/* Generated by Frama-C */
#include "stddef.h"
#include "stdio.h"
void decl_in_switch(int value)
{
  __e_acsl_store_block((void *)(& value),(size_t)4);
  switch (value) {
    int *p;
    __e_acsl_store_block((void *)(& p),(size_t)8);
    default: __e_acsl_store_block_duplicate((void *)(& p),(size_t)8);
    __e_acsl_full_init((void *)(& p));
    p = & value;
    __e_acsl_delete_block((void *)(& p));
    break;
    __e_acsl_delete_block((void *)(& p));
  }
  __e_acsl_delete_block((void *)(& value));
  return;
}

void compound_decl_and_init(int value)
{
  int a = 0;
  __e_acsl_store_block((void *)(& a),(size_t)4);
  __e_acsl_full_init((void *)(& a));
  {
    int __gen_e_acsl_valid;
    __gen_e_acsl_valid = __e_acsl_valid((void *)(& a),sizeof(int),
                                        (void *)(& a),(void *)0);
    __e_acsl_assert(__gen_e_acsl_valid,"Assertion","compound_decl_and_init",
                    "\\valid(&a)","tests/memory/decl_in_switch.c",26);
  }
  /*@ assert \valid(&a); */ ;
  switch (value) {
    int b = 2;
    {
      int __gen_e_acsl_valid_2;
      __gen_e_acsl_valid_2 = __e_acsl_valid((void *)(& b),sizeof(int),
                                            (void *)(& b),(void *)0);
      __e_acsl_assert(__gen_e_acsl_valid_2,"Assertion",
                      "compound_decl_and_init","\\valid(&b)",
                      "tests/memory/decl_in_switch.c",31);
    }
    /*@ assert \valid(&b); */ ;
    case 0: ;
    int c = 3;
    __e_acsl_store_block((void *)(& c),(size_t)4);
    __e_acsl_full_init((void *)(& c));
    {
      int __gen_e_acsl_valid_3;
      __gen_e_acsl_valid_3 = __e_acsl_valid((void *)(& c),sizeof(int),
                                            (void *)(& c),(void *)0);
      __e_acsl_assert(__gen_e_acsl_valid_3,"Assertion",
                      "compound_decl_and_init","\\valid(&c)",
                      "tests/memory/decl_in_switch.c",35);
    }
    /*@ assert \valid(&c); */ ;
    __e_acsl_delete_block((void *)(& c));
    break;
    case 1: __e_acsl_store_block_duplicate((void *)(& c),(size_t)4);
    ;
    int d = 4;
    __e_acsl_store_block((void *)(& d),(size_t)4);
    __e_acsl_full_init((void *)(& d));
    {
      int __gen_e_acsl_valid_4;
      __gen_e_acsl_valid_4 = __e_acsl_valid((void *)(& d),sizeof(int),
                                            (void *)(& d),(void *)0);
      __e_acsl_assert(__gen_e_acsl_valid_4,"Assertion",
                      "compound_decl_and_init","\\valid(&d)",
                      "tests/memory/decl_in_switch.c",40);
    }
    /*@ assert \valid(&d); */ ;
    __e_acsl_delete_block((void *)(& c));
    __e_acsl_delete_block((void *)(& d));
    break;
    __e_acsl_delete_block((void *)(& d));
    __e_acsl_delete_block((void *)(& c));
  }
  __e_acsl_delete_block((void *)(& a));
  return;
}

void separate_decl_and_init(int value)
{
  int a;
  __e_acsl_store_block((void *)(& a),(size_t)4);
  __e_acsl_full_init((void *)(& a));
  a = 1;
  {
    int __gen_e_acsl_valid;
    __gen_e_acsl_valid = __e_acsl_valid((void *)(& a),sizeof(int),
                                        (void *)(& a),(void *)0);
    __e_acsl_assert(__gen_e_acsl_valid,"Assertion","separate_decl_and_init",
                    "\\valid(&a)","tests/memory/decl_in_switch.c",51);
  }
  /*@ assert \valid(&a); */ ;
  switch (value) {
    int b;
    int c;
    int d;
    __e_acsl_store_block((void *)(& d),(size_t)4);
    __e_acsl_store_block((void *)(& c),(size_t)4);
    b = 2;
    {
      int __gen_e_acsl_valid_2;
      __gen_e_acsl_valid_2 = __e_acsl_valid((void *)(& b),sizeof(int),
                                            (void *)(& b),(void *)0);
      __e_acsl_assert(__gen_e_acsl_valid_2,"Assertion",
                      "separate_decl_and_init","\\valid(&b)",
                      "tests/memory/decl_in_switch.c",57);
    }
    /*@ assert \valid(&b); */ ;
    case 0: __e_acsl_store_block_duplicate((void *)(& c),(size_t)4);
    __e_acsl_store_block_duplicate((void *)(& d),(size_t)4);
    ;
    __e_acsl_full_init((void *)(& c));
    c = 3;
    {
      int __gen_e_acsl_valid_3;
      __gen_e_acsl_valid_3 = __e_acsl_valid((void *)(& c),sizeof(int),
                                            (void *)(& c),(void *)0);
      __e_acsl_assert(__gen_e_acsl_valid_3,"Assertion",
                      "separate_decl_and_init","\\valid(&c)",
                      "tests/memory/decl_in_switch.c",62);
    }
    /*@ assert \valid(&c); */ ;
    __e_acsl_delete_block((void *)(& c));
    __e_acsl_delete_block((void *)(& d));
    break;
    case 1: __e_acsl_store_block_duplicate((void *)(& c),(size_t)4);
    __e_acsl_store_block_duplicate((void *)(& d),(size_t)4);
    ;
    __e_acsl_full_init((void *)(& d));
    d = 4;
    {
      int __gen_e_acsl_valid_4;
      __gen_e_acsl_valid_4 = __e_acsl_valid((void *)(& d),sizeof(int),
                                            (void *)(& d),(void *)0);
      __e_acsl_assert(__gen_e_acsl_valid_4,"Assertion",
                      "separate_decl_and_init","\\valid(&d)",
                      "tests/memory/decl_in_switch.c",68);
    }
    /*@ assert \valid(&d); */ ;
    __e_acsl_delete_block((void *)(& c));
    __e_acsl_delete_block((void *)(& d));
    break;
    __e_acsl_delete_block((void *)(& d));
    __e_acsl_delete_block((void *)(& c));
  }
  __e_acsl_delete_block((void *)(& a));
  return;
}

void label_in_switch(int value)
{
  int done = 0;
  switch (value) {
    K: ;
    int d = 0;
    __e_acsl_store_block((void *)(& d),(size_t)4);
    __e_acsl_full_init((void *)(& d));
    {
      int __gen_e_acsl_valid;
      __gen_e_acsl_valid = __e_acsl_valid((void *)(& d),sizeof(int),
                                          (void *)(& d),(void *)0);
      __e_acsl_assert(__gen_e_acsl_valid,"Assertion","label_in_switch",
                      "\\valid(&d)","tests/memory/decl_in_switch.c",83);
    }
    /*@ assert \valid(&d); */ ;
    L: case 0: __e_acsl_store_block_duplicate((void *)(& d),(size_t)4);
    ;
    int e = 1;
    __e_acsl_store_block((void *)(& e),(size_t)4);
    __e_acsl_full_init((void *)(& e));
    {
      int __gen_e_acsl_valid_2;
      __gen_e_acsl_valid_2 = __e_acsl_valid((void *)(& e),sizeof(int),
                                            (void *)(& e),(void *)0);
      __e_acsl_assert(__gen_e_acsl_valid_2,"Assertion","label_in_switch",
                      "\\valid(&e)","tests/memory/decl_in_switch.c",89);
    }
    /*@ assert \valid(&e); */ ;
    __e_acsl_delete_block((void *)(& d));
    __e_acsl_delete_block((void *)(& e));
    break;
    case 1: __e_acsl_store_block_duplicate((void *)(& d),(size_t)4);
    __e_acsl_store_block_duplicate((void *)(& e),(size_t)4);
    ;
    int ff = 2;
    __e_acsl_store_block((void *)(& ff),(size_t)4);
    __e_acsl_full_init((void *)(& ff));
    {
      int __gen_e_acsl_valid_3;
      __gen_e_acsl_valid_3 = __e_acsl_valid((void *)(& ff),sizeof(int),
                                            (void *)(& ff),(void *)0);
      __e_acsl_assert(__gen_e_acsl_valid_3,"Assertion","label_in_switch",
                      "\\valid(&ff)","tests/memory/decl_in_switch.c",93);
    }
    /*@ assert \valid(&ff); */ ;
    __e_acsl_delete_block((void *)(& d));
    __e_acsl_delete_block((void *)(& e));
    __e_acsl_delete_block((void *)(& ff));
    break;
    __e_acsl_delete_block((void *)(& ff));
    __e_acsl_delete_block((void *)(& e));
    __e_acsl_delete_block((void *)(& d));
  }
  if (! done) {
    done = 1;
    if (value < 10) goto L; else goto K;
  }
  return;
}

int main(int argc, char **argv)
{
  int __retres;
  __e_acsl_memory_init(& argc,& argv,(size_t)8);
  decl_in_switch(argc);
  compound_decl_and_init(argc);
  separate_decl_and_init(argc);
  label_in_switch(argc);
  __retres = 0;
  __e_acsl_delete_block((void *)(& argc));
  __e_acsl_memory_clean();
  return __retres;
}


