/* Generated by Frama-C */
#include "pthread.h"
#include "sched.h"
#include "signal.h"
#include "stddef.h"
#include "stdint.h"
#include "stdio.h"
#include "time.h"
extern  __attribute__((__FC_BUILTIN__)) 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;
  __e_acsl_memory_init((int *)0,(char ***)0,8UL);
  __gen_e_acsl_f(1);
  __gen_e_acsl_g(Y);
  __gen_e_acsl_h();
  __retres = 0;
  __e_acsl_memory_clean();
  return __retres;
}

/*@ ensures \result == 0; */
int __gen_e_acsl_h(void)
{
  int __retres;
  __retres = h();
  {
    __e_acsl_assert_data_t __gen_e_acsl_assert_data = {.values = (void *)0};
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data,"\\result",0,
                                 __retres);
    __gen_e_acsl_assert_data.blocking = 1;
    __gen_e_acsl_assert_data.kind = "Postcondition";
    __gen_e_acsl_assert_data.pred_txt = "\\result == 0";
    __gen_e_acsl_assert_data.file = "result.i";
    __gen_e_acsl_assert_data.fct = "h";
    __gen_e_acsl_assert_data.line = 19;
    __e_acsl_assert(__retres == 0,& __gen_e_acsl_assert_data);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data);
    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_data_t __gen_e_acsl_assert_data = {.values = (void *)0};
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data,"\\result",0,
                                 __retres);
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data,"\\old(x)",0,
                                 __gen_e_acsl_at);
    __gen_e_acsl_assert_data.blocking = 1;
    __gen_e_acsl_assert_data.kind = "Postcondition";
    __gen_e_acsl_assert_data.pred_txt = "\\result == \\old(x)";
    __gen_e_acsl_assert_data.file = "result.i";
    __gen_e_acsl_assert_data.fct = "g";
    __gen_e_acsl_assert_data.line = 13;
    __e_acsl_assert(__retres == __gen_e_acsl_at,& __gen_e_acsl_assert_data);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data);
    __e_acsl_assert_data_t __gen_e_acsl_assert_data_2 =
      {.values = (void *)0};
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_2,"\\result",0,
                                 __retres);
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_2,"Y",0,Y);
    __gen_e_acsl_assert_data_2.blocking = 1;
    __gen_e_acsl_assert_data_2.kind = "Postcondition";
    __gen_e_acsl_assert_data_2.pred_txt = "\\result == Y";
    __gen_e_acsl_assert_data_2.file = "result.i";
    __gen_e_acsl_assert_data_2.fct = "g";
    __gen_e_acsl_assert_data_2.line = 14;
    __e_acsl_assert(__retres == Y,& __gen_e_acsl_assert_data_2);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data_2);
    return __retres;
  }
}

/*@ ensures \result == (int)(\old(x) - \old(x)); */
int __gen_e_acsl_f(int x)
{
  long __gen_e_acsl_at;
  int __retres;
  __gen_e_acsl_at = (long)x;
  __retres = f(x);
  {
    __e_acsl_assert_data_t __gen_e_acsl_assert_data = {.values = (void *)0};
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data,"\\result",0,
                                 __retres);
    __e_acsl_assert_register_long(& __gen_e_acsl_assert_data,"\\old(x)",0,
                                  __gen_e_acsl_at);
    __e_acsl_assert_register_long(& __gen_e_acsl_assert_data,"\\old(x)",0,
                                  __gen_e_acsl_at);
    __gen_e_acsl_assert_data.blocking = 1;
    __gen_e_acsl_assert_data.kind = "Postcondition";
    __gen_e_acsl_assert_data.pred_txt = "\\result == (int)(\\old(x) - \\old(x))";
    __gen_e_acsl_assert_data.file = "result.i";
    __gen_e_acsl_assert_data.fct = "f";
    __gen_e_acsl_assert_data.line = 5;
    __e_acsl_assert(__retres == (int)(__gen_e_acsl_at - __gen_e_acsl_at),
                    & __gen_e_acsl_assert_data);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data);
    return __retres;
  }
}


