/* Generated by Frama-C */
#include "stddef.h"
#include "stdio.h"
#include "stdlib.h"
char array[1024];
void __e_acsl_globals_init(void)
{
  static char __e_acsl_already_run = 0;
  if (! __e_acsl_already_run) {
    __e_acsl_already_run = 1;
    __e_acsl_store_block((void *)(array),(size_t)1024);
    __e_acsl_full_init((void *)(& array));
  }
  return;
}

void __e_acsl_globals_clean(void)
{
  __e_acsl_delete_block((void *)(array));
}

int main(void)
{
  int __retres;
  int *p;
  __e_acsl_memory_init((int *)0,(char ***)0,(size_t)8);
  __e_acsl_globals_init();
  __e_acsl_store_block((void *)(& p),(size_t)8);
  {
    int __gen_e_acsl_freeable;
    /*@ assert Eva: initialization: \initialized(&p); */
    __gen_e_acsl_freeable = __e_acsl_freeable((void *)p);
    __e_acsl_assert(! __gen_e_acsl_freeable,"Assertion","main",
                    "!\\freeable(p)","tests/memory/freeable.c",14);
  }
  /*@ assert ¬\freeable(p); */ ;
  {
    int __gen_e_acsl_freeable_2;
    __gen_e_acsl_freeable_2 = __e_acsl_freeable((void *)0);
    __e_acsl_assert(! __gen_e_acsl_freeable_2,"Assertion","main",
                    "!\\freeable((void *)0)","tests/memory/freeable.c",15);
  }
  /*@ assert ¬\freeable((void *)0); */ ;
  __e_acsl_full_init((void *)(& p));
  p = (int *)malloc((unsigned long)4 * sizeof(int));
  {
    int __gen_e_acsl_freeable_3;
    __gen_e_acsl_freeable_3 = __e_acsl_freeable((void *)(p + 1));
    __e_acsl_assert(! __gen_e_acsl_freeable_3,"Assertion","main",
                    "!\\freeable(p + 1)","tests/memory/freeable.c",17);
  }
  /*@ assert ¬\freeable(p + 1); */ ;
  {
    int __gen_e_acsl_freeable_4;
    __gen_e_acsl_freeable_4 = __e_acsl_freeable((void *)p);
    __e_acsl_assert(__gen_e_acsl_freeable_4,"Assertion","main",
                    "\\freeable(p)","tests/memory/freeable.c",18);
  }
  /*@ assert \freeable(p); */ ;
  free((void *)p);
  {
    int __gen_e_acsl_freeable_5;
    __gen_e_acsl_freeable_5 = __e_acsl_freeable((void *)p);
    __e_acsl_assert(! __gen_e_acsl_freeable_5,"Assertion","main",
                    "!\\freeable(p)","tests/memory/freeable.c",20);
  }
  /*@ assert ¬\freeable(p); */ ;
  {
    int __gen_e_acsl_freeable_6;
    __gen_e_acsl_freeable_6 = __e_acsl_freeable((void *)(array));
    __e_acsl_assert(! __gen_e_acsl_freeable_6,"Assertion","main",
                    "!\\freeable((char *)array)","tests/memory/freeable.c",
                    23);
  }
  /*@ assert ¬\freeable((char *)array); */ ;
  {
    int __gen_e_acsl_freeable_7;
    __gen_e_acsl_freeable_7 = __e_acsl_freeable((void *)(& array[5]));
    __e_acsl_assert(! __gen_e_acsl_freeable_7,"Assertion","main",
                    "!\\freeable(&array[5])","tests/memory/freeable.c",24);
  }
  /*@ assert ¬\freeable(&array[5]); */ ;
  __retres = 0;
  __e_acsl_delete_block((void *)(& p));
  __e_acsl_globals_clean();
  __e_acsl_memory_clean();
  return __retres;
}


