/* Generated by Frama-C */
#include "stddef.h"
#include "stdio.h"
#include "stdlib.h"
int main(void)
{
  int __retres;
  int *p;
  int *q;
  __e_acsl_memory_init((int *)0,(char ***)0,(size_t)8);
  __e_acsl_store_block((void *)(& q),(size_t)8);
  __e_acsl_store_block((void *)(& p),(size_t)8);
  {
    int __gen_e_acsl_initialized;
    int __gen_e_acsl_and;
    __gen_e_acsl_initialized = __e_acsl_initialized((void *)(& p),
                                                    sizeof(int *));
    if (__gen_e_acsl_initialized) {
      int __gen_e_acsl_valid;
      __gen_e_acsl_valid = __e_acsl_valid((void *)p,sizeof(int),(void *)p,
                                          (void *)(& p));
      __gen_e_acsl_and = __gen_e_acsl_valid;
    }
    else __gen_e_acsl_and = 0;
    __e_acsl_assert(! __gen_e_acsl_and,"Assertion","main","!\\valid(p)",
                    "tests/temporal/t_malloc.c",11);
  }
  /*@ assert ¬\valid(p); */ ;
  {
    int __gen_e_acsl_initialized_2;
    int __gen_e_acsl_and_2;
    __gen_e_acsl_initialized_2 = __e_acsl_initialized((void *)(& q),
                                                      sizeof(int *));
    if (__gen_e_acsl_initialized_2) {
      int __gen_e_acsl_valid_2;
      __gen_e_acsl_valid_2 = __e_acsl_valid((void *)q,sizeof(int),(void *)q,
                                            (void *)(& q));
      __gen_e_acsl_and_2 = __gen_e_acsl_valid_2;
    }
    else __gen_e_acsl_and_2 = 0;
    __e_acsl_assert(! __gen_e_acsl_and_2,"Assertion","main","!\\valid(q)",
                    "tests/temporal/t_malloc.c",12);
  }
  /*@ assert ¬\valid(q); */ ;
  __e_acsl_full_init((void *)(& p));
  __e_acsl_temporal_reset_parameters();
  __e_acsl_temporal_reset_return();
  p = (int *)malloc(sizeof(int));
  __e_acsl_temporal_store_nblock((void *)(& p),(void *)*(& p));
  __e_acsl_full_init((void *)(& q));
  __e_acsl_temporal_store_nreferent((void *)(& q),(void *)(& p));
  q = p;
  {
    int __gen_e_acsl_initialized_3;
    int __gen_e_acsl_and_3;
    __gen_e_acsl_initialized_3 = __e_acsl_initialized((void *)(& p),
                                                      sizeof(int *));
    if (__gen_e_acsl_initialized_3) {
      int __gen_e_acsl_valid_3;
      __gen_e_acsl_valid_3 = __e_acsl_valid((void *)p,sizeof(int),(void *)p,
                                            (void *)(& p));
      __gen_e_acsl_and_3 = __gen_e_acsl_valid_3;
    }
    else __gen_e_acsl_and_3 = 0;
    __e_acsl_assert(__gen_e_acsl_and_3,"Assertion","main","\\valid(p)",
                    "tests/temporal/t_malloc.c",17);
  }
  /*@ assert \valid(p); */ ;
  {
    int __gen_e_acsl_initialized_4;
    int __gen_e_acsl_and_4;
    __gen_e_acsl_initialized_4 = __e_acsl_initialized((void *)(& q),
                                                      sizeof(int *));
    if (__gen_e_acsl_initialized_4) {
      int __gen_e_acsl_valid_4;
      __gen_e_acsl_valid_4 = __e_acsl_valid((void *)q,sizeof(int),(void *)q,
                                            (void *)(& q));
      __gen_e_acsl_and_4 = __gen_e_acsl_valid_4;
    }
    else __gen_e_acsl_and_4 = 0;
    __e_acsl_assert(__gen_e_acsl_and_4,"Assertion","main","\\valid(q)",
                    "tests/temporal/t_malloc.c",18);
  }
  /*@ assert \valid(q); */ ;
  __e_acsl_temporal_reset_parameters();
  __e_acsl_temporal_reset_return();
  __e_acsl_temporal_save_nreferent_parameter((void *)(& q),0U);
  free((void *)q);
  {
    int __gen_e_acsl_initialized_5;
    int __gen_e_acsl_and_5;
    __gen_e_acsl_initialized_5 = __e_acsl_initialized((void *)(& p),
                                                      sizeof(int *));
    if (__gen_e_acsl_initialized_5) {
      int __gen_e_acsl_valid_5;
      /*@ assert Eva: dangling_pointer: ¬\dangling(&p); */
      __gen_e_acsl_valid_5 = __e_acsl_valid((void *)p,sizeof(int),(void *)p,
                                            (void *)(& p));
      __gen_e_acsl_and_5 = __gen_e_acsl_valid_5;
    }
    else __gen_e_acsl_and_5 = 0;
    __e_acsl_assert(! __gen_e_acsl_and_5,"Assertion","main","!\\valid(p)",
                    "tests/temporal/t_malloc.c",22);
  }
  /*@ assert ¬\valid(p); */ ;
  {
    int __gen_e_acsl_initialized_6;
    int __gen_e_acsl_and_6;
    __gen_e_acsl_initialized_6 = __e_acsl_initialized((void *)(& q),
                                                      sizeof(int *));
    if (__gen_e_acsl_initialized_6) {
      int __gen_e_acsl_valid_6;
      __gen_e_acsl_valid_6 = __e_acsl_valid((void *)q,sizeof(int),(void *)q,
                                            (void *)(& q));
      __gen_e_acsl_and_6 = __gen_e_acsl_valid_6;
    }
    else __gen_e_acsl_and_6 = 0;
    __e_acsl_assert(! __gen_e_acsl_and_6,"Assertion","main","!\\valid(q)",
                    "tests/temporal/t_malloc.c",23);
  }
  /*@ assert ¬\valid(q); */ ;
  __e_acsl_full_init((void *)(& p));
  __e_acsl_temporal_reset_parameters();
  __e_acsl_temporal_reset_return();
  p = (int *)malloc(sizeof(int));
  __e_acsl_temporal_store_nblock((void *)(& p),(void *)*(& p));
  {
    int __gen_e_acsl_initialized_7;
    int __gen_e_acsl_and_7;
    __gen_e_acsl_initialized_7 = __e_acsl_initialized((void *)(& p),
                                                      sizeof(int *));
    if (__gen_e_acsl_initialized_7) {
      int __gen_e_acsl_valid_7;
      __gen_e_acsl_valid_7 = __e_acsl_valid((void *)p,sizeof(int),(void *)p,
                                            (void *)(& p));
      __gen_e_acsl_and_7 = __gen_e_acsl_valid_7;
    }
    else __gen_e_acsl_and_7 = 0;
    __e_acsl_assert(__gen_e_acsl_and_7,"Assertion","main","\\valid(p)",
                    "tests/temporal/t_malloc.c",28);
  }
  /*@ assert \valid(p); */ ;
  {
    int __gen_e_acsl_initialized_8;
    int __gen_e_acsl_and_8;
    __gen_e_acsl_initialized_8 = __e_acsl_initialized((void *)(& q),
                                                      sizeof(int *));
    if (__gen_e_acsl_initialized_8) {
      int __gen_e_acsl_valid_8;
      __gen_e_acsl_valid_8 = __e_acsl_valid((void *)q,sizeof(int),(void *)q,
                                            (void *)(& q));
      __gen_e_acsl_and_8 = __gen_e_acsl_valid_8;
    }
    else __gen_e_acsl_and_8 = 0;
    __e_acsl_assert(! __gen_e_acsl_and_8,"Assertion","main","!\\valid(q)",
                    "tests/temporal/t_malloc.c",29);
  }
  /*@ assert ¬\valid(q); */ ;
  __e_acsl_initialize((void *)q,sizeof(int));
  *q = 1;
  __e_acsl_initialize((void *)p,sizeof(int));
  *p = 2;
  __e_acsl_full_init((void *)(& q));
  __e_acsl_temporal_reset_parameters();
  __e_acsl_temporal_reset_return();
  q = (int *)calloc((unsigned long)4096,(unsigned long)1);
  __e_acsl_temporal_store_nblock((void *)(& q),(void *)*(& q));
  {
    int __gen_e_acsl_initialized_9;
    int __gen_e_acsl_and_9;
    __gen_e_acsl_initialized_9 = __e_acsl_initialized((void *)(& q),
                                                      sizeof(int *));
    if (__gen_e_acsl_initialized_9) {
      int __gen_e_acsl_valid_9;
      __gen_e_acsl_valid_9 = __e_acsl_valid((void *)q,sizeof(int),(void *)q,
                                            (void *)(& q));
      __gen_e_acsl_and_9 = __gen_e_acsl_valid_9;
    }
    else __gen_e_acsl_and_9 = 0;
    __e_acsl_assert(__gen_e_acsl_and_9,"Assertion","main","\\valid(q)",
                    "tests/temporal/t_malloc.c",35);
  }
  /*@ assert \valid(q); */ ;
  __e_acsl_full_init((void *)(& q));
  __e_acsl_temporal_reset_parameters();
  __e_acsl_temporal_reset_return();
  __e_acsl_temporal_save_nreferent_parameter((void *)(& q),0U);
  q = (int *)realloc((void *)q,(unsigned long)8192);
  __e_acsl_temporal_store_nblock((void *)(& q),(void *)*(& q));
  {
    int __gen_e_acsl_initialized_10;
    int __gen_e_acsl_and_10;
    __gen_e_acsl_initialized_10 = __e_acsl_initialized((void *)(& q),
                                                       sizeof(int *));
    if (__gen_e_acsl_initialized_10) {
      int __gen_e_acsl_valid_10;
      __gen_e_acsl_valid_10 = __e_acsl_valid((void *)q,sizeof(int),(void *)q,
                                             (void *)(& q));
      __gen_e_acsl_and_10 = __gen_e_acsl_valid_10;
    }
    else __gen_e_acsl_and_10 = 0;
    __e_acsl_assert(__gen_e_acsl_and_10,"Assertion","main","\\valid(q)",
                    "tests/temporal/t_malloc.c",39);
  }
  /*@ assert \valid(q); */ ;
  __retres = 0;
  __e_acsl_delete_block((void *)(& q));
  __e_acsl_delete_block((void *)(& p));
  __e_acsl_memory_clean();
  return __retres;
}


