Local Open Scope logic.
Definition block_data_order_loop2 :=
nth 1 (loops (fn_body f_sha256_block_data_order)) Sskip.
Fixpoint Xarray' (b: list int) (i k: nat) : list int :=
match k with
| O => nil
| S k' => W (nthi b) (Z.of_nat i - 16 + (16-(Z.of_nat k)- Z.of_nat i) mod 16) ::
Xarray' b i k'
end.
Definition Xarray (b: list int) (i: nat) := Xarray' b i 16.
Global Opaque Xarray.

Lemma sha256_block_data_order_loop2_proof:
forall (Espec : OracleKind)
(b: list int) ctx (regs: list int) gv Xv
(Hregs: length regs = 8%nat),
Zlength b = LBLOCKz ->
semax (func_tycontext f_sha256_block_data_order Vprog Gtot nil)
(PROP ()
LOCAL (temp _ctx ctx; temp _i (Vint (Int.repr 16));
temp _a (Vint (nthi (Round regs (nthi b) (LBLOCKz-1)) 0));
temp _b (Vint (nthi (Round regs (nthi b) (LBLOCKz-1)) 1));
temp _c (Vint (nthi (Round regs (nthi b) (LBLOCKz-1)) 2));
temp _d (Vint (nthi (Round regs (nthi b) (LBLOCKz-1)) 3));
temp _e (Vint (nthi (Round regs (nthi b) (LBLOCKz-1)) 4));
temp _f (Vint (nthi (Round regs (nthi b) (LBLOCKz-1)) 5));
temp _g (Vint (nthi (Round regs (nthi b) (LBLOCKz-1)) 6));
temp _h (Vint (nthi (Round regs (nthi b) (LBLOCKz-1)) 7));
gvars gv; lvar _X (tarray tuint LBLOCKz) Xv)
SEP ( K_vector gv;
data_at Tsh (tarray tuint LBLOCKz) (map Vint b) Xv))
block_data_order_loop2
(normal_ret_assert
(PROP ()
LOCAL(temp _ctx ctx;
temp _a (Vint (nthi (Round regs (nthi b) 63) 0));
temp _b (Vint (nthi (Round regs (nthi b) 63) 1));
temp _c (Vint (nthi (Round regs (nthi b) 63) 2));
temp _d (Vint (nthi (Round regs (nthi b) 63) 3));
temp _e (Vint (nthi (Round regs (nthi b) 63) 4));
temp _f (Vint (nthi (Round regs (nthi b) 63) 5));
temp _g (Vint (nthi (Round regs (nthi b) 63) 6));
temp _h (Vint (nthi (Round regs (nthi b) 63) 7));
gvars gv; lvar _X (tarray tuint LBLOCKz) Xv)
SEP (K_vector gv;
data_at_ Tsh (tarray tuint LBLOCKz) Xv))).