/* Generated by Frama-C */
#include "stddef.h"
#include "stdio.h"
extern int __e_acsl_sound_verdict;

/*@ ensures \result ≡ (int)(\old(x) - \old(x)); */
int __gen_e_acsl_f(int x);

int f(int x)
{
  x = 0;
  return x;
}

int Y = 1;
/*@ ensures \result ≡ \old(x);
    ensures \result ≡ Y; */
int __gen_e_acsl_g(int x);

int g(int x)
{
  return x;
}

/*@ ensures \result ≡ 0; */
int __gen_e_acsl_h(void);

int h(void)
{
  int __retres;
  __retres = 0;
  return __retres;
}

int main(void)
{
  int __retres;
  __gen_e_acsl_f(1);
  __gen_e_acsl_g(Y);
  __gen_e_acsl_h();
  __retres = 0;
  return __retres;
}

/*@ ensures \result ≡ 0; */
int __gen_e_acsl_h(void)
{
  int __retres;
  __retres = h();
  __e_acsl_assert(__retres == 0,"Postcondition","h","\\result == 0",
                  "tests/constructs/result.i",18);
  return __retres;
}

/*@ ensures \result ≡ \old(x);
    ensures \result ≡ Y; */
int __gen_e_acsl_g(int x)
{
  int __gen_e_acsl_at;
  int __retres;
  __gen_e_acsl_at = x;
  __retres = g(x);
  __e_acsl_assert(__retres == __gen_e_acsl_at,"Postcondition","g",
                  "\\result == \\old(x)","tests/constructs/result.i",12);
  __e_acsl_assert(__retres == Y,"Postcondition","g","\\result == Y",
                  "tests/constructs/result.i",13);
  return __retres;
}

/*@ ensures \result ≡ (int)(\old(x) - \old(x)); */
int __gen_e_acsl_f(int x)
{
  int __gen_e_acsl_at_2;
  long __gen_e_acsl_at;
  int __retres;
  __gen_e_acsl_at_2 = x;
  __gen_e_acsl_at = (long)x;
  __retres = f(x);
  __e_acsl_assert(__retres == (int)(__gen_e_acsl_at - __gen_e_acsl_at_2),
                  "Postcondition","f",
                  "\\result == (int)(\\old(x) - \\old(x))",
                  "tests/constructs/result.i",5);
  return __retres;
}


