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.why3.Ref.Ref.
Require Import Why3.map.Const.
Require Import Why3.map.MapEq.
Require Import Why3.mach.int.Unsigned.
Require Import Why3.mach.c.C.
Require Import multiprecision.types.Config.
Require Import multiprecision.types.Types.
Require Import multiprecision.types.Int32Eq.
Require Import multiprecision.types.UInt64Eq.
Require Import multiprecision.lemmas.Lemmas.
Require Import multiprecision.compare.Compare.
Require Import multiprecision.util.Util.
Require Import multiprecision.ptralias.Alias.
Require Import multiprecision.util.UtilOld.
Require Import multiprecision.add.Add.
Require Import multiprecision.add.AddOld.
Require Import multiprecision.sub.SubOld.
Require Import multiprecision.logical.LogicalUtil.
Require Import multiprecision.logical.LogicalOld.
Require Import multiprecision.mul.Mul.
Open Scope Z_scope.
Definition reciprocal (v : bv 64%N) (d : bv 64%N) := bv_unsigned v = ZEuclid.div ((18446744073709551615%Z + 1%Z) * (18446744073709551615%Z + 1%Z) - 1%Z) (bv_unsigned d) - (18446744073709551615%Z + 1%Z).
Definition reciprocal_3by2 (v : bv 64%N) (dh : bv 64%N) (dl : bv 64%N) := bv_unsigned v = ZEuclid.div ((18446744073709551615%Z + 1%Z) * (18446744073709551615%Z + 1%Z) * (18446744073709551615%Z + 1%Z) - 1%Z) (bv_unsigned dl + (18446744073709551615%Z + 1%Z) * bv_unsigned dh) - (18446744073709551615%Z + 1%Z).
Definition normalized (x : ptr (bv 64%N)) (sz : bv 32%N) := valid x (bv_signed sz) ∧ ZEuclid.div (18446744073709551615%Z + 1%Z) 2%Z ≤ bv_unsigned (pelts x (offset x + bv_signed sz - 1%Z)).
Theorem div_qr'vc (sy : bv 32%N) (sx : bv 32%N) (x : ptr (bv 64%N)) (y : ptr (bv 64%N)) (q : ptr (bv 64%N)) (r : ptr (bv 64%N)) (nx : ptr (bv 64%N)) (ny : ptr (bv 64%N)) (o1 : bool) (fact0 : 1%Z ≤ bv_signed sy) (fact1 : bv_signed sy ≤ bv_signed sx) (fact2 : bv_signed sx ≤ 2147483647%Z - 1%Z) (fact3 : valid x (bv_signed sx)) (fact4 : valid y (bv_signed sy)) (fact5 : valid q (bv_signed sx - bv_signed sy + 1%Z)) (fact6 : valid r (bv_signed sy)) (fact7 : valid nx (bv_signed sx + 1%Z)) (fact8 : valid ny (bv_signed sy)) (fact9 : writable nx = true) (fact10 : writable ny = true) (fact11 : 0%Z < bv_unsigned (pelts y (offset y + bv_signed sy - 1%Z))) (fact12 : writable q = true) (fact13 : writable r = true) (fact14 : bv_signed sy = bv_signed (1%bv : bv 32%N) -> o1 = true) (fact15 : o1 = true -> sy = (1%bv : bv 32%N)) : if decide (o1 = true) then (min y ≤ offset y ∧ offset y < C.max y) ∧ (let o2 : bv 64%N := pelts y (offset y) in (valid x (bv_signed sx) ∧ valid q (bv_signed sx) ∧ writable q = true ∧ 0%Z < bv_signed sx ∧ 0%Z < bv_unsigned o2) ∧ (∀(q1 : ptr (bv 64%N)), length (data q1) = length (data q) ∧ offset q1 = offset q ∧ min q1 = min q ∧ C.max q1 = C.max q ∧ writable q1 = writable q ∧ zone1 q1 = zone1 q -> (∀(lr : bv 64%N), value x (bv_signed sx) = value q1 (bv_signed sx) * bv_unsigned o2 + bv_unsigned lr ∧ bv_unsigned lr < bv_unsigned o2 -> ((min r ≤ offset r ∧ offset r < C.max r) ∧ writable r = true) ∧ (∀(r1 : ptr (bv 64%N)), length (data r1) = length (data r) ∧ offset r1 = offset r ∧ min r1 = min r ∧ C.max r1 = C.max r ∧ writable r1 = writable r ∧ zone1 r1 = zone1 r -> pelts r1 = fun_updt (pelts r) (offset r1) lr -> value x (bv_signed sx) = value q1 (bv_signed sx - bv_signed sy + 1%Z) * value y (bv_signed sy) + value r1 (bv_signed sy) ∧ value r1 (bv_signed sy) < value y (bv_signed sy))))) else ∀(o2 : bool), (bv_signed sy = bv_signed (2%bv : bv 32%N) -> o2 = true) ∧ (o2 = true -> sy = (2%bv : bv 32%N)) -> (if decide (o2 = true) then int'32_in_bounds (bv_signed sy - 1%Z) ∧ (∀(o3 : bv 32%N), bv_signed o3 = bv_signed sy - 1%Z -> (min y ≤ offset y + bv_signed o3 ∧ offset y + bv_signed o3 < C.max y) ∧ (let o4 : bv 64%N := pelts y (offset y + bv_signed o3) in 0%Z < bv_unsigned o4 ∧ (∀(clz : bv 32%N), Z.pow 2%Z (bv_signed clz) * bv_unsigned o4 < 18446744073709551615%Z + 1%Z ∧ 18446744073709551615%Z + 1%Z ≤ 2%Z * Z.pow 2%Z (bv_signed clz) * bv_unsigned o4 ∧ (0%Z ≤ bv_signed clz ∧ bv_signed clz < 64%Z) ∧ Z.pow 2%Z (bv_signed clz) * bv_unsigned o4 ≤ 18446744073709551615%Z + 1%Z - Z.pow 2%Z (bv_signed clz) -> (∀(o5 : bool), (bv_signed clz = bv_signed (0%bv : bv 32%N) -> o5 = true) ∧ (o5 = true -> clz = (0%bv : bv 32%N)) -> (if decide (o5 = true) then (valid x (bv_signed sx) ∧ valid nx (bv_signed sx) ∧ writable nx = true) ∧ (∀(nx1 : ptr (bv 64%N)), length (data nx1) = length (data nx) ∧ offset nx1 = offset nx ∧ min nx1 = min nx ∧ C.max nx1 = C.max nx ∧ writable nx1 = writable nx ∧ zone1 nx1 = zone1 nx -> map_eq_sub_shift (pelts nx1) (pelts x) (offset nx1) (offset x) (bv_signed sx) ∧ (∀(j : Z), j < offset nx1 ∨ offset nx1 + bv_signed sx ≤ j -> pelts nx1 j = pelts nx j) -> ((min nx1 ≤ offset nx1 + bv_signed sx ∧ offset nx1 + bv_signed sx < C.max nx1) ∧ writable nx1 = true) ∧ (∀(nx2 : ptr (bv 64%N)), length (data nx2) = length (data nx1) ∧ offset nx2 = offset nx1 ∧ min nx2 = min nx1 ∧ C.max nx2 = C.max nx1 ∧ writable nx2 = writable nx1 ∧ zone1 nx2 = zone1 nx1 -> pelts nx2 = fun_updt (pelts nx1) (offset nx2 + bv_signed sx) (0%bv : bv 64%N) ∧ pelts nx2 (offset nx2 + bv_signed sx) = (0%bv : bv 64%N) -> int'32_in_bounds (bv_signed sx + 1%Z) ∧ (∀(o6 : bv 32%N), bv_signed o6 = bv_signed sx + 1%Z -> (2%Z ≤ bv_signed o6 ∧ valid nx2 (bv_signed o6) ∧ valid y 2%Z ∧ valid q (bv_signed o6 - 2%Z) ∧ ZEuclid.div (18446744073709551615%Z + 1%Z) 2%Z ≤ bv_unsigned (pelts y (offset y + 1%Z)) ∧ writable q = true ∧ writable nx2 = true) ∧ (∀(nx3 : ptr (bv 64%N)) (q1 : ptr (bv 64%N)), length (data nx3) = length (data nx2) ∧ offset nx3 = offset nx2 ∧ min nx3 = min nx2 ∧ C.max nx3 = C.max nx2 ∧ writable nx3 = writable nx2 ∧ zone1 nx3 = zone1 nx2 -> length (data q1) = length (data q) ∧ offset q1 = offset q ∧ min q1 = min q ∧ C.max q1 = C.max q ∧ writable q1 = writable q ∧ zone1 q1 = zone1 q -> (∀(x_qh : bv 64%N), value nx2 (bv_signed o6) = (value q1 (bv_signed o6 - 2%Z) + Z.pow (18446744073709551615%Z + 1%Z) (bv_signed o6 - 2%Z) * bv_unsigned x_qh) * value y 2%Z + value nx3 2%Z ∧ value nx3 2%Z < value y 2%Z ∧ 0%Z ≤ bv_unsigned x_qh ∧ bv_unsigned x_qh ≤ 1%Z -> (valid nx3 (bv_signed sy) ∧ valid r (bv_signed sy) ∧ writable r = true) ∧ (∀(r1 : ptr (bv 64%N)), length (data r1) = length (data r) ∧ offset r1 = offset r ∧ min r1 = min r ∧ C.max r1 = C.max r ∧ writable r1 = writable r ∧ zone1 r1 = zone1 r -> map_eq_sub_shift (pelts r1) (pelts nx3) (offset r1) (offset nx3) (bv_signed sy) ∧ (∀(j : Z), j < offset r1 ∨ offset r1 + bv_signed sy ≤ j -> pelts r1 j = pelts r j) -> value x (bv_signed sx) = value q1 (bv_signed sx - bv_signed sy + 1%Z) * value y (bv_signed sy) + value r1 (bv_signed sy) ∧ value r1 (bv_signed sy) < value y (bv_signed sy))))))) else 0%Z ≤ bv_signed clz ∧ (∀(o6 : bv 64%N), bv_unsigned o6 = bv_signed clz -> ((0%Z < bv_unsigned o6 ∧ bv_unsigned o6 < 64%Z) ∧ valid ny (bv_signed sy) ∧ valid y (bv_signed sy) ∧ writable ny = true ∧ 0%Z < bv_signed sy) ∧ (∀(ny1 : ptr (bv 64%N)), length (data ny1) = length (data ny) ∧ offset ny1 = offset ny ∧ min ny1 = min ny ∧ C.max ny1 = C.max ny ∧ writable ny1 = writable ny ∧ zone1 ny1 = zone1 ny -> (∀(x_c : bv 64%N), value ny1 (bv_signed sy) + Z.pow (18446744073709551615%Z + 1%Z) (bv_signed sy) * bv_unsigned x_c = value y (bv_signed sy) * Z.pow 2%Z (bv_unsigned o6) -> 0%Z ≤ bv_signed clz ∧ (∀(o7 : bv 64%N), bv_unsigned o7 = bv_signed clz -> ((0%Z < bv_unsigned o7 ∧ bv_unsigned o7 < 64%Z) ∧ valid nx (bv_signed sx) ∧ valid x (bv_signed sx) ∧ writable nx = true ∧ 0%Z < bv_signed sx) ∧ (∀(nx1 : ptr (bv 64%N)), length (data nx1) = length (data nx) ∧ offset nx1 = offset nx ∧ min nx1 = min nx ∧ C.max nx1 = C.max nx ∧ writable nx1 = writable nx ∧ zone1 nx1 = zone1 nx -> (∀(h : bv 64%N), value nx1 (bv_signed sx) + Z.pow (18446744073709551615%Z + 1%Z) (bv_signed sx) * bv_unsigned h = value x (bv_signed sx) * Z.pow 2%Z (bv_unsigned o7) -> ((min nx1 ≤ offset nx1 + bv_signed sx ∧ offset nx1 + bv_signed sx < C.max nx1) ∧ writable nx1 = true) ∧ (∀(nx2 : ptr (bv 64%N)), length (data nx2) = length (data nx1) ∧ offset nx2 = offset nx1 ∧ min nx2 = min nx1 ∧ C.max nx2 = C.max nx1 ∧ writable nx2 = writable nx1 ∧ zone1 nx2 = zone1 nx1 -> pelts nx2 = fun_updt (pelts nx1) (offset nx2 + bv_signed sx) h ∧ pelts nx2 (offset nx2 + bv_signed sx) = h -> int'32_in_bounds (bv_signed sx + 1%Z) ∧ (∀(o8 : bv 32%N), bv_signed o8 = bv_signed sx + 1%Z -> (2%Z ≤ bv_signed o8 ∧ valid nx2 (bv_signed o8) ∧ valid ny1 2%Z ∧ valid q (bv_signed o8 - 2%Z) ∧ ZEuclid.div (18446744073709551615%Z + 1%Z) 2%Z ≤ bv_unsigned (pelts ny1 (offset ny1 + 1%Z)) ∧ writable q = true ∧ writable nx2 = true) ∧ (∀(nx3 : ptr (bv 64%N)) (q1 : ptr (bv 64%N)), length (data nx3) = length (data nx2) ∧ offset nx3 = offset nx2 ∧ min nx3 = min nx2 ∧ C.max nx3 = C.max nx2 ∧ writable nx3 = writable nx2 ∧ zone1 nx3 = zone1 nx2 -> length (data q1) = length (data q) ∧ offset q1 = offset q ∧ min q1 = min q ∧ C.max q1 = C.max q ∧ writable q1 = writable q ∧ zone1 q1 = zone1 q -> (∀(x_qh : bv 64%N), value nx2 (bv_signed o8) = (value q1 (bv_signed o8 - 2%Z) + Z.pow (18446744073709551615%Z + 1%Z) (bv_signed o8 - 2%Z) * bv_unsigned x_qh) * value ny1 2%Z + value nx3 2%Z ∧ value nx3 2%Z < value ny1 2%Z ∧ 0%Z ≤ bv_unsigned x_qh ∧ bv_unsigned x_qh ≤ 1%Z -> 0%Z ≤ bv_signed clz ∧ (∀(o9 : bv 64%N), bv_unsigned o9 = bv_signed clz -> (valid nx3 (bv_signed sy) ∧ valid r (bv_signed sy) ∧ (0%Z < bv_unsigned o9 ∧ bv_unsigned o9 < 64%Z) ∧ 0%Z < bv_signed sy ∧ writable r = true) ∧ (∀(r1 : ptr (bv 64%N)), length (data r1) = length (data r) ∧ offset r1 = offset r ∧ min r1 = min r ∧ C.max r1 = C.max r ∧ writable r1 = writable r ∧ zone1 r1 = zone1 r -> (∀(x_l : bv 64%N), bv_unsigned x_l + (18446744073709551615%Z + 1%Z) * value r1 (bv_signed sy) = value nx3 (bv_signed sy) * Z.pow 2%Z (64%Z - bv_unsigned o9) -> value x (bv_signed sx) = value q1 (bv_signed sx - bv_signed sy + 1%Z) * value y (bv_signed sy) + value r1 (bv_signed sy) ∧ value r1 (bv_signed sy) < value y (bv_signed sy))))))))))))))))))) else int'32_in_bounds (bv_signed sy - 1%Z) ∧ (∀(o3 : bv 32%N), bv_signed o3 = bv_signed sy - 1%Z -> (min y ≤ offset y + bv_signed o3 ∧ offset y + bv_signed o3 < C.max y) ∧ int'32_in_bounds (bv_signed sx - 1%Z) ∧ (∀(o4 : bv 32%N), bv_signed o4 = bv_signed sx - 1%Z -> (min x ≤ offset x + bv_signed o4 ∧ offset x + bv_signed o4 < C.max x) ∧ (∀(adjust : bv 32%N), (if decide (bv_unsigned (pelts y (offset y + bv_signed o3)) ≤ bv_unsigned (pelts x (offset x + bv_signed o4))) then adjust = (1%bv : bv 32%N) else adjust = (0%bv : bv 32%N)) -> int'32_in_bounds (bv_signed sy - 1%Z) ∧ (∀(o5 : bv 32%N), bv_signed o5 = bv_signed sy - 1%Z -> (min y ≤ offset y + bv_signed o5 ∧ offset y + bv_signed o5 < C.max y) ∧ (let o6 : bv 64%N := pelts y (offset y + bv_signed o5) in 0%Z < bv_unsigned o6 ∧ (∀(clz : bv 32%N), Z.pow 2%Z (bv_signed clz) * bv_unsigned o6 < 18446744073709551615%Z + 1%Z ∧ 18446744073709551615%Z + 1%Z ≤ 2%Z * Z.pow 2%Z (bv_signed clz) * bv_unsigned o6 ∧ (0%Z ≤ bv_signed clz ∧ bv_signed clz < 64%Z) ∧ Z.pow 2%Z (bv_signed clz) * bv_unsigned o6 ≤ 18446744073709551615%Z + 1%Z - Z.pow 2%Z (bv_signed clz) -> (let p : Z := Z.pow 2%Z (bv_signed clz) in ∀(o7 : bool), (bv_signed clz = bv_signed (0%bv : bv 32%N) -> o7 = true) ∧ (o7 = true -> clz = (0%bv : bv 32%N)) -> (if decide (o7 = true) then (valid x (bv_signed sx) ∧ valid nx (bv_signed sx) ∧ writable nx = true) ∧ (∀(nx1 : ptr (bv 64%N)), length (data nx1) = length (data nx) ∧ offset nx1 = offset nx ∧ min nx1 = min nx ∧ C.max nx1 = C.max nx ∧ writable nx1 = writable nx ∧ zone1 nx1 = zone1 nx -> map_eq_sub_shift (pelts nx1) (pelts x) (offset nx1) (offset x) (bv_signed sx) ∧ (∀(j : Z), j < offset nx1 ∨ offset nx1 + bv_signed sx ≤ j -> pelts nx1 j = pelts nx j) -> ((min nx1 ≤ offset nx1 + bv_signed sx ∧ offset nx1 + bv_signed sx < C.max nx1) ∧ writable nx1 = true) ∧ (∀(nx2 : ptr (bv 64%N)), length (data nx2) = length (data nx1) ∧ offset nx2 = offset nx1 ∧ min nx2 = min nx1 ∧ C.max nx2 = C.max nx1 ∧ writable nx2 = writable nx1 ∧ zone1 nx2 = zone1 nx1 -> pelts nx2 = fun_updt (pelts nx1) (offset nx2 + bv_signed sx) (0%bv : bv 64%N) ∧ pelts nx2 (offset nx2 + bv_signed sx) = (0%bv : bv 64%N) -> int'32_in_bounds (bv_signed sx + bv_signed adjust) ∧ (∀(o8 : bv 32%N), bv_signed o8 = bv_signed sx + bv_signed adjust -> ((3%Z ≤ bv_signed sy ∧ bv_signed sy ≤ bv_signed o8) ∧ valid nx2 (bv_signed o8) ∧ valid y (bv_signed sy) ∧ valid q (bv_signed o8 - bv_signed sy) ∧ writable q = true ∧ writable nx2 = true ∧ normalized y sy) ∧ (∀(nx3 : ptr (bv 64%N)) (q1 : ptr (bv 64%N)), length (data nx3) = length (data nx2) ∧ offset nx3 = offset nx2 ∧ min nx3 = min nx2 ∧ C.max nx3 = C.max nx2 ∧ writable nx3 = writable nx2 ∧ zone1 nx3 = zone1 nx2 -> length (data q1) = length (data q) ∧ offset q1 = offset q ∧ min q1 = min q ∧ C.max q1 = C.max q ∧ writable q1 = writable q ∧ zone1 q1 = zone1 q -> (∀(x_qh : bv 64%N), value nx2 (bv_signed o8) = (value q1 (bv_signed o8 - bv_signed sy) + Z.pow (18446744073709551615%Z + 1%Z) (bv_signed o8 - bv_signed sy) * bv_unsigned x_qh) * value y (bv_signed sy) + value nx3 (bv_signed sy) ∧ value nx3 (bv_signed sy) < value y (bv_signed sy) ∧ 0%Z ≤ bv_unsigned x_qh ∧ bv_unsigned x_qh ≤ 1%Z -> (valid nx3 (bv_signed sy) ∧ valid r (bv_signed sy) ∧ writable r = true) ∧ (∀(r1 : ptr (bv 64%N)), length (data r1) = length (data r) ∧ offset r1 = offset r ∧ min r1 = min r ∧ C.max r1 = C.max r ∧ writable r1 = writable r ∧ zone1 r1 = zone1 r -> map_eq_sub_shift (pelts r1) (pelts nx3) (offset r1) (offset nx3) (bv_signed sy) ∧ (∀(j : Z), j < offset r1 ∨ offset r1 + bv_signed sy ≤ j -> pelts r1 j = pelts r j) -> (∀(o9 : bool), (bv_signed adjust = bv_signed (0%bv : bv 32%N) -> o9 = true) ∧ (o9 = true -> adjust = (0%bv : bv 32%N)) -> (if decide (o9 = true) then int'32_in_bounds (bv_signed sx - bv_signed sy) ∧ (∀(o10 : bv 32%N), bv_signed o10 = bv_signed sx - bv_signed sy -> ((min q1 ≤ offset q1 + bv_signed o10 ∧ offset q1 + bv_signed o10 < C.max q1) ∧ writable q1 = true) ∧ (∀(q2 : ptr (bv 64%N)), length (data q2) = length (data q1) ∧ offset q2 = offset q1 ∧ min q2 = min q1 ∧ C.max q2 = C.max q1 ∧ writable q2 = writable q1 ∧ zone1 q2 = zone1 q1 -> pelts q2 = fun_updt (pelts q1) (offset q2 + bv_signed o10) (0%bv : bv 64%N) ∧ pelts q2 (offset q2 + bv_signed o10) = (0%bv : bv 64%N) -> value q2 (bv_signed sx - bv_signed sy + 1%Z) = value q1 (bv_signed sx - bv_signed sy + bv_signed adjust))) else value q1 (bv_signed sx - bv_signed sy + 1%Z) = value q1 (bv_signed sx - bv_signed sy + bv_signed adjust))) ∧ (∀(q2 : ptr (bv 64%N)), length (data q2) = length (data q1) ∧ offset q2 = offset q1 ∧ min q2 = min q1 ∧ C.max q2 = C.max q1 ∧ writable q2 = writable q1 ∧ zone1 q2 = zone1 q1 -> value q2 (bv_signed sx - bv_signed sy + 1%Z) = value q1 (bv_signed sx - bv_signed sy + bv_signed adjust) -> value x (bv_signed sx) = value q2 (bv_signed sx - bv_signed sy + 1%Z) * value y (bv_signed sy) + value r1 (bv_signed sy) ∧ value r1 (bv_signed sy) < value y (bv_signed sy)))))))) else 0%Z ≤ bv_signed clz ∧ (∀(o8 : bv 64%N), bv_unsigned o8 = bv_signed clz -> ((0%Z < bv_unsigned o8 ∧ bv_unsigned o8 < 64%Z) ∧ valid ny (bv_signed sy) ∧ valid y (bv_signed sy) ∧ writable ny = true ∧ 0%Z < bv_signed sy) ∧ (∀(ny1 : ptr (bv 64%N)), length (data ny1) = length (data ny) ∧ offset ny1 = offset ny ∧ min ny1 = min ny ∧ C.max ny1 = C.max ny ∧ writable ny1 = writable ny ∧ zone1 ny1 = zone1 ny -> (∀(x_c : bv 64%N), value ny1 (bv_signed sy) + Z.pow (18446744073709551615%Z + 1%Z) (bv_signed sy) * bv_unsigned x_c = value y (bv_signed sy) * Z.pow 2%Z (bv_unsigned o8) -> (normalized ny1 sy ∧ value ny1 (bv_signed sy) = Z.pow 2%Z (bv_signed clz) * value y (bv_signed sy)) ∧ (normalized ny1 sy ∧ value ny1 (bv_signed sy) = Z.pow 2%Z (bv_signed clz) * value y (bv_signed sy) -> 0%Z ≤ bv_signed clz ∧ (∀(o9 : bv 64%N), bv_unsigned o9 = bv_signed clz -> ((0%Z < bv_unsigned o9 ∧ bv_unsigned o9 < 64%Z) ∧ valid nx (bv_signed sx) ∧ valid x (bv_signed sx) ∧ writable nx = true ∧ 0%Z < bv_signed sx) ∧ (∀(nx1 : ptr (bv 64%N)), length (data nx1) = length (data nx) ∧ offset nx1 = offset nx ∧ min nx1 = min nx ∧ C.max nx1 = C.max nx ∧ writable nx1 = writable nx ∧ zone1 nx1 = zone1 nx -> (∀(h : bv 64%N), value nx1 (bv_signed sx) + Z.pow (18446744073709551615%Z + 1%Z) (bv_signed sx) * bv_unsigned h = value x (bv_signed sx) * Z.pow 2%Z (bv_unsigned o9) -> ((min nx1 ≤ offset nx1 + bv_signed sx ∧ offset nx1 + bv_signed sx < C.max nx1) ∧ writable nx1 = true) ∧ (∀(nx2 : ptr (bv 64%N)), length (data nx2) = length (data nx1) ∧ offset nx2 = offset nx1 ∧ min nx2 = min nx1 ∧ C.max nx2 = C.max nx1 ∧ writable nx2 = writable nx1 ∧ zone1 nx2 = zone1 nx1 -> pelts nx2 = fun_updt (pelts nx1) (offset nx2 + bv_signed sx) h ∧ pelts nx2 (offset nx2 + bv_signed sx) = h -> (∀(o10 : bool), (bv_signed adjust = bv_signed (1%bv : bv 32%N) -> o10 = true) ∧ (o10 = true -> adjust = (1%bv : bv 32%N)) -> value nx2 (bv_signed sx + bv_signed adjust) = p * value x (bv_signed sx)) ∧ (value nx2 (bv_signed sx + bv_signed adjust) = p * value x (bv_signed sx) -> int'32_in_bounds (bv_signed sx + bv_signed adjust) ∧ (∀(o10 : bv 32%N), bv_signed o10 = bv_signed sx + bv_signed adjust -> ((3%Z ≤ bv_signed sy ∧ bv_signed sy ≤ bv_signed o10) ∧ valid nx2 (bv_signed o10) ∧ valid ny1 (bv_signed sy) ∧ valid q (bv_signed o10 - bv_signed sy) ∧ writable q = true ∧ writable nx2 = true ∧ normalized ny1 sy) ∧ (∀(nx3 : ptr (bv 64%N)) (q1 : ptr (bv 64%N)), length (data nx3) = length (data nx2) ∧ offset nx3 = offset nx2 ∧ min nx3 = min nx2 ∧ C.max nx3 = C.max nx2 ∧ writable nx3 = writable nx2 ∧ zone1 nx3 = zone1 nx2 -> length (data q1) = length (data q) ∧ offset q1 = offset q ∧ min q1 = min q ∧ C.max q1 = C.max q ∧ writable q1 = writable q ∧ zone1 q1 = zone1 q -> (∀(x_qh : bv 64%N), value nx2 (bv_signed o10) = (value q1 (bv_signed o10 - bv_signed sy) + Z.pow (18446744073709551615%Z + 1%Z) (bv_signed o10 - bv_signed sy) * bv_unsigned x_qh) * value ny1 (bv_signed sy) + value nx3 (bv_signed sy) ∧ value nx3 (bv_signed sy) < value ny1 (bv_signed sy) ∧ 0%Z ≤ bv_unsigned x_qh ∧ bv_unsigned x_qh ≤ 1%Z -> 0%Z ≤ bv_signed clz ∧ (∀(o11 : bv 64%N), bv_unsigned o11 = bv_signed clz -> (valid nx3 (bv_signed sy) ∧ valid r (bv_signed sy) ∧ (0%Z < bv_unsigned o11 ∧ bv_unsigned o11 < 64%Z) ∧ 0%Z < bv_signed sy ∧ writable r = true) ∧ (∀(r1 : ptr (bv 64%N)), length (data r1) = length (data r) ∧ offset r1 = offset r ∧ min r1 = min r ∧ C.max r1 = C.max r ∧ writable r1 = writable r ∧ zone1 r1 = zone1 r -> (∀(x_l : bv 64%N), bv_unsigned x_l + (18446744073709551615%Z + 1%Z) * value r1 (bv_signed sy) = value nx3 (bv_signed sy) * Z.pow 2%Z (64%Z - bv_unsigned o11) -> value nx3 (bv_signed sy) = p * value r1 (bv_signed sy) ∧ (value nx3 (bv_signed sy) = p * value r1 (bv_signed sy) -> (∀(o12 : bool), (bv_signed adjust = bv_signed (0%bv : bv 32%N) -> o12 = true) ∧ (o12 = true -> adjust = (0%bv : bv 32%N)) -> (if decide (o12 = true) then int'32_in_bounds (bv_signed sx - bv_signed sy) ∧ (∀(o13 : bv 32%N), bv_signed o13 = bv_signed sx - bv_signed sy -> ((min q1 ≤ offset q1 + bv_signed o13 ∧ offset q1 + bv_signed o13 < C.max q1) ∧ writable q1 = true) ∧ (∀(q2 : ptr (bv 64%N)), length (data q2) = length (data q1) ∧ offset q2 = offset q1 ∧ min q2 = min q1 ∧ C.max q2 = C.max q1 ∧ writable q2 = writable q1 ∧ zone1 q2 = zone1 q1 -> pelts q2 = fun_updt (pelts q1) (offset q2 + bv_signed o13) (0%bv : bv 64%N) ∧ pelts q2 (offset q2 + bv_signed o13) = (0%bv : bv 64%N) -> value q2 (bv_signed sx - bv_signed sy + 1%Z) = value q1 (bv_signed sx - bv_signed sy + bv_signed adjust))) else value q1 (bv_signed sx - bv_signed sy + 1%Z) = value q1 (bv_signed sx - bv_signed sy + bv_signed adjust))) ∧ (∀(q2 : ptr (bv 64%N)), length (data q2) = length (data q1) ∧ offset q2 = offset q1 ∧ min q2 = min q1 ∧ C.max q2 = C.max q1 ∧ writable q2 = writable q1 ∧ zone1 q2 = zone1 q1 -> value q2 (bv_signed sx - bv_signed sy + 1%Z) = value q1 (bv_signed sx - bv_signed sy + bv_signed adjust) -> value x (bv_signed sx) = value q2 (bv_signed sx - bv_signed sy + 1%Z) * value y (bv_signed sy) + value r1 (bv_signed sy) ∧ value r1 (bv_signed sy) < value y (bv_signed sy))))))))))))))))))))))))))).
Admitted.
