/* Generated by Frama-C */
#include "stddef.h"
#include "stdio.h"
char *__gen_e_acsl_literal_string_3;
char *__gen_e_acsl_literal_string;
char *__gen_e_acsl_literal_string_2;
char *__gen_e_acsl_literal_string_4;
char *__gen_e_acsl_literal_string_5;
struct ST {
   char *str ;
   int num ;
};
int _F;

char *_A[2] = {(char *)"XX", (char *)"YY"};
char *_B = (char *)"ZZ";
char *_C;
int _D[2] = {44, 88};
int _E = 44;
int _F = 9;
struct ST _G[2] =
  {{.str = (char *)"First", .num = 99}, {.str = (char *)"Second", .num = 147}};
void __e_acsl_globals_init(void)
{
  static char __e_acsl_already_run = 0;
  if (! __e_acsl_already_run) {
    __e_acsl_already_run = 1;
    __gen_e_acsl_literal_string_3 = "ZZ";
    __e_acsl_store_block((void *)__gen_e_acsl_literal_string_3,sizeof("ZZ"));
    __e_acsl_full_init((void *)__gen_e_acsl_literal_string_3);
    __e_acsl_mark_readonly((void *)__gen_e_acsl_literal_string_3);
    __gen_e_acsl_literal_string = "YY";
    __e_acsl_store_block((void *)__gen_e_acsl_literal_string,sizeof("YY"));
    __e_acsl_full_init((void *)__gen_e_acsl_literal_string);
    __e_acsl_mark_readonly((void *)__gen_e_acsl_literal_string);
    __gen_e_acsl_literal_string_2 = "XX";
    __e_acsl_store_block((void *)__gen_e_acsl_literal_string_2,sizeof("XX"));
    __e_acsl_full_init((void *)__gen_e_acsl_literal_string_2);
    __e_acsl_mark_readonly((void *)__gen_e_acsl_literal_string_2);
    __gen_e_acsl_literal_string_4 = "Second";
    __e_acsl_store_block((void *)__gen_e_acsl_literal_string_4,
                         sizeof("Second"));
    __e_acsl_full_init((void *)__gen_e_acsl_literal_string_4);
    __e_acsl_mark_readonly((void *)__gen_e_acsl_literal_string_4);
    __gen_e_acsl_literal_string_5 = "First";
    __e_acsl_store_block((void *)__gen_e_acsl_literal_string_5,
                         sizeof("First"));
    __e_acsl_full_init((void *)__gen_e_acsl_literal_string_5);
    __e_acsl_mark_readonly((void *)__gen_e_acsl_literal_string_5);
    __e_acsl_store_block((void *)(_G),(size_t)32);
    __e_acsl_full_init((void *)(& _G));
    __e_acsl_store_block((void *)(& _E),(size_t)4);
    __e_acsl_full_init((void *)(& _E));
    __e_acsl_store_block((void *)(_D),(size_t)8);
    __e_acsl_full_init((void *)(& _D));
    __e_acsl_store_block((void *)(& _C),(size_t)8);
    __e_acsl_full_init((void *)(& _C));
    __e_acsl_store_block((void *)(& _B),(size_t)8);
    __e_acsl_full_init((void *)(& _B));
    __e_acsl_store_block((void *)(_A),(size_t)16);
    __e_acsl_full_init((void *)(& _A));
    __e_acsl_store_block((void *)(& _F),(size_t)4);
    __e_acsl_full_init((void *)(& _F));
  }
  return;
}

void __e_acsl_globals_clean(void)
{
  __e_acsl_delete_block((void *)(_G));
  __e_acsl_delete_block((void *)(& _E));
  __e_acsl_delete_block((void *)(_D));
  __e_acsl_delete_block((void *)(& _C));
  __e_acsl_delete_block((void *)(& _B));
  __e_acsl_delete_block((void *)(_A));
  __e_acsl_delete_block((void *)(& _F));
}

int main(int argc, char **argv)
{
  int __retres;
  __e_acsl_memory_init(& argc,& argv,(size_t)8);
  __e_acsl_globals_init();
  {
    int __gen_e_acsl_valid;
    __gen_e_acsl_valid = __e_acsl_valid((void *)(_A),sizeof(char *),
                                        (void *)(_A),(void *)(_A));
    __e_acsl_assert(__gen_e_acsl_valid,"Assertion","main",
                    "\\valid((char **)_A)",
                    "tests/memory/compound_initializers.c",33);
  }
  /*@ assert \valid((char **)_A); */ ;
  {
    int __gen_e_acsl_initialized;
    int __gen_e_acsl_and;
    __gen_e_acsl_initialized = __e_acsl_initialized((void *)(_A),
                                                    sizeof(char *));
    if (__gen_e_acsl_initialized) {
      int __gen_e_acsl_valid_read;
      __gen_e_acsl_valid_read = __e_acsl_valid_read((void *)_A[0],
                                                    sizeof(char),
                                                    (void *)_A[0],
                                                    (void *)(_A));
      __gen_e_acsl_and = __gen_e_acsl_valid_read;
    }
    else __gen_e_acsl_and = 0;
    __e_acsl_assert(__gen_e_acsl_and,"Assertion","main",
                    "\\valid_read(_A[0])",
                    "tests/memory/compound_initializers.c",34);
  }
  /*@ assert \valid_read(_A[0]); */ ;
  {
    int __gen_e_acsl_initialized_2;
    int __gen_e_acsl_and_2;
    __gen_e_acsl_initialized_2 = __e_acsl_initialized((void *)(& _A[1]),
                                                      sizeof(char *));
    if (__gen_e_acsl_initialized_2) {
      int __gen_e_acsl_valid_read_2;
      __gen_e_acsl_valid_read_2 = __e_acsl_valid_read((void *)_A[1],
                                                      sizeof(char),
                                                      (void *)_A[1],
                                                      (void *)(& _A[1]));
      __gen_e_acsl_and_2 = __gen_e_acsl_valid_read_2;
    }
    else __gen_e_acsl_and_2 = 0;
    __e_acsl_assert(__gen_e_acsl_and_2,"Assertion","main",
                    "\\valid_read(_A[1])",
                    "tests/memory/compound_initializers.c",35);
  }
  /*@ assert \valid_read(_A[1]); */ ;
  {
    int __gen_e_acsl_valid_read_3;
    __gen_e_acsl_valid_read_3 = __e_acsl_valid_read((void *)_B,sizeof(char),
                                                    (void *)_B,
                                                    (void *)(& _B));
    __e_acsl_assert(__gen_e_acsl_valid_read_3,"Assertion","main",
                    "\\valid_read(_B)",
                    "tests/memory/compound_initializers.c",36);
  }
  /*@ assert \valid_read(_B); */ ;
  {
    int __gen_e_acsl_valid_2;
    __gen_e_acsl_valid_2 = __e_acsl_valid((void *)(& _C),sizeof(char *),
                                          (void *)(& _C),(void *)0);
    __e_acsl_assert(__gen_e_acsl_valid_2,"Assertion","main","\\valid(&_C)",
                    "tests/memory/compound_initializers.c",37);
  }
  /*@ assert \valid(&_C); */ ;
  {
    int __gen_e_acsl_valid_3;
    __gen_e_acsl_valid_3 = __e_acsl_valid((void *)(_D),sizeof(int),
                                          (void *)(_D),(void *)(_D));
    __e_acsl_assert(__gen_e_acsl_valid_3,"Assertion","main",
                    "\\valid((int *)_D)",
                    "tests/memory/compound_initializers.c",38);
  }
  /*@ assert \valid((int *)_D); */ ;
  {
    int __gen_e_acsl_valid_4;
    __gen_e_acsl_valid_4 = __e_acsl_valid((void *)(& _E),sizeof(int),
                                          (void *)(& _E),(void *)0);
    __e_acsl_assert(__gen_e_acsl_valid_4,"Assertion","main","\\valid(&_E)",
                    "tests/memory/compound_initializers.c",39);
  }
  /*@ assert \valid(&_E); */ ;
  {
    int __gen_e_acsl_valid_5;
    __gen_e_acsl_valid_5 = __e_acsl_valid((void *)(& _F),sizeof(int),
                                          (void *)(& _F),(void *)0);
    __e_acsl_assert(__gen_e_acsl_valid_5,"Assertion","main","\\valid(&_F)",
                    "tests/memory/compound_initializers.c",40);
  }
  /*@ assert \valid(&_F); */ ;
  __e_acsl_assert(_E == 44,"Assertion","main","_E == 44",
                  "tests/memory/compound_initializers.c",41);
  /*@ assert _E ≡ 44; */ ;
  {
    int __gen_e_acsl_valid_6;
    __gen_e_acsl_valid_6 = __e_acsl_valid((void *)(& _G),
                                          sizeof(struct ST [2]),
                                          (void *)(& _G),(void *)0);
    __e_acsl_assert(__gen_e_acsl_valid_6,"Assertion","main","\\valid(&_G)",
                    "tests/memory/compound_initializers.c",42);
  }
  /*@ assert \valid(&_G); */ ;
  __e_acsl_assert(_G[0].num == 99,"Assertion","main","_G[0].num == 99",
                  "tests/memory/compound_initializers.c",43);
  /*@ assert _G[0].num ≡ 99; */ ;
  __retres = 0;
  __e_acsl_globals_clean();
  __e_acsl_memory_clean();
  return __retres;
}


