Require Export sha.pure_lemmas.
Require Export sha.general_lemmas.
Require Export sha.vst_lemmas.
Export ListNotations.
Local Open Scope logic.
Global Opaque K256.
Transparent peq.
Fixpoint loops (s: statement) : list statement :=
match s with
| Ssequence a b => loops a ++ loops b
| Sloop _ _ => [s]
| Sifthenelse _ a b => loops a ++ loops b
| _ => nil
end.

Lemma Znth_big_endian_integer:
forall i bl,
0 <= i < Zlength bl ->
Znth i bl =
big_endian_integer
(sublist (i * WORD) (Z.succ i * WORD)
(intlist_to_bytelist bl)).