/* Generated by Frama-C */
#include "stddef.h"
#include "stdio.h"
#include "stdlib.h"
struct temporal_t {
   char *p ;
   char *q ;
};
struct larger_t {
   char *p ;
   char *q ;
   struct temporal_t t ;
};
typedef struct temporal_t temporal;
typedef struct larger_t larger;
int main(void)
{
  int __retres;
  temporal t1;
  temporal t2;
  temporal *tp;
  temporal tarr[2];
  larger l;
  larger *lp;
  larger larr[2];
  __e_acsl_memory_init((int *)0,(char ***)0,(size_t)8);
  __e_acsl_store_block((void *)(larr),(size_t)64);
  __e_acsl_store_block((void *)(& lp),(size_t)8);
  __e_acsl_store_block((void *)(& l),(size_t)32);
  __e_acsl_store_block((void *)(tarr),(size_t)32);
  __e_acsl_store_block((void *)(& t2),(size_t)16);
  __e_acsl_store_block((void *)(& t1),(size_t)16);
  int a = 1;
  __e_acsl_store_block((void *)(& a),(size_t)4);
  __e_acsl_full_init((void *)(& a));
  int b = 2;
  __e_acsl_initialize((void *)(& t1.p),sizeof(char *));
  __e_acsl_temporal_store_nblock((void *)(& t1.p),(void *)(& a));
  t1.p = (char *)(& a);
  __e_acsl_initialize((void *)(& t1.q),sizeof(char *));
  __e_acsl_temporal_store_nreferent((void *)(& t1.q),(void *)(& t1.p));
  t1.q = t1.p;
  {
    int __gen_e_acsl_initialized;
    int __gen_e_acsl_and;
    int __gen_e_acsl_and_3;
    __gen_e_acsl_initialized = __e_acsl_initialized((void *)(& t1.p),
                                                    sizeof(char *));
    if (__gen_e_acsl_initialized) {
      int __gen_e_acsl_valid;
      __gen_e_acsl_valid = __e_acsl_valid((void *)t1.p,sizeof(char),
                                          (void *)t1.p,(void *)(& t1.p));
      __gen_e_acsl_and = __gen_e_acsl_valid;
    }
    else __gen_e_acsl_and = 0;
    if (__gen_e_acsl_and) {
      int __gen_e_acsl_initialized_2;
      int __gen_e_acsl_and_2;
      __gen_e_acsl_initialized_2 = __e_acsl_initialized((void *)(& t1.q),
                                                        sizeof(char *));
      if (__gen_e_acsl_initialized_2) {
        int __gen_e_acsl_valid_2;
        __gen_e_acsl_valid_2 = __e_acsl_valid((void *)t1.q,sizeof(char),
                                              (void *)t1.q,(void *)(& t1.q));
        __gen_e_acsl_and_2 = __gen_e_acsl_valid_2;
      }
      else __gen_e_acsl_and_2 = 0;
      __gen_e_acsl_and_3 = __gen_e_acsl_and_2;
    }
    else __gen_e_acsl_and_3 = 0;
    __e_acsl_assert(__gen_e_acsl_and_3,"Assertion","main",
                    "\\valid(t1.p) && \\valid(t1.q)",
                    "tests/temporal/t_struct.c",31);
  }
  /*@ assert \valid(t1.p) ∧ \valid(t1.q); */ ;
  {
    int __gen_e_acsl_initialized_3;
    int __gen_e_acsl_and_4;
    int __gen_e_acsl_and_6;
    __gen_e_acsl_initialized_3 = __e_acsl_initialized((void *)(& t2.p),
                                                      sizeof(char *));
    if (__gen_e_acsl_initialized_3) {
      int __gen_e_acsl_valid_3;
      __gen_e_acsl_valid_3 = __e_acsl_valid((void *)t2.p,sizeof(char),
                                            (void *)t2.p,(void *)(& t2.p));
      __gen_e_acsl_and_4 = __gen_e_acsl_valid_3;
    }
    else __gen_e_acsl_and_4 = 0;
    if (! __gen_e_acsl_and_4) {
      int __gen_e_acsl_initialized_4;
      int __gen_e_acsl_and_5;
      __gen_e_acsl_initialized_4 = __e_acsl_initialized((void *)(& t2.q),
                                                        sizeof(char *));
      if (__gen_e_acsl_initialized_4) {
        int __gen_e_acsl_valid_4;
        __gen_e_acsl_valid_4 = __e_acsl_valid((void *)t2.q,sizeof(char),
                                              (void *)t2.q,(void *)(& t2.q));
        __gen_e_acsl_and_5 = __gen_e_acsl_valid_4;
      }
      else __gen_e_acsl_and_5 = 0;
      __gen_e_acsl_and_6 = ! __gen_e_acsl_and_5;
    }
    else __gen_e_acsl_and_6 = 0;
    __e_acsl_assert(__gen_e_acsl_and_6,"Assertion","main",
                    "!\\valid(t2.p) && !\\valid(t2.q)",
                    "tests/temporal/t_struct.c",32);
  }
  /*@ assert ¬\valid(t2.p) ∧ ¬\valid(t2.q); */ ;
  __e_acsl_full_init((void *)(& t2));
  __e_acsl_temporal_memcpy((void *)(& t2),(void *)(& t1),(size_t)16);
  t2 = t1;
  {
    int __gen_e_acsl_initialized_5;
    int __gen_e_acsl_and_7;
    int __gen_e_acsl_and_9;
    __gen_e_acsl_initialized_5 = __e_acsl_initialized((void *)(& t2.p),
                                                      sizeof(char *));
    if (__gen_e_acsl_initialized_5) {
      int __gen_e_acsl_valid_5;
      __gen_e_acsl_valid_5 = __e_acsl_valid((void *)t2.p,sizeof(char),
                                            (void *)t2.p,(void *)(& t2.p));
      __gen_e_acsl_and_7 = __gen_e_acsl_valid_5;
    }
    else __gen_e_acsl_and_7 = 0;
    if (__gen_e_acsl_and_7) {
      int __gen_e_acsl_initialized_6;
      int __gen_e_acsl_and_8;
      __gen_e_acsl_initialized_6 = __e_acsl_initialized((void *)(& t2.q),
                                                        sizeof(char *));
      if (__gen_e_acsl_initialized_6) {
        int __gen_e_acsl_valid_6;
        __gen_e_acsl_valid_6 = __e_acsl_valid((void *)t2.q,sizeof(char),
                                              (void *)t2.q,(void *)(& t2.q));
        __gen_e_acsl_and_8 = __gen_e_acsl_valid_6;
      }
      else __gen_e_acsl_and_8 = 0;
      __gen_e_acsl_and_9 = __gen_e_acsl_and_8;
    }
    else __gen_e_acsl_and_9 = 0;
    __e_acsl_assert(__gen_e_acsl_and_9,"Assertion","main",
                    "\\valid(t2.p) && \\valid(t2.q)",
                    "tests/temporal/t_struct.c",35);
  }
  /*@ assert \valid(t2.p) ∧ \valid(t2.q); */ ;
  __e_acsl_initialize((void *)(& t2.p),sizeof(char *));
  __e_acsl_temporal_store_nblock((void *)(& t2.p),(void *)0);
  t2.p = (char *)0;
  __e_acsl_initialize((void *)(& t2.q),sizeof(char *));
  __e_acsl_temporal_reset_parameters();
  __e_acsl_temporal_reset_return();
  t2.q = (char *)malloc((unsigned long)4);
  __e_acsl_temporal_store_nblock((void *)(& t2.q),(void *)*(& t2.q));
  {
    int __gen_e_acsl_initialized_7;
    int __gen_e_acsl_and_10;
    int __gen_e_acsl_and_12;
    __gen_e_acsl_initialized_7 = __e_acsl_initialized((void *)(& t2.p),
                                                      sizeof(char *));
    if (__gen_e_acsl_initialized_7) {
      int __gen_e_acsl_valid_7;
      __gen_e_acsl_valid_7 = __e_acsl_valid((void *)t2.p,sizeof(char),
                                            (void *)t2.p,(void *)(& t2.p));
      __gen_e_acsl_and_10 = __gen_e_acsl_valid_7;
    }
    else __gen_e_acsl_and_10 = 0;
    if (! __gen_e_acsl_and_10) {
      int __gen_e_acsl_initialized_8;
      int __gen_e_acsl_and_11;
      __gen_e_acsl_initialized_8 = __e_acsl_initialized((void *)(& t2.q),
                                                        sizeof(char *));
      if (__gen_e_acsl_initialized_8) {
        int __gen_e_acsl_valid_8;
        __gen_e_acsl_valid_8 = __e_acsl_valid((void *)t2.q,sizeof(char),
                                              (void *)t2.q,(void *)(& t2.q));
        __gen_e_acsl_and_11 = __gen_e_acsl_valid_8;
      }
      else __gen_e_acsl_and_11 = 0;
      __gen_e_acsl_and_12 = __gen_e_acsl_and_11;
    }
    else __gen_e_acsl_and_12 = 0;
    __e_acsl_assert(__gen_e_acsl_and_12,"Assertion","main",
                    "!\\valid(t2.p) && \\valid(t2.q)",
                    "tests/temporal/t_struct.c",39);
  }
  /*@ assert ¬\valid(t2.p) ∧ \valid(t2.q); */ ;
  __e_acsl_initialize((void *)(& l.t),sizeof(struct temporal_t));
  __e_acsl_temporal_memcpy((void *)(& l.t),(void *)(& t2),(size_t)16);
  l.t = t2;
  {
    int __gen_e_acsl_initialized_9;
    int __gen_e_acsl_and_13;
    int __gen_e_acsl_and_15;
    __gen_e_acsl_initialized_9 = __e_acsl_initialized((void *)(& l.t.p),
                                                      sizeof(char *));
    if (__gen_e_acsl_initialized_9) {
      int __gen_e_acsl_valid_9;
      __gen_e_acsl_valid_9 = __e_acsl_valid((void *)l.t.p,sizeof(char),
                                            (void *)l.t.p,(void *)(& l.t.p));
      __gen_e_acsl_and_13 = __gen_e_acsl_valid_9;
    }
    else __gen_e_acsl_and_13 = 0;
    if (! __gen_e_acsl_and_13) {
      int __gen_e_acsl_initialized_10;
      int __gen_e_acsl_and_14;
      __gen_e_acsl_initialized_10 = __e_acsl_initialized((void *)(& l.t.q),
                                                         sizeof(char *));
      if (__gen_e_acsl_initialized_10) {
        int __gen_e_acsl_valid_10;
        __gen_e_acsl_valid_10 = __e_acsl_valid((void *)l.t.q,sizeof(char),
                                               (void *)l.t.q,
                                               (void *)(& l.t.q));
        __gen_e_acsl_and_14 = __gen_e_acsl_valid_10;
      }
      else __gen_e_acsl_and_14 = 0;
      __gen_e_acsl_and_15 = __gen_e_acsl_and_14;
    }
    else __gen_e_acsl_and_15 = 0;
    __e_acsl_assert(__gen_e_acsl_and_15,"Assertion","main",
                    "!\\valid(l.t.p) && \\valid(l.t.q)",
                    "tests/temporal/t_struct.c",42);
  }
  /*@ assert ¬\valid(l.t.p) ∧ \valid(l.t.q); */ ;
  __e_acsl_full_init((void *)(& lp));
  __e_acsl_temporal_store_nblock((void *)(& lp),(void *)(& l));
  lp = & l;
  {
    int __gen_e_acsl_initialized_11;
    int __gen_e_acsl_and_16;
    __gen_e_acsl_initialized_11 = __e_acsl_initialized((void *)(& lp->t.p),
                                                       sizeof(char *));
    if (__gen_e_acsl_initialized_11) {
      int __gen_e_acsl_valid_read;
      int __gen_e_acsl_valid_11;
      __gen_e_acsl_valid_read = __e_acsl_valid_read((void *)(& lp->t.p),
                                                    sizeof(char *),
                                                    (void *)(& lp->t.p),
                                                    (void *)0);
      __e_acsl_assert(__gen_e_acsl_valid_read,"RTE","main",
                      "mem_access: \\valid_read(&lp->t.p)",
                      "tests/temporal/t_struct.c",45);
      __gen_e_acsl_valid_11 = __e_acsl_valid((void *)lp->t.p,sizeof(char),
                                             (void *)lp->t.p,
                                             (void *)(& lp->t.p));
      __gen_e_acsl_and_16 = __gen_e_acsl_valid_11;
    }
    else __gen_e_acsl_and_16 = 0;
    __e_acsl_assert(! __gen_e_acsl_and_16,"Assertion","main",
                    "!\\valid(lp->t.p)","tests/temporal/t_struct.c",45);
  }
  /*@ assert ¬\valid(lp->t.p); */ ;
  __e_acsl_initialize((void *)(tarr),sizeof(temporal));
  __e_acsl_temporal_memcpy((void *)(tarr),(void *)(& t2),(size_t)16);
  tarr[0] = t2;
  {
    int __gen_e_acsl_initialized_12;
    int __gen_e_acsl_and_17;
    int __gen_e_acsl_and_19;
    __gen_e_acsl_initialized_12 = __e_acsl_initialized((void *)(& tarr[0].p),
                                                       sizeof(char *));
    if (__gen_e_acsl_initialized_12) {
      int __gen_e_acsl_valid_12;
      __gen_e_acsl_valid_12 = __e_acsl_valid((void *)tarr[0].p,sizeof(char),
                                             (void *)tarr[0].p,
                                             (void *)(& tarr[0].p));
      __gen_e_acsl_and_17 = __gen_e_acsl_valid_12;
    }
    else __gen_e_acsl_and_17 = 0;
    if (! __gen_e_acsl_and_17) {
      int __gen_e_acsl_initialized_13;
      int __gen_e_acsl_and_18;
      __gen_e_acsl_initialized_13 = __e_acsl_initialized((void *)(& tarr[0].q),
                                                         sizeof(char *));
      if (__gen_e_acsl_initialized_13) {
        int __gen_e_acsl_valid_13;
        __gen_e_acsl_valid_13 = __e_acsl_valid((void *)tarr[0].q,
                                               sizeof(char),
                                               (void *)tarr[0].q,
                                               (void *)(& tarr[0].q));
        __gen_e_acsl_and_18 = __gen_e_acsl_valid_13;
      }
      else __gen_e_acsl_and_18 = 0;
      __gen_e_acsl_and_19 = __gen_e_acsl_and_18;
    }
    else __gen_e_acsl_and_19 = 0;
    __e_acsl_assert(__gen_e_acsl_and_19,"Assertion","main",
                    "!\\valid(tarr[0].p) && \\valid(tarr[0].q)",
                    "tests/temporal/t_struct.c",48);
  }
  /*@ assert ¬\valid(tarr[0].p) ∧ \valid(tarr[0].q); */ ;
  __e_acsl_initialize((void *)(larr),sizeof(larger));
  __e_acsl_temporal_memcpy((void *)(larr),(void *)(& l),(size_t)32);
  larr[0] = l;
  {
    int __gen_e_acsl_initialized_14;
    int __gen_e_acsl_and_20;
    int __gen_e_acsl_and_22;
    __gen_e_acsl_initialized_14 = __e_acsl_initialized((void *)(& larr[0].t.p),
                                                       sizeof(char *));
    if (__gen_e_acsl_initialized_14) {
      int __gen_e_acsl_valid_14;
      __gen_e_acsl_valid_14 = __e_acsl_valid((void *)larr[0].t.p,
                                             sizeof(char),
                                             (void *)larr[0].t.p,
                                             (void *)(& larr[0].t.p));
      __gen_e_acsl_and_20 = __gen_e_acsl_valid_14;
    }
    else __gen_e_acsl_and_20 = 0;
    if (! __gen_e_acsl_and_20) {
      int __gen_e_acsl_initialized_15;
      int __gen_e_acsl_and_21;
      __gen_e_acsl_initialized_15 = __e_acsl_initialized((void *)(& larr[0].t.q),
                                                         sizeof(char *));
      if (__gen_e_acsl_initialized_15) {
        int __gen_e_acsl_valid_15;
        __gen_e_acsl_valid_15 = __e_acsl_valid((void *)larr[0].t.q,
                                               sizeof(char),
                                               (void *)larr[0].t.q,
                                               (void *)(& larr[0].t.q));
        __gen_e_acsl_and_21 = __gen_e_acsl_valid_15;
      }
      else __gen_e_acsl_and_21 = 0;
      __gen_e_acsl_and_22 = __gen_e_acsl_and_21;
    }
    else __gen_e_acsl_and_22 = 0;
    __e_acsl_assert(__gen_e_acsl_and_22,"Assertion","main",
                    "!\\valid(larr[0].t.p) && \\valid(larr[0].t.q)",
                    "tests/temporal/t_struct.c",51);
  }
  /*@ assert ¬\valid(larr[0].t.p) ∧ \valid(larr[0].t.q); */ ;
  __retres = 0;
  __e_acsl_delete_block((void *)(larr));
  __e_acsl_delete_block((void *)(& lp));
  __e_acsl_delete_block((void *)(& l));
  __e_acsl_delete_block((void *)(tarr));
  __e_acsl_delete_block((void *)(& t2));
  __e_acsl_delete_block((void *)(& t1));
  __e_acsl_delete_block((void *)(& a));
  __e_acsl_memory_clean();
  return __retres;
}


