Remark find_label_save_callee_save:
  forall lbl l ofs k,
  Mach.find_label lbl (save_callee_save_rec l ofs k) = Mach.find_label lbl k.Remark find_label_restore_callee_save:
  forall lbl l ofs k,
  Mach.find_label lbl (restore_callee_save_rec l ofs k) = Mach.find_label lbl k.

(* Specifications: *)
Lemma transl_code_eq: forall fe i c, transl_code fe (i :: c) = transl_instr fe i (transl_code fe c).
Lemma find_label_transl_code: forall fe lbl c, Mach.find_label lbl (transl_code fe c) = option_map (transl_code fe) (Linear.find_label lbl c).
Lemma transl_find_label: forall f tf lbl c, transf_function f = OK tf -> Linear.find_label lbl f.(Linear.fn_code) = Some c -> Mach.find_label lbl tf.(Mach.fn_code) = Some (transl_code (make_env (function_bounds f)) c).
Lemma find_label_tail: forall lbl c c', Linear.find_label lbl c = Some c' -> is_tail c' c.
Lemma is_tail_save_callee_save: forall l ofs k, is_tail k (save_callee_save_rec l ofs k).
Lemma is_tail_restore_callee_save: forall l ofs k, is_tail k (restore_callee_save_rec l ofs k).
Lemma is_tail_transl_instr: forall fe i k, is_tail k (transl_instr fe i k).
Lemma is_tail_transl_code: forall fe c1 c2, is_tail c1 c2 -> is_tail (transl_code fe c1) (transl_code fe c2).
Lemma is_tail_transf_function: forall f tf c, transf_function f = OK tf -> is_tail c (Linear.fn_code f) -> is_tail (transl_code (make_env (function_bounds f)) c) (fn_code tf).
Lemma symbols_preserved: forall (s: ident), Genv.find_symbol tge s = Genv.find_symbol ge s.
Lemma senv_preserved: Senv.equiv ge tge.
Lemma functions_translated: forall v f, Genv.find_funct ge v = Some f -> exists tf, Genv.find_funct tge v = Some tf /\ transf_fundef f = OK tf.
Lemma function_ptr_translated: forall b f, Genv.find_funct_ptr ge b = Some f -> exists tf, Genv.find_funct_ptr tge b = Some tf /\ transf_fundef f = OK tf.
Lemma sig_preserved: forall f tf, transf_fundef f = OK tf -> Mach.funsig tf = Linear.funsig f.
Lemma transl_external_argument: forall l, In l (regs_of_rpairs (loc_arguments sg)) -> exists v, extcall_arg rs m' (parent_sp cs') l v /\ Val.inject j (ls l) v.
Lemma transl_external_argument_2: forall p, In p (loc_arguments sg) -> exists v, extcall_arg_pair rs m' (parent_sp cs') p v /\ Val.inject j (Locmap.getpair p ls) v.
Lemma transl_external_arguments_rec: forall locs, incl locs (loc_arguments sg) -> exists vl, list_forall2 (extcall_arg_pair rs m' (parent_sp cs')) locs vl /\ Val.inject_list j (map (fun p => Locmap.getpair p ls) locs) vl.
Lemma transl_external_arguments: exists vl, extcall_arguments rs m' (parent_sp cs') sg vl /\ Val.inject_list j (map (fun p => Locmap.getpair p ls) (loc_arguments sg)) vl.
Lemma transl_builtin_arg_correct: forall a v, eval_builtin_arg ge ls (Vptr sp Ptrofs.zero) m a v -> (forall l, In l (params_of_builtin_arg a) -> loc_valid f l = true) -> (forall sl ofs ty, In (S sl ofs ty) (params_of_builtin_arg a) -> slot_within_bounds b sl ofs ty) -> exists v', eval_builtin_arg ge rs (Vptr sp' Ptrofs.zero) m' (transl_builtin_arg fe a) v' /\ Val.inject j v v'.
Lemma transl_builtin_args_correct: forall al vl, eval_builtin_args ge ls (Vptr sp Ptrofs.zero) m al vl -> (forall l, In l (params_of_builtin_args al) -> loc_valid f l = true) -> (forall sl ofs ty, In (S sl ofs ty) (params_of_builtin_args al) -> slot_within_bounds b sl ofs ty) -> exists vl', eval_builtin_args ge rs (Vptr sp' Ptrofs.zero) m' (List.map (transl_builtin_arg fe) al) vl' /\ Val.inject_list j vl vl'.
Theorem transf_step_correct: forall s1 t s2, Linear.step ge s1 t s2 -> forall (WTS: wt_state s1) s1' (MS: match_states s1 s1'), exists s2', plus step tge s1' t s2' /\ match_states s2 s2'.
Lemma transf_initial_states: forall st1, Linear.initial_state prog st1 -> exists st2, Mach.initial_state tprog st2 /\ match_states st1 st2.
Lemma transf_final_states: forall st1 st2 r, match_states st1 st2 -> Linear.final_state st1 r -> Mach.final_state st2 r.
Lemma wt_prog: forall i fd, In (i, Gfun fd) prog.(prog_defs) -> wt_fundef fd.
Theorem transf_program_correct: forward_simulation (Linear.semantics prog) (Mach.semantics return_address_offset tprog).