/* Generated by Frama-C */
#include "pthread.h"
#include "sched.h"
#include "signal.h"
#include "stdarg.h"
#include "stddef.h"
#include "stdint.h"
#include "stdio.h"
#include "time.h"
extern  __attribute__((__FC_BUILTIN__)) int __e_acsl_sound_verdict;

int __gen_e_acsl_uninstrument1(int *p);

int uninstrument1(int *p)
{
  int __retres;
  *p = 0;
  __retres = 0;
  return __retres;
}

/*@ requires \valid(p); */
int __gen_e_acsl_uninstrument2(int *p);

int uninstrument2(int *p)
{
  int __retres;
  {
    int *q = p;
    *p = 0;
    goto L;
  }
  L: __retres = 0;
  return __retres;
}

int instrument1(int *p)
{
  int __retres;
  __e_acsl_store_block((void *)(& p),8UL);
  __e_acsl_initialize((void *)p,sizeof(int));
  *p = 0;
  __retres = 0;
  __e_acsl_delete_block((void *)(& p));
  return __retres;
}

/*@ requires \valid(p); */
int __gen_e_acsl_instrument2(int *p);

int instrument2(int *p)
{
  int __retres;
  __e_acsl_store_block((void *)(& p),8UL);
  {
    int *q = p;
    __e_acsl_store_block((void *)(& q),8UL);
    __e_acsl_full_init((void *)(& q));
    __e_acsl_initialize((void *)p,sizeof(int));
    *p = 0;
    __e_acsl_delete_block((void *)(& q));
    goto L;
    __e_acsl_delete_block((void *)(& q));
  }
  L: __retres = 0;
  __e_acsl_delete_block((void *)(& p));
  return __retres;
}

int vol(int n, void * const *__va_params)
{
  int __retres;
  va_list vl;
  int tmp;
  __e_acsl_store_block((void *)(& vl),8UL);
  __e_acsl_store_block((void *)(& __va_params),8UL);
  __e_acsl_full_init((void *)(& vl));
  vl = __va_params;
  tmp = *((int *)*vl);
  __e_acsl_full_init((void *)(& vl));
  vl ++;
  int r = tmp;
  __retres = 0;
  __e_acsl_delete_block((void *)(& __va_params));
  __e_acsl_delete_block((void *)(& vl));
  return __retres;
}

int main(void)
{
  int x;
  int tmp;
  __e_acsl_memory_init((int *)0,(char ***)0,8UL);
  __e_acsl_store_block((void *)(& x),4UL);
  int y = 0;
  __e_acsl_store_block((void *)(& y),4UL);
  __e_acsl_full_init((void *)(& y));
  instrument1(& x);
  __gen_e_acsl_uninstrument1(& x);
  __gen_e_acsl_instrument2(& x);
  __gen_e_acsl_uninstrument2(& x);
  {
    int __gen_e_acsl_initialized;
    __e_acsl_assert_data_t __gen_e_acsl_assert_data = {.values = (void *)0};
    __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data,"&x",
                                 (void *)(& x));
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data,"sizeof(int)",
                                   0,sizeof(int));
    __gen_e_acsl_initialized = __e_acsl_initialized((void *)(& x),
                                                    sizeof(int));
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data,
                                 "\\initialized(&x)",0,
                                 __gen_e_acsl_initialized);
    __gen_e_acsl_assert_data.blocking = 1;
    __gen_e_acsl_assert_data.kind = "Assertion";
    __gen_e_acsl_assert_data.pred_txt = "\\initialized(&x)";
    __gen_e_acsl_assert_data.file = "e-acsl-instrument.c";
    __gen_e_acsl_assert_data.fct = "main";
    __gen_e_acsl_assert_data.line = 61;
    __e_acsl_assert(__gen_e_acsl_initialized,& __gen_e_acsl_assert_data);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data);
  }
  /*@ assert \initialized(&x); */ ;
  {
    int __gen_e_acsl_initialized_2;
    __e_acsl_assert_data_t __gen_e_acsl_assert_data_2 =
      {.values = (void *)0};
    __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data_2,"&y",
                                 (void *)(& y));
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_2,
                                   "sizeof(int)",0,sizeof(int));
    __gen_e_acsl_initialized_2 = __e_acsl_initialized((void *)(& y),
                                                      sizeof(int));
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_2,
                                 "\\initialized(&y)",0,
                                 __gen_e_acsl_initialized_2);
    __gen_e_acsl_assert_data_2.blocking = 1;
    __gen_e_acsl_assert_data_2.kind = "Assertion";
    __gen_e_acsl_assert_data_2.pred_txt = "\\initialized(&y)";
    __gen_e_acsl_assert_data_2.file = "e-acsl-instrument.c";
    __gen_e_acsl_assert_data_2.fct = "main";
    __gen_e_acsl_assert_data_2.line = 62;
    __e_acsl_assert(__gen_e_acsl_initialized_2,& __gen_e_acsl_assert_data_2);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data_2);
  }
  /*@ assert \initialized(&y); */ ;
  {
    int __va_arg0 = 1;
    __e_acsl_store_block((void *)(& __va_arg0),4UL);
    __e_acsl_full_init((void *)(& __va_arg0));
    void *__va_args[1] = {& __va_arg0};
    __e_acsl_store_block((void *)(__va_args),8UL);
    __e_acsl_full_init((void *)(& __va_args));
    tmp = vol(6,(void * const *)(__va_args));
    __e_acsl_delete_block((void *)(__va_args));
    __e_acsl_delete_block((void *)(& __va_arg0));
  }
  __e_acsl_delete_block((void *)(& y));
  __e_acsl_delete_block((void *)(& x));
  __e_acsl_memory_clean();
  return tmp;
}

/*@ requires \valid(p); */
int __gen_e_acsl_instrument2(int *p)
{
  int __retres;
  {
    int __gen_e_acsl_valid;
    __e_acsl_store_block((void *)(& p),8UL);
    __e_acsl_assert_data_t __gen_e_acsl_assert_data = {.values = (void *)0};
    __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data,"p",(void *)p);
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data,"sizeof(int)",
                                   0,sizeof(int));
    __gen_e_acsl_valid = __e_acsl_valid((void *)p,sizeof(int),(void *)p,
                                        (void *)(& p));
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data,"\\valid(p)",0,
                                 __gen_e_acsl_valid);
    __gen_e_acsl_assert_data.blocking = 1;
    __gen_e_acsl_assert_data.kind = "Precondition";
    __gen_e_acsl_assert_data.pred_txt = "\\valid(p)";
    __gen_e_acsl_assert_data.file = "e-acsl-instrument.c";
    __gen_e_acsl_assert_data.fct = "instrument2";
    __gen_e_acsl_assert_data.line = 33;
    __e_acsl_assert(__gen_e_acsl_valid,& __gen_e_acsl_assert_data);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data);
  }
  __retres = instrument2(p);
  __e_acsl_delete_block((void *)(& p));
  return __retres;
}

/*@ requires \valid(p); */
int __gen_e_acsl_uninstrument2(int *p)
{
  int __retres;
  {
    int __gen_e_acsl_valid;
    __e_acsl_assert_data_t __gen_e_acsl_assert_data = {.values = (void *)0};
    __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data,"p",(void *)p);
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data,"sizeof(int)",
                                   0,sizeof(int));
    __gen_e_acsl_valid = __e_acsl_valid((void *)p,sizeof(int),(void *)p,
                                        (void *)(& p));
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data,"\\valid(p)",0,
                                 __gen_e_acsl_valid);
    __gen_e_acsl_assert_data.blocking = 1;
    __gen_e_acsl_assert_data.kind = "Precondition";
    __gen_e_acsl_assert_data.pred_txt = "\\valid(p)";
    __gen_e_acsl_assert_data.file = "e-acsl-instrument.c";
    __gen_e_acsl_assert_data.fct = "uninstrument2";
    __gen_e_acsl_assert_data.line = 17;
    __e_acsl_assert(__gen_e_acsl_valid,& __gen_e_acsl_assert_data);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data);
  }
  __e_acsl_sound_verdict = 0;
  __retres = uninstrument2(p);
  return __retres;
}

int __gen_e_acsl_uninstrument1(int *p)
{
  int __retres;
  __e_acsl_sound_verdict = 0;
  __retres = uninstrument1(p);
  return __retres;
}


