/* Generated by Frama-C */
#include "stddef.h"
#include "stdio.h"
#include "stdlib.h"
int A[4] = {1, 2, 3, 4};
int *PA;
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 *)(& PA),(size_t)8);
    __e_acsl_full_init((void *)(& PA));
    __e_acsl_store_block((void *)(A),(size_t)16);
    __e_acsl_full_init((void *)(& A));
  }
  return;
}

void __e_acsl_globals_clean(void)
{
  __e_acsl_delete_block((void *)(& PA));
  __e_acsl_delete_block((void *)(A));
}

int main(void)
{
  int __retres;
  int *pa;
  __e_acsl_memory_init((int *)0,(char ***)0,(size_t)8);
  __e_acsl_globals_init();
  __e_acsl_store_block((void *)(& pa),(size_t)8);
  PA = (int *)(& A);
  {
    void *__gen_e_acsl_base_addr;
    void *__gen_e_acsl_base_addr_2;
    __gen_e_acsl_base_addr = __e_acsl_base_addr((void *)(A));
    __gen_e_acsl_base_addr_2 = __e_acsl_base_addr((void *)(& A));
    __e_acsl_assert(__gen_e_acsl_base_addr == __gen_e_acsl_base_addr_2,
                    "Assertion","main",
                    "\\base_addr((int *)A) == \\base_addr(&A)",
                    "tests/memory/base_addr.c",13);
  }
  /*@ assert \base_addr((int *)A) ≡ \base_addr(&A); */ ;
  {
    void *__gen_e_acsl_base_addr_3;
    void *__gen_e_acsl_base_addr_4;
    __gen_e_acsl_base_addr_3 = __e_acsl_base_addr((void *)(A));
    __gen_e_acsl_base_addr_4 = __e_acsl_base_addr((void *)PA);
    __e_acsl_assert(__gen_e_acsl_base_addr_3 == __gen_e_acsl_base_addr_4,
                    "Assertion","main",
                    "\\base_addr((int *)A) == \\base_addr(PA)",
                    "tests/memory/base_addr.c",14);
  }
  /*@ assert \base_addr((int *)A) ≡ \base_addr(PA); */ ;
  {
    void *__gen_e_acsl_base_addr_5;
    void *__gen_e_acsl_base_addr_6;
    __gen_e_acsl_base_addr_5 = __e_acsl_base_addr((void *)(& A[3]));
    __gen_e_acsl_base_addr_6 = __e_acsl_base_addr((void *)PA);
    __e_acsl_assert(__gen_e_acsl_base_addr_5 == __gen_e_acsl_base_addr_6,
                    "Assertion","main",
                    "\\base_addr(&A[3]) == \\base_addr(PA)",
                    "tests/memory/base_addr.c",15);
  }
  /*@ assert \base_addr(&A[3]) ≡ \base_addr(PA); */ ;
  PA ++;
  {
    void *__gen_e_acsl_base_addr_7;
    void *__gen_e_acsl_base_addr_8;
    __gen_e_acsl_base_addr_7 = __e_acsl_base_addr((void *)PA);
    __gen_e_acsl_base_addr_8 = __e_acsl_base_addr((void *)(A));
    __e_acsl_assert(__gen_e_acsl_base_addr_7 == __gen_e_acsl_base_addr_8,
                    "Assertion","main",
                    "\\base_addr(PA) == \\base_addr((int *)A)",
                    "tests/memory/base_addr.c",17);
  }
  /*@ assert \base_addr(PA) ≡ \base_addr((int *)A); */ ;
  {
    void *__gen_e_acsl_base_addr_9;
    void *__gen_e_acsl_base_addr_10;
    __gen_e_acsl_base_addr_9 = __e_acsl_base_addr((void *)(PA + 2));
    __gen_e_acsl_base_addr_10 = __e_acsl_base_addr((void *)(& A[3]));
    __e_acsl_assert(__gen_e_acsl_base_addr_9 == __gen_e_acsl_base_addr_10,
                    "Assertion","main",
                    "\\base_addr(PA + 2) == \\base_addr(&A[3])",
                    "tests/memory/base_addr.c",18);
  }
  /*@ assert \base_addr(PA + 2) ≡ \base_addr(&A[3]); */ ;
  int a[4] = {1, 2, 3, 4};
  __e_acsl_store_block((void *)(a),(size_t)16);
  __e_acsl_full_init((void *)(& a));
  __e_acsl_full_init((void *)(& pa));
  pa = (int *)(& a);
  {
    void *__gen_e_acsl_base_addr_11;
    void *__gen_e_acsl_base_addr_12;
    __gen_e_acsl_base_addr_11 = __e_acsl_base_addr((void *)(a));
    __gen_e_acsl_base_addr_12 = __e_acsl_base_addr((void *)(& a));
    __e_acsl_assert(__gen_e_acsl_base_addr_11 == __gen_e_acsl_base_addr_12,
                    "Assertion","main",
                    "\\base_addr((int *)a) == \\base_addr(&a)",
                    "tests/memory/base_addr.c",25);
  }
  /*@ assert \base_addr((int *)a) ≡ \base_addr(&a); */ ;
  {
    void *__gen_e_acsl_base_addr_13;
    void *__gen_e_acsl_base_addr_14;
    __gen_e_acsl_base_addr_13 = __e_acsl_base_addr((void *)(a));
    __gen_e_acsl_base_addr_14 = __e_acsl_base_addr((void *)pa);
    __e_acsl_assert(__gen_e_acsl_base_addr_13 == __gen_e_acsl_base_addr_14,
                    "Assertion","main",
                    "\\base_addr((int *)a) == \\base_addr(pa)",
                    "tests/memory/base_addr.c",26);
  }
  /*@ assert \base_addr((int *)a) ≡ \base_addr(pa); */ ;
  {
    void *__gen_e_acsl_base_addr_15;
    void *__gen_e_acsl_base_addr_16;
    __gen_e_acsl_base_addr_15 = __e_acsl_base_addr((void *)(& a[3]));
    __gen_e_acsl_base_addr_16 = __e_acsl_base_addr((void *)pa);
    __e_acsl_assert(__gen_e_acsl_base_addr_15 == __gen_e_acsl_base_addr_16,
                    "Assertion","main",
                    "\\base_addr(&a[3]) == \\base_addr(pa)",
                    "tests/memory/base_addr.c",27);
  }
  /*@ assert \base_addr(&a[3]) ≡ \base_addr(pa); */ ;
  __e_acsl_full_init((void *)(& pa));
  pa ++;
  {
    void *__gen_e_acsl_base_addr_17;
    void *__gen_e_acsl_base_addr_18;
    __gen_e_acsl_base_addr_17 = __e_acsl_base_addr((void *)pa);
    __gen_e_acsl_base_addr_18 = __e_acsl_base_addr((void *)(a));
    __e_acsl_assert(__gen_e_acsl_base_addr_17 == __gen_e_acsl_base_addr_18,
                    "Assertion","main",
                    "\\base_addr(pa) == \\base_addr((int *)a)",
                    "tests/memory/base_addr.c",29);
  }
  /*@ assert \base_addr(pa) ≡ \base_addr((int *)a); */ ;
  {
    void *__gen_e_acsl_base_addr_19;
    void *__gen_e_acsl_base_addr_20;
    __gen_e_acsl_base_addr_19 = __e_acsl_base_addr((void *)(pa + 2));
    __gen_e_acsl_base_addr_20 = __e_acsl_base_addr((void *)(a));
    __e_acsl_assert(__gen_e_acsl_base_addr_19 == __gen_e_acsl_base_addr_20,
                    "Assertion","main",
                    "\\base_addr(pa + 2) == \\base_addr((int *)a)",
                    "tests/memory/base_addr.c",30);
  }
  /*@ assert \base_addr(pa + 2) ≡ \base_addr((int *)a); */ ;
  long l = (long)4;
  __e_acsl_store_block((void *)(& l),(size_t)8);
  __e_acsl_full_init((void *)(& l));
  char *pl = (char *)(& l);
  __e_acsl_store_block((void *)(& pl),(size_t)8);
  __e_acsl_full_init((void *)(& pl));
  {
    void *__gen_e_acsl_base_addr_21;
    void *__gen_e_acsl_base_addr_22;
    __gen_e_acsl_base_addr_21 = __e_acsl_base_addr((void *)(& l));
    __gen_e_acsl_base_addr_22 = __e_acsl_base_addr((void *)pl);
    __e_acsl_assert(__gen_e_acsl_base_addr_21 == __gen_e_acsl_base_addr_22,
                    "Assertion","main","\\base_addr(&l) == \\base_addr(pl)",
                    "tests/memory/base_addr.c",35);
  }
  /*@ assert \base_addr(&l) ≡ \base_addr(pl); */ ;
  {
    void *__gen_e_acsl_base_addr_23;
    void *__gen_e_acsl_base_addr_24;
    __gen_e_acsl_base_addr_23 = __e_acsl_base_addr((void *)(pl + 2));
    __gen_e_acsl_base_addr_24 = __e_acsl_base_addr((void *)(& l));
    __e_acsl_assert(__gen_e_acsl_base_addr_23 == __gen_e_acsl_base_addr_24,
                    "Assertion","main",
                    "\\base_addr(pl + 2) == \\base_addr(&l)",
                    "tests/memory/base_addr.c",36);
  }
  /*@ assert \base_addr(pl + 2) ≡ \base_addr(&l); */ ;
  short *pi = (short *)(& l);
  __e_acsl_store_block((void *)(& pi),(size_t)8);
  __e_acsl_full_init((void *)(& pi));
  __e_acsl_full_init((void *)(& pi));
  pi ++;
  __e_acsl_full_init((void *)(& pl));
  pl ++;
  {
    void *__gen_e_acsl_base_addr_25;
    void *__gen_e_acsl_base_addr_26;
    __gen_e_acsl_base_addr_25 = __e_acsl_base_addr((void *)pi);
    __gen_e_acsl_base_addr_26 = __e_acsl_base_addr((void *)pl);
    __e_acsl_assert(__gen_e_acsl_base_addr_25 == __gen_e_acsl_base_addr_26,
                    "Assertion","main","\\base_addr(pi) == \\base_addr(pl)",
                    "tests/memory/base_addr.c",40);
  }
  /*@ assert \base_addr(pi) ≡ \base_addr(pl); */ ;
  {
    void *__gen_e_acsl_base_addr_27;
    void *__gen_e_acsl_base_addr_28;
    __gen_e_acsl_base_addr_27 = __e_acsl_base_addr((void *)pl);
    __gen_e_acsl_base_addr_28 = __e_acsl_base_addr((void *)(& l));
    __e_acsl_assert(__gen_e_acsl_base_addr_27 == __gen_e_acsl_base_addr_28,
                    "Assertion","main","\\base_addr(pl) == \\base_addr(&l)",
                    "tests/memory/base_addr.c",41);
  }
  /*@ assert \base_addr(pl) ≡ \base_addr(&l); */ ;
  char *p = malloc((unsigned long)12);
  __e_acsl_store_block((void *)(& p),(size_t)8);
  __e_acsl_full_init((void *)(& p));
  char *pd = p;
  __e_acsl_store_block((void *)(& pd),(size_t)8);
  __e_acsl_full_init((void *)(& pd));
  {
    void *__gen_e_acsl_base_addr_29;
    void *__gen_e_acsl_base_addr_30;
    __gen_e_acsl_base_addr_29 = __e_acsl_base_addr((void *)p);
    __gen_e_acsl_base_addr_30 = __e_acsl_base_addr((void *)pd);
    __e_acsl_assert(__gen_e_acsl_base_addr_29 == __gen_e_acsl_base_addr_30,
                    "Assertion","main","\\base_addr(p) == \\base_addr(pd)",
                    "tests/memory/base_addr.c",46);
  }
  /*@ assert \base_addr(p) ≡ \base_addr(pd); */ ;
  {
    void *__gen_e_acsl_base_addr_31;
    void *__gen_e_acsl_base_addr_32;
    __gen_e_acsl_base_addr_31 = __e_acsl_base_addr((void *)(p + 1));
    __gen_e_acsl_base_addr_32 = __e_acsl_base_addr((void *)(pd + 5));
    __e_acsl_assert(__gen_e_acsl_base_addr_31 == __gen_e_acsl_base_addr_32,
                    "Assertion","main",
                    "\\base_addr(p + 1) == \\base_addr(pd + 5)",
                    "tests/memory/base_addr.c",47);
  }
  /*@ assert \base_addr(p + 1) ≡ \base_addr(pd + 5); */ ;
  {
    void *__gen_e_acsl_base_addr_33;
    void *__gen_e_acsl_base_addr_34;
    __gen_e_acsl_base_addr_33 = __e_acsl_base_addr((void *)(p + 11));
    __gen_e_acsl_base_addr_34 = __e_acsl_base_addr((void *)(pd + 1));
    __e_acsl_assert(__gen_e_acsl_base_addr_33 == __gen_e_acsl_base_addr_34,
                    "Assertion","main",
                    "\\base_addr(p + 11) == \\base_addr(pd + 1)",
                    "tests/memory/base_addr.c",48);
  }
  /*@ assert \base_addr(p + 11) ≡ \base_addr(pd + 1); */ ;
  __e_acsl_full_init((void *)(& p));
  p += 5;
  {
    void *__gen_e_acsl_base_addr_35;
    void *__gen_e_acsl_base_addr_36;
    __gen_e_acsl_base_addr_35 = __e_acsl_base_addr((void *)(p + 5));
    __gen_e_acsl_base_addr_36 = __e_acsl_base_addr((void *)pd);
    __e_acsl_assert(__gen_e_acsl_base_addr_35 == __gen_e_acsl_base_addr_36,
                    "Assertion","main",
                    "\\base_addr(p + 5) == \\base_addr(pd)",
                    "tests/memory/base_addr.c",50);
  }
  /*@ assert \base_addr(p + 5) ≡ \base_addr(pd); */ ;
  {
    void *__gen_e_acsl_base_addr_37;
    void *__gen_e_acsl_base_addr_38;
    __gen_e_acsl_base_addr_37 = __e_acsl_base_addr((void *)(p - 5));
    __gen_e_acsl_base_addr_38 = __e_acsl_base_addr((void *)pd);
    __e_acsl_assert(__gen_e_acsl_base_addr_37 == __gen_e_acsl_base_addr_38,
                    "Assertion","main",
                    "\\base_addr(p - 5) == \\base_addr(pd)",
                    "tests/memory/base_addr.c",51);
  }
  /*@ assert \base_addr(p - 5) ≡ \base_addr(pd); */ ;
  long *q = malloc((unsigned long)30 * sizeof(long));
  __e_acsl_store_block((void *)(& q),(size_t)8);
  __e_acsl_full_init((void *)(& q));
  long *qd = q;
  __e_acsl_store_block((void *)(& qd),(size_t)8);
  __e_acsl_full_init((void *)(& qd));
  {
    void *__gen_e_acsl_base_addr_39;
    void *__gen_e_acsl_base_addr_40;
    __gen_e_acsl_base_addr_39 = __e_acsl_base_addr((void *)q);
    __gen_e_acsl_base_addr_40 = __e_acsl_base_addr((void *)qd);
    __e_acsl_assert(__gen_e_acsl_base_addr_39 == __gen_e_acsl_base_addr_40,
                    "Assertion","main","\\base_addr(q) == \\base_addr(qd)",
                    "tests/memory/base_addr.c",57);
  }
  /*@ assert \base_addr(q) ≡ \base_addr(qd); */ ;
  __e_acsl_full_init((void *)(& q));
  q ++;
  {
    void *__gen_e_acsl_base_addr_41;
    void *__gen_e_acsl_base_addr_42;
    __gen_e_acsl_base_addr_41 = __e_acsl_base_addr((void *)q);
    __gen_e_acsl_base_addr_42 = __e_acsl_base_addr((void *)qd);
    __e_acsl_assert(__gen_e_acsl_base_addr_41 == __gen_e_acsl_base_addr_42,
                    "Assertion","main","\\base_addr(q) == \\base_addr(qd)",
                    "tests/memory/base_addr.c",59);
  }
  /*@ assert \base_addr(q) ≡ \base_addr(qd); */ ;
  __e_acsl_full_init((void *)(& q));
  q += 2;
  {
    void *__gen_e_acsl_base_addr_43;
    void *__gen_e_acsl_base_addr_44;
    __gen_e_acsl_base_addr_43 = __e_acsl_base_addr((void *)q);
    __gen_e_acsl_base_addr_44 = __e_acsl_base_addr((void *)qd);
    __e_acsl_assert(__gen_e_acsl_base_addr_43 == __gen_e_acsl_base_addr_44,
                    "Assertion","main","\\base_addr(q) == \\base_addr(qd)",
                    "tests/memory/base_addr.c",61);
  }
  /*@ assert \base_addr(q) ≡ \base_addr(qd); */ ;
  __e_acsl_full_init((void *)(& q));
  q += 4;
  {
    void *__gen_e_acsl_base_addr_45;
    void *__gen_e_acsl_base_addr_46;
    __gen_e_acsl_base_addr_45 = __e_acsl_base_addr((void *)q);
    __gen_e_acsl_base_addr_46 = __e_acsl_base_addr((void *)qd);
    __e_acsl_assert(__gen_e_acsl_base_addr_45 == __gen_e_acsl_base_addr_46,
                    "Assertion","main","\\base_addr(q) == \\base_addr(qd)",
                    "tests/memory/base_addr.c",63);
  }
  /*@ assert \base_addr(q) ≡ \base_addr(qd); */ ;
  __retres = 0;
  __e_acsl_delete_block((void *)(& qd));
  __e_acsl_delete_block((void *)(& q));
  __e_acsl_delete_block((void *)(& pd));
  __e_acsl_delete_block((void *)(& p));
  __e_acsl_delete_block((void *)(& pi));
  __e_acsl_delete_block((void *)(& pl));
  __e_acsl_delete_block((void *)(& l));
  __e_acsl_delete_block((void *)(& pa));
  __e_acsl_delete_block((void *)(a));
  __e_acsl_globals_clean();
  __e_acsl_memory_clean();
  return __retres;
}


