Remark val_lessdef_normalize:
  forall v v' ty,
  Val.has_type v ty -> Val.lessdef v v' ->
  Val.lessdef v (Val.load_result (chunk_of_type ty) v').

(* Specifications: *)
Lemma subst_loc_satisf: forall env src dst rs ls e e', subst_loc dst src e = Some e' -> well_typed_move env dst e = true -> wt_regset env rs -> satisf rs ls e' -> satisf rs (Locmap.set dst (ls src) ls) e.
Lemma in_subst_loc_part: forall l1 l2 k q (e e': eqs), EqSet.In q e -> subst_loc_part l1 l2 k e = Some e' -> (eloc q = l1 /\ ekind q = k /\ EqSet.In (Eq Full (ereg q) l2) e') \/ (Loc.diff l1 (eloc q) /\ EqSet.In q e').
Lemma subst_loc_part_satisf_lowlong: forall src dst rs ls e e', subst_loc_part (R dst) (R src) Low e = Some e' -> satisf rs ls e' -> satisf rs (Locmap.set (R dst) (Val.loword (ls (R src))) ls) e.
Lemma subst_loc_part_satisf_highlong: forall src dst rs ls e e', subst_loc_part (R dst) (R src) High e = Some e' -> satisf rs ls e' -> satisf rs (Locmap.set (R dst) (Val.hiword (ls (R src))) ls) e.
Lemma in_subst_loc_pair: forall l1 l2 l2' q (e e': eqs), EqSet.In q e -> subst_loc_pair l1 l2 l2' e = Some e' -> (eloc q = l1 /\ ekind q = Full /\ EqSet.In (Eq High (ereg q) l2) e' /\ EqSet.In (Eq Low (ereg q) l2') e') \/ (Loc.diff l1 (eloc q) /\ EqSet.In q e').
Lemma long_type_compat_charact: forall env l e q, long_type_compat env l e = true -> EqSet.In q e -> subtype (env (ereg q)) Tlong = true \/ Loc.diff l (eloc q).
Lemma subst_loc_pair_satisf_makelong: forall env src1 src2 dst rs ls e e', subst_loc_pair (R dst) (R src1) (R src2) e = Some e' -> long_type_compat env (R dst) e = true -> wt_regset env rs -> satisf rs ls e' -> Archi.ptr64 = false -> satisf rs (Locmap.set (R dst) (Val.longofwords (ls (R src1)) (ls (R src2))) ls) e.
Lemma can_undef_sound: forall e ml q, can_undef ml e = true -> EqSet.In q e -> Loc.notin (eloc q) (map R ml).
Lemma undef_regs_outside: forall ml ls l, Loc.notin l (map R ml) -> undef_regs ml ls l = ls l.
Lemma can_undef_satisf: forall ml e rs ls, can_undef ml e = true -> satisf rs ls e -> satisf rs (undef_regs ml ls) e.
Lemma can_undef_except_sound: forall lx e ml q, can_undef_except lx ml e = true -> EqSet.In q e -> Loc.diff (eloc q) lx -> Loc.notin (eloc q) (map R ml).
Lemma subst_loc_undef_satisf: forall env src dst rs ls ml e e', subst_loc dst src e = Some e' -> well_typed_move env dst e = true -> can_undef_except dst ml e = true -> wt_regset env rs -> satisf rs ls e' -> satisf rs (Locmap.set dst (ls src) (undef_regs ml ls)) e.
Lemma return_regs_agree_callee_save: forall caller callee, agree_callee_save caller (return_regs caller callee).
Lemma no_caller_saves_sound: forall e q, no_caller_saves e = true -> EqSet.In q e -> callee_save_loc (eloc q).
Lemma val_hiword_longofwords: forall v1 v2, Val.lessdef (Val.hiword (Val.longofwords v1 v2)) v1.
Lemma val_loword_longofwords: forall v1 v2, Val.lessdef (Val.loword (Val.longofwords v1 v2)) v2.
Lemma compat_left_sound: forall r l e q, compat_left r l e = true -> EqSet.In q e -> ereg q = r -> ekind q = Full /\ eloc q = l.
Lemma compat_left2_sound: forall r l1 l2 e q, compat_left2 r l1 l2 e = true -> EqSet.In q e -> ereg q = r -> (ekind q = High /\ eloc q = l1) \/ (ekind q = Low /\ eloc q = l2).
Lemma compat_entry_satisf: forall rl ll e, compat_entry rl ll e = true -> forall vl ls, Val.lessdef_list vl (map (fun p => Locmap.getpair p ls) ll) -> satisf (init_regs vl rl) ls e.
Lemma call_regs_param_values: forall sg ls, map (fun p => Locmap.getpair p (call_regs ls)) (loc_parameters sg) = map (fun p => Locmap.getpair p ls) (loc_arguments sg).
Lemma return_regs_arg_values: forall sg ls1 ls2, tailcall_is_possible sg = true -> map (fun p => Locmap.getpair p (return_regs ls1 ls2)) (loc_arguments sg) = map (fun p => Locmap.getpair p ls2) (loc_arguments sg).
Lemma find_function_tailcall: forall tge ros ls1 ls2, ros_compatible_tailcall ros = true -> find_function tge ros (return_regs ls1 ls2) = find_function tge ros ls2.
Lemma loadv_int64_split: forall m a v, Mem.loadv Mint64 m a = Some v -> Archi.splitlong = true -> exists v1 v2, Mem.loadv Mint32 m a = Some (if Archi.big_endian then v1 else v2) /\ Mem.loadv Mint32 m (Val.add a (Vint (Int.repr 4))) = Some (if Archi.big_endian then v2 else v1) /\ Val.lessdef (Val.hiword v) v1 /\ Val.lessdef (Val.loword v) v2.
Lemma add_equations_builtin_arg_satisf: forall env rs ls arg arg' e e', add_equations_builtin_arg env arg arg' e = Some e' -> satisf rs ls e' -> satisf rs ls e.
Lemma add_equations_builtin_args_satisf: forall env rs ls arg arg' e e', add_equations_builtin_args env arg arg' e = Some e' -> satisf rs ls e' -> satisf rs ls e.
Lemma add_equations_debug_args_satisf: forall env rs ls arg arg' e e', add_equations_debug_args env arg arg' e = Some e' -> satisf rs ls e' -> satisf rs ls e.
Lemma parallel_set_builtin_res_satisf: forall env res res' e0 e1 rs ls v v', remove_equations_builtin_res env res res' e0 = Some e1 -> forallb (fun r => reg_unconstrained r e1) (params_of_builtin_res res) = true -> forallb (fun mr => loc_unconstrained (R mr) e1) (params_of_builtin_res res') = true -> satisf rs ls e1 -> Val.lessdef v v' -> satisf (regmap_setres res v rs) (Locmap.setres res' v' ls) e0.
Lemma transf_function_inv: forall f tf, transf_function f = OK tf -> transf_function_spec f 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: val) (f: RTL.fundef), 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: block) (f: RTL.fundef), 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_function_translated: forall f tf, transf_fundef f = OK tf -> LTL.funsig tf = RTL.funsig f.
Lemma find_function_translated: forall ros rs fd ros' e e' ls, RTL.find_function ge ros rs = Some fd -> add_equation_ros ros ros' e = Some e' -> satisf rs ls e' -> exists tfd, LTL.find_function tge ros' ls = Some tfd /\ transf_fundef fd = OK tfd.
Lemma exec_moves: forall mv env rs s f sp bb m e e' ls, track_moves env mv e = Some e' -> wf_moves mv -> satisf rs ls e' -> wt_regset env rs -> exists ls', star step tge (Block s f sp (expand_moves mv bb) ls m) E0 (Block s f sp bb ls' m) /\ satisf rs ls' e.
Lemma match_stackframes_change_sig: forall s ts sg sg', match_stackframes s ts sg -> sg'.(sig_res) = sg.(sig_res) -> match_stackframes s ts sg'.