/* 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;

int main(void)
{
  int __retres;
  __e_acsl_memory_init((int *)0,(char ***)0,8UL);
  int x = 1;
  __e_acsl_store_block((void *)(& x),4UL);
  __e_acsl_full_init((void *)(& x));
  int t[3] = {2, 3, 4};
  __e_acsl_store_block((void *)(t),12UL);
  __e_acsl_full_init((void *)(& t));
  int *p = & x;
  __e_acsl_store_block((void *)(& p),8UL);
  __e_acsl_full_init((void *)(& p));
  {
    int __gen_e_acsl_initialized;
    int __gen_e_acsl_and;
    __e_acsl_assert_data_t __gen_e_acsl_assert_data = {.values = (void *)0};
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data,"*p",0,*p);
    __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,"&p",
                                 (void *)(& p));
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_2,
                                   "sizeof(int *)",0,sizeof(int *));
    __gen_e_acsl_initialized = __e_acsl_initialized((void *)(& p),
                                                    sizeof(int *));
    if (__gen_e_acsl_initialized) {
      int __gen_e_acsl_valid_read;
      __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data_2,"p",
                                   (void *)p);
      __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_2,
                                     "sizeof(int)",0,sizeof(int));
      __gen_e_acsl_valid_read = __e_acsl_valid_read((void *)p,sizeof(int),
                                                    (void *)p,(void *)(& p));
      __gen_e_acsl_and = __gen_e_acsl_valid_read;
    }
    else __gen_e_acsl_and = 0;
    __gen_e_acsl_assert_data_2.blocking = 1;
    __gen_e_acsl_assert_data_2.kind = "RTE";
    __gen_e_acsl_assert_data_2.pred_txt = "\\valid_read(p)";
    __gen_e_acsl_assert_data_2.file = "ptr.i";
    __gen_e_acsl_assert_data_2.fct = "main";
    __gen_e_acsl_assert_data_2.line = 12;
    __gen_e_acsl_assert_data_2.name = "mem_access";
    __e_acsl_assert(__gen_e_acsl_and,& __gen_e_acsl_assert_data_2);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data_2);
    __gen_e_acsl_assert_data.blocking = 1;
    __gen_e_acsl_assert_data.kind = "Assertion";
    __gen_e_acsl_assert_data.pred_txt = "*p == 1";
    __gen_e_acsl_assert_data.file = "ptr.i";
    __gen_e_acsl_assert_data.fct = "main";
    __gen_e_acsl_assert_data.line = 12;
    __e_acsl_assert(*p == 1,& __gen_e_acsl_assert_data);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data);
  }
  /*@ assert *p == 1; */ ;
  {
    __e_acsl_assert_data_t __gen_e_acsl_assert_data_3 =
      {.values = (void *)0};
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_3,"t[0]",0,t[0]);
    __gen_e_acsl_assert_data_3.blocking = 1;
    __gen_e_acsl_assert_data_3.kind = "Assertion";
    __gen_e_acsl_assert_data_3.pred_txt = "t[0] == 2";
    __gen_e_acsl_assert_data_3.file = "ptr.i";
    __gen_e_acsl_assert_data_3.fct = "main";
    __gen_e_acsl_assert_data_3.line = 13;
    __e_acsl_assert(t[0] == 2,& __gen_e_acsl_assert_data_3);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data_3);
  }
  /*@ assert t[0] == 2; */ ;
  {
    __e_acsl_assert_data_t __gen_e_acsl_assert_data_4 =
      {.values = (void *)0};
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_4,"t[2]",0,t[2]);
    __gen_e_acsl_assert_data_4.blocking = 1;
    __gen_e_acsl_assert_data_4.kind = "Assertion";
    __gen_e_acsl_assert_data_4.pred_txt = "t[2] == 4";
    __gen_e_acsl_assert_data_4.file = "ptr.i";
    __gen_e_acsl_assert_data_4.fct = "main";
    __gen_e_acsl_assert_data_4.line = 14;
    __e_acsl_assert(t[2] == 4,& __gen_e_acsl_assert_data_4);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data_4);
  }
  /*@ assert t[2] == 4; */ ;
  {
    __e_acsl_assert_data_t __gen_e_acsl_assert_data_5 =
      {.values = (void *)0};
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_5,
                                 "t[(2 * sizeof(int)) / sizeof((int)0x0)]",0,
                                 t[(2 * 4) / 4]);
    __gen_e_acsl_assert_data_5.blocking = 1;
    __gen_e_acsl_assert_data_5.kind = "Assertion";
    __gen_e_acsl_assert_data_5.pred_txt = "t[(2 * sizeof(int)) / sizeof((int)0x0)] == 4";
    __gen_e_acsl_assert_data_5.file = "ptr.i";
    __gen_e_acsl_assert_data_5.fct = "main";
    __gen_e_acsl_assert_data_5.line = 15;
    __e_acsl_assert(t[2] == 4,& __gen_e_acsl_assert_data_5);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data_5);
  }
  /*@ assert t[(2 * sizeof(int)) / sizeof((int)0x0)] == 4; */ ;
  {
    int i = 0;
    while (i < 2) {
      {
        __e_acsl_assert_data_t __gen_e_acsl_assert_data_6 =
          {.values = (void *)0};
        __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_6,"t[i]",0,
                                     t[i]);
        __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_6,"i",0,i);
        __e_acsl_assert_data_t __gen_e_acsl_assert_data_7 =
          {.values = (void *)0};
        __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_7,"i",0,i);
        __gen_e_acsl_assert_data_7.blocking = 1;
        __gen_e_acsl_assert_data_7.kind = "RTE";
        __gen_e_acsl_assert_data_7.pred_txt = "i < 3";
        __gen_e_acsl_assert_data_7.file = "ptr.i";
        __gen_e_acsl_assert_data_7.fct = "main";
        __gen_e_acsl_assert_data_7.line = 18;
        __gen_e_acsl_assert_data_7.name = "index_bound";
        __e_acsl_assert(i < 3,& __gen_e_acsl_assert_data_7);
        __e_acsl_assert_clean(& __gen_e_acsl_assert_data_7);
        __e_acsl_assert_data_t __gen_e_acsl_assert_data_8 =
          {.values = (void *)0};
        __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_8,"i",0,i);
        __gen_e_acsl_assert_data_8.blocking = 1;
        __gen_e_acsl_assert_data_8.kind = "RTE";
        __gen_e_acsl_assert_data_8.pred_txt = "0 <= i";
        __gen_e_acsl_assert_data_8.file = "ptr.i";
        __gen_e_acsl_assert_data_8.fct = "main";
        __gen_e_acsl_assert_data_8.line = 18;
        __gen_e_acsl_assert_data_8.name = "index_bound";
        __e_acsl_assert(0 <= i,& __gen_e_acsl_assert_data_8);
        __e_acsl_assert_clean(& __gen_e_acsl_assert_data_8);
        __gen_e_acsl_assert_data_6.blocking = 1;
        __gen_e_acsl_assert_data_6.kind = "Assertion";
        __gen_e_acsl_assert_data_6.pred_txt = "t[i] == i + 2";
        __gen_e_acsl_assert_data_6.file = "ptr.i";
        __gen_e_acsl_assert_data_6.fct = "main";
        __gen_e_acsl_assert_data_6.line = 18;
        __e_acsl_assert((long)t[i] == i + 2L,& __gen_e_acsl_assert_data_6);
        __e_acsl_assert_clean(& __gen_e_acsl_assert_data_6);
      }
      /*@ assert t[i] == i + 2; */ ;
      {
        __e_acsl_assert_data_t __gen_e_acsl_assert_data_9 =
          {.values = (void *)0};
        __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_9,"t[2 - i]",
                                     0,t[2L - i]);
        __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_9,"i",0,i);
        __e_acsl_assert_data_t __gen_e_acsl_assert_data_10 =
          {.values = (void *)0};
        __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_10,"i",0,i);
        __gen_e_acsl_assert_data_10.blocking = 1;
        __gen_e_acsl_assert_data_10.kind = "RTE";
        __gen_e_acsl_assert_data_10.pred_txt = "(long)(2 - i) < 3";
        __gen_e_acsl_assert_data_10.file = "ptr.i";
        __gen_e_acsl_assert_data_10.fct = "main";
        __gen_e_acsl_assert_data_10.line = 19;
        __gen_e_acsl_assert_data_10.name = "index_bound";
        __e_acsl_assert(2L - i < 3L,& __gen_e_acsl_assert_data_10);
        __e_acsl_assert_clean(& __gen_e_acsl_assert_data_10);
        __e_acsl_assert_data_t __gen_e_acsl_assert_data_11 =
          {.values = (void *)0};
        __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_11,"i",0,i);
        __gen_e_acsl_assert_data_11.blocking = 1;
        __gen_e_acsl_assert_data_11.kind = "RTE";
        __gen_e_acsl_assert_data_11.pred_txt = "0 <= (long)(2 - i)";
        __gen_e_acsl_assert_data_11.file = "ptr.i";
        __gen_e_acsl_assert_data_11.fct = "main";
        __gen_e_acsl_assert_data_11.line = 19;
        __gen_e_acsl_assert_data_11.name = "index_bound";
        __e_acsl_assert(0L <= 2L - i,& __gen_e_acsl_assert_data_11);
        __e_acsl_assert_clean(& __gen_e_acsl_assert_data_11);
        __gen_e_acsl_assert_data_9.blocking = 1;
        __gen_e_acsl_assert_data_9.kind = "Assertion";
        __gen_e_acsl_assert_data_9.pred_txt = "t[2 - i] == 4 - i";
        __gen_e_acsl_assert_data_9.file = "ptr.i";
        __gen_e_acsl_assert_data_9.fct = "main";
        __gen_e_acsl_assert_data_9.line = 19;
        __e_acsl_assert((long)t[2L - i] == 4L - i,
                        & __gen_e_acsl_assert_data_9);
        __e_acsl_assert_clean(& __gen_e_acsl_assert_data_9);
      }
      /*@ assert t[2 - i] == 4 - i; */ ;
      {
        int __gen_e_acsl_valid_read_2;
        __e_acsl_assert_data_t __gen_e_acsl_assert_data_12 =
          {.values = (void *)0};
        __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_12,
                                     "*(&t[2] - i)",0,*(& t[2] - i));
        __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_12,"i",0,i);
        __e_acsl_assert_data_t __gen_e_acsl_assert_data_13 =
          {.values = (void *)0};
        __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data_13,"&t[2]",
                                     (void *)(& t[2]));
        __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_13,"i",0,i);
        __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_13,
                                       "sizeof(int)",0,sizeof(int));
        __gen_e_acsl_valid_read_2 = __e_acsl_valid_read((void *)(& t[2] - i),
                                                        sizeof(int),
                                                        (void *)(t),
                                                        (void *)0);
        __gen_e_acsl_assert_data_13.blocking = 1;
        __gen_e_acsl_assert_data_13.kind = "RTE";
        __gen_e_acsl_assert_data_13.pred_txt = "\\valid_read(&t[2] - i)";
        __gen_e_acsl_assert_data_13.file = "ptr.i";
        __gen_e_acsl_assert_data_13.fct = "main";
        __gen_e_acsl_assert_data_13.line = 20;
        __gen_e_acsl_assert_data_13.name = "mem_access";
        __e_acsl_assert(__gen_e_acsl_valid_read_2,
                        & __gen_e_acsl_assert_data_13);
        __e_acsl_assert_clean(& __gen_e_acsl_assert_data_13);
        __gen_e_acsl_assert_data_12.blocking = 1;
        __gen_e_acsl_assert_data_12.kind = "Assertion";
        __gen_e_acsl_assert_data_12.pred_txt = "*(&t[2] - i) == 4 - i";
        __gen_e_acsl_assert_data_12.file = "ptr.i";
        __gen_e_acsl_assert_data_12.fct = "main";
        __gen_e_acsl_assert_data_12.line = 20;
        __e_acsl_assert((long)*(& t[2] - i) == 4L - i,
                        & __gen_e_acsl_assert_data_12);
        __e_acsl_assert_clean(& __gen_e_acsl_assert_data_12);
      }
      /*@ assert *(&t[2] - i) == 4 - i; */ ;
      i ++;
    }
  }
  __e_acsl_full_init((void *)(& p));
  p = & t[2];
  __e_acsl_initialize((void *)(& t[2]),sizeof(int));
  t[2] = 5;
  {
    int __gen_e_acsl_initialized_2;
    int __gen_e_acsl_and_2;
    __e_acsl_assert_data_t __gen_e_acsl_assert_data_14 =
      {.values = (void *)0};
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_14,"*p",0,*p);
    __e_acsl_assert_data_t __gen_e_acsl_assert_data_15 =
      {.values = (void *)0};
    __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data_15,"&p",
                                 (void *)(& p));
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_15,
                                   "sizeof(int *)",0,sizeof(int *));
    __gen_e_acsl_initialized_2 = __e_acsl_initialized((void *)(& p),
                                                      sizeof(int *));
    if (__gen_e_acsl_initialized_2) {
      int __gen_e_acsl_valid_read_3;
      __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data_15,"p",
                                   (void *)p);
      __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_15,
                                     "sizeof(int)",0,sizeof(int));
      __gen_e_acsl_valid_read_3 = __e_acsl_valid_read((void *)p,sizeof(int),
                                                      (void *)p,
                                                      (void *)(& p));
      __gen_e_acsl_and_2 = __gen_e_acsl_valid_read_3;
    }
    else __gen_e_acsl_and_2 = 0;
    __gen_e_acsl_assert_data_15.blocking = 1;
    __gen_e_acsl_assert_data_15.kind = "RTE";
    __gen_e_acsl_assert_data_15.pred_txt = "\\valid_read(p)";
    __gen_e_acsl_assert_data_15.file = "ptr.i";
    __gen_e_acsl_assert_data_15.fct = "main";
    __gen_e_acsl_assert_data_15.line = 26;
    __gen_e_acsl_assert_data_15.name = "mem_access";
    __e_acsl_assert(__gen_e_acsl_and_2,& __gen_e_acsl_assert_data_15);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data_15);
    __gen_e_acsl_assert_data_14.blocking = 1;
    __gen_e_acsl_assert_data_14.kind = "Assertion";
    __gen_e_acsl_assert_data_14.pred_txt = "*p == 5";
    __gen_e_acsl_assert_data_14.file = "ptr.i";
    __gen_e_acsl_assert_data_14.fct = "main";
    __gen_e_acsl_assert_data_14.line = 26;
    __e_acsl_assert(*p == 5,& __gen_e_acsl_assert_data_14);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data_14);
  }
  /*@ assert *p == 5; */ ;
  int k = -1;
  {
    int __gen_e_acsl_valid_read_4;
    __e_acsl_assert_data_t __gen_e_acsl_assert_data_16 =
      {.values = (void *)0};
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_16,"*(p + k)",0,
                                 *(p + k));
    __e_acsl_assert_data_t __gen_e_acsl_assert_data_17 =
      {.values = (void *)0};
    __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data_17,"p",(void *)p);
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_17,"k",0,k);
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_17,
                                   "sizeof(int)",0,sizeof(int));
    __gen_e_acsl_valid_read_4 = __e_acsl_valid_read((void *)(p + k),
                                                    sizeof(int),(void *)p,
                                                    (void *)(& p));
    __gen_e_acsl_assert_data_17.blocking = 1;
    __gen_e_acsl_assert_data_17.kind = "RTE";
    __gen_e_acsl_assert_data_17.pred_txt = "\\valid_read(p + k)";
    __gen_e_acsl_assert_data_17.file = "ptr.i";
    __gen_e_acsl_assert_data_17.fct = "main";
    __gen_e_acsl_assert_data_17.line = 28;
    __gen_e_acsl_assert_data_17.name = "mem_access";
    __e_acsl_assert(__gen_e_acsl_valid_read_4,& __gen_e_acsl_assert_data_17);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data_17);
    __gen_e_acsl_assert_data_16.blocking = 1;
    __gen_e_acsl_assert_data_16.kind = "Assertion";
    __gen_e_acsl_assert_data_16.pred_txt = "*(p + k) == 3";
    __gen_e_acsl_assert_data_16.file = "ptr.i";
    __gen_e_acsl_assert_data_16.fct = "main";
    __gen_e_acsl_assert_data_16.line = 28;
    __e_acsl_assert(*(p + k) == 3,& __gen_e_acsl_assert_data_16);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data_16);
  }
  /*@ assert *(p + k) == 3; */ ;
  __retres = 0;
  __e_acsl_delete_block((void *)(& p));
  __e_acsl_delete_block((void *)(t));
  __e_acsl_delete_block((void *)(& x));
  __e_acsl_memory_clean();
  return __retres;
}


