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 Why3.Cint.Cint.
Require Import x509_parser.Compound.Compound.
Require Import Why3.Cbits.Cbits.
Open Scope Z_scope.
Lemma goal0 (a_6 : addr) (t_14 : addr -> Z) (a_1 : addr) (t_8 : addr -> Z) (a_3 : addr) (t_11 : addr -> Z) (t_13 : addr -> Z) (t_12 : addr -> Z) (i_1 : Z) (a_7 : addr) (t : Z -> Z) (i : Z) (i_2 : Z) (a_4 : addr) (a_5 : addr) (a : addr) (t_1 : Z -> Z) (a_2 : addr) (t_9 : addr -> Z) (t_2 : Z -> Z) (t_7 : Z -> Z) (t_4 : Z -> Z) (t_6 : Z -> Z) (t_5 : Z -> Z) (t_10 : addr -> Z) (t_3 : Z -> Z) : let a_8 : addr := shift a_6 1%Z in let x : Z := t_14 a_8 in let a_9 : addr := shift a_1 0%Z in let x_1 : Z := t_8 a_9 in let a_10 : addr := shift a_3 0%Z in let x_2 : Z := t_11 a_10 in let a_11 : addr := shift a_3 1%Z in let x_3 : Z := t_13 a_11 in let x_4 : Z := land 192%Z x_3 in let a_12 : addr := shift a_3 2%Z in let x_5 : Z := land 192%Z (t_13 a_12) in let x_6 : Z := t_13 a_10 in let x_7 : Z := t_12 a_10 in let x_8 : Z := t_12 a_11 in let x_9 : Z := land 192%Z x_8 in let x_10 : Z := land 192%Z (t_12 a_12) in let a_13 : addr := shift a_3 3%Z in let x_11 : Z := land 192%Z (t_12 a_13) in ¬ i_1 = 0%Z -> ¬ Mk_addr 0%Z 0%Z = a_7 -> 0%Z ≤ i_1 -> region (base a_7) ≤ 0%Z -> linked t -> is_uint16 i -> is_uint16 i_1 -> is_sint32 i_2 -> is_uint8 (t_12 (shift a_4 1%Z)) -> is_uint8 (t_12 (shift a_4 2%Z)) -> is_uint8 (t_12 (shift a_4 3%Z)) -> is_uint8 (t_13 (shift a_5 1%Z)) -> is_uint8 (t_13 (shift a_5 2%Z)) -> is_uint8 x -> valid_rd t (shift a 0%Z) i -> (if decide (i = 0%Z) then i_2 = 0%Z else a_1 = a ∧ t_1 = t ∧ 128%Z ≤ x_1 ∧ valid_rd t_1 a_9 1%Z ∧ (if decide (194%Z ≤ x_1) then a_2 = a_1 ∧ t_9 = t_8 ∧ t_2 = t_1 ∧ (if decide (t_9 (shift a_2 0%Z) ≤ 223%Z) then a_6 = a_2 ∧ t_14 = t_9 ∧ t_7 = t_2 ∧ (if decide (i ≤ 1%Z) then i_2 = - 2460%Z else i_2 = - 2466%Z ∧ ¬ land 192%Z x = 128%Z ∧ valid_rd t_7 a_8 1%Z) else a_3 = a_2 ∧ t_11 = t_9 ∧ t_4 = t_2 ∧ (if decide (x_2 ≤ 239%Z) then a_5 = a_3 ∧ t_13 = t_11 ∧ t_6 = t_4 ∧ (if decide (i ≤ 2%Z) then i_2 = - 2483%Z else valid_rd t_6 a_11 1%Z ∧ (if decide (x_4 = 128%Z) then valid_rd t_6 a_12 1%Z ∧ (if decide (x_5 = 128%Z) then if decide (x_6 = 224%Z) then i_2 = - 2501%Z ∧ (x_3 ≤ 159%Z ∨ 192%Z ≤ x_3) else i_2 = - 2506%Z ∧ x_6 = 237%Z ∧ (x_3 ≤ 127%Z ∨ 160%Z ≤ x_3) else i_2 = - 2490%Z) else i_2 = - 2490%Z)) else a_4 = a_3 ∧ t_12 = t_11 ∧ t_5 = t_4 ∧ (if decide (240%Z ≤ x_7) then if decide (x_7 ≤ 244%Z) then if decide (i ≤ 3%Z) then i_2 = - 2523%Z else if decide (x_7 = 240%Z) then valid_rd t_5 a_11 1%Z ∧ (if decide (x_8 ≤ 143%Z) then i_2 = - 2534%Z else if decide (192%Z ≤ x_8) then i_2 = - 2534%Z else i_2 = - 2547%Z ∧ (¬ x_9 = 128%Z ∨ valid_rd t_5 a_12 1%Z ∧ (¬ x_10 = 128%Z ∨ ¬ x_11 = 128%Z ∧ valid_rd t_5 a_13 1%Z))) else if decide (x_7 = 244%Z) then valid_rd t_5 a_11 1%Z ∧ (if decide (x_8 ≤ 127%Z) then i_2 = - 2539%Z else if decide (144%Z ≤ x_8) then i_2 = - 2539%Z else i_2 = - 2547%Z ∧ (¬ x_9 = 128%Z ∨ valid_rd t_5 a_12 1%Z ∧ (¬ x_10 = 128%Z ∨ ¬ x_11 = 128%Z ∧ valid_rd t_5 a_13 1%Z))) else i_2 = - 2547%Z ∧ valid_rd t_5 a_11 1%Z ∧ (¬ x_9 = 128%Z ∨ valid_rd t_5 a_12 1%Z ∧ (¬ x_10 = 128%Z ∨ ¬ x_11 = 128%Z ∧ valid_rd t_5 a_13 1%Z)) else i_2 = - 2557%Z else i_2 = - 2557%Z))) else a_3 = a_1 ∧ t_10 = t_8 ∧ t_3 = t_1 ∧ (if decide (224%Z ≤ t_10 a_10) then t_11 = t_10 ∧ t_4 = t_3 ∧ (if decide (x_2 ≤ 239%Z) then a_5 = a_3 ∧ t_13 = t_11 ∧ t_6 = t_4 ∧ (if decide (i ≤ 2%Z) then i_2 = - 2483%Z else valid_rd t_6 a_11 1%Z ∧ (if decide (x_4 = 128%Z) then valid_rd t_6 a_12 1%Z ∧ (if decide (x_5 = 128%Z) then if decide (x_6 = 224%Z) then i_2 = - 2501%Z ∧ (x_3 ≤ 159%Z ∨ 192%Z ≤ x_3) else i_2 = - 2506%Z ∧ x_6 = 237%Z ∧ (x_3 ≤ 127%Z ∨ 160%Z ≤ x_3) else i_2 = - 2490%Z) else i_2 = - 2490%Z)) else a_4 = a_3 ∧ t_12 = t_11 ∧ t_5 = t_4 ∧ (if decide (240%Z ≤ x_7) then if decide (x_7 ≤ 244%Z) then if decide (i ≤ 3%Z) then i_2 = - 2523%Z else if decide (x_7 = 240%Z) then valid_rd t_5 a_11 1%Z ∧ (if decide (x_8 ≤ 143%Z) then i_2 = - 2534%Z else if decide (192%Z ≤ x_8) then i_2 = - 2534%Z else i_2 = - 2547%Z ∧ (¬ x_9 = 128%Z ∨ valid_rd t_5 a_12 1%Z ∧ (¬ x_10 = 128%Z ∨ ¬ x_11 = 128%Z ∧ valid_rd t_5 a_13 1%Z))) else if decide (x_7 = 244%Z) then valid_rd t_5 a_11 1%Z ∧ (if decide (x_8 ≤ 127%Z) then i_2 = - 2539%Z else if decide (144%Z ≤ x_8) then i_2 = - 2539%Z else i_2 = - 2547%Z ∧ (¬ x_9 = 128%Z ∨ valid_rd t_5 a_12 1%Z ∧ (¬ x_10 = 128%Z ∨ ¬ x_11 = 128%Z ∧ valid_rd t_5 a_13 1%Z))) else i_2 = - 2547%Z ∧ valid_rd t_5 a_11 1%Z ∧ (¬ x_9 = 128%Z ∨ valid_rd t_5 a_12 1%Z ∧ (¬ x_10 = 128%Z ∨ ¬ x_11 = 128%Z ∧ valid_rd t_5 a_13 1%Z)) else i_2 = - 2557%Z else i_2 = - 2557%Z)) else a_4 = a_3 ∧ t_12 = t_10 ∧ t_5 = t_3 ∧ (if decide (240%Z ≤ x_7) then if decide (x_7 ≤ 244%Z) then if decide (i ≤ 3%Z) then i_2 = - 2523%Z else if decide (x_7 = 240%Z) then valid_rd t_5 a_11 1%Z ∧ (if decide (x_8 ≤ 143%Z) then i_2 = - 2534%Z else if decide (192%Z ≤ x_8) then i_2 = - 2534%Z else i_2 = - 2547%Z ∧ (¬ x_9 = 128%Z ∨ valid_rd t_5 a_12 1%Z ∧ (¬ x_10 = 128%Z ∨ ¬ x_11 = 128%Z ∧ valid_rd t_5 a_13 1%Z))) else if decide (x_7 = 244%Z) then valid_rd t_5 a_11 1%Z ∧ (if decide (x_8 ≤ 127%Z) then i_2 = - 2539%Z else if decide (144%Z ≤ x_8) then i_2 = - 2539%Z else i_2 = - 2547%Z ∧ (¬ x_9 = 128%Z ∨ valid_rd t_5 a_12 1%Z ∧ (¬ x_10 = 128%Z ∨ ¬ x_11 = 128%Z ∧ valid_rd t_5 a_13 1%Z))) else i_2 = - 2547%Z ∧ valid_rd t_5 a_11 1%Z ∧ (¬ x_9 = 128%Z ∨ valid_rd t_5 a_12 1%Z ∧ (¬ x_10 = 128%Z ∨ ¬ x_11 = 128%Z ∧ valid_rd t_5 a_13 1%Z)) else i_2 = - 2557%Z else i_2 = - 2557%Z)))) -> (0%Z < i_1 -> valid_rd t (shift a_7 0%Z) i_1) -> i_2 = 0%Z ∨ i_2 < 0%Z.
Admitted.
