Local Open Scope logic.
(*TODO: eliminate*)
Ltac canon_load_result ::= idtac.
Opaque littleendian.
Opaque littleendian_invert. Opaque Snuffle20. Opaque prepare_data.
Opaque QuadByte2ValList. Opaque fcore_result.
Definition wlistJ' (wlist:list val) (j: Z) (t0 t1 t2 t3:int) (l: list val): Prop :=
Zlength l = 16 /\
l = upd_Znth (4 * j + (j + 3) mod 4)
(upd_Znth (4 * j + (j + 2) mod 4)
(upd_Znth (4 * j + (j + 1) mod 4)
(upd_Znth (4 * j + (j + 0) mod 4) wlist (Vint t0))
(Vint t1)) (Vint t2)) (Vint t3).
Fixpoint WLIST' (wlist : list val) (tlist: list int) (j:Z) m l :=
match m with
O => l=wlist
| S m' => exists l' tm,
Zlength l = Zlength wlist /\
WLIST' wlist tlist j m' l' /\
Znth (Z.of_nat m') (map Vint tlist) = Vint tm /\
l = upd_Znth (4*j+ ((j+Z.of_nat m') mod 4)) l' (Vint tm)
end.

Lemma WLIST'_length wlist tlist j : forall m l, WLIST' wlist tlist j m l -> Zlength l=Zlength wlist.
Definition Wcopyspec (t0 t1 t2 t3: int):=
(Int.xor t0
(Int.rol
(Int.add
(Int.xor t3
(Int.rol
(Int.add
(Int.xor t2
(Int.rol
(Int.add
(Int.xor t1
(Int.rol (Int.add t0 t3) (Int.repr 7))) t0)
(Int.repr 9)))
(Int.xor t1 (Int.rol (Int.add t0 t3) (Int.repr 7))))
(Int.repr 13)))
(Int.xor t2
(Int.rol
(Int.add
(Int.xor t1 (Int.rol (Int.add t0 t3) (Int.repr 7))) t0)
(Int.repr 9)))) (Int.repr 18)),
Int.xor t1 (Int.rol (Int.add t0 t3) (Int.repr 7)),
Int.xor t2
(Int.rol
(Int.add (Int.xor t1 (Int.rol (Int.add t0 t3) (Int.repr 7))) t0)
(Int.repr 9)),
Int.xor t3
(Int.rol
(Int.add
(Int.xor t2
(Int.rol
(Int.add
(Int.xor t1 (Int.rol (Int.add t0 t3) (Int.repr 7))) t0)
(Int.repr 9)))
(Int.xor t1 (Int.rol (Int.add t0 t3) (Int.repr 7))))
(Int.repr 13))).