Ltac UseShape :=
match goal with
| [ WT: wt_function _ _, CODE: (RTL.fn_code _)!_ = Some _, EQ: transfer _ _ _ _ _ = OK _ |- _ ] =>
destruct (invert_code _ _ _ _ _ _ _ WT CODE EQ) as (eafter & bsh & bb & AFTER & BSH & TCODE & EBS & TR & WTI);
inv EBS; unfold transfer_aux in TR; MonadInv
end.
Remark addressing_not_long:
forall env f addr args dst s r,
wt_instr f env (Iload Mint64 addr args dst s) -> Archi.splitlong = true ->
In r args -> r <> dst.
(** The proof of semantic preservation is a simulation argument of the "plus" kind. *)

(* Specifications: *)
Lemma step_simulation:
forall S1 t S2, RTL.step ge S1 t S2 -> wt_state S1 ->
forall S1', match_states S1 S1' ->
exists S2', plus LTL.step tge S1' t S2' /\ match_states S2 S2'.
Lemma initial_states_simulation:
forall st1, RTL.initial_state prog st1 ->
exists st2, LTL.initial_state tprog st2 /\ match_states st1 st2.
Lemma final_states_simulation:
forall st1 st2 r,
match_states st1 st2 -> RTL.final_state st1 r -> LTL.final_state st2 r.
Lemma wt_prog: wt_program prog.
Theorem transf_program_correct:
forward_simulation (RTL.semantics prog) (LTL.semantics tprog).