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

/*@ ensures \valid(\result); */
int *__gen_e_acsl_f(int *x, int *y);

int *f(int *x, int *y)
{
  __e_acsl_store_block((void *)(& y),8UL);
  __e_acsl_store_block((void *)(& x),8UL);
  __e_acsl_initialize((void *)y,sizeof(int));
  *y = 1;
  __e_acsl_delete_block((void *)(& y));
  __e_acsl_delete_block((void *)(& x));
  return x;
}

int main(void)
{
  int __retres;
  int *p;
  __e_acsl_memory_init((int *)0,(char ***)0,8UL);
  __e_acsl_store_block((void *)(& p),8UL);
  int x = 0;
  __e_acsl_store_block((void *)(& x),4UL);
  __e_acsl_full_init((void *)(& x));
  int *q = malloc(sizeof(int));
  __e_acsl_store_block((void *)(& q),8UL);
  __e_acsl_full_init((void *)(& q));
  int *r = malloc(sizeof(int));
  __e_acsl_full_init((void *)(& p));
  p = __gen_e_acsl_f(& x,q);
  __e_acsl_full_init((void *)(& q));
  q = __gen_e_acsl_f(& x,r);
  __retres = 0;
  __e_acsl_delete_block((void *)(& q));
  __e_acsl_delete_block((void *)(& p));
  __e_acsl_delete_block((void *)(& x));
  __e_acsl_memory_clean();
  return __retres;
}

/*@ ensures \valid(\result); */
int *__gen_e_acsl_f(int *x, int *y)
{
  int *__retres;
  __e_acsl_store_block((void *)(& __retres),8UL);
  __e_acsl_store_block((void *)(& y),8UL);
  __e_acsl_store_block((void *)(& x),8UL);
  __retres = f(x,y);
  {
    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,"\\result",
                                 (void *)__retres);
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data,"sizeof(int)",
                                   0,sizeof(int));
    __gen_e_acsl_valid = __e_acsl_valid((void *)__retres,sizeof(int),
                                        (void *)__retres,
                                        (void *)(& __retres));
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data,
                                 "\\valid(\\result)",0,__gen_e_acsl_valid);
    __gen_e_acsl_assert_data.blocking = 1;
    __gen_e_acsl_assert_data.kind = "Postcondition";
    __gen_e_acsl_assert_data.pred_txt = "\\valid(\\result)";
    __gen_e_acsl_assert_data.file = "call.c";
    __gen_e_acsl_assert_data.fct = "f";
    __gen_e_acsl_assert_data.line = 7;
    __e_acsl_assert(__gen_e_acsl_valid,& __gen_e_acsl_assert_data);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data);
    __e_acsl_delete_block((void *)(& y));
    __e_acsl_delete_block((void *)(& x));
    __e_acsl_delete_block((void *)(& __retres));
    return __retres;
  }
}


