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.

Lemma nth_Xarray:
forall b i k,
(0 <= k < 16)%Z ->
nthi (Xarray b i) k = W (nthi b) (Z.of_nat i - 16 + (k- Z.of_nat i) mod 16)%Z .