From Stdlib Require Import Strings.String.
From Stdlib Require Import String Ascii.
From Stdlib Require Arith.
From stdpp Require Import base.
From stdpp Require Import fin_maps.
From stdpp Require Import gmap.
From stdpp Require Import base gmultiset.
From Stdlib Require Classical.
From Stdlib Require Import ZArith.
From stdpp.bitvector Require Import definitions tactics.
From Stdlib Require Import Sorting.Sorted.
From Stdlib Require Import Reals.Rbasic_fun.
From Stdlib Require Import Reals.Abstract.ConstructiveAbs.
From Stdlib Require Import Reals.Rdefinitions.
From stdpp Require Import list_relations.
From stdpp Require Import list_numbers.
From stdpp Require Import functions.
From Stdlib Require Import ClassicalEpsilon.
From stdpp Require Import base decidable.
From Stdlib Require Import ZArith.Zeuclid.
From Stdlib Require Import ZArith.Znumtheory.
From stdpp Require Import propset.
From Stdlib Require Import Reals.
Require Import Why3.Base.
Require Import Why3.Qed.Qed.
Require Import Why3.Memory.Memory.
Require Import x509_parser.Compound.Compound.
Require Import x509_parser.Globals.Globals.
Require Import Why3.Cint.Cint.
Open Scope Z_scope.
Theorem goal0 (a : addr) (a_2 : addr) (i_10 : Z) (i_11 : Z) (i_12 : Z) (i_8 : Z) (t_2 : addr -> addr) (t : Z -> Z) (i : Z) (i_1 : Z) (i_2 : Z) (i_9 : Z) (i_13 : Z) (i_14 : Z) (i_15 : Z) (i_3 : Z) (i_4 : Z) (i_5 : Z) (i_6 : Z) (i_7 : Z) (t_1 : addr -> Z) (a_1 : addr) : let a_3 : addr := shift a 1%Z in let a_4 : addr := shift a_2 (1%Z + i_10 + i_11 + i_12) in let a_5 : addr := shift a_2 (1%Z + i_10 + i_11) in let a_6 : addr := shift a_2 (1%Z + i_10) in ¬ i_8 = 0%Z -> ¬ Mk_addr 0%Z 0%Z = a_2 -> t_2 a_3 = shift (Mk_addr (- 4163%Z) 0%Z) 0%Z -> 0%Z ≤ i_8 -> region (base a) ≤ 0%Z -> region (base a_2) ≤ 0%Z -> framed t_2 -> linked t -> is_uint16 i -> is_uint16 i_1 -> is_uint16 i_2 -> is_uint16 i_8 -> is_uint16 i_9 -> is_uint16 i_11 -> is_uint16 i_12 -> is_uint16 i_13 -> is_uint16 i_14 -> is_uint16 i_15 -> is_sint32 i_3 -> is_sint32 i_4 -> is_sint32 i_5 -> is_sint32 i_6 -> is_sint32 i_7 -> valid_rd t a_3 1%Z -> is_uint8 (t_1 (shift a_1 0%Z)) -> (if decide (i_6 = 0%Z) then if decide (i_14 = 0%Z) then i_3 = - 2196%Z else shift a_2 i_9 = a_1 ∧ valid_rd t a_1 1%Z ∧ (if decide (t_1 a_1 = 0%Z) then i_10 = i_9 ∧ to_uint16 (i_14 - 1%Z) = i ∧ - 2147483647%Z ≤ i_14 ∧ (if decide (i_7 = 0%Z) then 0%Z ≤ i_15 ∧ (if decide (i_4 = 0%Z) then to_uint16 (i_15 - i_12) = i_1 ∧ i_12 ≤ 2147483648%Z + i_15 ∧ i_15 ≤ 2147483647%Z + i_12 ∧ (if decide (i_5 = 0%Z) then to_uint16 (i_1 - i_13) = i_2 ∧ i_1 ≤ 2147483647%Z + i_13 ∧ i_13 ≤ 2147483648%Z + i_1 ∧ (if decide (i_2 = 0%Z) then i_3 = 0%Z else i_3 = - 2252%Z) else i_5 = i_3) ∧ (i_1 = 0%Z -> i_5 < 0%Z) ∧ (i_5 = 0%Z -> i_13 ≤ i_1 ∧ 3%Z ≤ i_13) ∧ (a_4 = Mk_addr 0%Z 0%Z -> i_5 < 0%Z) ∧ (¬ a_4 = Mk_addr 0%Z 0%Z -> 0%Z < i_1 -> valid_rd t a_4 i_1) ∧ (i_5 = 0%Z ∨ i_5 < 0%Z) else i_4 = i_3) ∧ (i_15 = 0%Z -> i_4 < 0%Z) ∧ (i_4 = 0%Z -> i_12 ≤ i_15 ∧ 3%Z ≤ i_12) ∧ (a_5 = Mk_addr 0%Z 0%Z -> i_4 < 0%Z) ∧ (¬ a_5 = Mk_addr 0%Z 0%Z -> 0%Z < i_15 -> valid_rd t a_5 i_15) ∧ (i_4 = 0%Z ∨ i_4 < 0%Z) else i_7 = i_3) ∧ (i = 0%Z -> i_7 < 0%Z) ∧ (i_7 = 0%Z -> i_15 ≤ i) ∧ (i_7 = 0%Z -> i_11 + i_15 ≤ i) ∧ (i_7 = 0%Z -> i_11 ≤ i ∧ 2%Z ≤ i_11) ∧ (a_6 = Mk_addr 0%Z 0%Z -> i_7 < 0%Z) ∧ (¬ a_6 = Mk_addr 0%Z 0%Z -> 0%Z < i -> valid_rd t a_6 i) ∧ (i_7 = 0%Z ∨ i_7 < 0%Z) else i_3 = - 2209%Z) else i_6 = i_3) -> (i_6 = 0%Z -> i_14 ≤ i_8) -> (i_6 = 0%Z -> i_9 + i_14 ≤ i_8) -> (i_6 = 0%Z -> i_9 ≤ i_8 ∧ 2%Z ≤ i_9) -> (0%Z < i_8 -> valid_rd t (shift a_2 0%Z) i_8) -> i_6 = 0%Z ∨ i_6 < 0%Z -> i_3 = 0%Z ∨ i_3 < 0%Z.
Admitted.
