Local Open Scope logic.
Opaque Snuffle.Snuffle. Opaque prepare_data.
(*TODO: eliminate*)
Ltac canon_load_result ::= idtac.
Definition HTrue_inv1 l i ys xs : Prop :=
Zlength l = 16 /\ exists ints, l=map Vint ints /\
forall j, 0<=j<16 -> exists xj,
Znth j xs = Vint xj
/\ (j<i -> exists yj, Znth j ys = Vint yj /\
Znth j l = Vint (Int.add yj xj))
/\ (i<=j ->  Znth j l = Vint xj).
Definition htrue_loop1_statement:=
Sfor (Sset _i (Econst_int (Int.repr 0) tint))
(Ebinop Olt (Etempvar _i tint) (Econst_int (Int.repr 16) tint) tint)
(Ssequence
(Sset _t'17
(Ederef
(Ebinop Oadd (Evar _x (tarray tuint 16)) (Etempvar _i tint)
(tptr tuint)) tuint))
(Ssequence
(Sset _t'18
(Ederef
(Ebinop Oadd (Evar _y (tarray tuint 16)) (Etempvar _i tint)
(tptr tuint)) tuint))
(Sassign
(Ederef
(Ebinop Oadd (Evar _x (tarray tuint 16)) (Etempvar _i tint)
(tptr tuint)) tuint)
(Ebinop Oadd (Etempvar _t'17 tuint) (Etempvar _t'18 tuint)
tuint))))
(Sset _i
(Ebinop Oadd (Etempvar _i tint) (Econst_int (Int.repr 1) tint) tint)).
Fixpoint hPosLoop3 (n:nat) (xlist: list int) (old: list val): list val :=
match n with
O => old
| S m => let j:= Z.of_nat m in
let s := hPosLoop3 m xlist old in
let five := Znth (5*j) xlist in
let six := Znth (6+j) xlist in
UpdateOut (UpdateOut s (4*j) five) (16+4*j) six
end.
Opaque Z.mul. Opaque Z.add.

Lemma hposLoop3_length xlist old: forall n, (16+4*Z.of_nat n<Zlength old) ->
Zlength (hPosLoop3 n xlist old) = Zlength old.