/* Generated by Frama-C */
#include "stddef.h"
#include "stdio.h"
int main(void)
{
  int __retres;
  __e_acsl_memory_init((int *)0,(char ***)0,(size_t)8);
  {
    int __gen_e_acsl_forall;
    int __gen_e_acsl_x;
    __gen_e_acsl_forall = 1;
    __gen_e_acsl_x = 0;
    while (1) {
      if (__gen_e_acsl_x <= 1) ; else break;
      {
        int __gen_e_acsl_or;
        if (__gen_e_acsl_x == 0) __gen_e_acsl_or = 1;
        else __gen_e_acsl_or = __gen_e_acsl_x == 1;
        if (__gen_e_acsl_or) ;
        else {
          __gen_e_acsl_forall = 0;
          goto e_acsl_end_loop1;
        }
      }
      __gen_e_acsl_x ++;
    }
    e_acsl_end_loop1: ;
    __e_acsl_assert(__gen_e_acsl_forall,"Assertion","main",
                    "\\forall integer x; 0 <= x <= 1 ==> x == 0 || x == 1",
                    "tests/arith/quantif.i",9);
  }
  /*@ assert ∀ ℤ x; 0 ≤ x ≤ 1 ⇒ x ≡ 0 ∨ x ≡ 1; */ ;
  {
    int __gen_e_acsl_forall_2;
    int __gen_e_acsl_x_2;
    __gen_e_acsl_forall_2 = 1;
    __gen_e_acsl_x_2 = 0 + 1;
    while (1) {
      if (__gen_e_acsl_x_2 <= 1) ; else break;
      if (__gen_e_acsl_x_2 == 1) ;
      else {
        __gen_e_acsl_forall_2 = 0;
        goto e_acsl_end_loop2;
      }
      __gen_e_acsl_x_2 ++;
    }
    e_acsl_end_loop2: ;
    __e_acsl_assert(__gen_e_acsl_forall_2,"Assertion","main",
                    "\\forall integer x; 0 < x <= 1 ==> x == 1",
                    "tests/arith/quantif.i",10);
  }
  /*@ assert ∀ ℤ x; 0 < x ≤ 1 ⇒ x ≡ 1; */ ;
  {
    int __gen_e_acsl_forall_3;
    int __gen_e_acsl_x_3;
    __gen_e_acsl_forall_3 = 1;
    __gen_e_acsl_x_3 = 0;
    while (1) {
      if (__gen_e_acsl_x_3 < 1) ; else break;
      if (__gen_e_acsl_x_3 == 0) ;
      else {
        __gen_e_acsl_forall_3 = 0;
        goto e_acsl_end_loop3;
      }
      __gen_e_acsl_x_3 ++;
    }
    e_acsl_end_loop3: ;
    __e_acsl_assert(__gen_e_acsl_forall_3,"Assertion","main",
                    "\\forall integer x; 0 <= x < 1 ==> x == 0",
                    "tests/arith/quantif.i",11);
  }
  /*@ assert ∀ ℤ x; 0 ≤ x < 1 ⇒ x ≡ 0; */ ;
  {
    int __gen_e_acsl_forall_4;
    int __gen_e_acsl_x_4;
    int __gen_e_acsl_y;
    int __gen_e_acsl_z;
    __gen_e_acsl_forall_4 = 1;
    __gen_e_acsl_x_4 = 0;
    while (1) {
      if (__gen_e_acsl_x_4 < 2) ; else break;
      __gen_e_acsl_y = 0;
      while (1) {
        if (__gen_e_acsl_y < 5) ; else break;
        __gen_e_acsl_z = 0;
        while (1) {
          if (__gen_e_acsl_z <= __gen_e_acsl_y) ; else break;
          if (__gen_e_acsl_x_4 + __gen_e_acsl_z <= __gen_e_acsl_y + 1) 
            ;
          else {
            __gen_e_acsl_forall_4 = 0;
            goto e_acsl_end_loop4;
          }
          __gen_e_acsl_z ++;
        }
        __gen_e_acsl_y ++;
      }
      __gen_e_acsl_x_4 ++;
    }
    e_acsl_end_loop4: ;
    __e_acsl_assert(__gen_e_acsl_forall_4,"Assertion","main",
                    "\\forall integer x, integer y, integer z;\n  0 <= x < 2 && 0 <= y < 5 && 0 <= z <= y ==> x + z <= y + 1",
                    "tests/arith/quantif.i",15);
  }
  /*@
  assert
  ∀ ℤ x, ℤ y, ℤ z;
    0 ≤ x < 2 ∧ 0 ≤ y < 5 ∧ 0 ≤ z ≤ y ⇒ x + z ≤ y + 1;
   */
  ;
  {
    int __gen_e_acsl_exists;
    int __gen_e_acsl_x_5;
    __gen_e_acsl_exists = 0;
    __gen_e_acsl_x_5 = 0;
    while (1) {
      if (__gen_e_acsl_x_5 < 10) ; else break;
      if (! (__gen_e_acsl_x_5 == 5)) ;
      else {
        __gen_e_acsl_exists = 1;
        goto e_acsl_end_loop5;
      }
      __gen_e_acsl_x_5 ++;
    }
    e_acsl_end_loop5: ;
    __e_acsl_assert(__gen_e_acsl_exists,"Assertion","main",
                    "\\exists int x; 0 <= x < 10 && x == 5",
                    "tests/arith/quantif.i",20);
  }
  /*@ assert ∃ int x; 0 ≤ x < 10 ∧ x ≡ 5; */ ;
  {
    int __gen_e_acsl_forall_5;
    int __gen_e_acsl_x_6;
    __gen_e_acsl_forall_5 = 1;
    __gen_e_acsl_x_6 = 0;
    while (1) {
      if (__gen_e_acsl_x_6 < 10) ; else break;
      {
        int __gen_e_acsl_implies;
        if (! (__gen_e_acsl_x_6 % 2 == 0)) __gen_e_acsl_implies = 1;
        else {
          int __gen_e_acsl_exists_2;
          int __gen_e_acsl_y_2;
          __gen_e_acsl_exists_2 = 0;
          __gen_e_acsl_y_2 = 0;
          while (1) {
            if (__gen_e_acsl_y_2 <= __gen_e_acsl_x_6 / 2) ; else break;
            if (! (__gen_e_acsl_x_6 == 2 * __gen_e_acsl_y_2)) ;
            else {
              __gen_e_acsl_exists_2 = 1;
              goto e_acsl_end_loop6;
            }
            __gen_e_acsl_y_2 ++;
          }
          e_acsl_end_loop6: ;
          __gen_e_acsl_implies = __gen_e_acsl_exists_2;
        }
        if (__gen_e_acsl_implies) ;
        else {
          __gen_e_acsl_forall_5 = 0;
          goto e_acsl_end_loop7;
        }
      }
      __gen_e_acsl_x_6 ++;
    }
    e_acsl_end_loop7: ;
    __e_acsl_assert(__gen_e_acsl_forall_5,"Assertion","main",
                    "\\forall int x;\n  0 <= x < 10 ==>\n  x % 2 == 0 ==> (\\exists integer y; 0 <= y <= x / 2 && x == 2 * y)",
                    "tests/arith/quantif.i",24);
  }
  /*@
  assert
  ∀ int x;
    0 ≤ x < 10 ⇒
    x % 2 ≡ 0 ⇒ (∃ ℤ y; 0 ≤ y ≤ x / 2 ∧ x ≡ 2 * y);
   */
  ;
  {
    int buf[10];
    __e_acsl_store_block((void *)(buf),(size_t)40);
    unsigned long len = (unsigned long)9;
    {
      int __gen_e_acsl_forall_6;
      int __gen_e_acsl_i;
      __gen_e_acsl_forall_6 = 1;
      __gen_e_acsl_i = 0;
      while (1) {
        if (__gen_e_acsl_i < 10) ; else break;
        {
          int __gen_e_acsl_valid;
          __gen_e_acsl_valid = __e_acsl_valid((void *)(& buf[__gen_e_acsl_i]),
                                              sizeof(int),
                                              (void *)(& buf[__gen_e_acsl_i]),
                                              (void *)0);
          if (__gen_e_acsl_valid) ;
          else {
            __gen_e_acsl_forall_6 = 0;
            goto e_acsl_end_loop8;
          }
        }
        __gen_e_acsl_i ++;
      }
      e_acsl_end_loop8: ;
      __e_acsl_assert(__gen_e_acsl_forall_6,"Assertion","main",
                      "\\forall integer i; 0 <= i < 10 ==> \\valid(&buf[i])",
                      "tests/arith/quantif.i",30);
    }
    /*@ assert ∀ ℤ i; 0 ≤ i < 10 ⇒ \valid(&buf[i]); */ ;
    {
      int __gen_e_acsl_forall_7;
      int __gen_e_acsl_i_2;
      __gen_e_acsl_forall_7 = 1;
      __gen_e_acsl_i_2 = (char)0;
      while (1) {
        if (__gen_e_acsl_i_2 < 10) ; else break;
        {
          int __gen_e_acsl_valid_2;
          __gen_e_acsl_valid_2 = __e_acsl_valid((void *)(& buf[__gen_e_acsl_i_2]),
                                                sizeof(int),
                                                (void *)(& buf[__gen_e_acsl_i_2]),
                                                (void *)0);
          if (__gen_e_acsl_valid_2) ;
          else {
            __gen_e_acsl_forall_7 = 0;
            goto e_acsl_end_loop9;
          }
        }
        __gen_e_acsl_i_2 ++;
      }
      e_acsl_end_loop9: ;
      __e_acsl_assert(__gen_e_acsl_forall_7,"Assertion","main",
                      "\\forall char i; 0 <= i < 10 ==> \\valid(&buf[i])",
                      "tests/arith/quantif.i",31);
    }
    /*@ assert ∀ char i; 0 ≤ i < 10 ⇒ \valid(&buf[i]); */ ;
    {
      int __gen_e_acsl_forall_8;
      unsigned long __gen_e_acsl_i_3;
      __gen_e_acsl_forall_8 = 1;
      __gen_e_acsl_i_3 = 0UL;
      while (1) {
        if (__gen_e_acsl_i_3 < len) ; else break;
        {
          int __gen_e_acsl_valid_3;
          __gen_e_acsl_valid_3 = __e_acsl_valid((void *)(& buf[__gen_e_acsl_i_3]),
                                                sizeof(int),
                                                (void *)(& buf[__gen_e_acsl_i_3]),
                                                (void *)0);
          if (__gen_e_acsl_valid_3) ;
          else {
            __gen_e_acsl_forall_8 = 0;
            goto e_acsl_end_loop10;
          }
        }
        __gen_e_acsl_i_3 ++;
      }
      e_acsl_end_loop10: ;
      __e_acsl_assert(__gen_e_acsl_forall_8,"Assertion","main",
                      "\\forall integer i; 0 <= i < len ==> \\valid(&buf[i])",
                      "tests/arith/quantif.i",32);
    }
    /*@ assert ∀ ℤ i; 0 ≤ i < len ⇒ \valid(&buf[i]); */ ;
    {
      int __gen_e_acsl_forall_9;
      __e_acsl_mpz_t __gen_e_acsl_i_4;
      __gen_e_acsl_forall_9 = 1;
      __gmpz_init(__gen_e_acsl_i_4);
      {
        __e_acsl_mpz_t __gen_e_acsl_;
        __gmpz_init_set_si(__gen_e_acsl_,0L);
        __gmpz_set(__gen_e_acsl_i_4,
                   (__e_acsl_mpz_struct const *)(__gen_e_acsl_));
        __gmpz_clear(__gen_e_acsl_);
      }
      while (1) {
        {
          __e_acsl_mpz_t __gen_e_acsl_len;
          int __gen_e_acsl_le;
          __gmpz_init_set_ui(__gen_e_acsl_len,len);
          __gen_e_acsl_le = __gmpz_cmp((__e_acsl_mpz_struct const *)(__gen_e_acsl_i_4),
                                       (__e_acsl_mpz_struct const *)(__gen_e_acsl_len));
          if (__gen_e_acsl_le <= 0) ; else break;
          __gmpz_clear(__gen_e_acsl_len);
        }
        {
          long __gen_e_acsl_i_5;
          int __gen_e_acsl_valid_4;
          __gen_e_acsl_i_5 = __gmpz_get_si((__e_acsl_mpz_struct const *)(__gen_e_acsl_i_4));
          __gen_e_acsl_valid_4 = __e_acsl_valid((void *)(& buf[__gen_e_acsl_i_5]),
                                                sizeof(int),
                                                (void *)(& buf[__gen_e_acsl_i_5]),
                                                (void *)0);
          if (__gen_e_acsl_valid_4) ;
          else {
            __gen_e_acsl_forall_9 = 0;
            goto e_acsl_end_loop11;
          }
        }
        {
          __e_acsl_mpz_t __gen_e_acsl__2;
          __e_acsl_mpz_t __gen_e_acsl_add;
          __gmpz_init_set_ui(__gen_e_acsl__2,1UL);
          __gmpz_init(__gen_e_acsl_add);
          __gmpz_add(__gen_e_acsl_add,
                     (__e_acsl_mpz_struct const *)(__gen_e_acsl_i_4),
                     (__e_acsl_mpz_struct const *)(__gen_e_acsl__2));
          __gmpz_set(__gen_e_acsl_i_4,
                     (__e_acsl_mpz_struct const *)(__gen_e_acsl_add));
          __gmpz_clear(__gen_e_acsl__2);
          __gmpz_clear(__gen_e_acsl_add);
        }
      }
      e_acsl_end_loop11: ;
      __e_acsl_assert(__gen_e_acsl_forall_9,"Assertion","main",
                      "\\forall integer i; 0 <= i <= len ==> \\valid(&buf[i])",
                      "tests/arith/quantif.i",33);
      __gmpz_clear(__gen_e_acsl_i_4);
    }
    /*@ assert ∀ ℤ i; 0 ≤ i ≤ len ⇒ \valid(&buf[i]); */ ;
    __e_acsl_delete_block((void *)(buf));
  }
  __e_acsl_assert(1,"Assertion","main",
                  "\\forall integer x; 0 < x < 1 ==> \\false",
                  "tests/arith/quantif.i",37);
  /*@ assert ∀ ℤ x; 0 < x < 1 ⇒ \false; */ ;
  __e_acsl_assert(! 0,"Assertion","main",
                  "!(\\exists char c; 10 <= c < 10 && c == 10)",
                  "tests/arith/quantif.i",38);
  /*@ assert ¬(∃ char c; 10 ≤ c < 10 ∧ c ≡ 10); */ ;
  {
    int __gen_e_acsl_u;
    __gen_e_acsl_u = 5;
    __e_acsl_assert(1,"Assertion","main",
                    "\\let u = 5;\n\\forall integer x, integer y; 0 <= x < 2 && 4 < y < u ==> \\false",
                    "tests/arith/quantif.i",40);
  }
  /*@
  assert \let u = 5; ∀ ℤ x, ℤ y; 0 ≤ x < 2 ∧ 4 < y < u ⇒ \false;
   */
  ;
  __retres = 0;
  __e_acsl_memory_clean();
  return __retres;
}


