/* 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"
char *__gen_e_acsl_literal_string;
char *__gen_e_acsl_literal_string_2;
extern  __attribute__((__FC_BUILTIN__)) int __e_acsl_sound_verdict;

/*@ requires valid_filename: valid_read_string(filename);
    requires valid_mode: valid_read_string(mode);
    ensures
      result_null_or_valid_fd:
        \result == \null || \subset(\result, &__fc_fopen[0 .. 16 - 1]);
    assigns \result;
    assigns \result
      \from (indirect: *(filename + (0 .. strlen{Old}(filename)))),
            (indirect: *(mode + (0 .. strlen{Old}(mode)))), __fc_p_fopen;
 */
FILE *__gen_e_acsl_fopen(char const * restrict filename,
                         char const * restrict mode);

/*@ requires valid_ptr_block: \valid((char *)ptr + (0 .. nmemb * size - 1));
    requires valid_stream: \valid(stream);
    ensures size_read: \result <= \old(nmemb);
    ensures
      initialization:
        \initialized((char *)\old(ptr) + (0 .. \result * \old(size) - 1));
    assigns *((char *)ptr + (0 .. nmemb * size - 1)), *stream, \result;
    assigns *((char *)ptr + (0 .. nmemb * size - 1))
      \from (indirect: size), (indirect: nmemb), (indirect: *stream);
    assigns *stream
      \from (indirect: size), (indirect: nmemb), (indirect: *stream);
    assigns \result \from size, (indirect: *stream);
 */
size_t __gen_e_acsl_fread(void * restrict ptr, size_t size, size_t nmemb,
                          FILE * restrict stream);

/*@ requires valid_ptr_block: \valid((char *)ptr + (0 .. nmemb * size - 1));
    requires valid_stream: \valid(stream);
    ensures size_read: \result <= \old(nmemb);
    ensures
      initialization:
        \initialized((char *)\old(ptr) + (0 .. \result * \old(size) - 1));
    assigns *((char *)ptr + (0 .. nmemb * size - 1)), *stream, \result;
    assigns *((char *)ptr + (0 .. nmemb * size - 1))
      \from (indirect: size), (indirect: nmemb), (indirect: *stream);
    assigns *stream
      \from (indirect: size), (indirect: nmemb), (indirect: *stream);
    assigns \result \from size, (indirect: *stream);
 */
size_t __gen_e_acsl_fread(void * restrict ptr, size_t size, size_t nmemb,
                          FILE * restrict stream)
{
  size_t __gen_e_acsl_at_3;
  __e_acsl_mpz_t __gen_e_acsl_at_2;
  void *__gen_e_acsl_at;
  size_t __retres;
  {
    __e_acsl_mpz_t __gen_e_acsl_size;
    __e_acsl_mpz_t __gen_e_acsl_size_2;
    __e_acsl_mpz_t __gen_e_acsl_sizeof;
    __e_acsl_mpz_t __gen_e_acsl_nmemb;
    __e_acsl_mpz_t __gen_e_acsl_size_3;
    __e_acsl_mpz_t __gen_e_acsl_mul;
    __e_acsl_mpz_t __gen_e_acsl_;
    __e_acsl_mpz_t __gen_e_acsl_sub;
    __e_acsl_mpz_t __gen_e_acsl__2;
    __e_acsl_mpz_t __gen_e_acsl_sub_2;
    __e_acsl_mpz_t __gen_e_acsl_add;
    __e_acsl_mpz_t __gen_e_acsl_mul_2;
    int __gen_e_acsl_le;
    __e_acsl_mpz_t __gen_e_acsl_if;
    __e_acsl_mpz_t __gen_e_acsl__4;
    int __gen_e_acsl_le_2;
    unsigned long __gen_e_acsl_size_4;
    int __gen_e_acsl_valid;
    int __gen_e_acsl_valid_2;
    __e_acsl_store_block((void *)(& stream),8UL);
    __e_acsl_store_block((void *)(& ptr),8UL);
    __gen_e_acsl_at = ptr;
    __gmpz_init_set_ui(__gen_e_acsl_size,size);
    __gmpz_init_set(__gen_e_acsl_at_2,
                    (__e_acsl_mpz_struct const *)(__gen_e_acsl_size));
    __gen_e_acsl_at_3 = nmemb;
    __e_acsl_assert_data_t __gen_e_acsl_assert_data = {.values = (void *)0};
    __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data,"ptr",ptr);
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data,"sizeof(char)",0,
                                 1);
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data,"sizeof(char)",0,
                                 1);
    __gmpz_init_set_si(__gen_e_acsl_sizeof,1L);
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data,"nmemb",0,
                                   nmemb);
    __gmpz_init_set_ui(__gen_e_acsl_nmemb,nmemb);
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data,"size",0,size);
    __gmpz_init_set_ui(__gen_e_acsl_size_3,size);
    __gmpz_init(__gen_e_acsl_mul);
    __gmpz_mul(__gen_e_acsl_mul,
               (__e_acsl_mpz_struct const *)(__gen_e_acsl_nmemb),
               (__e_acsl_mpz_struct const *)(__gen_e_acsl_size_3));
    __gmpz_init_set_si(__gen_e_acsl_,1L);
    __gmpz_init(__gen_e_acsl_sub);
    __gmpz_sub(__gen_e_acsl_sub,
               (__e_acsl_mpz_struct const *)(__gen_e_acsl_mul),
               (__e_acsl_mpz_struct const *)(__gen_e_acsl_));
    __gmpz_init_set_si(__gen_e_acsl__2,0L);
    __gmpz_init(__gen_e_acsl_sub_2);
    __gmpz_sub(__gen_e_acsl_sub_2,
               (__e_acsl_mpz_struct const *)(__gen_e_acsl_sub),
               (__e_acsl_mpz_struct const *)(__gen_e_acsl__2));
    __gmpz_init(__gen_e_acsl_add);
    __gmpz_add(__gen_e_acsl_add,
               (__e_acsl_mpz_struct const *)(__gen_e_acsl_sub_2),
               (__e_acsl_mpz_struct const *)(__gen_e_acsl_));
    __gmpz_init(__gen_e_acsl_mul_2);
    __gmpz_mul(__gen_e_acsl_mul_2,
               (__e_acsl_mpz_struct const *)(__gen_e_acsl_sizeof),
               (__e_acsl_mpz_struct const *)(__gen_e_acsl_add));
    __gmpz_init_set(__gen_e_acsl_size_2,
                    (__e_acsl_mpz_struct const *)(__gen_e_acsl_mul_2));
    __e_acsl_assert_register_mpz(& __gen_e_acsl_assert_data,"size",0,
                                 (__e_acsl_mpz_struct const *)(__gen_e_acsl_size_2));
    __gen_e_acsl_le = __gmpz_cmp((__e_acsl_mpz_struct const *)(__gen_e_acsl_size_2),
                                 (__e_acsl_mpz_struct const *)(__gen_e_acsl__2));
    if (__gen_e_acsl_le <= 0) {
      __e_acsl_mpz_t __gen_e_acsl__3;
      __gmpz_init_set_si(__gen_e_acsl__3,0L);
      __gmpz_init_set(__gen_e_acsl_if,
                      (__e_acsl_mpz_struct const *)(__gen_e_acsl__3));
      __gmpz_clear(__gen_e_acsl__3);
    }
    else {
      __e_acsl_assert_register_mpz(& __gen_e_acsl_assert_data,"size",0,
                                   (__e_acsl_mpz_struct const *)(__gen_e_acsl_size_2));
      __gmpz_init_set(__gen_e_acsl_if,
                      (__e_acsl_mpz_struct const *)(__gen_e_acsl_size_2));
    }
    __e_acsl_assert_data_t __gen_e_acsl_assert_data_2 =
      {.values = (void *)0};
    __e_acsl_assert_register_mpz(& __gen_e_acsl_assert_data_2,
                                 "__gen_e_acsl_if",0,
                                 (__e_acsl_mpz_struct const *)(__gen_e_acsl_if));
    __gmpz_init_set_ui(__gen_e_acsl__4,18446744073709551615UL);
    __gen_e_acsl_le_2 = __gmpz_cmp((__e_acsl_mpz_struct const *)(__gen_e_acsl_if),
                                   (__e_acsl_mpz_struct const *)(__gen_e_acsl__4));
    __e_acsl_assert_register_mpz(& __gen_e_acsl_assert_data,
                                 "__gen_e_acsl_if",0,
                                 (__e_acsl_mpz_struct const *)(__gen_e_acsl_if));
    __gen_e_acsl_assert_data_2.blocking = 1;
    __gen_e_acsl_assert_data_2.kind = "RTE";
    __gen_e_acsl_assert_data_2.pred_txt = "(\\let size = sizeof(char) * (((nmemb * size - 1) - 0) + 1);\n size <= 0? 0: size)\n<= 18446744073709551615";
    __gen_e_acsl_assert_data_2.file = "FRAMAC_SHARE/libc/stdio.h";
    __gen_e_acsl_assert_data_2.fct = "fread";
    __gen_e_acsl_assert_data_2.line = 351;
    __gen_e_acsl_assert_data_2.name = "offset_lesser_or_eq_than_SIZE_MAX";
    __e_acsl_assert(__gen_e_acsl_le_2 <= 0,& __gen_e_acsl_assert_data_2);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data_2);
    __gen_e_acsl_size_4 = __gmpz_get_ui((__e_acsl_mpz_struct const *)(__gen_e_acsl_if));
    __gen_e_acsl_valid = __e_acsl_valid((void *)((char *)ptr + 1 * 0),
                                        __gen_e_acsl_size_4,ptr,
                                        (void *)(& ptr));
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data,
                                 "valid_ptr_block: \\valid((char *)ptr + (0 .. nmemb * size - 1))",
                                 0,__gen_e_acsl_valid);
    __gen_e_acsl_assert_data.blocking = 1;
    __gen_e_acsl_assert_data.kind = "Precondition";
    __gen_e_acsl_assert_data.pred_txt = "\\valid((char *)ptr + (0 .. nmemb * size - 1))";
    __gen_e_acsl_assert_data.file = "FRAMAC_SHARE/libc/stdio.h";
    __gen_e_acsl_assert_data.fct = "fread";
    __gen_e_acsl_assert_data.line = 351;
    __gen_e_acsl_assert_data.name = "valid_ptr_block";
    __e_acsl_assert(__gen_e_acsl_valid,& __gen_e_acsl_assert_data);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data);
    __e_acsl_assert_data_t __gen_e_acsl_assert_data_3 =
      {.values = (void *)0};
    __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data_3,"stream",
                                 (void *)stream);
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_3,
                                   "sizeof(FILE)",0,sizeof(FILE));
    __gen_e_acsl_valid_2 = __e_acsl_valid((void *)stream,sizeof(FILE),
                                          (void *)stream,(void *)(& stream));
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_3,
                                 "\\valid(stream)",0,__gen_e_acsl_valid_2);
    __gen_e_acsl_assert_data_3.blocking = 1;
    __gen_e_acsl_assert_data_3.kind = "Precondition";
    __gen_e_acsl_assert_data_3.pred_txt = "\\valid(stream)";
    __gen_e_acsl_assert_data_3.file = "FRAMAC_SHARE/libc/stdio.h";
    __gen_e_acsl_assert_data_3.fct = "fread";
    __gen_e_acsl_assert_data_3.line = 352;
    __gen_e_acsl_assert_data_3.name = "valid_stream";
    __e_acsl_assert(__gen_e_acsl_valid_2,& __gen_e_acsl_assert_data_3);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data_3);
    __gmpz_clear(__gen_e_acsl_size);
    __gmpz_clear(__gen_e_acsl_size_2);
    __gmpz_clear(__gen_e_acsl_sizeof);
    __gmpz_clear(__gen_e_acsl_nmemb);
    __gmpz_clear(__gen_e_acsl_size_3);
    __gmpz_clear(__gen_e_acsl_mul);
    __gmpz_clear(__gen_e_acsl_);
    __gmpz_clear(__gen_e_acsl_sub);
    __gmpz_clear(__gen_e_acsl__2);
    __gmpz_clear(__gen_e_acsl_sub_2);
    __gmpz_clear(__gen_e_acsl_add);
    __gmpz_clear(__gen_e_acsl_mul_2);
    __gmpz_clear(__gen_e_acsl_if);
    __gmpz_clear(__gen_e_acsl__4);
  }
  __retres = fread(ptr,size,nmemb,stream);
  {
    __e_acsl_mpz_t __gen_e_acsl___retres;
    __e_acsl_mpz_t __gen_e_acsl_size_5;
    __e_acsl_mpz_t __gen_e_acsl_mul_3;
    __e_acsl_mpz_t __gen_e_acsl__5;
    int __gen_e_acsl_le_3;
    unsigned long __gen_e_acsl_size_6;
    __e_acsl_assert_data_t __gen_e_acsl_assert_data_4 =
      {.values = (void *)0};
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_4,"__retres",0,
                                   __retres);
    __gmpz_init_set_ui(__gen_e_acsl___retres,__retres);
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_4,"size",0,
                                   size);
    __gmpz_init_set_ui(__gen_e_acsl_size_5,size);
    __gmpz_init(__gen_e_acsl_mul_3);
    __gmpz_mul(__gen_e_acsl_mul_3,
               (__e_acsl_mpz_struct const *)(__gen_e_acsl___retres),
               (__e_acsl_mpz_struct const *)(__gen_e_acsl_size_5));
    __gmpz_init_set_ui(__gen_e_acsl__5,18446744073709551615UL);
    __gen_e_acsl_le_3 = __gmpz_cmp((__e_acsl_mpz_struct const *)(__gen_e_acsl_mul_3),
                                   (__e_acsl_mpz_struct const *)(__gen_e_acsl__5));
    __gen_e_acsl_assert_data_4.blocking = 1;
    __gen_e_acsl_assert_data_4.kind = "RTE";
    __gen_e_acsl_assert_data_4.pred_txt = "__retres * size <= 18446744073709551615";
    __gen_e_acsl_assert_data_4.file = "FRAMAC_SHARE/libc/stdio.h";
    __gen_e_acsl_assert_data_4.fct = "fread";
    __gen_e_acsl_assert_data_4.line = 350;
    __gen_e_acsl_assert_data_4.name = "size_lesser_or_eq_than_SIZE_MAX";
    __e_acsl_assert(__gen_e_acsl_le_3 <= 0,& __gen_e_acsl_assert_data_4);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data_4);
    __gen_e_acsl_size_6 = __gmpz_get_ui((__e_acsl_mpz_struct const *)(__gen_e_acsl_mul_3));
    __e_acsl_initialize(ptr,__gen_e_acsl_size_6);
    __gmpz_clear(__gen_e_acsl___retres);
    __gmpz_clear(__gen_e_acsl_size_5);
    __gmpz_clear(__gen_e_acsl_mul_3);
    __gmpz_clear(__gen_e_acsl__5);
  }
  {
    __e_acsl_mpz_t __gen_e_acsl_size_7;
    __e_acsl_mpz_t __gen_e_acsl_sizeof_2;
    __e_acsl_mpz_t __gen_e_acsl_result;
    __e_acsl_mpz_t __gen_e_acsl_mul_4;
    __e_acsl_mpz_t __gen_e_acsl__6;
    __e_acsl_mpz_t __gen_e_acsl_sub_3;
    __e_acsl_mpz_t __gen_e_acsl__7;
    __e_acsl_mpz_t __gen_e_acsl_sub_4;
    __e_acsl_mpz_t __gen_e_acsl_add_2;
    __e_acsl_mpz_t __gen_e_acsl_mul_5;
    int __gen_e_acsl_le_4;
    __e_acsl_mpz_t __gen_e_acsl_if_2;
    __e_acsl_mpz_t __gen_e_acsl__9;
    int __gen_e_acsl_le_5;
    unsigned long __gen_e_acsl_size_8;
    int __gen_e_acsl_initialized;
    __e_acsl_assert_data_t __gen_e_acsl_assert_data_5 =
      {.values = (void *)0};
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_5,"\\result",0,
                                   __retres);
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_5,
                                   "\\old(nmemb)",0,__gen_e_acsl_at_3);
    __gen_e_acsl_assert_data_5.blocking = 1;
    __gen_e_acsl_assert_data_5.kind = "Postcondition";
    __gen_e_acsl_assert_data_5.pred_txt = "\\result <= \\old(nmemb)";
    __gen_e_acsl_assert_data_5.file = "FRAMAC_SHARE/libc/stdio.h";
    __gen_e_acsl_assert_data_5.fct = "fread";
    __gen_e_acsl_assert_data_5.line = 356;
    __gen_e_acsl_assert_data_5.name = "size_read";
    __e_acsl_assert(__retres <= __gen_e_acsl_at_3,
                    & __gen_e_acsl_assert_data_5);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data_5);
    __e_acsl_assert_data_t __gen_e_acsl_assert_data_6 =
      {.values = (void *)0};
    __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data_6,"\\old(ptr)",
                                 __gen_e_acsl_at);
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_6,"sizeof(char)",
                                 0,1);
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_6,"sizeof(char)",
                                 0,1);
    __gmpz_init_set_si(__gen_e_acsl_sizeof_2,1L);
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_6,"\\result",0,
                                   __retres);
    __gmpz_init_set_ui(__gen_e_acsl_result,__retres);
    __e_acsl_assert_register_mpz(& __gen_e_acsl_assert_data_6,"\\old(size)",
                                 0,
                                 (__e_acsl_mpz_struct const *)(__gen_e_acsl_at_2));
    __gmpz_init(__gen_e_acsl_mul_4);
    __gmpz_mul(__gen_e_acsl_mul_4,
               (__e_acsl_mpz_struct const *)(__gen_e_acsl_result),
               (__e_acsl_mpz_struct const *)(__gen_e_acsl_at_2));
    __gmpz_init_set_si(__gen_e_acsl__6,1L);
    __gmpz_init(__gen_e_acsl_sub_3);
    __gmpz_sub(__gen_e_acsl_sub_3,
               (__e_acsl_mpz_struct const *)(__gen_e_acsl_mul_4),
               (__e_acsl_mpz_struct const *)(__gen_e_acsl__6));
    __gmpz_init_set_si(__gen_e_acsl__7,0L);
    __gmpz_init(__gen_e_acsl_sub_4);
    __gmpz_sub(__gen_e_acsl_sub_4,
               (__e_acsl_mpz_struct const *)(__gen_e_acsl_sub_3),
               (__e_acsl_mpz_struct const *)(__gen_e_acsl__7));
    __gmpz_init(__gen_e_acsl_add_2);
    __gmpz_add(__gen_e_acsl_add_2,
               (__e_acsl_mpz_struct const *)(__gen_e_acsl_sub_4),
               (__e_acsl_mpz_struct const *)(__gen_e_acsl__6));
    __gmpz_init(__gen_e_acsl_mul_5);
    __gmpz_mul(__gen_e_acsl_mul_5,
               (__e_acsl_mpz_struct const *)(__gen_e_acsl_sizeof_2),
               (__e_acsl_mpz_struct const *)(__gen_e_acsl_add_2));
    __gmpz_init_set(__gen_e_acsl_size_7,
                    (__e_acsl_mpz_struct const *)(__gen_e_acsl_mul_5));
    __e_acsl_assert_register_mpz(& __gen_e_acsl_assert_data_6,"size",0,
                                 (__e_acsl_mpz_struct const *)(__gen_e_acsl_size_7));
    __gen_e_acsl_le_4 = __gmpz_cmp((__e_acsl_mpz_struct const *)(__gen_e_acsl_size_7),
                                   (__e_acsl_mpz_struct const *)(__gen_e_acsl__7));
    if (__gen_e_acsl_le_4 <= 0) {
      __e_acsl_mpz_t __gen_e_acsl__8;
      __gmpz_init_set_si(__gen_e_acsl__8,0L);
      __gmpz_init_set(__gen_e_acsl_if_2,
                      (__e_acsl_mpz_struct const *)(__gen_e_acsl__8));
      __gmpz_clear(__gen_e_acsl__8);
    }
    else {
      __e_acsl_assert_register_mpz(& __gen_e_acsl_assert_data_6,"size",0,
                                   (__e_acsl_mpz_struct const *)(__gen_e_acsl_size_7));
      __gmpz_init_set(__gen_e_acsl_if_2,
                      (__e_acsl_mpz_struct const *)(__gen_e_acsl_size_7));
    }
    __e_acsl_assert_data_t __gen_e_acsl_assert_data_7 =
      {.values = (void *)0};
    __e_acsl_assert_register_mpz(& __gen_e_acsl_assert_data_7,
                                 "__gen_e_acsl_if_2",0,
                                 (__e_acsl_mpz_struct const *)(__gen_e_acsl_if_2));
    __gmpz_init_set_ui(__gen_e_acsl__9,18446744073709551615UL);
    __gen_e_acsl_le_5 = __gmpz_cmp((__e_acsl_mpz_struct const *)(__gen_e_acsl_if_2),
                                   (__e_acsl_mpz_struct const *)(__gen_e_acsl__9));
    __e_acsl_assert_register_mpz(& __gen_e_acsl_assert_data_6,
                                 "__gen_e_acsl_if_2",0,
                                 (__e_acsl_mpz_struct const *)(__gen_e_acsl_if_2));
    __gen_e_acsl_assert_data_7.blocking = 1;
    __gen_e_acsl_assert_data_7.kind = "RTE";
    __gen_e_acsl_assert_data_7.pred_txt = "(\\let size = sizeof(char) * (((\\result * \\old(size) - 1) - 0) + 1);\n size <= 0? 0: size)\n<= 18446744073709551615";
    __gen_e_acsl_assert_data_7.file = "FRAMAC_SHARE/libc/stdio.h";
    __gen_e_acsl_assert_data_7.fct = "fread";
    __gen_e_acsl_assert_data_7.line = 357;
    __gen_e_acsl_assert_data_7.name = "offset_lesser_or_eq_than_SIZE_MAX";
    __e_acsl_assert(__gen_e_acsl_le_5 <= 0,& __gen_e_acsl_assert_data_7);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data_7);
    __gen_e_acsl_size_8 = __gmpz_get_ui((__e_acsl_mpz_struct const *)(__gen_e_acsl_if_2));
    __gen_e_acsl_initialized = __e_acsl_initialized((void *)((char *)__gen_e_acsl_at + 
                                                             1 * 0),
                                                    __gen_e_acsl_size_8);
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_6,
                                 "initialization:\n  \\initialized((char *)\\old(ptr) + (0 .. \\result * \\old(size) - 1))",
                                 0,__gen_e_acsl_initialized);
    __gen_e_acsl_assert_data_6.blocking = 1;
    __gen_e_acsl_assert_data_6.kind = "Postcondition";
    __gen_e_acsl_assert_data_6.pred_txt = "\\initialized((char *)\\old(ptr) + (0 .. \\result * \\old(size) - 1))";
    __gen_e_acsl_assert_data_6.file = "FRAMAC_SHARE/libc/stdio.h";
    __gen_e_acsl_assert_data_6.fct = "fread";
    __gen_e_acsl_assert_data_6.line = 357;
    __gen_e_acsl_assert_data_6.name = "initialization";
    __e_acsl_assert(__gen_e_acsl_initialized,& __gen_e_acsl_assert_data_6);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data_6);
    __e_acsl_delete_block((void *)(& stream));
    __e_acsl_delete_block((void *)(& ptr));
    __gmpz_clear(__gen_e_acsl_size_7);
    __gmpz_clear(__gen_e_acsl_sizeof_2);
    __gmpz_clear(__gen_e_acsl_result);
    __gmpz_clear(__gen_e_acsl_mul_4);
    __gmpz_clear(__gen_e_acsl__6);
    __gmpz_clear(__gen_e_acsl_sub_3);
    __gmpz_clear(__gen_e_acsl__7);
    __gmpz_clear(__gen_e_acsl_sub_4);
    __gmpz_clear(__gen_e_acsl_add_2);
    __gmpz_clear(__gen_e_acsl_mul_5);
    __gmpz_clear(__gen_e_acsl_if_2);
    __gmpz_clear(__gen_e_acsl__9);
    __gmpz_clear(__gen_e_acsl_at_2);
    return __retres;
  }
}

/*@ requires valid_filename: valid_read_string(filename);
    requires valid_mode: valid_read_string(mode);
    ensures
      result_null_or_valid_fd:
        \result == \null || \subset(\result, &__fc_fopen[0 .. 16 - 1]);
    assigns \result;
    assigns \result
      \from (indirect: *(filename + (0 .. strlen{Old}(filename)))),
            (indirect: *(mode + (0 .. strlen{Old}(mode)))), __fc_p_fopen;
 */
FILE *__gen_e_acsl_fopen(char const * restrict filename,
                         char const * restrict mode)
{
  FILE *__retres;
  __e_acsl_store_block((void *)(& __retres),8UL);
  __retres = fopen(filename,mode);
  __e_acsl_delete_block((void *)(& __retres));
  return __retres;
}

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 = "r";
    __e_acsl_store_block((void *)__gen_e_acsl_literal_string,sizeof("r"));
    __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 = "/dev/urandom";
    __e_acsl_store_block((void *)__gen_e_acsl_literal_string_2,
                         sizeof("/dev/urandom"));
    __e_acsl_full_init((void *)__gen_e_acsl_literal_string_2);
    __e_acsl_mark_readonly((void *)__gen_e_acsl_literal_string_2);
  }
  return;
}

int main(void)
{
  int __retres;
  int buf[6];
  size_t tmp_0;
  int buf2[6];
  __e_acsl_memory_init((int *)0,(char ***)0,8UL);
  __e_acsl_globals_init();
  __e_acsl_store_block((void *)(buf2),24UL);
  __e_acsl_store_block((void *)(buf),24UL);
  FILE *f =
    __gen_e_acsl_fopen(__gen_e_acsl_literal_string_2,
                       __gen_e_acsl_literal_string);
  __e_acsl_store_block((void *)(& f),8UL);
  __e_acsl_full_init((void *)(& f));
  tmp_0 = __gen_e_acsl_fread((void *)(& buf[1]),sizeof(int),(size_t)4,f);
  int res = (int)tmp_0;
  {
    int __gen_e_acsl_initialized;
    __e_acsl_assert_data_t __gen_e_acsl_assert_data = {.values = (void *)0};
    __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data,"(int *)buf",
                                 (void *)(buf));
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data,"sizeof(int)",
                                   0,sizeof(int));
    __gen_e_acsl_initialized = __e_acsl_initialized((void *)(buf),
                                                    sizeof(int));
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data,
                                 "\\initialized((int *)buf)",0,
                                 __gen_e_acsl_initialized);
    __gen_e_acsl_assert_data.blocking = 1;
    __gen_e_acsl_assert_data.kind = "Assertion";
    __gen_e_acsl_assert_data.pred_txt = "!\\initialized((int *)buf)";
    __gen_e_acsl_assert_data.file = "file.c";
    __gen_e_acsl_assert_data.fct = "main";
    __gen_e_acsl_assert_data.line = 13;
    __e_acsl_assert(! __gen_e_acsl_initialized,& __gen_e_acsl_assert_data);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data);
  }
  /*@ assert !\initialized((int *)buf); */ ;
  if (res == 0) {
    {
      int __gen_e_acsl_initialized_2;
      __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,"&buf[1]",
                                   (void *)(& buf[1]));
      __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_2,
                                     "sizeof(int)",0,sizeof(int));
      __gen_e_acsl_initialized_2 = __e_acsl_initialized((void *)(& buf[1]),
                                                        sizeof(int));
      __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_2,
                                   "\\initialized(&buf[1])",0,
                                   __gen_e_acsl_initialized_2);
      __gen_e_acsl_assert_data_2.blocking = 1;
      __gen_e_acsl_assert_data_2.kind = "Assertion";
      __gen_e_acsl_assert_data_2.pred_txt = "!\\initialized(&buf[1])";
      __gen_e_acsl_assert_data_2.file = "file.c";
      __gen_e_acsl_assert_data_2.fct = "main";
      __gen_e_acsl_assert_data_2.line = 15;
      __e_acsl_assert(! __gen_e_acsl_initialized_2,
                      & __gen_e_acsl_assert_data_2);
      __e_acsl_assert_clean(& __gen_e_acsl_assert_data_2);
    }
    /*@ assert !\initialized(&buf[1]); */ ;
  }
  if (res >= 1) {
    {
      int __gen_e_acsl_initialized_3;
      __e_acsl_assert_data_t __gen_e_acsl_assert_data_3 =
        {.values = (void *)0};
      __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data_3,"&buf[1]",
                                   (void *)(& buf[1]));
      __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_3,
                                     "sizeof(int)",0,sizeof(int));
      __gen_e_acsl_initialized_3 = __e_acsl_initialized((void *)(& buf[1]),
                                                        sizeof(int));
      __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_3,
                                   "\\initialized(&buf[1])",0,
                                   __gen_e_acsl_initialized_3);
      __gen_e_acsl_assert_data_3.blocking = 1;
      __gen_e_acsl_assert_data_3.kind = "Assertion";
      __gen_e_acsl_assert_data_3.pred_txt = "\\initialized(&buf[1])";
      __gen_e_acsl_assert_data_3.file = "file.c";
      __gen_e_acsl_assert_data_3.fct = "main";
      __gen_e_acsl_assert_data_3.line = 18;
      __e_acsl_assert(__gen_e_acsl_initialized_3,
                      & __gen_e_acsl_assert_data_3);
      __e_acsl_assert_clean(& __gen_e_acsl_assert_data_3);
    }
    /*@ assert \initialized(&buf[1]); */ ;
  }
  if (res >= 2) {
    {
      int __gen_e_acsl_initialized_4;
      __e_acsl_assert_data_t __gen_e_acsl_assert_data_4 =
        {.values = (void *)0};
      __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data_4,"&buf[2]",
                                   (void *)(& buf[2]));
      __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_4,
                                     "sizeof(int)",0,sizeof(int));
      __gen_e_acsl_initialized_4 = __e_acsl_initialized((void *)(& buf[2]),
                                                        sizeof(int));
      __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_4,
                                   "\\initialized(&buf[2])",0,
                                   __gen_e_acsl_initialized_4);
      __gen_e_acsl_assert_data_4.blocking = 1;
      __gen_e_acsl_assert_data_4.kind = "Assertion";
      __gen_e_acsl_assert_data_4.pred_txt = "\\initialized(&buf[2])";
      __gen_e_acsl_assert_data_4.file = "file.c";
      __gen_e_acsl_assert_data_4.fct = "main";
      __gen_e_acsl_assert_data_4.line = 21;
      __e_acsl_assert(__gen_e_acsl_initialized_4,
                      & __gen_e_acsl_assert_data_4);
      __e_acsl_assert_clean(& __gen_e_acsl_assert_data_4);
    }
    /*@ assert \initialized(&buf[2]); */ ;
  }
  if (res >= 3) {
    {
      int __gen_e_acsl_initialized_5;
      __e_acsl_assert_data_t __gen_e_acsl_assert_data_5 =
        {.values = (void *)0};
      __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data_5,"&buf[3]",
                                   (void *)(& buf[3]));
      __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_5,
                                     "sizeof(int)",0,sizeof(int));
      __gen_e_acsl_initialized_5 = __e_acsl_initialized((void *)(& buf[3]),
                                                        sizeof(int));
      __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_5,
                                   "\\initialized(&buf[3])",0,
                                   __gen_e_acsl_initialized_5);
      __gen_e_acsl_assert_data_5.blocking = 1;
      __gen_e_acsl_assert_data_5.kind = "Assertion";
      __gen_e_acsl_assert_data_5.pred_txt = "\\initialized(&buf[3])";
      __gen_e_acsl_assert_data_5.file = "file.c";
      __gen_e_acsl_assert_data_5.fct = "main";
      __gen_e_acsl_assert_data_5.line = 24;
      __e_acsl_assert(__gen_e_acsl_initialized_5,
                      & __gen_e_acsl_assert_data_5);
      __e_acsl_assert_clean(& __gen_e_acsl_assert_data_5);
    }
    /*@ assert \initialized(&buf[3]); */ ;
  }
  if (res >= 4) {
    {
      int __gen_e_acsl_initialized_6;
      __e_acsl_assert_data_t __gen_e_acsl_assert_data_6 =
        {.values = (void *)0};
      __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data_6,"&buf[4]",
                                   (void *)(& buf[4]));
      __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_6,
                                     "sizeof(int)",0,sizeof(int));
      __gen_e_acsl_initialized_6 = __e_acsl_initialized((void *)(& buf[4]),
                                                        sizeof(int));
      __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_6,
                                   "\\initialized(&buf[4])",0,
                                   __gen_e_acsl_initialized_6);
      __gen_e_acsl_assert_data_6.blocking = 1;
      __gen_e_acsl_assert_data_6.kind = "Assertion";
      __gen_e_acsl_assert_data_6.pred_txt = "\\initialized(&buf[4])";
      __gen_e_acsl_assert_data_6.file = "file.c";
      __gen_e_acsl_assert_data_6.fct = "main";
      __gen_e_acsl_assert_data_6.line = 27;
      __e_acsl_assert(__gen_e_acsl_initialized_6,
                      & __gen_e_acsl_assert_data_6);
      __e_acsl_assert_clean(& __gen_e_acsl_assert_data_6);
    }
    /*@ assert \initialized(&buf[4]); */ ;
  }
  {
    int __gen_e_acsl_initialized_7;
    __e_acsl_assert_data_t __gen_e_acsl_assert_data_7 =
      {.values = (void *)0};
    __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data_7,"&buf[5]",
                                 (void *)(& buf[5]));
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_7,
                                   "sizeof(int)",0,sizeof(int));
    __gen_e_acsl_initialized_7 = __e_acsl_initialized((void *)(& buf[5]),
                                                      sizeof(int));
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_7,
                                 "\\initialized(&buf[5])",0,
                                 __gen_e_acsl_initialized_7);
    __gen_e_acsl_assert_data_7.blocking = 1;
    __gen_e_acsl_assert_data_7.kind = "Assertion";
    __gen_e_acsl_assert_data_7.pred_txt = "!\\initialized(&buf[5])";
    __gen_e_acsl_assert_data_7.file = "file.c";
    __gen_e_acsl_assert_data_7.fct = "main";
    __gen_e_acsl_assert_data_7.line = 29;
    __e_acsl_assert(! __gen_e_acsl_initialized_7,
                    & __gen_e_acsl_assert_data_7);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data_7);
  }
  /*@ assert !\initialized(&buf[5]); */ ;
  __gen_e_acsl_fread((void *)(& buf2[1]),sizeof(int),(size_t)4,f);
  {
    int __gen_e_acsl_initialized_8;
    __e_acsl_assert_data_t __gen_e_acsl_assert_data_8 =
      {.values = (void *)0};
    __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data_8,"(int *)buf2",
                                 (void *)(buf2));
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_8,
                                   "sizeof(int)",0,sizeof(int));
    __gen_e_acsl_initialized_8 = __e_acsl_initialized((void *)(buf2),
                                                      sizeof(int));
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_8,
                                 "\\initialized((int *)buf2)",0,
                                 __gen_e_acsl_initialized_8);
    __gen_e_acsl_assert_data_8.blocking = 1;
    __gen_e_acsl_assert_data_8.kind = "Assertion";
    __gen_e_acsl_assert_data_8.pred_txt = "!\\initialized((int *)buf2)";
    __gen_e_acsl_assert_data_8.file = "file.c";
    __gen_e_acsl_assert_data_8.fct = "main";
    __gen_e_acsl_assert_data_8.line = 36;
    __e_acsl_assert(! __gen_e_acsl_initialized_8,
                    & __gen_e_acsl_assert_data_8);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data_8);
  }
  /*@ assert !\initialized((int *)buf2); */ ;
  {
    int __gen_e_acsl_size;
    int __gen_e_acsl_if;
    int __gen_e_acsl_initialized_9;
    __e_acsl_assert_data_t __gen_e_acsl_assert_data_9 =
      {.values = (void *)0};
    __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data_9,"(int *)buf2",
                                 (void *)(buf2));
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_9,"sizeof(int)",
                                 0,4);
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_9,"sizeof(int)",
                                 0,4);
    __gen_e_acsl_size = 4 * ((4 - 1) + 1);
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_9,"size",0,
                                 __gen_e_acsl_size);
    if (__gen_e_acsl_size <= 0) __gen_e_acsl_if = 0;
    else {
      __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_9,"size",0,
                                   __gen_e_acsl_size);
      __gen_e_acsl_if = __gen_e_acsl_size;
    }
    __gen_e_acsl_initialized_9 = __e_acsl_initialized((void *)((char *)(buf2) + 
                                                               4 * 1),
                                                      (size_t)__gen_e_acsl_if);
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_9,
                                 "\\initialized(&buf2[1 .. 4])",0,
                                 __gen_e_acsl_initialized_9);
    __gen_e_acsl_assert_data_9.blocking = 1;
    __gen_e_acsl_assert_data_9.kind = "Assertion";
    __gen_e_acsl_assert_data_9.pred_txt = "\\initialized(&buf2[1 .. 4])";
    __gen_e_acsl_assert_data_9.file = "file.c";
    __gen_e_acsl_assert_data_9.fct = "main";
    __gen_e_acsl_assert_data_9.line = 37;
    __e_acsl_assert(__gen_e_acsl_initialized_9,& __gen_e_acsl_assert_data_9);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data_9);
  }
  /*@ assert \initialized(&buf2[1 .. 4]); */ ;
  {
    int __gen_e_acsl_initialized_10;
    __e_acsl_assert_data_t __gen_e_acsl_assert_data_10 =
      {.values = (void *)0};
    __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data_10,"&buf2[5]",
                                 (void *)(& buf2[5]));
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_10,
                                   "sizeof(int)",0,sizeof(int));
    __gen_e_acsl_initialized_10 = __e_acsl_initialized((void *)(& buf2[5]),
                                                       sizeof(int));
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_10,
                                 "\\initialized(&buf2[5])",0,
                                 __gen_e_acsl_initialized_10);
    __gen_e_acsl_assert_data_10.blocking = 1;
    __gen_e_acsl_assert_data_10.kind = "Assertion";
    __gen_e_acsl_assert_data_10.pred_txt = "!\\initialized(&buf2[5])";
    __gen_e_acsl_assert_data_10.file = "file.c";
    __gen_e_acsl_assert_data_10.fct = "main";
    __gen_e_acsl_assert_data_10.line = 38;
    __e_acsl_assert(! __gen_e_acsl_initialized_10,
                    & __gen_e_acsl_assert_data_10);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data_10);
  }
  /*@ assert !\initialized(&buf2[5]); */ ;
  __retres = 0;
  __e_acsl_delete_block((void *)(buf2));
  __e_acsl_delete_block((void *)(& f));
  __e_acsl_delete_block((void *)(buf));
  __e_acsl_memory_clean();
  return __retres;
}


