Require Import VST.veric.juicy_base.
Require Import VST.msl.normalize.
Require Import VST.veric.juicy_mem VST.veric.juicy_mem_lemmas VST.veric.juicy_mem_ops.
Require Import VST.veric.res_predicates.
Require Import VST.veric.extend_tc.
Require Import VST.veric.Clight_seplog.
Require Import VST.veric.Clight_assert_lemmas.
Require Import VST.veric.Clight_new.
Require Import VST.sepcomp.extspec.
Require Import VST.sepcomp.step_lemmas.
Require Import VST.veric.juicy_extspec.
Require Import VST.veric.tycontext.
Require Import VST.veric.expr2.
Require Import VST.veric.expr_lemmas.
Require Import VST.veric.expr_lemmas4.
Require Import VST.veric.semax.
Require Import VST.veric.semax_lemmas.
Require Import VST.veric.semax_conseq.
Require Import VST.veric.Clight_lemmas.
Require Import VST.veric.binop_lemmas.
Require Import VST.veric.binop_lemmas4.
Require Import VST.veric.expr_rel.

Require Import VST.veric.expr_rel.
Local Open Scope pred.

Section extensions.
Context {CS: compspecs} {Espec: OracleKind}.

Lemma semax_straight_simple:
 forall Delta (B: assert) P c Q,
  (forall rho, boxy extendM (B rho)) ->
  (forall jm jm1 Delta' ge ve te rho k F,
              tycontext_sub Delta Delta' ->
              app_pred (B rho) (m_phi jm) ->
              guard_environ Delta' (current_function k) rho ->
              closed_wrt_modvars c F ->
              rho = construct_rho (filter_genv ge) ve te  ->
              age jm jm1 ->
              ((F rho * |>P rho) && funassert Delta' rho) (m_phi jm) ->
              genv_cenv ge = cenv_cs ->
              exists jm', exists te', exists rho',
                rho' = mkEnviron (ge_of rho) (ve_of rho) (make_tenv te') /\
                level jm = S (level jm') /\
                guard_environ Delta' (current_function k) rho'  /\
                jstep (cl_core_sem ge) (State ve te (Kseq c :: k)) jm
                                 (State ve te' k) jm' /\
              ((F rho' * Q rho') && funassert Delta' rho) (m_phi jm')) ->
  semax Espec Delta (fun rho => B rho && |> P rho) c (normal_ret_assert Q).
Proof.
(* Goal: forall (Delta : tycontext) (B : assert) (P : forall _ : environ, @pred rmap ag_rmap) (c : statement) (Q : forall _ : environ, @pred rmap ag_rmap) (_ : forall rho : environ, @boxy rmap ag_rmap (@extendM rmap Join_rmap Perm_rmap ag_rmap Age_rmap) (B rho)) (_ : forall (jm jm1 : juicy_mem) (Delta' : tycontext) (ge : genv) (ve : env) (te : temp_env) (rho : environ) (k : cont) (F : assert) (_ : tycontext_sub Delta Delta') (_ : @app_pred rmap ag_rmap (B rho) (m_phi jm)) (_ : guard_environ Delta' (current_function k) rho) (_ : closed_wrt_modvars c F) (_ : @eq environ rho (construct_rho (filter_genv ge) ve te)) (_ : @age juicy_mem juicy_mem_ageable jm jm1) (_ : @app_pred rmap ag_rmap (@andp rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (F rho) (@box rmap ag_rmap (@laterM rmap ag_rmap) (P rho))) (funassert Delta' rho)) (m_phi jm)) (_ : @eq composite_env (genv_cenv ge) (@cenv_cs CS)), @ex juicy_mem (fun jm' : juicy_mem => @ex temp_env (fun te' : temp_env => @ex environ (fun rho' : environ => and (@eq environ rho' (mkEnviron (ge_of rho) (ve_of rho) (make_tenv te'))) (and (@eq nat (@level juicy_mem juicy_mem_ageable jm) (S (@level juicy_mem juicy_mem_ageable jm'))) (and (guard_environ Delta' (current_function k) rho') (and (@jstep corestate (cl_core_sem ge) (State ve te (@cons cont' (Kseq c) k)) jm (State ve te' k) jm') (@app_pred rmap ag_rmap (@andp rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (F rho') (Q rho')) (funassert Delta' rho)) (m_phi jm'))))))))), @semax CS Espec Delta (fun rho : environ => @andp rmap ag_rmap (B rho) (@box rmap ag_rmap (@laterM rmap ag_rmap) (P rho))) c (normal_ret_assert Q) *)
intros until Q; intros EB Hc.
(* Goal: @semax CS Espec Delta (fun rho : environ => @andp rmap ag_rmap (B rho) (@box rmap ag_rmap (@laterM rmap ag_rmap) (P rho))) c (normal_ret_assert Q) *)
rewrite semax_unfold.
(* Goal: forall (psi : genv) (Delta' : tycontext) (w : nat) (_ : tycontext_sub Delta Delta') (_ : @eq composite_env (genv_cenv psi) (@cenv_cs CS)) (_ : @app_pred nat ag_nat (@believe CS Espec Delta' psi Delta') w) (k : cont) (F : assert) (_ : closed_wrt_modvars c F) (_ : @app_pred nat ag_nat (rguard Espec psi Delta' (frame_ret_assert (normal_ret_assert Q) F) k) w), @app_pred nat ag_nat (guard Espec psi Delta' (fun rho : environ => @sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (F rho) (@andp rmap ag_rmap (B rho) (@box rmap ag_rmap (@laterM rmap ag_rmap) (P rho)))) (@cons cont' (Kseq c) k)) w *)
intros psi Delta' n TS HGG _ k F Hcl Hsafe te ve w Hx w0 H Hglob.
(* Goal: @app_pred rmap ag_rmap (assert_safe Espec psi ve te (@cons cont' (Kseq c) k) (construct_rho (filter_genv psi) ve te)) w0 *)
apply nec_nat in Hx.
(* Goal: @app_pred rmap ag_rmap (assert_safe Espec psi ve te (@cons cont' (Kseq c) k) (construct_rho (filter_genv psi) ve te)) w0 *)
apply (pred_nec_hereditary _ _ _ Hx) in Hsafe.
(* Goal: @app_pred rmap ag_rmap (assert_safe Espec psi ve te (@cons cont' (Kseq c) k) (construct_rho (filter_genv psi) ve te)) w0 *)
clear n Hx.
(* Goal: @app_pred rmap ag_rmap (assert_safe Espec psi ve te (@cons cont' (Kseq c) k) (construct_rho (filter_genv psi) ve te)) w0 *)
apply (pred_nec_hereditary _ _ _ (necR_nat H)) in Hsafe.
(* Goal: @app_pred rmap ag_rmap (assert_safe Espec psi ve te (@cons cont' (Kseq c) k) (construct_rho (filter_genv psi) ve te)) w0 *)
clear H w.
(* Goal: @app_pred rmap ag_rmap (assert_safe Espec psi ve te (@cons cont' (Kseq c) k) (construct_rho (filter_genv psi) ve te)) w0 *)
rename w0 into w.
(* Goal: @app_pred rmap ag_rmap (assert_safe Espec psi ve te (@cons cont' (Kseq c) k) (construct_rho (filter_genv psi) ve te)) w *)
apply assert_safe_last'; intro Hage.
(* Goal: @app_pred rmap ag_rmap (assert_safe Espec psi ve te (@cons cont' (Kseq c) k) (construct_rho (filter_genv psi) ve te)) w *)
apply own.bupd_intro.
(* Goal: @app_pred rmap ag_rmap (@exist (forall _ : rmap, Prop) (fun p : forall _ : rmap, Prop => @hereditary rmap (@age rmap ag_rmap) p) (fun w : rmap => forall (ora : @OK_ty Espec) (jm : juicy_mem) (_ : @app_pred rmap ag_rmap (@ext_compat (@OK_ty Espec) ora) w) (_ : @eq environ (construct_rho (filter_genv psi) ve te) (construct_rho (filter_genv psi) ve te)) (_ : @eq rmap (m_phi jm) w), @jsafeN (@OK_ty Espec) (@OK_spec Espec) psi (@level rmap ag_rmap w) ora (State ve te (@cons cont' (Kseq c) k)) jm) (semax.assert_safe_obligation_1 Espec psi ve te (@cons cont' (Kseq c) k) (construct_rho (filter_genv psi) ve te))) w *)
intros ora jm Hora _ H2. subst w.
(* Goal: @jsafeN (@OK_ty Espec) (@OK_spec Espec) psi (@level rmap ag_rmap (m_phi jm)) ora (State ve te (@cons cont' (Kseq c) k)) jm *)
destruct Hglob as [[TC' Hglob] Hglob'].
(* Goal: @jsafeN (@OK_ty Espec) (@OK_spec Espec) psi (@level rmap ag_rmap (m_phi jm)) ora (State ve te (@cons cont' (Kseq c) k)) jm *)
apply can_age_jm in Hage; destruct Hage as [jm1 Hage].
(* Goal: @jsafeN (@OK_ty Espec) (@OK_spec Espec) psi (@level rmap ag_rmap (m_phi jm)) ora (State ve te (@cons cont' (Kseq c) k)) jm *)
apply extend_sepcon_andp in Hglob; auto.
(* Goal: @jsafeN (@OK_ty Espec) (@OK_spec Espec) psi (@level rmap ag_rmap (m_phi jm)) ora (State ve te (@cons cont' (Kseq c) k)) jm *)
destruct Hglob as [TC2 Hglob].
(* Goal: @jsafeN (@OK_ty Espec) (@OK_spec Espec) psi (@level rmap ag_rmap (m_phi jm)) ora (State ve te (@cons cont' (Kseq c) k)) jm *)
specialize (Hc jm jm1 Delta' psi ve te _ k F TS TC2 TC' Hcl (eq_refl _) Hage).
(* Goal: @jsafeN (@OK_ty Espec) (@OK_spec Espec) psi (@level rmap ag_rmap (m_phi jm)) ora (State ve te (@cons cont' (Kseq c) k)) jm *)
specialize (Hc (conj Hglob Hglob') HGG); clear Hglob Hglob'.
(* Goal: @jsafeN (@OK_ty Espec) (@OK_spec Espec) psi (@level rmap ag_rmap (m_phi jm)) ora (State ve te (@cons cont' (Kseq c) k)) jm *)
destruct Hc as [jm' [te' [rho' [H9 [H2 [TC'' [H3 H4]]]]]]].
change (@level rmap _  (m_phi jm) = S (level (m_phi jm'))) in H2.
(* Goal: @jsafeN (@OK_ty Espec) (@OK_spec Espec) psi (@level rmap ag_rmap (m_phi jm)) ora (State ve te (@cons cont' (Kseq c) k)) jm *)
rewrite H2 in Hsafe.
(* Goal: @jsafeN (@OK_ty Espec) (@OK_spec Espec) psi (@level rmap ag_rmap (m_phi jm)) ora (State ve te (@cons cont' (Kseq c) k)) jm *)
rewrite <- level_juice_level_phi, (age_level _ _ Hage).
(* Goal: @jsafeN (@OK_ty Espec) (@OK_spec Espec) psi (S (@level juicy_mem juicy_mem_ageable jm1)) ora (State ve te (@cons cont' (Kseq c) k)) jm *)
econstructor; [eassumption | ].
(* Goal: @jm_bupd (@OK_ty Espec) ora (@jsafeN_ genv corestate (@OK_ty Espec) (fun ge : genv => @genv_symb_injective fundef type (genv_genv ge)) (cl_core_sem psi) (@OK_spec Espec) psi (@level juicy_mem juicy_mem_ageable jm1) ora (State ve te' k)) jm' *)
unfold rguard in Hsafe.
(* Goal: @jm_bupd (@OK_ty Espec) ora (@jsafeN_ genv corestate (@OK_ty Espec) (fun ge : genv => @genv_symb_injective fundef type (genv_genv ge)) (cl_core_sem psi) (@OK_spec Espec) psi (@level juicy_mem juicy_mem_ageable jm1) ora (State ve te' k)) jm' *)
specialize (Hsafe EK_normal None te' ve).
(* Goal: @jm_bupd (@OK_ty Espec) ora (@jsafeN_ genv corestate (@OK_ty Espec) (fun ge : genv => @genv_symb_injective fundef type (genv_genv ge)) (cl_core_sem psi) (@OK_spec Espec) psi (@level juicy_mem juicy_mem_ageable jm1) ora (State ve te' k)) jm' *)
simpl exit_cont in Hsafe.
(* Goal: @jm_bupd (@OK_ty Espec) ora (@jsafeN_ genv corestate (@OK_ty Espec) (fun ge : genv => @genv_symb_injective fundef type (genv_genv ge)) (cl_core_sem psi) (@OK_spec Espec) psi (@level juicy_mem juicy_mem_ageable jm1) ora (State ve te' k)) jm' *)
specialize (Hsafe (m_phi jm')).
(* Goal: @jm_bupd (@OK_ty Espec) ora (@jsafeN_ genv corestate (@OK_ty Espec) (fun ge : genv => @genv_symb_injective fundef type (genv_genv ge)) (cl_core_sem psi) (@OK_spec Espec) psi (@level juicy_mem juicy_mem_ageable jm1) ora (State ve te' k)) jm' *)
spec Hsafe.
(* Goal: ge (S (@level rmap ag_rmap (m_phi jm'))) (@level rmap ag_rmap (m_phi jm')) *)
(* Goal: @jm_bupd (@OK_ty Espec) ora (@jsafeN_ genv corestate (@OK_ty Espec) (fun ge : genv => @genv_symb_injective fundef type (genv_genv ge)) (cl_core_sem psi) (@OK_spec Espec) psi (@level juicy_mem juicy_mem_ageable jm1) ora (State ve te' k)) jm' *)
change R.rmap with rmap; omega.
(* Goal: @jm_bupd (@OK_ty Espec) ora (@jsafeN_ genv corestate (@OK_ty Espec) (fun ge : genv => @genv_symb_injective fundef type (genv_genv ge)) (cl_core_sem psi) (@OK_spec Espec) psi (@level juicy_mem juicy_mem_ageable jm1) ora (State ve te' k)) jm' *)
specialize (Hsafe _ (necR_refl _)).
(* Goal: @join resource Join_resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join resource Join_resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
destruct H4.
(* Goal: @jm_bupd (@OK_ty Espec) ora (@jsafeN_ genv corestate (@OK_ty Espec) (fun ge : genv => @genv_symb_injective fundef type (genv_genv ge)) (cl_core_sem psi) (@OK_spec Espec) psi (@level juicy_mem juicy_mem_ageable jm1) ora (State ve te' k)) jm' *)
spec Hsafe; [clear Hsafe| ].
(* Goal: @app_pred rmap ag_rmap (@andp rmap ag_rmap (@prop rmap ag_rmap (guard_environ Delta' (current_function k) (construct_rho (filter_genv psi) ve te'))) (proj_ret_assert (frame_ret_assert (normal_ret_assert Q) F) EK_normal (@None val) (construct_rho (filter_genv psi) ve te'))) (m_phi jm') *)
(* Goal: @jm_bupd (@OK_ty Espec) ora (@jsafeN_ genv corestate (@OK_ty Espec) (fun ge : genv => @genv_symb_injective fundef type (genv_genv ge)) (cl_core_sem psi) (@OK_spec Espec) psi (@level juicy_mem juicy_mem_ageable jm1) ora (State ve te' k)) jm' *)
split; auto.
(* Goal: @app_pred rmap ag_rmap (@andp rmap ag_rmap (@prop rmap ag_rmap (guard_environ Delta' (current_function k) (construct_rho (filter_genv psi) ve te'))) (proj_ret_assert (frame_ret_assert (normal_ret_assert Q) F) EK_normal (@None val) (construct_rho (filter_genv psi) ve te'))) (m_phi jm') *)
(* Goal: @jm_bupd (@OK_ty Espec) ora (@jsafeN_ genv corestate (@OK_ty Espec) (fun ge : genv => @genv_symb_injective fundef type (genv_genv ge)) (cl_core_sem psi) (@OK_spec Espec) psi (@level juicy_mem juicy_mem_ageable jm1) ora (State ve te' k)) jm' *)
split; auto.
(* Goal: @app_pred rmap ag_rmap (@prop rmap ag_rmap (guard_environ Delta' (current_function k) (construct_rho (filter_genv psi) ve te'))) (m_phi jm') *)
(* Goal: @app_pred rmap ag_rmap (proj_ret_assert (frame_ret_assert (normal_ret_assert Q) F) EK_normal (@None val) (construct_rho (filter_genv psi) ve te')) (m_phi jm') *)
(* Goal: @jm_bupd (@OK_ty Espec) ora (@jsafeN_ genv corestate (@OK_ty Espec) (fun ge : genv => @genv_symb_injective fundef type (genv_genv ge)) (cl_core_sem psi) (@OK_spec Espec) psi (@level juicy_mem juicy_mem_ageable jm1) ora (State ve te' k)) jm' *)
subst rho'; auto.
(* Goal: @app_pred rmap ag_rmap (proj_ret_assert (frame_ret_assert (normal_ret_assert Q) F) EK_normal (@None val) (construct_rho (filter_genv psi) ve te')) (m_phi jm') *)
(* Goal: @jm_bupd (@OK_ty Espec) ora (@jsafeN_ genv corestate (@OK_ty Espec) (fun ge : genv => @genv_symb_injective fundef type (genv_genv ge)) (cl_core_sem psi) (@OK_spec Espec) psi (@level juicy_mem juicy_mem_ageable jm1) ora (State ve te' k)) jm' *)
rewrite proj_frame_ret_assert.
(* Goal: @app_pred rmap ag_rmap (@seplog.sepcon assert (@seplog.LiftNatDed environ mpred (@alg_seplog.algNatDed rmap ag_rmap)) (@seplog.LiftSepLog environ mpred (@alg_seplog.algNatDed rmap ag_rmap) (@alg_seplog.algSepLog rmap ag_rmap Join_rmap Perm_rmap Sep_rmap Age_rmap)) (proj_ret_assert (normal_ret_assert Q) EK_normal (@None val)) F (construct_rho (filter_genv psi) ve te')) (m_phi jm') *)
(* Goal: @jm_bupd (@OK_ty Espec) ora (@jsafeN_ genv corestate (@OK_ty Espec) (fun ge : genv => @genv_symb_injective fundef type (genv_genv ge)) (cl_core_sem psi) (@OK_spec Espec) psi (@level juicy_mem juicy_mem_ageable jm1) ora (State ve te' k)) jm' *)
simpl seplog.sepcon.
(* Goal: @app_pred rmap ag_rmap (@prop rmap ag_rmap (guard_environ Delta' (current_function k) (construct_rho (filter_genv psi) ve te'))) (m_phi jm') *)
(* Goal: @app_pred rmap ag_rmap (proj_ret_assert (frame_ret_assert (normal_ret_assert Q) F) EK_normal (@None val) (construct_rho (filter_genv psi) ve te')) (m_phi jm') *)
(* Goal: @jm_bupd (@OK_ty Espec) ora (@jsafeN_ genv corestate (@OK_ty Espec) (fun ge : genv => @genv_symb_injective fundef type (genv_genv ge)) (cl_core_sem psi) (@OK_spec Espec) psi (@level juicy_mem juicy_mem_ageable jm1) ora (State ve te' k)) jm' *)
rewrite sepcon_comm; subst rho'; auto.
(* Goal: @jm_bupd (@OK_ty Espec) ora (@jsafeN_ genv corestate (@OK_ty Espec) (fun ge : genv => @genv_symb_injective fundef type (genv_genv ge)) (cl_core_sem psi) (@OK_spec Espec) psi (@level juicy_mem juicy_mem_ageable jm1) ora (State ve te' k)) jm' *)
subst rho'.
(* Goal: @jm_bupd (@OK_ty Espec) ora (@jsafeN_ genv corestate (@OK_ty Espec) (fun ge : genv => @genv_symb_injective fundef type (genv_genv ge)) (cl_core_sem psi) (@OK_spec Espec) psi (@level juicy_mem juicy_mem_ageable jm1) ora (State ve te' k)) jm' *)
replace (level jm1) with (level jm').
(* Goal: @jm_bupd (@OK_ty Espec) ora (@jsafeN_ genv corestate (@OK_ty Espec) (fun ge : genv => @genv_symb_injective fundef type (genv_genv ge)) (cl_core_sem psi) (@OK_spec Espec) psi (@level juicy_mem juicy_mem_ageable jm') ora (State ve te' k)) jm' *)
(* Goal: @eq nat (@level juicy_mem juicy_mem_ageable jm') (@level juicy_mem juicy_mem_ageable jm1) *)
apply assert_safe_jsafe; auto.
(* Goal: @eq nat (@level juicy_mem juicy_mem_ageable jm') (@level juicy_mem juicy_mem_ageable jm1) *)
rewrite <- !level_juice_level_phi in H2.
(* Goal: @eq nat (@level juicy_mem juicy_mem_ageable jm') (@level juicy_mem juicy_mem_ageable jm1) *)
apply age_level in Hage; omega.
Qed.

Definition force_valid_pointers m v1 v2 :=
match v1, v2 with
| Vptr b1 ofs1, Vptr b2 ofs2 =>
    (Mem.valid_pointer m b1 (Ptrofs.unsigned ofs1) &&
    Mem.valid_pointer m b2 (Ptrofs.unsigned ofs2))%bool
| _, _ => false
end.

Definition blocks_match op v1 v2 :=
match op with Cop.Olt | Cop.Ogt | Cop.Ole | Cop.Oge =>
  match v1, v2 with
    Vptr b _, Vptr b2 _ => b=b2
    | _, _ => False
  end
| _ => True
end.

Lemma later_sepcon2  {A} {JA: Join A}{PA: Perm_alg A}{SA: Sep_alg A}{AG: ageable A}{XA: Age_alg A}:
  forall P Q,  P * |> Q |-- |> (P * Q).
Proof.
(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
intros. apply @derives_trans with (|> P * |> Q).
(* Goal: @derives A AG (@sepcon A JA PA AG XA P (@box A AG (@laterM A AG) Q)) (@sepcon A JA PA AG XA (@box A AG (@laterM A AG) P) (@box A AG (@laterM A AG) Q)) *)
(* Goal: @derives A AG (@sepcon A JA PA AG XA (@box A AG (@laterM A AG) P) (@box A AG (@laterM A AG) Q)) (@box A AG (@laterM A AG) (@sepcon A JA PA AG XA P Q)) *)
apply sepcon_derives; auto. rewrite later_sepcon; auto.
Qed.


Lemma perm_order''_trans:
  forall x y z, perm_order'' x y -> perm_order'' y z -> perm_order'' x z.
Proof.
(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
intros.
(* Goal: perm_order'' x z *)
destruct x,y; inv H; auto.
(* Goal: perm_order'' (@Some permission Freeable) z *)
(* Goal: perm_order'' (@Some permission Writable) z *)
(* Goal: perm_order'' (@Some permission p) z *)
(* Goal: perm_order'' (@Some permission p) z *)
destruct z; constructor.
(* Goal: perm_order'' (@Some permission p) z *)
destruct z; inv H0; constructor.
(* Goal: perm_order'' (@Some permission p) z *)
destruct z; inv H0; constructor.
(* Goal: perm_order'' (@Some permission p) z *)
destruct z; inv H0; constructor.
Qed.

Lemma mapsto_valid_pointer : forall b o sh t jm,
 nonidentity sh ->
(mapsto_ sh (t) (Vptr b o) * TT)%pred (m_phi jm) ->
Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o) = true.
(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
intros. rename H into N.

(* Goal: match resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o)) as anonymous' return (forall _ : @eq resource anonymous' (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))), Prop) with | NO sh wildcard' => fun _ : @eq resource (NO sh wildcard') (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => @nonidentity Share.t Share.Join_ba pa_share sh | YES wildcard' wildcard'0 wildcard'1 pp => fun _ : @eq resource (YES wildcard' wildcard'0 wildcard'1 pp) (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => True | PURE k p => fun _ : @eq resource (PURE k p) (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => False end (@eq_refl resource (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o)))) *)
destruct H0. destruct H. destruct H. destruct H0.
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
unfold mapsto_,mapsto in H0.  unfold mapsto in *.
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
destruct (readable_share_dec sh) as [H2 | H2].
* (* readable_share sh *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
rename H2 into RS.
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
destruct (access_mode t); try solve [ inv H0].
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
destruct (type_is_volatile t) eqn:VOL; try contradiction.
assert (exists v,  address_mapsto m v sh (b, Ptrofs.unsigned o) x).
(* Goal: match resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o)) as anonymous' return (forall _ : @eq resource anonymous' (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))), Prop) with | NO sh wildcard' => fun _ : @eq resource (NO sh wildcard') (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => @nonidentity Share.t Share.Join_ba pa_share sh | YES wildcard' wildcard'0 wildcard'1 pp => fun _ : @eq resource (YES wildcard' wildcard'0 wildcard'1 pp) (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => True | PURE k p => fun _ : @eq resource (PURE k p) (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => False end (@eq_refl resource (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o)))) *)
destruct H0.
(* Goal: @ex val (fun v : val => @app_pred rmap ag_rmap (address_mapsto m v sh (@pair block Z b (Ptrofs.unsigned o))) x) *)
(* Goal: @ex val (fun v : val => @app_pred rmap ag_rmap (address_mapsto m v sh (@pair block Z b (Ptrofs.unsigned o))) x) *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
econstructor; apply H0. destruct H0 as [_ [v2' H0]]; exists v2'; apply H0.
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
clear H0; destruct H2 as [x1 H0].

(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
pose proof mapsto_core_load m x1 sh (b, Ptrofs.unsigned o) (m_phi jm). 

(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
destruct H2. simpl; eauto.
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
simpl in H2.
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
destruct H2.
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
specialize (H3 (b, Ptrofs.unsigned o)).
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
if_tac in H3.
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
destruct H3.  destruct H3. 

(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
rewrite valid_pointer_nonempty_perm.
(* Goal: perm (m_dry jm) b (Ptrofs.unsigned o) Cur Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
unfold perm.

(* Goal: perm_order' (@PMap.get (forall (_ : Z) (_ : perm_kind), option permission) b (mem_access (m_dry jm)) (Ptrofs.unsigned o) Cur) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
assert (JMA := juicy_mem_access jm (b, Ptrofs.unsigned o)).
unfold access_at in *. simpl in JMA.
unfold perm_of_res in *.
(* Goal: perm_order' (@PMap.get (forall (_ : Z) (_ : perm_kind), option permission) b (mem_access (m_dry jm)) (Ptrofs.unsigned o) Cur) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
rewrite H3 in JMA. simpl in JMA.
unfold perm_of_sh in *.
(* Goal: perm_order' (@PMap.get (forall (_ : Z) (_ : perm_kind), option permission) b (mem_access (m_dry jm)) (Ptrofs.unsigned o) Cur) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
rewrite JMA.
(* Goal: perm_order' (if writable0_share_dec x3 then if @eq_dec Share.t Share.EqDec_share x3 Share.top then @Some permission Freeable else @Some permission Writable else if readable_share_dec x3 then @Some permission Readable else if @eq_dec Share.t Share.EqDec_share x3 Share.bot then @None permission else @Some permission Nonempty) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
repeat if_tac; try constructor. subst.
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
simpl in H3.
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
contradiction.
(* Goal: @join resource Join_resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join resource Join_resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
destruct H4.  repeat split. omega. 
(* Goal: Z.le (Ptrofs.unsigned o) (Ptrofs.unsigned o) *)
(* Goal: Z.lt (Ptrofs.unsigned o) (Z.add (Ptrofs.unsigned o) (size_chunk m)) *)
destruct m; simpl; omega.
* (* ~ readable_share sh *)
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
destruct (access_mode t) eqn:?; try contradiction.
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
destruct (type_is_volatile t); [inversion H0 |].
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
destruct H0 as [_ [? _]].
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
specialize (H0 (b, Ptrofs.unsigned o)).
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
simpl in H0.
rewrite if_true in H0
 by (split; auto; pose proof (size_chunk_pos m); omega).
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
clear H1.
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
pose proof (resource_at_join _ _ _ (b, Ptrofs.unsigned o) H).
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
unfold resource_share in H0.
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
rewrite <- (Z.add_0_r (Ptrofs.unsigned o)).
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Z.add (Ptrofs.unsigned o) Z0)) true *)
apply (valid_pointer_dry b o 0 jm).
(* Goal: @app_pred rmap ag_rmap (@jam rmap Join_rmap Perm_rmap ag_rmap Age_rmap address (adr_range (@pair block Z b i) (size_chunk ch)) (adr_range_dec (@pair block Z b i) (size_chunk ch)) (fun loc : address => yesat NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) sh loc) noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
hnf.
(* Goal: match resource_at (m_phi jm) (@pair block Z b (Z.add (Ptrofs.unsigned o) Z0)) as anonymous' return (forall _ : @eq resource anonymous' (resource_at (m_phi jm) (@pair block Z b (Z.add (Ptrofs.unsigned o) Z0))), Prop) with | NO sh wildcard' => fun _ : @eq resource (NO sh wildcard') (resource_at (m_phi jm) (@pair block Z b (Z.add (Ptrofs.unsigned o) Z0))) => @nonidentity Share.t Share.Join_ba pa_share sh | YES wildcard' wildcard'0 wildcard'1 pp => fun _ : @eq resource (YES wildcard' wildcard'0 wildcard'1 pp) (resource_at (m_phi jm) (@pair block Z b (Z.add (Ptrofs.unsigned o) Z0))) => True | PURE k p => fun _ : @eq resource (PURE k p) (resource_at (m_phi jm) (@pair block Z b (Z.add (Ptrofs.unsigned o) Z0))) => False end (@eq_refl resource (resource_at (m_phi jm) (@pair block Z b (Z.add (Ptrofs.unsigned o) Z0)))) *)
rewrite Z.add_0_r.
(* Goal: match resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o)) as anonymous' return (forall _ : @eq resource anonymous' (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))), Prop) with | NO sh wildcard' => fun _ : @eq resource (NO sh wildcard') (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => @nonidentity Share.t Share.Join_ba pa_share sh | YES wildcard' wildcard'0 wildcard'1 pp => fun _ : @eq resource (YES wildcard' wildcard'0 wildcard'1 pp) (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => True | PURE k p => fun _ : @eq resource (PURE k p) (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => False end (@eq_refl resource (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o)))) *)
destruct H0.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
destruct  (x @ (b, Ptrofs.unsigned o)); inv H0; inv H1; simpl; auto.
(* Goal: @nonidentity Share.t Share.Join_ba pa_share sh3 *)
intro.
(* Goal: False *)
apply split_identity in RJ; auto.
Qed.

Lemma mapsto_is_pointer : forall sh t m v,
mapsto_ sh t v m ->
exists b, exists o, v = Vptr b o.
Proof.
(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
intros. unfold mapsto_, mapsto in H.
if_tac in H; try contradiction;
destruct (access_mode t); try contradiction;
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
destruct (type_is_volatile t); try contradiction.
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
destruct v; try contradiction.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
eauto.
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
destruct v; try contradiction.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
eauto.
Qed.

Lemma pointer_cmp_eval:
   forall (Delta : tycontext) (cmp : Cop.binary_operation) (e1 e2 : expr) sh1 sh2,
   is_comparison cmp = true ->
   forall (jm : juicy_mem) (rho : environ),
   (tc_expr Delta e1 rho) (m_phi jm) ->
   (tc_expr Delta e2 rho) (m_phi jm) ->
   blocks_match cmp (eval_expr e1 rho) (eval_expr e2 rho) ->
   typecheck_environ Delta rho ->
   nonidentity sh1 ->
   nonidentity sh2 ->
   (mapsto_ sh1 (typeof e1) (eval_expr e1 rho) * TT)%pred (m_phi jm) ->
   (mapsto_ sh2 (typeof e2) (eval_expr e2 rho) * TT)%pred (m_phi jm) ->
   eqb_type (typeof e1) int_or_ptr_type = false ->
   eqb_type (typeof e2) int_or_ptr_type = false ->
   Cop.sem_binary_operation cenv_cs cmp (eval_expr e1 rho)
     (typeof e1) (eval_expr e2 rho) (typeof e2) (m_dry jm) =
  Some
     (force_val
        (sem_binary_operation' cmp (typeof e1) (typeof e2)
           (eval_expr e1 rho) (eval_expr e2 rho))).
Proof.
(* Goal: forall (Delta : tycontext) (cmp : binary_operation) (e1 e2 : expr) (sh1 sh2 : Share.t) (_ : @eq bool (is_comparison cmp) true) (jm : juicy_mem) (rho : environ) (_ : @app_pred rmap ag_rmap (@tc_expr CS Delta e1 rho) (m_phi jm)) (_ : @app_pred rmap ag_rmap (@tc_expr CS Delta e2 rho) (m_phi jm)) (_ : blocks_match cmp (@eval_expr CS e1 rho) (@eval_expr CS e2 rho)) (_ : typecheck_environ Delta rho) (_ : @nonidentity Share.t Share.Join_ba pa_share sh1) (_ : @nonidentity Share.t Share.Join_ba pa_share sh2) (_ : @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (mapsto_ sh1 (typeof e1) (@eval_expr CS e1 rho)) (@TT rmap ag_rmap)) (m_phi jm)) (_ : @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (mapsto_ sh2 (typeof e2) (@eval_expr CS e2 rho)) (@TT rmap ag_rmap)) (m_phi jm)) (_ : @eq bool (eqb_type (typeof e1) int_or_ptr_type) false) (_ : @eq bool (eqb_type (typeof e2) int_or_ptr_type) false), @eq (option val) (sem_binary_operation (@cenv_cs CS) cmp (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm)) (@Some val (force_val (@sem_binary_operation' CS cmp (typeof e1) (typeof e2) (@eval_expr CS e1 rho) (@eval_expr CS e2 rho)))) *)
intros until rho. intros ? ? BM ? N1 N2 ? ? NE1 NE2.
(* Goal: @eq (option val) (sem_binary_operation (@cenv_cs CS) cmp (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm)) (@Some val (force_val (@sem_binary_operation' CS cmp (typeof e1) (typeof e2) (@eval_expr CS e1 rho) (@eval_expr CS e2 rho)))) *)
unfold Cop.sem_binary_operation, sem_cmp.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Omul => Cop.sem_mul (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Odiv => Cop.sem_div (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Omod => Cop.sem_mod (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oand => Cop.sem_and (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oor => Cop.sem_or (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oxor => Cop.sem_xor (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oshl => Cop.sem_shl (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) | Oshr => Cop.sem_shr (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) | Oeq => Cop.sem_cmp Ceq (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | One => Cop.sem_cmp Cne (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Olt => Cop.sem_cmp Clt (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Ogt => Cop.sem_cmp Cgt (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Ole => Cop.sem_cmp Cle (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oge => Cop.sem_cmp Cge (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) end (@Some val (force_val (@sem_binary_operation' CS cmp (typeof e1) (typeof e2) (@eval_expr CS e1 rho) (@eval_expr CS e2 rho)))) *)
simpl in H0, H1. apply typecheck_expr_sound in H0; auto.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Omul => Cop.sem_mul (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Odiv => Cop.sem_div (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Omod => Cop.sem_mod (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oand => Cop.sem_and (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oor => Cop.sem_or (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oxor => Cop.sem_xor (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oshl => Cop.sem_shl (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) | Oshr => Cop.sem_shr (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) | Oeq => Cop.sem_cmp Ceq (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | One => Cop.sem_cmp Cne (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Olt => Cop.sem_cmp Clt (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Ogt => Cop.sem_cmp Cgt (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Ole => Cop.sem_cmp Cle (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oge => Cop.sem_cmp Cge (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) end (@Some val (force_val (@sem_binary_operation' CS cmp (typeof e1) (typeof e2) (@eval_expr CS e1 rho) (@eval_expr CS e2 rho)))) *)
apply typecheck_expr_sound in H1; auto.

(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Omul => Cop.sem_mul (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Odiv => Cop.sem_div (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Omod => Cop.sem_mod (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oand => Cop.sem_and (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oor => Cop.sem_or (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oxor => Cop.sem_xor (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oshl => Cop.sem_shl (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) | Oshr => Cop.sem_shr (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) | Oeq => Cop.sem_cmp Ceq (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | One => Cop.sem_cmp Cne (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Olt => Cop.sem_cmp Clt (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Ogt => Cop.sem_cmp Cgt (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Ole => Cop.sem_cmp Cle (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oge => Cop.sem_cmp Cge (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) end (@Some val (force_val (@sem_binary_operation' CS cmp (typeof e1) (typeof e2) (@eval_expr CS e1 rho) (@eval_expr CS e2 rho)))) *)
copy H3. copy H4. rename H5 into MT_1.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Omul => Cop.sem_mul (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Odiv => Cop.sem_div (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Omod => Cop.sem_mod (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oand => Cop.sem_and (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oor => Cop.sem_or (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oxor => Cop.sem_xor (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oshl => Cop.sem_shl (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) | Oshr => Cop.sem_shr (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) | Oeq => Cop.sem_cmp Ceq (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | One => Cop.sem_cmp Cne (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Olt => Cop.sem_cmp Clt (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Ogt => Cop.sem_cmp Cgt (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Ole => Cop.sem_cmp Cle (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oge => Cop.sem_cmp Cge (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) end (@Some val (force_val (@sem_binary_operation' CS cmp (typeof e1) (typeof e2) (@eval_expr CS e1 rho) (@eval_expr CS e2 rho)))) *)
rename H6 into MT_2.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Omul => Cop.sem_mul (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Odiv => Cop.sem_div (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Omod => Cop.sem_mod (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oand => Cop.sem_and (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oor => Cop.sem_or (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oxor => Cop.sem_xor (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oshl => Cop.sem_shl (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) | Oshr => Cop.sem_shr (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) | Oeq => Cop.sem_cmp Ceq (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | One => Cop.sem_cmp Cne (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Olt => Cop.sem_cmp Clt (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Ogt => Cop.sem_cmp Cgt (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Ole => Cop.sem_cmp Cle (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oge => Cop.sem_cmp Cge (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) end (@Some val (force_val (@sem_binary_operation' CS cmp (typeof e1) (typeof e2) (@eval_expr CS e1 rho) (@eval_expr CS e2 rho)))) *)
destruct H3 as [? [? [J1 [MT1 _]]]].
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Omul => Cop.sem_mul (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Odiv => Cop.sem_div (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Omod => Cop.sem_mod (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oand => Cop.sem_and (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oor => Cop.sem_or (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oxor => Cop.sem_xor (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oshl => Cop.sem_shl (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) | Oshr => Cop.sem_shr (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) | Oeq => Cop.sem_cmp Ceq (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | One => Cop.sem_cmp Cne (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Olt => Cop.sem_cmp Clt (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Ogt => Cop.sem_cmp Cgt (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Ole => Cop.sem_cmp Cle (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oge => Cop.sem_cmp Cge (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) end (@Some val (force_val (@sem_binary_operation' CS cmp (typeof e1) (typeof e2) (@eval_expr CS e1 rho) (@eval_expr CS e2 rho)))) *)
destruct H4 as [? [? [J2 [MT2 _]]]].
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Omul => Cop.sem_mul (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Odiv => Cop.sem_div (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Omod => Cop.sem_mod (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oand => Cop.sem_and (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oor => Cop.sem_or (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oxor => Cop.sem_xor (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oshl => Cop.sem_shl (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) | Oshr => Cop.sem_shr (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) | Oeq => Cop.sem_cmp Ceq (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | One => Cop.sem_cmp Cne (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Olt => Cop.sem_cmp Clt (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Ogt => Cop.sem_cmp Cgt (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Ole => Cop.sem_cmp Cle (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oge => Cop.sem_cmp Cge (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) end (@Some val (force_val (@sem_binary_operation' CS cmp (typeof e1) (typeof e2) (@eval_expr CS e1 rho) (@eval_expr CS e2 rho)))) *)
destruct (mapsto_is_pointer _ _ _ _ MT1) as [? [? ?]].
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Omul => Cop.sem_mul (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Odiv => Cop.sem_div (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Omod => Cop.sem_mod (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oand => Cop.sem_and (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oor => Cop.sem_or (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oxor => Cop.sem_xor (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oshl => Cop.sem_shl (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) | Oshr => Cop.sem_shr (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) | Oeq => Cop.sem_cmp Ceq (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | One => Cop.sem_cmp Cne (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Olt => Cop.sem_cmp Clt (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Ogt => Cop.sem_cmp Cgt (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Ole => Cop.sem_cmp Cle (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oge => Cop.sem_cmp Cge (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) end (@Some val (force_val (@sem_binary_operation' CS cmp (typeof e1) (typeof e2) (@eval_expr CS e1 rho) (@eval_expr CS e2 rho)))) *)
destruct (mapsto_is_pointer _ _ _ _ MT2) as [? [? ?]].

unfold blocks_match in *.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Omul => Cop.sem_mul (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Odiv => Cop.sem_div (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Omod => Cop.sem_mod (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oand => Cop.sem_and (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oor => Cop.sem_or (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oxor => Cop.sem_xor (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oshl => Cop.sem_shl (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) | Oshr => Cop.sem_shr (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) | Oeq => Cop.sem_cmp Ceq (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | One => Cop.sem_cmp Cne (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Olt => Cop.sem_cmp Clt (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Ogt => Cop.sem_cmp Cgt (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Ole => Cop.sem_cmp Cle (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oge => Cop.sem_cmp Cge (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) end (@Some val (force_val (@sem_binary_operation' CS cmp (typeof e1) (typeof e2) (@eval_expr CS e1 rho) (@eval_expr CS e2 rho)))) *)
simpl in BM.

rewrite H3 in *. rewrite H4 in *.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) | Oshr => Cop.sem_shr (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) | Oeq => Cop.sem_cmp Ceq (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | One => Cop.sem_cmp Cne (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Olt => Cop.sem_cmp Clt (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Ogt => Cop.sem_cmp Cgt (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Ole => Cop.sem_cmp Cle (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Oge => Cop.sem_cmp Cge (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) end (@Some val (force_val (@sem_binary_operation' CS cmp (typeof e1) (typeof e2) (Vptr x3 x4) (Vptr x5 x6)))) *)
apply mapsto_valid_pointer in MT_1; auto.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) | Oshr => Cop.sem_shr (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) | Oeq => Cop.sem_cmp Ceq (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | One => Cop.sem_cmp Cne (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Olt => Cop.sem_cmp Clt (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Ogt => Cop.sem_cmp Cgt (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Ole => Cop.sem_cmp Cle (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Oge => Cop.sem_cmp Cge (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) end (@Some val (force_val (@sem_binary_operation' CS cmp (typeof e1) (typeof e2) (Vptr x3 x4) (Vptr x5 x6)))) *)
apply mapsto_valid_pointer in MT_2; auto.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) | Oshr => Cop.sem_shr (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) | Oeq => Cop.sem_cmp Ceq (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | One => Cop.sem_cmp Cne (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Olt => Cop.sem_cmp Clt (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Ogt => Cop.sem_cmp Cgt (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Ole => Cop.sem_cmp Cle (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Oge => Cop.sem_cmp Cge (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) end (@Some val (force_val (@sem_binary_operation' CS cmp (typeof e1) (typeof e2) (Vptr x3 x4) (Vptr x5 x6)))) *)
forget (typeof e1) as t1.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) | Oshr => Cop.sem_shr (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) | Oeq => Cop.sem_cmp Ceq (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) (m_dry jm) | One => Cop.sem_cmp Cne (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) (m_dry jm) | Olt => Cop.sem_cmp Clt (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) (m_dry jm) | Ogt => Cop.sem_cmp Cgt (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) (m_dry jm) | Ole => Cop.sem_cmp Cle (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) (m_dry jm) | Oge => Cop.sem_cmp Cge (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) (m_dry jm) end (@Some val (force_val (@sem_binary_operation' CS cmp t1 (typeof e2) (Vptr x3 x4) (Vptr x5 x6)))) *)
forget (typeof e2) as t2.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) t1 (Vptr x5 x6) t2 | Oshr => Cop.sem_shr (Vptr x3 x4) t1 (Vptr x5 x6) t2 | Oeq => Cop.sem_cmp Ceq (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | One => Cop.sem_cmp Cne (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Olt => Cop.sem_cmp Clt (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Ogt => Cop.sem_cmp Cgt (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Ole => Cop.sem_cmp Cle (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oge => Cop.sem_cmp Cge (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) end (@Some val (force_val (@sem_binary_operation' CS cmp t1 t2 (Vptr x3 x4) (Vptr x5 x6)))) *)
clear e1 e2 H3 H4.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) t1 (Vptr x5 x6) t2 | Oshr => Cop.sem_shr (Vptr x3 x4) t1 (Vptr x5 x6) t2 | Oeq => Cop.sem_cmp Ceq (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | One => Cop.sem_cmp Cne (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Olt => Cop.sem_cmp Clt (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Ogt => Cop.sem_cmp Cgt (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Ole => Cop.sem_cmp Cle (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oge => Cop.sem_cmp Cge (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) end (@Some val (force_val (@sem_binary_operation' CS cmp t1 t2 (Vptr x3 x4) (Vptr x5 x6)))) *)
unfold Cop.sem_cmp, Cop.sem_binarith; simpl.
unfold  cmp_ptr, Val.cmpu_bool, Val.cmplu_bool.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) t1 (Vptr x5 x6) t2 | Oshr => Cop.sem_shr (Vptr x3 x4) t1 (Vptr x5 x6) t2 | Oeq => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Ceq x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Ceq else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Ceq x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Ceq else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Ceq x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Ceq else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Ceq x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Ceq else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Ceq x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Ceq else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Ceq x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Ceq else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Ceq x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Ceq else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Ceq x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Ceq else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Ceq x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Ceq else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Ceq x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Ceq else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => Int.eq n1 n2 | Unsigned => Int.eq n1 n2 end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => Int64.eq n1 n2 | Unsigned => Int64.eq n1 n2 end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Ceq n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Ceq n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end | One => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cne x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cne else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cne x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cne else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cne x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cne else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cne x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cne else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cne x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cne else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cne x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cne else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cne x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cne else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cne x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cne else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cne x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cne else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cne x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cne else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int.eq n1 n2) | Unsigned => negb (Int.eq n1 n2) end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int64.eq n1 n2) | Unsigned => negb (Int64.eq n1 n2) end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Cne n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Cne n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end | Olt => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Clt x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Clt else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Clt x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Clt else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Clt x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Clt else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Clt x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Clt else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Clt x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Clt else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Clt x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Clt else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Clt x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Clt else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Clt x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Clt else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Clt x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Clt else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Clt x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Clt else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => Int.lt n1 n2 | Unsigned => Int.ltu n1 n2 end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => Int64.lt n1 n2 | Unsigned => Int64.ltu n1 n2 end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Clt n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Clt n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end | Ogt => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cgt x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cgt else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cgt x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cgt else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cgt x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cgt else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cgt x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cgt else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cgt x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cgt else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cgt x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cgt else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cgt x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cgt else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cgt x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cgt else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cgt x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cgt else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cgt x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cgt else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => Int.lt n2 n1 | Unsigned => Int.ltu n2 n1 end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => Int64.lt n2 n1 | Unsigned => Int64.ltu n2 n1 end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Cgt n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Cgt n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end | Ole => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cle x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cle else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cle x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cle else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cle x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cle else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cle x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cle else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cle x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cle else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cle x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cle else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cle x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cle else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cle x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cle else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cle x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cle else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cle x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cle else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int.lt n2 n1) | Unsigned => negb (Int.ltu n2 n1) end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int64.lt n2 n1) | Unsigned => negb (Int64.ltu n2 n1) end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Cle n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Cle n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end | Oge => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cge x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cge else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cge x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cge else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cge x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cge else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cge x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cge else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cge x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cge else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cge x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cge else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cge x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cge else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cge x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cge else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cge x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cge else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then if andb (orb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x3 (Z.sub (Ptrofs.unsigned x4) (Zpos xH)))) (orb (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) (Mem.valid_pointer (m_dry jm) x5 (Z.sub (Ptrofs.unsigned x6) (Zpos xH)))) then @Some bool (Ptrofs.cmpu Cge x4 x6) else @None bool else if andb (Mem.valid_pointer (m_dry jm) x3 (Ptrofs.unsigned x4)) (Mem.valid_pointer (m_dry jm) x5 (Ptrofs.unsigned x6)) then Val.cmp_different_blocks Cge else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int.lt n1 n2) | Unsigned => negb (Int.ltu n1 n2) end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int64.lt n1 n2) | Unsigned => negb (Int64.ltu n1 n2) end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Cge n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Cge n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp t1 t2 (Vptr x3 x4) (Vptr x5 x6)))) *)
rewrite MT_1, MT_2.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
simpl.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) t1 (Vptr x5 x6) t2 | Oshr => Cop.sem_shr (Vptr x3 x4) t1 (Vptr x5 x6) t2 | Oeq => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => Int.eq n1 n2 | Unsigned => Int.eq n1 n2 end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => Int64.eq n1 n2 | Unsigned => Int64.eq n1 n2 end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Ceq n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Ceq n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end | One => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int.eq n1 n2) | Unsigned => negb (Int.eq n1 n2) end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int64.eq n1 n2) | Unsigned => negb (Int64.eq n1 n2) end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Cne n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Cne n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end | Olt => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => Int.lt n1 n2 | Unsigned => Int.ltu n1 n2 end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => Int64.lt n1 n2 | Unsigned => Int64.ltu n1 n2 end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Clt n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Clt n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end | Ogt => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => Int.lt n2 n1 | Unsigned => Int.ltu n2 n1 end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => Int64.lt n2 n1 | Unsigned => Int64.ltu n2 n1 end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Cgt n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Cgt n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end | Ole => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int.lt n2 n1) | Unsigned => negb (Int.ltu n2 n1) end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int64.lt n2 n1) | Unsigned => negb (Int64.ltu n2 n1) end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Cle n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Cle n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end | Oge => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int.lt n1 n2) | Unsigned => negb (Int.ltu n1 n2) end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int64.lt n1 n2) | Unsigned => negb (Int64.ltu n1 n2) end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Cge n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Cge n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp t1 t2 (Vptr x3 x4) (Vptr x5 x6)))) *)
clear MT_1 MT_2.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) t1 (Vptr x5 x6) t2 | Oshr => Cop.sem_shr (Vptr x3 x4) t1 (Vptr x5 x6) t2 | Oeq => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => Int.eq n1 n2 | Unsigned => Int.eq n1 n2 end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => Int64.eq n1 n2 | Unsigned => Int64.eq n1 n2 end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Ceq n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Ceq n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end | One => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int.eq n1 n2) | Unsigned => negb (Int.eq n1 n2) end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int64.eq n1 n2) | Unsigned => negb (Int64.eq n1 n2) end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Cne n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Cne n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end | Olt => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => Int.lt n1 n2 | Unsigned => Int.ltu n1 n2 end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => Int64.lt n1 n2 | Unsigned => Int64.ltu n1 n2 end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Clt n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Clt n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end | Ogt => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => Int.lt n2 n1 | Unsigned => Int.ltu n2 n1 end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => Int64.lt n2 n1 | Unsigned => Int64.ltu n2 n1 end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Cgt n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Cgt n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end | Ole => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int.lt n2 n1) | Unsigned => negb (Int.ltu n2 n1) end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int64.lt n2 n1) | Unsigned => negb (Int64.ltu n2 n1) end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Cle n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Cle n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end | Oge => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int.lt n1 n2) | Unsigned => negb (Int.ltu n1 n2) end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int64.lt n1 n2) | Unsigned => negb (Int64.ltu n1 n2) end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Cge n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Cge n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp t1 t2 (Vptr x3 x4) (Vptr x5 x6)))) *)
unfold mapsto_ in MT1, MT2.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) t1 (Vptr x5 x6) t2 | Oshr => Cop.sem_shr (Vptr x3 x4) t1 (Vptr x5 x6) t2 | Oeq => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => Int.eq n1 n2 | Unsigned => Int.eq n1 n2 end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => Int64.eq n1 n2 | Unsigned => Int64.eq n1 n2 end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Ceq n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Ceq n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end | One => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int.eq n1 n2) | Unsigned => negb (Int.eq n1 n2) end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int64.eq n1 n2) | Unsigned => negb (Int64.eq n1 n2) end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Cne n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Cne n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end | Olt => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => Int.lt n1 n2 | Unsigned => Int.ltu n1 n2 end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => Int64.lt n1 n2 | Unsigned => Int64.ltu n1 n2 end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Clt n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Clt n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end | Ogt => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => Int.lt n2 n1 | Unsigned => Int.ltu n2 n1 end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => Int64.lt n2 n1 | Unsigned => Int64.ltu n2 n1 end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Cgt n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Cgt n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end | Ole => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int.lt n2 n1) | Unsigned => negb (Int.ltu n2 n1) end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int64.lt n2 n1) | Unsigned => negb (Int64.ltu n2 n1) end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Cle n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Cle n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end | Oge => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int.lt n1 n2) | Unsigned => negb (Int.ltu n1 n2) end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int64.lt n1 n2) | Unsigned => negb (Int64.ltu n1 n2) end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Cge n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Cge n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp t1 t2 (Vptr x3 x4) (Vptr x5 x6)))) *)
unfold mapsto in MT1,MT2.
destruct (access_mode t1) eqn:?A1;
 try solve [simpl in MT1; contradiction].
destruct (access_mode t2) eqn:?A2;
 try solve [simpl in MT2; contradiction].
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) t1 (Vptr x5 x6) t2 (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) t1 (Vptr x5 x6) t2 | Oshr => Cop.sem_shr (Vptr x3 x4) t1 (Vptr x5 x6) t2 | Oeq => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => Int.eq n1 n2 | Unsigned => Int.eq n1 n2 end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => Int64.eq n1 n2 | Unsigned => Int64.eq n1 n2 end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Ceq n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Ceq n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end | One => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int.eq n1 n2) | Unsigned => negb (Int.eq n1 n2) end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int64.eq n1 n2) | Unsigned => negb (Int64.eq n1 n2) end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Cne n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Cne n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end | Olt => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => Int.lt n1 n2 | Unsigned => Int.ltu n1 n2 end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => Int64.lt n1 n2 | Unsigned => Int64.ltu n1 n2 end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Clt n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Clt n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end | Ogt => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => Int.lt n2 n1 | Unsigned => Int.ltu n2 n1 end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => Int64.lt n2 n1 | Unsigned => Int64.ltu n2 n1 end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Cgt n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Cgt n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end | Ole => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int.lt n2 n1) | Unsigned => negb (Int.ltu n2 n1) end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int64.lt n2 n1) | Unsigned => negb (Int64.ltu n2 n1) end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Cle n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Cle n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end | Oge => match match typeconv t1 with | Tvoid => cmp_default | Tint i si a => match typeconv t2 with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv t2 with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv t2 with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) t1 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) t2 (binarith_type match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end) (m_dry jm) with | Some v2' => match match t1 with | Tvoid => bin_default | Tint (I8 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I16 as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Signed as s) a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (I32 as i) (Unsigned as s) a => match t2 with | Tvoid => bin_default | Tint i0 s0 a0 => bin_case_i Unsigned | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tint (IBool as i) s a => match t2 with | Tvoid => bin_default | Tint (I8 as i0) s0 a0 => bin_case_i Signed | Tint (I16 as i0) s0 a0 => bin_case_i Signed | Tint (I32 as i0) (Signed as s0) a0 => bin_case_i Signed | Tint (I32 as i0) (Unsigned as s0) a0 => bin_case_i Unsigned | Tint (IBool as i0) s0 a0 => bin_case_i Signed | Tlong sg a0 => bin_case_l sg | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i0 a0 => bin_default | Tunion i0 a0 => bin_default end | Tlong (Signed as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong (Signed as s) a0 => bin_case_l Signed | Tlong (Unsigned as s) a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tlong (Unsigned as sg) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_l sg | Tlong s a0 => bin_case_l Unsigned | Tfloat (F32 as f) a0 => bin_case_s | Tfloat (F64 as f) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F32 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_s | Tlong s a0 => bin_case_s | Tfloat (F32 as f0) a0 => bin_case_s | Tfloat (F64 as f0) a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tfloat (F64 as f) a => match t2 with | Tvoid => bin_default | Tint i s a0 => bin_case_f | Tlong s a0 => bin_case_f | Tfloat f0 a0 => bin_case_f | Tpointer t a0 => bin_default | Tarray t z a0 => bin_default | Tfunction t t0 c => bin_default | Tstruct i a0 => bin_default | Tunion i a0 => bin_default end | Tpointer t a => bin_default | Tarray t z a => bin_default | Tfunction t t0 c => bin_default | Tstruct i a => bin_default | Tunion i a => bin_default end with | bin_case_i sg => match v1' with | Vundef => @None val | Vint n1 => match v2' with | Vundef => @None val | Vint n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int.lt n1 n2) | Unsigned => negb (Int.ltu n1 n2) end) | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vlong i => @None val | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_l sg => match v1' with | Vundef => @None val | Vint i => @None val | Vlong n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong n2 => @Some val (Val.of_bool match sg with | Signed => negb (Int64.lt n1 n2) | Unsigned => negb (Int64.ltu n1 n2) end) | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | Vfloat f => @None val | Vsingle f => @None val | Vptr b i => @None val end | bin_case_f => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat n2 => @Some val (Val.of_bool (Float.cmp Cge n1 n2)) | Vsingle f => @None val | Vptr b i => @None val end | Vsingle f => @None val | Vptr b i => @None val end | bin_case_s => match v1' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n1 => match v2' with | Vundef => @None val | Vint i => @None val | Vlong i => @None val | Vfloat f => @None val | Vsingle n2 => @Some val (Val.of_bool (Float32.cmp Cge n1 n2)) | Vptr b i => @None val end | Vptr b i => @None val end | bin_default => @None val end | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp t1 t2 (Vptr x3 x4) (Vptr x5 x6)))) *)
clear MT1 MT2.
destruct t1; try solve [simpl in *; try destruct f; try tauto; congruence].
destruct t2; try solve [simpl in *; try destruct f; try tauto; congruence].
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
simpl.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | One => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | Olt => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | Ogt => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | Ole => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | Oge => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
unfold sem_binary_operation', sem_cmp.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | One => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | Olt => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | Ogt => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | Ole => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | Oge => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) end (@Some val (force_val (match cmp with | Oadd => @sem_add CS (Tpointer t1 a) (Tpointer t2 a0) | Osub => @sem_sub CS (Tpointer t1 a) (Tpointer t2 a0) | Omul => sem_mul (Tpointer t1 a) (Tpointer t2 a0) | Odiv => sem_div (Tpointer t1 a) (Tpointer t2 a0) | Omod => sem_mod (Tpointer t1 a) (Tpointer t2 a0) | Oand => sem_and (Tpointer t1 a) (Tpointer t2 a0) | Oor => sem_or (Tpointer t1 a) (Tpointer t2 a0) | Oxor => sem_xor (Tpointer t1 a) (Tpointer t2 a0) | Oshl => sem_shl (Tpointer t1 a) (Tpointer t2 a0) | Oshr => sem_shr (Tpointer t1 a) (Tpointer t2 a0) | Oeq => match classify_cmp (Tpointer t1 a) (Tpointer t2 a0) with | cmp_case_pp => if orb (eqb_type (Tpointer t1 a) int_or_ptr_type) (eqb_type (Tpointer t2 a0) int_or_ptr_type) then fun _ _ : val => @None val else sem_cmp_pp Ceq | cmp_case_pi si => if eqb_type (Tpointer t1 a) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_pi si Ceq | cmp_case_ip si => if eqb_type (Tpointer t2 a0) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_ip si Ceq | cmp_case_pl => if eqb_type (Tpointer t1 a) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_pl Ceq | cmp_case_lp => if eqb_type (Tpointer t2 a0) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_lp Ceq | cmp_default => sem_cmp_default Ceq (Tpointer t1 a) (Tpointer t2 a0) end | One => match classify_cmp (Tpointer t1 a) (Tpointer t2 a0) with | cmp_case_pp => if orb (eqb_type (Tpointer t1 a) int_or_ptr_type) (eqb_type (Tpointer t2 a0) int_or_ptr_type) then fun _ _ : val => @None val else sem_cmp_pp Cne | cmp_case_pi si => if eqb_type (Tpointer t1 a) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_pi si Cne | cmp_case_ip si => if eqb_type (Tpointer t2 a0) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_ip si Cne | cmp_case_pl => if eqb_type (Tpointer t1 a) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_pl Cne | cmp_case_lp => if eqb_type (Tpointer t2 a0) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_lp Cne | cmp_default => sem_cmp_default Cne (Tpointer t1 a) (Tpointer t2 a0) end | Olt => match classify_cmp (Tpointer t1 a) (Tpointer t2 a0) with | cmp_case_pp => if orb (eqb_type (Tpointer t1 a) int_or_ptr_type) (eqb_type (Tpointer t2 a0) int_or_ptr_type) then fun _ _ : val => @None val else sem_cmp_pp Clt | cmp_case_pi si => if eqb_type (Tpointer t1 a) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_pi si Clt | cmp_case_ip si => if eqb_type (Tpointer t2 a0) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_ip si Clt | cmp_case_pl => if eqb_type (Tpointer t1 a) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_pl Clt | cmp_case_lp => if eqb_type (Tpointer t2 a0) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_lp Clt | cmp_default => sem_cmp_default Clt (Tpointer t1 a) (Tpointer t2 a0) end | Ogt => match classify_cmp (Tpointer t1 a) (Tpointer t2 a0) with | cmp_case_pp => if orb (eqb_type (Tpointer t1 a) int_or_ptr_type) (eqb_type (Tpointer t2 a0) int_or_ptr_type) then fun _ _ : val => @None val else sem_cmp_pp Cgt | cmp_case_pi si => if eqb_type (Tpointer t1 a) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_pi si Cgt | cmp_case_ip si => if eqb_type (Tpointer t2 a0) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_ip si Cgt | cmp_case_pl => if eqb_type (Tpointer t1 a) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_pl Cgt | cmp_case_lp => if eqb_type (Tpointer t2 a0) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_lp Cgt | cmp_default => sem_cmp_default Cgt (Tpointer t1 a) (Tpointer t2 a0) end | Ole => match classify_cmp (Tpointer t1 a) (Tpointer t2 a0) with | cmp_case_pp => if orb (eqb_type (Tpointer t1 a) int_or_ptr_type) (eqb_type (Tpointer t2 a0) int_or_ptr_type) then fun _ _ : val => @None val else sem_cmp_pp Cle | cmp_case_pi si => if eqb_type (Tpointer t1 a) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_pi si Cle | cmp_case_ip si => if eqb_type (Tpointer t2 a0) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_ip si Cle | cmp_case_pl => if eqb_type (Tpointer t1 a) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_pl Cle | cmp_case_lp => if eqb_type (Tpointer t2 a0) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_lp Cle | cmp_default => sem_cmp_default Cle (Tpointer t1 a) (Tpointer t2 a0) end | Oge => match classify_cmp (Tpointer t1 a) (Tpointer t2 a0) with | cmp_case_pp => if orb (eqb_type (Tpointer t1 a) int_or_ptr_type) (eqb_type (Tpointer t2 a0) int_or_ptr_type) then fun _ _ : val => @None val else sem_cmp_pp Cge | cmp_case_pi si => if eqb_type (Tpointer t1 a) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_pi si Cge | cmp_case_ip si => if eqb_type (Tpointer t2 a0) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_ip si Cge | cmp_case_pl => if eqb_type (Tpointer t1 a) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_pl Cge | cmp_case_lp => if eqb_type (Tpointer t2 a0) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_lp Cge | cmp_default => sem_cmp_default Cge (Tpointer t1 a) (Tpointer t2 a0) end end (Vptr x3 x4) (Vptr x5 x6)))) *)
rewrite NE1,NE2.
destruct cmp; 
inv H; subst; simpl;
unfold Cop.sem_cmp, sem_cmp_pp, cmp_ptr, Val.cmpu_bool, Val.cmplu_bool; simpl;
try rewrite MT_1; try rewrite MT_2; simpl;
destruct Archi.ptr64  eqn:Hp;
try rewrite if_true by auto;
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
try solve[if_tac; subst; eauto]; try repeat rewrite peq_true; eauto.
all: simpl; destruct (eq_block x3 x5); try reflexivity.
Qed.

Lemma is_int_of_bool:
  forall i s b, is_int i s (Val.of_bool b).
Proof.
Transparent Int.repr.
destruct i,s,b; simpl; auto;
compute; try split; congruence.
Opaque Int.repr.
Qed.

Lemma pointer_cmp_no_mem_bool_type:
   forall (Delta : tycontext) cmp (e1 e2 : expr) sh1 sh2 x1 x b1 o1 b2 o2 i3 s3,
   is_comparison cmp = true->
   eqb_type (typeof e1) int_or_ptr_type = false ->
   eqb_type (typeof e2) int_or_ptr_type = false ->
   forall (rho : environ) phi,
   eval_expr e1 rho = Vptr b1 o1 ->
   eval_expr e2 rho = Vptr b2 o2 ->
   blocks_match cmp (eval_expr e1 rho) (eval_expr e2 rho) ->
   denote_tc_assert (typecheck_expr Delta e1) rho phi ->
   denote_tc_assert (typecheck_expr Delta e2) rho phi ->
   (mapsto_ sh1 (typeof e1)
      (eval_expr e1 rho)) x ->
   (mapsto_ sh2 (typeof e2)
      (eval_expr e2 rho)) x1 ->
   typecheck_environ Delta rho ->
    is_int i3 s3
     (force_val
        (sem_binary_operation' cmp (typeof e1) (typeof e2)
           (eval_expr e1 rho)
           (eval_expr e2 rho))).
Proof.
(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
intros until 1. intros NE1 NE2; intros.
apply typecheck_both_sound in H4; auto.
apply typecheck_both_sound in H3; auto.
rewrite H0 in *.
rewrite H1 in *.
unfold sem_binary_operation'.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) | Oshr => Cop.sem_shr (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) | Oeq => Cop.sem_cmp Ceq (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | One => Cop.sem_cmp Cne (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Olt => Cop.sem_cmp Clt (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Ogt => Cop.sem_cmp Cgt (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Ole => Cop.sem_cmp Cle (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) | Oge => Cop.sem_cmp Cge (Vptr x3 x4) (typeof e1) (Vptr x5 x6) (typeof e2) (m_dry jm) end (@Some val (force_val (@sem_binary_operation' CS cmp (typeof e1) (typeof e2) (Vptr x3 x4) (Vptr x5 x6)))) *)
forget (typeof e1) as t1.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) | Oshr => Cop.sem_shr (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) | Oeq => Cop.sem_cmp Ceq (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) (m_dry jm) | One => Cop.sem_cmp Cne (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) (m_dry jm) | Olt => Cop.sem_cmp Clt (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) (m_dry jm) | Ogt => Cop.sem_cmp Cgt (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) (m_dry jm) | Ole => Cop.sem_cmp Cle (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) (m_dry jm) | Oge => Cop.sem_cmp Cge (Vptr x3 x4) t1 (Vptr x5 x6) (typeof e2) (m_dry jm) end (@Some val (force_val (@sem_binary_operation' CS cmp t1 (typeof e2) (Vptr x3 x4) (Vptr x5 x6)))) *)
forget (typeof e2) as t2.
clear e1 e2 H0 H1.
unfold mapsto_ in *.
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
unfold mapsto in *.
destruct (access_mode t1) eqn:?A1;
 try solve [simpl in H5; contradiction].
destruct (access_mode t2) eqn:?A2;
 try solve [simpl in H6; contradiction].
destruct t1 as [ | | | [ | ] | | | | | ]; try solve[simpl in *; try contradiction; try congruence];
destruct t2 as [ | | | [ | ] | | | | | ]; try solve[simpl in *; try contradiction; try congruence].
unfold sem_cmp, sem_cmp_pp, cmp_ptr, Val.cmpu_bool, Val.cmplu_bool.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | One => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | Olt => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | Ogt => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | Ole => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | Oge => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) end (@Some val (force_val (match cmp with | Oadd => @sem_add CS (Tpointer t1 a) (Tpointer t2 a0) | Osub => @sem_sub CS (Tpointer t1 a) (Tpointer t2 a0) | Omul => sem_mul (Tpointer t1 a) (Tpointer t2 a0) | Odiv => sem_div (Tpointer t1 a) (Tpointer t2 a0) | Omod => sem_mod (Tpointer t1 a) (Tpointer t2 a0) | Oand => sem_and (Tpointer t1 a) (Tpointer t2 a0) | Oor => sem_or (Tpointer t1 a) (Tpointer t2 a0) | Oxor => sem_xor (Tpointer t1 a) (Tpointer t2 a0) | Oshl => sem_shl (Tpointer t1 a) (Tpointer t2 a0) | Oshr => sem_shr (Tpointer t1 a) (Tpointer t2 a0) | Oeq => match classify_cmp (Tpointer t1 a) (Tpointer t2 a0) with | cmp_case_pp => if orb (eqb_type (Tpointer t1 a) int_or_ptr_type) (eqb_type (Tpointer t2 a0) int_or_ptr_type) then fun _ _ : val => @None val else sem_cmp_pp Ceq | cmp_case_pi si => if eqb_type (Tpointer t1 a) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_pi si Ceq | cmp_case_ip si => if eqb_type (Tpointer t2 a0) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_ip si Ceq | cmp_case_pl => if eqb_type (Tpointer t1 a) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_pl Ceq | cmp_case_lp => if eqb_type (Tpointer t2 a0) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_lp Ceq | cmp_default => sem_cmp_default Ceq (Tpointer t1 a) (Tpointer t2 a0) end | One => match classify_cmp (Tpointer t1 a) (Tpointer t2 a0) with | cmp_case_pp => if orb (eqb_type (Tpointer t1 a) int_or_ptr_type) (eqb_type (Tpointer t2 a0) int_or_ptr_type) then fun _ _ : val => @None val else sem_cmp_pp Cne | cmp_case_pi si => if eqb_type (Tpointer t1 a) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_pi si Cne | cmp_case_ip si => if eqb_type (Tpointer t2 a0) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_ip si Cne | cmp_case_pl => if eqb_type (Tpointer t1 a) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_pl Cne | cmp_case_lp => if eqb_type (Tpointer t2 a0) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_lp Cne | cmp_default => sem_cmp_default Cne (Tpointer t1 a) (Tpointer t2 a0) end | Olt => match classify_cmp (Tpointer t1 a) (Tpointer t2 a0) with | cmp_case_pp => if orb (eqb_type (Tpointer t1 a) int_or_ptr_type) (eqb_type (Tpointer t2 a0) int_or_ptr_type) then fun _ _ : val => @None val else sem_cmp_pp Clt | cmp_case_pi si => if eqb_type (Tpointer t1 a) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_pi si Clt | cmp_case_ip si => if eqb_type (Tpointer t2 a0) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_ip si Clt | cmp_case_pl => if eqb_type (Tpointer t1 a) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_pl Clt | cmp_case_lp => if eqb_type (Tpointer t2 a0) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_lp Clt | cmp_default => sem_cmp_default Clt (Tpointer t1 a) (Tpointer t2 a0) end | Ogt => match classify_cmp (Tpointer t1 a) (Tpointer t2 a0) with | cmp_case_pp => if orb (eqb_type (Tpointer t1 a) int_or_ptr_type) (eqb_type (Tpointer t2 a0) int_or_ptr_type) then fun _ _ : val => @None val else sem_cmp_pp Cgt | cmp_case_pi si => if eqb_type (Tpointer t1 a) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_pi si Cgt | cmp_case_ip si => if eqb_type (Tpointer t2 a0) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_ip si Cgt | cmp_case_pl => if eqb_type (Tpointer t1 a) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_pl Cgt | cmp_case_lp => if eqb_type (Tpointer t2 a0) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_lp Cgt | cmp_default => sem_cmp_default Cgt (Tpointer t1 a) (Tpointer t2 a0) end | Ole => match classify_cmp (Tpointer t1 a) (Tpointer t2 a0) with | cmp_case_pp => if orb (eqb_type (Tpointer t1 a) int_or_ptr_type) (eqb_type (Tpointer t2 a0) int_or_ptr_type) then fun _ _ : val => @None val else sem_cmp_pp Cle | cmp_case_pi si => if eqb_type (Tpointer t1 a) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_pi si Cle | cmp_case_ip si => if eqb_type (Tpointer t2 a0) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_ip si Cle | cmp_case_pl => if eqb_type (Tpointer t1 a) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_pl Cle | cmp_case_lp => if eqb_type (Tpointer t2 a0) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_lp Cle | cmp_default => sem_cmp_default Cle (Tpointer t1 a) (Tpointer t2 a0) end | Oge => match classify_cmp (Tpointer t1 a) (Tpointer t2 a0) with | cmp_case_pp => if orb (eqb_type (Tpointer t1 a) int_or_ptr_type) (eqb_type (Tpointer t2 a0) int_or_ptr_type) then fun _ _ : val => @None val else sem_cmp_pp Cge | cmp_case_pi si => if eqb_type (Tpointer t1 a) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_pi si Cge | cmp_case_ip si => if eqb_type (Tpointer t2 a0) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_ip si Cge | cmp_case_pl => if eqb_type (Tpointer t1 a) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_pl Cge | cmp_case_lp => if eqb_type (Tpointer t2 a0) int_or_ptr_type then fun _ _ : val => @None val else sem_cmp_lp Cge | cmp_default => sem_cmp_default Cge (Tpointer t1 a) (Tpointer t2 a0) end end (Vptr x3 x4) (Vptr x5 x6)))) *)
rewrite NE1,NE2.
destruct Archi.ptr64 eqn:Hp;
destruct cmp; inv H;
unfold sem_cmp; simpl;
if_tac; auto; simpl; try of_bool_destruct; auto;
try apply is_int_of_bool.

Transparent Int.repr.
all: destruct i3,s3; simpl; auto; compute; try split; congruence.
Opaque Int.repr.
Qed.

Definition weak_mapsto_ sh e rho :=
match (eval_expr e rho) with
| Vptr b o => (mapsto_ sh (typeof e) (Vptr b o)) ||
              (mapsto_ sh (typeof e) (Vptr b o))
| _ => FF
end.

Lemma extend_sepcon_TT {A} {JA: Join A} {PA: Perm_alg A}{SA: Sep_alg A} {AG: ageable A} {Aga: Age_alg A}:
 forall P, boxy extendM (P * TT).
(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
Proof. intros. hnf.
(* Goal: @eq (@pred A AG) (@box A AG (@extendM A JA PA AG Aga) (@sepcon A JA PA AG Aga P (@TT A AG))) (@sepcon A JA PA AG Aga P (@TT A AG)) *)
 apply pred_ext.
(* Goal: @app_pred A AG (@box A AG (@extendM A JA PA AG Aga) (@sepcon A JA PA AG Aga P (@TT A AG))) a *)
 intros ? ?. hnf in H. apply H. apply extendM_refl.
(* Goal: @app_pred A AG (@box A AG (@extendM A JA PA AG Aga) (@sepcon A JA PA AG Aga P (@TT A AG))) a *)
 intros ? ?. intros ? ?. destruct H0 as [b ?].
(* Goal: @app_pred A AG (@sepcon A JA PA AG Aga P (@TT A AG)) a' *)
 destruct H as [? [? [? [? ?]]]].
(* Goal: @app_pred A AG (@sepcon A JA PA AG Aga P (@TT A AG)) a' *)
 destruct (join_assoc H H0) as [c [? ?]].
(* Goal: @app_pred rmap ag_rmap (@andp rmap ag_rmap (@prop rmap ag_rmap (guard_environ Delta' (current_function k) (construct_rho (filter_genv psi) ve te'))) (proj_ret_assert (frame_ret_assert (normal_ret_assert Q) F) EK_normal (@None val) (construct_rho (filter_genv psi) ve te'))) (m_phi jm') *)
(* Goal: @jm_bupd (@OK_ty Espec) ora (@jsafeN_ genv corestate (@OK_ty Espec) (fun ge : genv => @genv_symb_injective fundef type (genv_genv ge)) (cl_core_sem psi) (@OK_spec Espec) psi (@level juicy_mem juicy_mem_ageable jm1) ora (State ve te' k)) jm' *)
 exists x; exists c; split; auto.
Qed.

Lemma semax_ptr_compare:
forall (Delta: tycontext) (P: assert) id cmp e1 e2 ty sh1 sh2,
    nonidentity sh1 -> nonidentity sh2 ->
    is_comparison cmp = true  ->
     eqb_type (typeof e1) int_or_ptr_type = false ->
    eqb_type (typeof e2) int_or_ptr_type = false ->
    (typecheck_tid_ptr_compare Delta id = true) ->
    semax Espec Delta
        (fun rho =>
          |> (tc_expr Delta e1 rho && tc_expr Delta e2 rho  &&

          !!(blocks_match cmp (eval_expr e1 rho) (eval_expr e2 rho)) &&
          (mapsto_ sh1 (typeof e1) (eval_expr e1 rho) * TT) &&
          (mapsto_ sh2 (typeof e2) (eval_expr e2 rho) * TT) &&
          P rho))
          (Sset id (Ebinop cmp e1 e2 ty))
        (normal_ret_assert
          (fun rho => (EX old:val,
                 !!(eval_id id rho =  subst id old
                     (eval_expr (Ebinop cmp e1 e2 ty)) rho) &&
                            subst id old P rho))).
Proof.
  intros until sh2. intros N1 N2. intros ? NE1 NE2. revert H.
  replace (fun rho : environ =>
     |> (tc_expr Delta e1 rho && tc_expr Delta e2 rho  &&
             !!blocks_match cmp (eval_expr e1 rho) (eval_expr e2 rho) &&
            (mapsto_ sh1 (typeof e1) (eval_expr e1 rho) * TT) &&
            (mapsto_ sh2 (typeof e2) (eval_expr e2 rho) * TT) &&
            P rho))
    with (fun rho : environ =>
       (|> tc_expr Delta e1 rho &&
        |> tc_expr Delta e2 rho &&
        |> !!blocks_match cmp (eval_expr e1 rho) (eval_expr e2 rho) &&
        |> (mapsto_ sh1 (typeof e1) (eval_expr e1 rho) * TT) &&
        |> (mapsto_ sh2 (typeof e2) (eval_expr e2 rho) * TT) &&
        |> P rho))
    by (extensionality rho;  repeat rewrite later_andp; auto).
  intros CMP TC2.
  apply semax_straight_simple; auto.
  intros; repeat apply boxy_andp; auto;  apply extend_later'; apply extend_sepcon_TT.
  intros jm jm' Delta' ge vx tx rho k F TS [[[[TC3 TC1]  TC4] MT1] MT2] TC' Hcl Hge ? ? HGG.
  specialize (TC3 (m_phi jm') (age_laterR (age_jm_phi H))).
  specialize (TC1 (m_phi jm') (age_laterR (age_jm_phi H))).
  specialize (TC4 (m_phi jm') (age_laterR (age_jm_phi H))).
  specialize (MT1 (m_phi jm') (age_laterR (age_jm_phi H))).
  specialize (MT2 (m_phi jm') (age_laterR (age_jm_phi H))).
  apply (typecheck_tid_ptr_compare_sub _ _ TS) in TC2.
  pose proof TC1 as TC1'.
  pose proof TC3 as TC3'.
  assert (typecheck_environ Delta rho) as TYCON_ENV
    by (destruct TC' as [TC' TC'']; eapply typecheck_environ_sub; eauto).
  apply (tc_expr_sub _ _ _ TS) in TC3'; [| auto].
  apply (tc_expr_sub _ _ _ TS) in TC1'; [| auto].
  exists jm', (PTree.set id (eval_expr (Ebinop cmp e1 e2 ty) rho) (tx)).
  econstructor.
  split; [reflexivity |].
(* Goal: @app_pred rmap ag_rmap (@prop rmap ag_rmap (and (@eq nat (@Datatypes.length memval (encode_val ch v')) (size_chunk_nat ch)) (and (@eq val (decode_val ch (encode_val ch v')) v') (Z.divide (align_chunk ch) (@snd block Z (@pair block Z b i)))))) mf *)
(* Goal: @app_pred rmap ag_rmap (@allp rmap ag_rmap address (@jam rmap Join_rmap Perm_rmap ag_rmap Age_rmap address (adr_range (@pair block Z b i) (size_chunk ch)) (adr_range_dec (@pair block Z b i) (size_chunk ch)) (fun loc : address => yesat NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) sh loc) noat)) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
  split3; auto.
  + apply age_level; auto.
  + normalize in H0.
    clear H H0.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
    simpl. rewrite <- map_ptree_rel.
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
    apply guard_environ_put_te'; auto. subst. simpl.
    unfold construct_rho in *; auto.

(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
    intros.

    destruct TC' as [TC' TC''].
    simpl in TC2. unfold typecheck_tid_ptr_compare in *.
    rewrite H in TC2.
    unfold guard_environ in *.

    destruct MT1 as [? [? [J1 [MT1 _]]]].
    destruct MT2 as [? [? [J2 [MT2 _]]]].
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Omul => Cop.sem_mul (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Odiv => Cop.sem_div (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Omod => Cop.sem_mod (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oand => Cop.sem_and (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oor => Cop.sem_or (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oxor => Cop.sem_xor (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oshl => Cop.sem_shl (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) | Oshr => Cop.sem_shr (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) | Oeq => Cop.sem_cmp Ceq (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | One => Cop.sem_cmp Cne (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Olt => Cop.sem_cmp Clt (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Ogt => Cop.sem_cmp Cgt (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Ole => Cop.sem_cmp Cle (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oge => Cop.sem_cmp Cge (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) end (@Some val (force_val (@sem_binary_operation' CS cmp (typeof e1) (typeof e2) (@eval_expr CS e1 rho) (@eval_expr CS e2 rho)))) *)
    destruct (mapsto_is_pointer _ _ _ _ MT1) as [? [? ?]].
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Omul => Cop.sem_mul (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Odiv => Cop.sem_div (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Omod => Cop.sem_mod (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oand => Cop.sem_and (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oor => Cop.sem_or (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oxor => Cop.sem_xor (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oshl => Cop.sem_shl (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) | Oshr => Cop.sem_shr (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) | Oeq => Cop.sem_cmp Ceq (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | One => Cop.sem_cmp Cne (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Olt => Cop.sem_cmp Clt (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Ogt => Cop.sem_cmp Cgt (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Ole => Cop.sem_cmp Cle (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oge => Cop.sem_cmp Cge (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) end (@Some val (force_val (@sem_binary_operation' CS cmp (typeof e1) (typeof e2) (@eval_expr CS e1 rho) (@eval_expr CS e2 rho)))) *)
    destruct (mapsto_is_pointer _ _ _ _ MT2) as [? [? ?]].

    destruct t; inv TC2.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
    simpl. super_unfold_lift.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
    simpl.
    apply tc_val_tc_val'.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
    eapply pointer_cmp_no_mem_bool_type; eauto.
(* Goal: match resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o)) as anonymous' return (forall _ : @eq resource anonymous' (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))), Prop) with | NO sh wildcard' => fun _ : @eq resource (NO sh wildcard') (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => @nonidentity Share.t Share.Join_ba pa_share sh | YES wildcard' wildcard'0 wildcard'1 pp => fun _ : @eq resource (YES wildcard' wildcard'0 wildcard'1 pp) (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => True | PURE k p => fun _ : @eq resource (PURE k p) (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => False end (@eq_refl resource (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o)))) *)
  + destruct H0.
(* Goal: @app_pred rmap ag_rmap (@andp rmap ag_rmap (@prop rmap ag_rmap (guard_environ Delta' (current_function k) (construct_rho (filter_genv psi) ve te'))) (proj_ret_assert (frame_ret_assert (normal_ret_assert Q) F) EK_normal (@None val) (construct_rho (filter_genv psi) ve te'))) (m_phi jm') *)
(* Goal: @jm_bupd (@OK_ty Espec) ora (@jsafeN_ genv corestate (@OK_ty Espec) (fun ge : genv => @genv_symb_injective fundef type (genv_genv ge)) (cl_core_sem psi) (@OK_spec Espec) psi (@level juicy_mem juicy_mem_ageable jm1) ora (State ve te' k)) jm' *)
    split; auto.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
    - simpl.
(* Goal: @app_pred rmap ag_rmap (@prop rmap ag_rmap (and (@eq nat (@Datatypes.length memval (encode_val ch v')) (size_chunk_nat ch)) (and (@eq val (decode_val ch (encode_val ch v')) v') (Z.divide (align_chunk ch) (@snd block Z (@pair block Z b i)))))) mf *)
(* Goal: @app_pred rmap ag_rmap (@allp rmap ag_rmap address (@jam rmap Join_rmap Perm_rmap ag_rmap Age_rmap address (adr_range (@pair block Z b i) (size_chunk ch)) (adr_range_dec (@pair block Z b i) (size_chunk ch)) (fun loc : address => yesat NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) sh loc) noat)) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
      split3; auto.
      2: apply age1_resource_decay; auto.
      2:{
        split; [apply age_level; auto|].
        apply age1_ghost_of, age_jm_phi; auto.
      }
      destruct (age1_juicy_mem_unpack _ _ H).
      rewrite <- H3.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
      econstructor; eauto.

      (*start new proof*)
      rewrite Hge in *.
      destruct TC'; simpl in H4, TC3, TC1.
      rewrite <- Hge in *.
      eapply Clight.eval_Ebinop.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
      rewrite H3; eapply eval_expr_relate; eauto.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
      rewrite H3; eapply eval_expr_relate; eauto.
      rewrite H3.
      super_unfold_lift.
      destruct MT1 as [? [? [J1 [MT1 _]]]].
      destruct MT2 as [? [? [J2 [MT2 _]]]].
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Omul => Cop.sem_mul (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Odiv => Cop.sem_div (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Omod => Cop.sem_mod (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oand => Cop.sem_and (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oor => Cop.sem_or (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oxor => Cop.sem_xor (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oshl => Cop.sem_shl (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) | Oshr => Cop.sem_shr (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) | Oeq => Cop.sem_cmp Ceq (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | One => Cop.sem_cmp Cne (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Olt => Cop.sem_cmp Clt (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Ogt => Cop.sem_cmp Cgt (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Ole => Cop.sem_cmp Cle (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oge => Cop.sem_cmp Cge (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) end (@Some val (force_val (@sem_binary_operation' CS cmp (typeof e1) (typeof e2) (@eval_expr CS e1 rho) (@eval_expr CS e2 rho)))) *)
      destruct (mapsto_is_pointer _ _ _ _ MT1) as [? [? ?]].
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Omul => Cop.sem_mul (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Odiv => Cop.sem_div (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Omod => Cop.sem_mod (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oand => Cop.sem_and (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oor => Cop.sem_or (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oxor => Cop.sem_xor (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oshl => Cop.sem_shl (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) | Oshr => Cop.sem_shr (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) | Oeq => Cop.sem_cmp Ceq (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | One => Cop.sem_cmp Cne (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Olt => Cop.sem_cmp Clt (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Ogt => Cop.sem_cmp Cgt (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Ole => Cop.sem_cmp Cle (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) | Oge => Cop.sem_cmp Cge (@eval_expr CS e1 rho) (typeof e1) (@eval_expr CS e2 rho) (typeof e2) (m_dry jm) end (@Some val (force_val (@sem_binary_operation' CS cmp (typeof e1) (typeof e2) (@eval_expr CS e1 rho) (@eval_expr CS e2 rho)))) *)
      destruct (mapsto_is_pointer _ _ _ _ MT2) as [? [? ?]].
(* Goal: @join resource Join_resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join resource Join_resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
      rewrite H6. rewrite H7. unfold eval_binop.
      rewrite <- H6. rewrite <- H7. clear H6 H7.
      rewrite HGG.
      apply (pointer_cmp_eval Delta' cmp e1 e2 sh1 sh2); auto;
      try (eauto; simpl; eauto).
    - split.
      2: eapply pred_hereditary; try apply H1; destruct (age1_juicy_mem_unpack _ _ H); auto.
      assert (app_pred (|>  (F rho * P rho)) (m_phi jm)).
(* Goal: @eq Z (size_chunk ch) (@sizeof (@cenv_cs CS) t) *)
(* Goal: @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
      {
        rewrite later_sepcon. eapply sepcon_derives; try apply H0; auto.
      }
      assert (laterR (m_phi jm) (m_phi jm')).
(* Goal: @eq Z (size_chunk ch) (@sizeof (@cenv_cs CS) t) *)
(* Goal: @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
      {
        constructor 1.
        destruct (age1_juicy_mem_unpack _ _ H); auto.
      }
      specialize (H2 _ H3).
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
      eapply sepcon_derives; try  apply H2; auto.
      * clear - Hcl Hge.
        rewrite <- map_ptree_rel.
        specialize (Hcl rho (Map.set id (eval_expr (Ebinop cmp e1 e2 ty) rho) (make_tenv tx))).
        rewrite <- Hcl; auto.
(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
        intros.
        destruct (Pos.eq_dec id i).
(* Goal: @eq Z (size_chunk ch) (@sizeof (@cenv_cs CS) t) *)
(* Goal: @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
        {
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
          subst.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
          left. unfold modifiedvars. simpl.
          unfold insert_idset; rewrite PTree.gss; hnf; auto.
        }
(* Goal: @eq Z (size_chunk ch) (@sizeof (@cenv_cs CS) t) *)
(* Goal: @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
        {
          right.
          rewrite Map.gso; auto. subst; auto.
        }
      * apply exp_right with (eval_id id rho).
        rewrite <- map_ptree_rel.
        assert (env_set
                 (mkEnviron (ge_of rho) (ve_of rho)
                    (Map.set id (eval_expr (Ebinop cmp e1 e2 ty) rho) (make_tenv tx))) id (eval_id id rho) = rho).
(* Goal: @eq Z (size_chunk ch) (@sizeof (@cenv_cs CS) t) *)
(* Goal: @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
        {
          unfold env_set;
(* Goal: @eq resource (YES (Share.lub (retainer_part sh) Share.Rsh) (@readable_share_lub (retainer_part sh) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES sh (@writable0_readable sh wsh) (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) i)) (encode_val ch v') Undef)) NoneP) *)
(* Goal: @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
          f_equal.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
          unfold eval_id; simpl.
          rewrite Map.override.
          rewrite Map.override_same. subst; auto.
          rewrite Hge in TC'.
          destruct TC' as [TC' _].
          destruct TC' as [TC' _]. unfold typecheck_temp_environ in *.
          simpl in TC2. unfold typecheck_tid_ptr_compare in *. remember ((temp_types Delta') ! id).
          destruct o; [ | inv TC2]. symmetry in Heqo.
(* Goal: @join resource Join_resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join resource Join_resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
          specialize (TC' _ _ Heqo). destruct TC'. destruct H4.
          simpl in H4.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
          rewrite H4. simpl.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
          f_equal. rewrite Hge; simpl. rewrite H4. reflexivity.
        }
        apply andp_right.
(* Goal: @eq Z (size_chunk ch) (@sizeof (@cenv_cs CS) t) *)
(* Goal: @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
        {
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
          intros ? _. simpl.
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
          unfold subst.
          simpl in H4. super_unfold_lift.
(* Goal: @eq nat (@level rmap ag_rmap mf) (@level rmap ag_rmap (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @eq nat (@level rmap ag_rmap m2) (@level rmap ag_rmap (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: forall loc : AV.address, @join resource Join_resource (resource_at mf loc) (resource_at m2 loc) (resource_at (m_phi (store_juicy_mem jm m' ch b i v' STORE)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
          rewrite H4.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
          unfold eval_id at 1. unfold force_val; simpl.
          rewrite Map.gss. auto.
        }
(* Goal: @eq Z (size_chunk ch) (@sizeof (@cenv_cs CS) t) *)
(* Goal: @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
        {
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
          simpl. simpl in H4. super_unfold_lift.
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
          unfold subst.
(* Goal: @eq nat (@level rmap ag_rmap mf) (@level rmap ag_rmap (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @eq nat (@level rmap ag_rmap m2) (@level rmap ag_rmap (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: forall loc : AV.address, @join resource Join_resource (resource_at mf loc) (resource_at m2 loc) (resource_at (m_phi (store_juicy_mem jm m' ch b i v' STORE)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
          rewrite H4.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
          auto.
        }
Qed.

Lemma semax_set_forward:
forall (Delta: tycontext) (P: assert) id e,
    semax Espec Delta
        (fun rho =>
          |> (tc_expr Delta e rho  && (tc_temp_id id (typeof e) Delta e rho) && P rho))
          (Sset id e)
        (normal_ret_assert
          (fun rho => (EX old:val,
                 !! (eval_id id rho =  subst id old (eval_expr e) rho) &&
                            subst id old P rho))).
Proof.
  intros until e.
  replace (fun rho : environ =>
     |>(tc_expr Delta e rho && tc_temp_id id (typeof e) Delta e rho &&
        P rho))
   with (fun rho : environ =>
       (|> tc_expr Delta e rho &&
        |> tc_temp_id id (typeof e) Delta e rho &&
        |> P rho))
    by (extensionality rho;  repeat rewrite later_andp; auto).
  apply semax_straight_simple; auto.
  intros jm jm' Delta' ge vx tx rho k F TS [TC3 TC2] TC' Hcl Hge ? ? HGG'.
  specialize (TC3 (m_phi jm') (age_laterR (age_jm_phi H))).
  specialize (TC2 (m_phi jm') (age_laterR (age_jm_phi H))).
  assert (typecheck_environ Delta rho) as TC.
(* Goal: @eq Z (size_chunk ch) (@sizeof (@cenv_cs CS) t) *)
(* Goal: @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
  {
    destruct TC' as [? _].
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
    eapply typecheck_environ_sub; eauto.
  }
  pose proof TC3 as TC3'.
  pose proof TC2 as TC2'.
  apply (tc_expr_sub _ _ _ TS) in TC3'; [| auto].
  apply (tc_temp_id_sub _ _ _ TS) in TC2'.
  exists jm', (PTree.set id (eval_expr e rho) (tx)).
  econstructor.
  split; [reflexivity |].
(* Goal: @app_pred rmap ag_rmap (@prop rmap ag_rmap (and (@eq nat (@Datatypes.length memval (encode_val ch v')) (size_chunk_nat ch)) (and (@eq val (decode_val ch (encode_val ch v')) v') (Z.divide (align_chunk ch) (@snd block Z (@pair block Z b i)))))) mf *)
(* Goal: @app_pred rmap ag_rmap (@allp rmap ag_rmap address (@jam rmap Join_rmap Perm_rmap ag_rmap Age_rmap address (adr_range (@pair block Z b i) (size_chunk ch)) (adr_range_dec (@pair block Z b i) (size_chunk ch)) (fun loc : address => yesat NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) sh loc) noat)) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
  split3; auto.
  + apply age_level; auto.
  + normalize in H0.
    clear - TS TC TC' TC2 TC2' TC3 TC3' Hge.
    simpl in *. simpl. rewrite <- map_ptree_rel.
    apply guard_environ_put_te'; auto.
(* Goal: @eq Z (size_chunk ch) (@sizeof (@cenv_cs CS) t) *)
(* Goal: @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
    {
      subst; simpl in *.
      unfold construct_rho in *; auto.
    }
(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
    intros. simpl in *. unfold typecheck_temp_id in *.
    unfold tc_temp_id in TC2'. simpl in TC2'. unfold typecheck_temp_id in TC2'.
    rewrite H in TC2'.
    simpl in *.
    rewrite denote_tc_assert_andp in TC2' ; simpl in *.
    super_unfold_lift. destruct TC2'.
    unfold tc_bool in *. remember (is_neutral_cast (implicit_deref (typeof e)) t).
    destruct b; inv H0.
    apply tc_val_tc_val'.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
    apply neutral_cast_tc_val with (Delta0 := Delta')(phi:=m_phi jm'); auto.
    unfold guard_environ in *. destruct TC'; auto.
(* Goal: match resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o)) as anonymous' return (forall _ : @eq resource anonymous' (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))), Prop) with | NO sh wildcard' => fun _ : @eq resource (NO sh wildcard') (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => @nonidentity Share.t Share.Join_ba pa_share sh | YES wildcard' wildcard'0 wildcard'1 pp => fun _ : @eq resource (YES wildcard' wildcard'0 wildcard'1 pp) (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => True | PURE k p => fun _ : @eq resource (PURE k p) (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => False end (@eq_refl resource (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o)))) *)
  + destruct H0.
(* Goal: @app_pred rmap ag_rmap (@andp rmap ag_rmap (@prop rmap ag_rmap (guard_environ Delta' (current_function k) (construct_rho (filter_genv psi) ve te'))) (proj_ret_assert (frame_ret_assert (normal_ret_assert Q) F) EK_normal (@None val) (construct_rho (filter_genv psi) ve te'))) (m_phi jm') *)
(* Goal: @jm_bupd (@OK_ty Espec) ora (@jsafeN_ genv corestate (@OK_ty Espec) (fun ge : genv => @genv_symb_injective fundef type (genv_genv ge)) (cl_core_sem psi) (@OK_spec Espec) psi (@level juicy_mem juicy_mem_ageable jm1) ora (State ve te' k)) jm' *)
    split; auto.
(* Goal: @eq Z (size_chunk ch) (@sizeof (@cenv_cs CS) t) *)
(* Goal: @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
    {
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
      simpl.
(* Goal: @app_pred rmap ag_rmap (@prop rmap ag_rmap (and (@eq nat (@Datatypes.length memval (encode_val ch v')) (size_chunk_nat ch)) (and (@eq val (decode_val ch (encode_val ch v')) v') (Z.divide (align_chunk ch) (@snd block Z (@pair block Z b i)))))) mf *)
(* Goal: @app_pred rmap ag_rmap (@allp rmap ag_rmap address (@jam rmap Join_rmap Perm_rmap ag_rmap Age_rmap address (adr_range (@pair block Z b i) (size_chunk ch)) (adr_range_dec (@pair block Z b i) (size_chunk ch)) (fun loc : address => yesat NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) sh loc) noat)) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
      split3; auto.
      + destruct (age1_juicy_mem_unpack _ _ H).
        rewrite <- H3.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
        econstructor; eauto.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
        rewrite H3; eapply eval_expr_relate with (m := jm'); eauto.
      + apply age1_resource_decay; auto.
      + split; [apply age_level; auto|].
        apply age1_ghost_of, age_jm_phi; auto.
    }
    split.
    2: eapply pred_hereditary; try apply H1; destruct (age1_juicy_mem_unpack _ _ H); auto.
    assert (app_pred (|>  (F rho * P rho)) (m_phi jm)).
    { rewrite later_sepcon. eapply sepcon_derives; try apply H0; auto. } 
    assert (laterR (m_phi jm) (m_phi jm')).
    { constructor 1. destruct (age1_juicy_mem_unpack _ _ H); auto. }
    specialize (H2 _ H3).
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
    eapply sepcon_derives; try  apply H2; auto.
    - clear - Hcl Hge.
      rewrite <- map_ptree_rel.
      specialize (Hcl rho (Map.set id (eval_expr e rho) (make_tenv tx))).
      rewrite <- Hcl; auto.
(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
      intros.
      destruct (Pos.eq_dec id i).
      * subst.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
        left. unfold modifiedvars. simpl.
        unfold insert_idset; rewrite PTree.gss; hnf; auto.
      * right.
        rewrite Map.gso; auto. subst; auto.
    - apply exp_right with (eval_id id rho).
      rewrite <- map_ptree_rel.
      assert (env_set
               (mkEnviron (ge_of rho) (ve_of rho)
                  (Map.set id (eval_expr e rho) (make_tenv tx))) id (eval_id id rho) = rho).
(* Goal: @eq Z (size_chunk ch) (@sizeof (@cenv_cs CS) t) *)
(* Goal: @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
      {
        unfold env_set;
(* Goal: @eq resource (YES (Share.lub (retainer_part sh) Share.Rsh) (@readable_share_lub (retainer_part sh) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES sh (@writable0_readable sh wsh) (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) i)) (encode_val ch v') Undef)) NoneP) *)
(* Goal: @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
        f_equal.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
        unfold eval_id; simpl.
        rewrite Map.override.
        rewrite Map.override_same. subst; auto.
        rewrite Hge in TC'.
        destruct TC' as [TC' _].
        destruct TC' as [TC' _]. unfold typecheck_temp_environ in *.
        simpl in TC2'. unfold typecheck_temp_id in *. remember ((temp_types Delta') ! id).
        unfold tc_temp_id,typecheck_temp_id in TC2'. simpl in TC2'.
        rewrite <- Heqo in TC2'.
        destruct o; [ | inv TC2']. symmetry in Heqo.
(* Goal: @join resource Join_resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join resource Join_resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
        specialize (TC' _ _ Heqo). destruct TC'. destruct H4.
        simpl in H4.
(* Goal: @eq nat (@level rmap ag_rmap mf) (@level rmap ag_rmap (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @eq nat (@level rmap ag_rmap m2) (@level rmap ag_rmap (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: forall loc : AV.address, @join resource Join_resource (resource_at mf loc) (resource_at m2 loc) (resource_at (m_phi (store_juicy_mem jm m' ch b i v' STORE)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
        rewrite H4.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
        f_equal. rewrite Hge; simpl. rewrite H4. reflexivity.
      }
      apply andp_right.
      * intros ? _. simpl.
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
        unfold subst.
(* Goal: @eq nat (@level rmap ag_rmap mf) (@level rmap ag_rmap (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @eq nat (@level rmap ag_rmap m2) (@level rmap ag_rmap (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: forall loc : AV.address, @join resource Join_resource (resource_at mf loc) (resource_at m2 loc) (resource_at (m_phi (store_juicy_mem jm m' ch b i v' STORE)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
        rewrite H4.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
        unfold eval_id at 1. unfold force_val; simpl.
        rewrite Map.gss. auto.
      * unfold subst; rewrite H4.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
        auto.
Qed.

Lemma semax_set_forward':
forall (Delta: tycontext) (P: assert) id e t,
    typeof_temp Delta id = Some t ->
    is_neutral_cast (typeof e) t = true ->
    semax Espec Delta
        (fun rho =>
          |> ((tc_expr Delta e rho) && P rho))
          (Sset id e)
        (normal_ret_assert
          (fun rho => (EX old:val,
                 !! (eval_id id rho =  subst id old (eval_expr e) rho) &&
                            subst id old P rho))).
Proof.
intros until e.
intros t H99 H98.
replace (fun rho : environ =>
   |> ((tc_expr Delta e rho) && P rho))
 with (fun rho : environ =>
     (|> tc_expr Delta e rho && |> P rho))
  by (extensionality rho;  repeat rewrite later_andp; auto).
apply semax_straight_simple; auto.
intros jm jm' Delta' ge vx tx rho k F TS TC3 TC' Hcl Hge ? ? HGG'.
specialize (TC3 (m_phi jm') (age_laterR (age_jm_phi H))).
assert (typecheck_environ Delta rho) as TC.
(* Goal: @eq Z (size_chunk ch) (@sizeof (@cenv_cs CS) t) *)
(* Goal: @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
{
  destruct TC'.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
  eapply typecheck_environ_sub; eauto.
}
pose proof TC3 as TC3'.
apply (tc_expr_sub _ _ _ TS) in TC3'; [| auto].
assert (typeof_temp Delta' id = Some t) as H97.
  unfold typeof_temp in *.
  unfold tycontext_sub in TS. destruct TS as [?TS _]. specialize (TS id).
  destruct ((temp_types Delta) ! id); inversion H99.
  destruct ((temp_types Delta') ! id); inversion TS.
  subst; auto.
clear H99.
exists jm', (PTree.set id (eval_expr e rho) (tx)).
econstructor.
split.
(* Goal: @eq resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) *)
(* Goal: @eq resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc))) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
reflexivity.
(* Goal: @app_pred rmap ag_rmap (@prop rmap ag_rmap (and (@eq nat (@Datatypes.length memval (encode_val ch v')) (size_chunk_nat ch)) (and (@eq val (decode_val ch (encode_val ch v')) v') (Z.divide (align_chunk ch) (@snd block Z (@pair block Z b i)))))) mf *)
(* Goal: @app_pred rmap ag_rmap (@allp rmap ag_rmap address (@jam rmap Join_rmap Perm_rmap ag_rmap Age_rmap address (adr_range (@pair block Z b i) (size_chunk ch)) (adr_range_dec (@pair block Z b i) (size_chunk ch)) (fun loc : address => yesat NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) sh loc) noat)) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
split3; auto.
+ apply age_level; auto.
+ normalize in H0.
  clear - TS TC TC' H98 H97 TC3 TC3' HGG' Hge.
  simpl in *. simpl. rewrite <- map_ptree_rel.
  apply guard_environ_put_te'; auto. subst; simpl in *.
  unfold construct_rho in *; auto.
(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
  intros. simpl in *. unfold typecheck_temp_id in *.
  unfold typeof_temp in H97.
  rewrite H in H97.
  simpl in *.
  super_unfold_lift. inversion H97.
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
  subst.
  assert (is_neutral_cast (implicit_deref (typeof e)) t = true).
(* Goal: @eq resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) *)
(* Goal: @eq resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc))) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
  destruct (typeof e), t; inversion H98; reflexivity.
  apply tc_val_tc_val'.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
  apply neutral_cast_tc_val with (Delta0 := Delta')(phi:=m_phi jm'); auto.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
  apply neutral_isCastResultType; auto.
  unfold guard_environ in *. destruct TC'; auto.
+
(* Goal: match resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o)) as anonymous' return (forall _ : @eq resource anonymous' (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))), Prop) with | NO sh wildcard' => fun _ : @eq resource (NO sh wildcard') (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => @nonidentity Share.t Share.Join_ba pa_share sh | YES wildcard' wildcard'0 wildcard'1 pp => fun _ : @eq resource (YES wildcard' wildcard'0 wildcard'1 pp) (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => True | PURE k p => fun _ : @eq resource (PURE k p) (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => False end (@eq_refl resource (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o)))) *)
  destruct H0.
(* Goal: @app_pred rmap ag_rmap (@andp rmap ag_rmap (@prop rmap ag_rmap (guard_environ Delta' (current_function k) (construct_rho (filter_genv psi) ve te'))) (proj_ret_assert (frame_ret_assert (normal_ret_assert Q) F) EK_normal (@None val) (construct_rho (filter_genv psi) ve te'))) (m_phi jm') *)
(* Goal: @jm_bupd (@OK_ty Espec) ora (@jsafeN_ genv corestate (@OK_ty Espec) (fun ge : genv => @genv_symb_injective fundef type (genv_genv ge)) (cl_core_sem psi) (@OK_spec Espec) psi (@level juicy_mem juicy_mem_ageable jm1) ora (State ve te' k)) jm' *)
  split; auto.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
  simpl.
(* Goal: @app_pred rmap ag_rmap (@prop rmap ag_rmap (and (@eq nat (@Datatypes.length memval (encode_val ch v')) (size_chunk_nat ch)) (and (@eq val (decode_val ch (encode_val ch v')) v') (Z.divide (align_chunk ch) (@snd block Z (@pair block Z b i)))))) mf *)
(* Goal: @app_pred rmap ag_rmap (@allp rmap ag_rmap address (@jam rmap Join_rmap Perm_rmap ag_rmap Age_rmap address (adr_range (@pair block Z b i) (size_chunk ch)) (adr_range_dec (@pair block Z b i) (size_chunk ch)) (fun loc : address => yesat NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) sh loc) noat)) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
  split3; auto.
  destruct (age1_juicy_mem_unpack _ _ H).
  rewrite <- H3.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
  econstructor; eauto.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
  rewrite H3; eapply eval_expr_relate; try apply TC3; auto.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
  apply age1_resource_decay; auto.
  split; [apply age_level; auto|].
  apply age1_ghost_of, age_jm_phi; auto.

split.
2: eapply pred_hereditary; try apply H1; destruct (age1_juicy_mem_unpack _ _ H); auto.

assert (app_pred (|>  (F rho * P rho)) (m_phi jm)).
rewrite later_sepcon. eapply sepcon_derives; try apply H0; auto.
assert (laterR (m_phi jm) (m_phi jm')).
constructor 1.
destruct (age1_juicy_mem_unpack _ _ H); auto.
specialize (H2 _ H3).
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
eapply sepcon_derives; try  apply H2; auto.
clear - Hcl Hge.
rewrite <- map_ptree_rel.
specialize (Hcl rho (Map.set id (eval_expr e rho) (make_tenv tx))).
rewrite <- Hcl; auto.
(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
intros.
destruct (Pos.eq_dec id i).
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
subst.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
left. unfold modifiedvars. simpl.
 unfold insert_idset; rewrite PTree.gss; hnf; auto.
right.
rewrite Map.gso; auto. subst; auto.
apply exp_right with (eval_id id rho).
rewrite <- map_ptree_rel.
assert (env_set
         (mkEnviron (ge_of rho) (ve_of rho)
            (Map.set id (eval_expr e rho) (make_tenv tx))) id (eval_id id rho) = rho).
(* Goal: @eq Z (size_chunk ch) (@sizeof (@cenv_cs CS) t) *)
(* Goal: @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
{ unfold env_set;
(* Goal: @eq resource (YES (Share.lub (retainer_part sh) Share.Rsh) (@readable_share_lub (retainer_part sh) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES sh (@writable0_readable sh wsh) (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) i)) (encode_val ch v') Undef)) NoneP) *)
(* Goal: @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
  f_equal.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
  unfold eval_id; simpl.
  rewrite Map.override.
  rewrite Map.override_same. subst; auto.
  rewrite Hge in TC'.
  destruct TC' as [TC' _].
  destruct TC' as [TC' _]. unfold typecheck_temp_environ in *.
  unfold typeof_temp in H97. unfold typecheck_temp_id in *. remember ((temp_types Delta') ! id).
  destruct o; [ | inv H97]. symmetry in Heqo.
(* Goal: @join resource Join_resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join resource Join_resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
  specialize (TC' _ _ Heqo). destruct TC'. destruct H4.
  simpl in H4.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
  rewrite H4. simpl.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
  f_equal. rewrite Hge; simpl. rewrite H4. reflexivity.
}

apply andp_right.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
intros ? _. simpl.
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
unfold subst.
(* Goal: @eq nat (@level rmap ag_rmap mf) (@level rmap ag_rmap (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @eq nat (@level rmap ag_rmap m2) (@level rmap ag_rmap (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: forall loc : AV.address, @join resource Join_resource (resource_at mf loc) (resource_at m2 loc) (resource_at (m_phi (store_juicy_mem jm m' ch b i v' STORE)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
rewrite H4.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
unfold eval_id at 1. unfold force_val; simpl.
rewrite Map.gss. auto.
(* Goal: @eq nat (@level rmap ag_rmap mf) (@level rmap ag_rmap (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @eq nat (@level rmap ag_rmap m2) (@level rmap ag_rmap (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: forall loc : AV.address, @join resource Join_resource (resource_at mf loc) (resource_at m2 loc) (resource_at (m_phi (store_juicy_mem jm m' ch b i v' STORE)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
unfold subst; rewrite H4.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
auto.
Qed.

Lemma semax_cast_set:
forall (Delta: tycontext) (P: assert) id e t,
    typeof_temp Delta id = Some t ->
    semax Espec Delta
        (fun rho =>
          |> ((tc_expr Delta (Ecast e t) rho) && P rho))
          (Sset id (Ecast e t))
        (normal_ret_assert
          (fun rho => (EX old:val,
                 !! (eval_id id rho = subst id old (eval_expr (Ecast e t)) rho) &&
                            subst id old P rho))).
Proof.
intros until e.
intros t H99.
replace (fun rho : environ =>
   |> ((tc_expr Delta (Ecast e t) rho) && P rho))
 with (fun rho : environ =>
     (|> tc_expr Delta (Ecast e t) rho && |> P rho))
  by (extensionality rho;  repeat rewrite later_andp; auto).
apply semax_straight_simple; auto.
intros jm jm' Delta' ge vx tx rho k F TS TC3 TC' Hcl Hge ? ? HGG'.
specialize (TC3 (m_phi jm') (age_laterR (age_jm_phi H))).
assert (typecheck_environ Delta rho) as TC.
(* Goal: @eq Z (size_chunk ch) (@sizeof (@cenv_cs CS) t) *)
(* Goal: @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
{
  destruct TC'.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
  eapply typecheck_environ_sub; eauto.
}
pose proof TC3 as TC3'.
apply (tc_expr_sub _ _ _ TS) in TC3'; [| auto].
assert (typeof_temp Delta' id = Some t) as H97.
  unfold typeof_temp in *.
  unfold tycontext_sub in TS. destruct TS as [?TS _]. specialize (TS id).
  destruct ((temp_types Delta) ! id); inversion H99.
  destruct ((temp_types Delta') ! id); inversion TS.
  subst; auto.
clear H99.
exists jm', (PTree.set id (eval_expr (Ecast e t) rho) (tx)).
econstructor.
split.
(* Goal: @eq resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) *)
(* Goal: @eq resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc))) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
reflexivity.
(* Goal: @app_pred rmap ag_rmap (@prop rmap ag_rmap (and (@eq nat (@Datatypes.length memval (encode_val ch v')) (size_chunk_nat ch)) (and (@eq val (decode_val ch (encode_val ch v')) v') (Z.divide (align_chunk ch) (@snd block Z (@pair block Z b i)))))) mf *)
(* Goal: @app_pred rmap ag_rmap (@allp rmap ag_rmap address (@jam rmap Join_rmap Perm_rmap ag_rmap Age_rmap address (adr_range (@pair block Z b i) (size_chunk ch)) (adr_range_dec (@pair block Z b i) (size_chunk ch)) (fun loc : address => yesat NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) sh loc) noat)) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
split3; auto.
+ apply age_level; auto.
+ normalize in H0.
  clear - TS TC' TC H97 TC3 TC3' Hge HGG'.
  simpl in *. simpl. rewrite <- map_ptree_rel.
  apply guard_environ_put_te'; auto. subst; simpl in *.
  unfold construct_rho in *; auto.
(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
  intros. simpl in *. unfold typecheck_temp_id in *.
  unfold typeof_temp in H97.
  rewrite H in H97.
  simpl in *.
  super_unfold_lift. inversion H97.
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
  subst.
  unfold tc_expr in TC3, TC3'; simpl in TC3, TC3'.
  rewrite denote_tc_assert_andp in TC3. destruct TC3.
  rewrite denote_tc_assert_andp in TC3'. destruct TC3'.
  apply tc_val_tc_val'.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
  apply tc_val_sem_cast with (Delta0 := Delta')(phi:=m_phi jm'); auto.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
  eapply guard_environ_e1; eauto.
+
(* Goal: match resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o)) as anonymous' return (forall _ : @eq resource anonymous' (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))), Prop) with | NO sh wildcard' => fun _ : @eq resource (NO sh wildcard') (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => @nonidentity Share.t Share.Join_ba pa_share sh | YES wildcard' wildcard'0 wildcard'1 pp => fun _ : @eq resource (YES wildcard' wildcard'0 wildcard'1 pp) (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => True | PURE k p => fun _ : @eq resource (PURE k p) (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => False end (@eq_refl resource (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o)))) *)
  destruct H0.
(* Goal: @app_pred rmap ag_rmap (@andp rmap ag_rmap (@prop rmap ag_rmap (guard_environ Delta' (current_function k) (construct_rho (filter_genv psi) ve te'))) (proj_ret_assert (frame_ret_assert (normal_ret_assert Q) F) EK_normal (@None val) (construct_rho (filter_genv psi) ve te'))) (m_phi jm') *)
(* Goal: @jm_bupd (@OK_ty Espec) ora (@jsafeN_ genv corestate (@OK_ty Espec) (fun ge : genv => @genv_symb_injective fundef type (genv_genv ge)) (cl_core_sem psi) (@OK_spec Espec) psi (@level juicy_mem juicy_mem_ageable jm1) ora (State ve te' k)) jm' *)
  split; auto.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
  simpl.
(* Goal: @app_pred rmap ag_rmap (@prop rmap ag_rmap (and (@eq nat (@Datatypes.length memval (encode_val ch v')) (size_chunk_nat ch)) (and (@eq val (decode_val ch (encode_val ch v')) v') (Z.divide (align_chunk ch) (@snd block Z (@pair block Z b i)))))) mf *)
(* Goal: @app_pred rmap ag_rmap (@allp rmap ag_rmap address (@jam rmap Join_rmap Perm_rmap ag_rmap Age_rmap address (adr_range (@pair block Z b i) (size_chunk ch)) (adr_range_dec (@pair block Z b i) (size_chunk ch)) (fun loc : address => yesat NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) sh loc) noat)) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
  split3; auto.
  destruct (age1_juicy_mem_unpack _ _ H).
  rewrite <- H3.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
  econstructor; eauto.
  change ((`(force_val1 (sem_cast (typeof e) t)) (eval_expr e) rho)) with (eval_expr (Ecast e t) rho).
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
  rewrite H3; eapply eval_expr_relate; eauto.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
  apply age1_resource_decay; auto.
  split; [apply age_level; auto|].
  apply age1_ghost_of, age_jm_phi; auto.

split.
2: eapply pred_hereditary; try apply H1; destruct (age1_juicy_mem_unpack _ _ H); auto.

assert (app_pred (|>  (F rho * P rho)) (m_phi jm)).
rewrite later_sepcon. eapply sepcon_derives; try apply H0; auto.
assert (laterR (m_phi jm) (m_phi jm')).
constructor 1.
destruct (age1_juicy_mem_unpack _ _ H); auto.
specialize (H2 _ H3).
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
eapply sepcon_derives; try  apply H2; auto.
clear - Hcl Hge.
rewrite <- map_ptree_rel.
specialize (Hcl rho (Map.set id (eval_expr (Ecast e t) rho) (make_tenv tx))).
rewrite <- Hcl; auto.
(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
intros.
destruct (Pos.eq_dec id i).
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
subst.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
left. unfold modifiedvars. simpl.
 unfold insert_idset; rewrite PTree.gss; hnf; auto.
right.
rewrite Map.gso; auto. subst; auto.
apply exp_right with (eval_id id rho).
rewrite <- map_ptree_rel.
assert (env_set
         (mkEnviron (ge_of rho) (ve_of rho)
            (Map.set id (eval_expr (Ecast e t) rho) (make_tenv tx))) id (eval_id id rho) = rho).
(* Goal: @eq Z (size_chunk ch) (@sizeof (@cenv_cs CS) t) *)
(* Goal: @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
{ unfold env_set;
(* Goal: @eq resource (YES (Share.lub (retainer_part sh) Share.Rsh) (@readable_share_lub (retainer_part sh) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES sh (@writable0_readable sh wsh) (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) i)) (encode_val ch v') Undef)) NoneP) *)
(* Goal: @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
  f_equal.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
  unfold eval_id; simpl.
  rewrite Map.override.
  rewrite Map.override_same. subst; auto.
  rewrite Hge in TC'.
  destruct TC' as [TC' _].
  destruct TC' as [TC' _]. unfold typecheck_temp_environ in *.
  unfold typeof_temp in H97. unfold typecheck_temp_id in *. remember ((temp_types Delta') ! id).
  destruct o; [ | inv H97]. symmetry in Heqo.
(* Goal: @join resource Join_resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join resource Join_resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
  specialize (TC' _ _ Heqo). destruct TC'. destruct H4.
  simpl in H4.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
  rewrite H4. simpl.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
  f_equal. rewrite Hge; simpl. rewrite H4. reflexivity.
}

apply andp_right.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
intros ? _. simpl.
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
unfold subst.
change ((`(force_val1 (sem_cast (typeof e) t)) (eval_expr e) rho)) with (eval_expr (Ecast e t) rho).
(* Goal: @eq nat (@level rmap ag_rmap mf) (@level rmap ag_rmap (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @eq nat (@level rmap ag_rmap m2) (@level rmap ag_rmap (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: forall loc : AV.address, @join resource Join_resource (resource_at mf loc) (resource_at m2 loc) (resource_at (m_phi (store_juicy_mem jm m' ch b i v' STORE)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
rewrite H4.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
unfold eval_id at 1. unfold force_val; simpl.
rewrite Map.gss. auto.
(* Goal: @eq nat (@level rmap ag_rmap mf) (@level rmap ag_rmap (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @eq nat (@level rmap ag_rmap m2) (@level rmap ag_rmap (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: forall loc : AV.address, @join resource Join_resource (resource_at mf loc) (resource_at m2 loc) (resource_at (m_phi (store_juicy_mem jm m' ch b i v' STORE)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
unfold subst; rewrite H4.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
auto.
Qed.

Lemma eval_cast_Vundef:
 forall t1 t2, eval_cast t1 t2 Vundef = Vundef.
Proof.
(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
 intros.
(* Goal: @eq val (eval_cast t1 t2 Vundef) Vundef *)
 unfold eval_cast, sem_cast, classify_cast.
 destruct (eqb_type t1 int_or_ptr_type);
 destruct (eqb_type t2 int_or_ptr_type);
 destruct t1,t2;
 try destruct i; try destruct s; try destruct f;
 try destruct i0; try destruct s0; try destruct f0;
(* Goal: @eq resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) *)
(* Goal: @eq resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc))) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
 reflexivity.
Qed.

Transparent Int.repr.

Lemma eqb_attr_true:
  forall a a',  eqb_attr a a' = true  -> a=a'.
Proof.
(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
intros.
(* Goal: @eq attr a a' *)
destruct a as [v a],a' as [v' a'].
(* Goal: @eq attr (mk_attr v a) (mk_attr v' a') *)
simpl in H.
(* Goal: @eq attr (mk_attr v a) (mk_attr v' a') *)
apply andb_true_iff in H.
(* Goal: @eq attr (mk_attr v a) (mk_attr v' a') *)
destruct H.
destruct v,v'; inv  H;
destruct a,a'; inv H0; auto;
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
apply Neqb_ok in H1; subst n0; auto.
Qed.

Opaque Int.repr.

Lemma semax_load:
forall (Delta: tycontext) sh id P e1 t2 v2,
    typeof_temp Delta id = Some t2 ->
    is_neutral_cast (typeof e1) t2 = true ->
    readable_share sh ->
   (forall rho, !! typecheck_environ Delta rho && P rho |-- mapsto sh (typeof e1) (eval_lvalue e1 rho) v2 * TT) ->
    semax Espec Delta
       (fun rho => |>
        (tc_lvalue Delta e1 rho
        && (!! tc_val (typeof e1) v2) && P rho))
       (Sset id e1)
       (normal_ret_assert (fun rho =>
        EX old:val, (!!(eval_id id rho = v2) &&
                         (subst id old P rho)))).
Proof.
intros until v2.
intros Hid TC1 H_READABLE H99.
replace (fun rho : environ => |> ((tc_lvalue Delta e1 rho &&
  !! tc_val (typeof e1) v2 && P rho)))
 with (fun rho : environ =>
   ( |> tc_lvalue Delta e1 rho &&
     |> !! (tc_val (typeof e1) v2) &&
     |> P rho)).
2 : { extensionality rho. repeat rewrite <- later_andp. f_equal. }
repeat rewrite andp_assoc.
unfold mapsto.
apply semax_straight_simple.
(* Goal: @nonidentity Share.t Share.Join_ba pa_share sh3 *)
intro. apply boxy_andp; auto.
intros jm jm1 Delta' ge ve te rho k F TS [TC2 TC3] TC' Hcl Hge ? ? HGG'.
specialize (TC2 (m_phi jm1) (age_laterR (age_jm_phi H))).
specialize (TC3 (m_phi jm1) (age_laterR (age_jm_phi H))).
assert (typecheck_environ Delta rho) as TC.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
{ destruct TC'. eapply typecheck_environ_sub; eauto. }
pose proof TC2 as TC2'.
apply (tc_lvalue_sub _ _ _ TS) in TC2'; [| auto].
hnf in TC3.
apply (typeof_temp_sub _ _ TS) in Hid.
assert (H99': forall rho : environ,
      !!typecheck_environ Delta' rho && P rho
      |-- mapsto sh (typeof e1) (eval_lvalue e1 rho) v2 * TT).
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
intro; eapply derives_trans; [ | apply H99]; apply andp_derives; auto.
intros ? ?; do 3 red.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
eapply typecheck_environ_sub; eauto.
clear H99.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
destruct (eval_lvalue_relate _ _ _ _ _ e1 jm1 HGG' Hge (guard_environ_e1 _ _ _ TC')) as [b [ofs [? ?]]]; auto.
rewrite <- (age_jm_dry H) in H1.
exists jm1.
exists (PTree.set id v2 te).
econstructor; split; [reflexivity | ].
split3.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
apply age_level; auto. simpl.
rewrite <- map_ptree_rel.
apply guard_environ_put_te'.
unfold typecheck_temp_id in *.
unfold construct_rho in *. destruct rho; inv Hge; auto.
clear - H_READABLE Hid TC1 TC2 TC3 TC' H2 Hge H0 H99'.
(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
intros. simpl in TC1.
unfold typeof_temp in Hid. rewrite H in Hid.
inv Hid.
apply tc_val_tc_val'.
apply (neutral_cast_subsumption _ t2 _ TC1 TC3).
(* typechecking proof *)
split; [split3 | ].
* simpl.
   rewrite <- (age_jm_dry H); constructor; auto.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
   apply Clight.eval_Elvalue with b ofs; auto.
   destruct H0 as [H0 _].
   assert ((|> (F rho * P rho))%pred
       (m_phi jm)).
   rewrite later_sepcon.
   eapply sepcon_derives; try apply H0; auto.
   specialize (H3 _ (age_laterR (age_jm_phi H))).
   rewrite sepcon_comm in H3.
   assert ((mapsto sh (typeof e1) (eval_lvalue e1 rho) v2 * TT)%pred (m_phi jm1)).
   rewrite <- TT_sepcon_TT. rewrite <- sepcon_assoc.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
   eapply sepcon_derives; try apply H3; auto.
   eapply derives_trans; [ | apply H99'].
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
   apply andp_right; auto. intros ? _ ; do 3 red. destruct TC'; auto.
   clear H3; rename H4 into H3.
   destruct H3 as [m1 [m2 [? [? _]]]].
   unfold mapsto in H4.
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
   revert H4; case_eq (access_mode (typeof e1)); intros; try contradiction.
   rename m into ch.
   rewrite H2 in H5.
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
   destruct (type_is_volatile (typeof e1)); try contradiction.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
   rewrite if_true in H5 by auto.
   destruct H5 as [[H5' H5] | [H5 _]]; [ | rewrite H5 in TC3; exfalso; revert TC3; apply tc_val_Vundef].
   assert (core_load ch  (b, Ptrofs.unsigned ofs) v2 (m_phi jm1)).
   apply mapsto_core_load with sh.
(* Goal: @app_pred rmap ag_rmap (@prop rmap ag_rmap (and (@eq nat (@Datatypes.length memval (encode_val ch v')) (size_chunk_nat ch)) (and (@eq val (decode_val ch (encode_val ch v')) v') (Z.divide (align_chunk ch) (@snd block Z (@pair block Z b i)))))) mf *)
(* Goal: @app_pred rmap ag_rmap (@allp rmap ag_rmap address (@jam rmap Join_rmap Perm_rmap ag_rmap Age_rmap address (adr_range (@pair block Z b i) (size_chunk ch)) (adr_range_dec (@pair block Z b i) (size_chunk ch)) (fun loc : address => yesat NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) sh loc) noat)) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
   exists m1; exists m2; split3; auto.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
   apply Clight.deref_loc_value with ch; auto.
   unfold loadv.
   rewrite (age_jm_dry H).
   apply core_load_load.
(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
   intros.
   destruct H6 as [bl [_ ?]]. specialize (H6 (b,z)). hnf in H6.
   rewrite if_true in H6 by (split; auto; omega).
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
   destruct H6 as [? [? ?]]. rewrite H6. simpl.
   clear - x0.
   unfold perm_of_sh. if_tac. if_tac; constructor. if_tac; [ | contradiction]. constructor.
   apply H6.
* apply age1_resource_decay; auto.
* split; [apply age_level; auto|].
  apply age1_ghost_of, age_jm_phi; auto.
* rewrite <- map_ptree_rel.
  rewrite <- (Hcl rho (Map.set id v2 (make_tenv te))).
 +normalize.
   exists (eval_id id rho).
(* Goal: match resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o)) as anonymous' return (forall _ : @eq resource anonymous' (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))), Prop) with | NO sh wildcard' => fun _ : @eq resource (NO sh wildcard') (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => @nonidentity Share.t Share.Join_ba pa_share sh | YES wildcard' wildcard'0 wildcard'1 pp => fun _ : @eq resource (YES wildcard' wildcard'0 wildcard'1 pp) (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => True | PURE k p => fun _ : @eq resource (PURE k p) (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => False end (@eq_refl resource (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o)))) *)
   destruct H0.
   apply later_sepcon2 in H0.
   specialize (H0 _ (age_laterR (age_jm_phi H))).
   split; [ |  apply pred_hereditary with (m_phi jm); auto; apply age_jm_phi; eauto].
   eapply sepcon_derives; try apply H0; auto.
   assert (env_set
         (mkEnviron (ge_of rho) (ve_of rho) (Map.set id v2 (make_tenv te))) id
         (eval_id id rho) = rho).
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
  unfold env_set. simpl.
  rewrite Map.override. unfold eval_id.
  destruct TC' as [TC' _].
  unfold typecheck_environ in TC'. repeat rewrite andb_true_iff in TC'. destruct TC' as [TC'[ _ _]].
  unfold typecheck_temp_environ in *.
  specialize (TC' id).
  unfold typeof_temp in Hid. destruct ((temp_types Delta') ! id); inv Hid.
  specialize (TC' _ (eq_refl _)).
(* Goal: @join resource Join_resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join resource Join_resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
   destruct TC'. destruct H4. rewrite H4. simpl.
  rewrite Map.override_same; subst; auto.
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
  unfold subst.
(* Goal: @eq nat (@level rmap ag_rmap mf) (@level rmap ag_rmap (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @eq nat (@level rmap ag_rmap m2) (@level rmap ag_rmap (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: forall loc : AV.address, @join resource Join_resource (resource_at mf loc) (resource_at m2 loc) (resource_at (m_phi (store_juicy_mem jm m' ch b i v' STORE)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
  rewrite H4.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
  apply andp_right; auto.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
  intros ? ?; simpl.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
  unfold eval_id, force_val. simpl. rewrite Map.gss. auto.
 +intro i; destruct (Pos.eq_dec id i); [left; auto | right; rewrite Map.gso; auto].
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
   subst; unfold modifiedvars. simpl.
   unfold insert_idset; rewrite PTree.gss; hnf; auto.
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
   subst. auto.
Qed.


Lemma semax_cast_load:
forall (Delta: tycontext) sh id P e1 t1 v2,
    typeof_temp Delta id = Some t1 ->
   cast_pointer_to_bool (typeof e1) t1 = false ->
(*   classify_cast (typeof e1) t1 <> cast_case_p2bool -> *)
    readable_share sh ->
   (forall rho, !! typecheck_environ Delta rho && P rho |-- mapsto sh (typeof e1) (eval_lvalue e1 rho) v2 * TT) ->
    semax Espec Delta
       (fun rho => |>
        (tc_lvalue Delta e1 rho
        && (!! tc_val t1 (`(eval_cast (typeof e1) t1 v2) rho))
        &&  P rho))
       (Sset id (Ecast e1 t1))
       (normal_ret_assert (fun rho =>
        EX old:val, (!!(eval_id id rho = (`(eval_cast (typeof e1) t1 v2)) rho) &&
                         (subst id old P rho)))).
Proof.
intros until v2.
intros Hid HCAST H_READABLE H99.
replace (fun rho : environ => |> ((tc_lvalue Delta e1 rho &&
       (!! tc_val t1  (`(eval_cast (typeof e1) t1 v2) rho)) &&
       P rho)))
 with (fun rho : environ =>
   ( |> tc_lvalue Delta e1 rho &&
     |> !! (tc_val t1 (eval_cast (typeof e1) t1 v2)) &&
     |> P rho)).
2 : { extensionality rho. repeat rewrite <- later_andp. f_equal. }
repeat rewrite andp_assoc.
unfold mapsto.
apply semax_straight_simple.
(* Goal: @nonidentity Share.t Share.Join_ba pa_share sh3 *)
intro. apply boxy_andp; auto.
intros jm jm1 Delta' ge ve te rho k F TS [TC2 TC3] TC' Hcl Hge ? ? HGG'.
specialize (TC2 (m_phi jm1) (age_laterR (age_jm_phi H))).
specialize (TC3 (m_phi jm1) (age_laterR (age_jm_phi H))).
assert (typecheck_environ Delta rho) as TC.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
{ destruct TC'. eapply typecheck_environ_sub; eauto. }
pose proof TC2 as TC2'.
apply (tc_lvalue_sub _ _ _ TS) in TC2'; [| auto].
hnf in TC3.
apply (typeof_temp_sub _ _ TS) in Hid.
assert (H99': forall rho : environ,
      !!typecheck_environ Delta' rho && P rho
      |-- mapsto sh (typeof e1) (eval_lvalue e1 rho) v2 * TT).
(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
{ intros.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
  intro; eapply derives_trans; [ | apply H99]; apply andp_derives; auto.
  intros ? ?; do 3 red.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
  eapply typecheck_environ_sub; eauto.
}
clear H99.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
destruct (eval_lvalue_relate _ _ _ _ _ e1 jm1 HGG' Hge (guard_environ_e1 _ _ _ TC')) as [b [ofs [? ?]]]; auto.
rewrite <- (age_jm_dry H) in H1.
exists jm1.
exists (PTree.set id (eval_cast (typeof e1) t1 v2) (te)).
econstructor.
split.
(* Goal: @eq resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) *)
(* Goal: @eq resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc))) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
reflexivity.
split3.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
apply age_level; auto. simpl.
rewrite <- map_ptree_rel.
apply guard_environ_put_te'.
unfold typecheck_temp_id in *.
unfold construct_rho in *. destruct rho; inv Hge; auto.
clear - H_READABLE Hid TC2 TC3 TC' H2 Hge H0 H99'.
(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
intros.
unfold typeof_temp in Hid. rewrite H in Hid.
inv Hid.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
simpl.
apply tc_val_tc_val'.
apply TC3.
(*
(* Goal: @eq Z (size_chunk ch) (@sizeof (@cenv_cs CS) t) *)
(* Goal: @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
assert (Tv2: tc_val (typeof e1) (v2 rho)). {
 clear - H99' 
 *)
split; [split3 | ].
*   rewrite <- (age_jm_dry H); constructor; auto.
  destruct (sem_cast (typeof e1) t1 v2) eqn:EC.
  2: elimtype False; clear - EC TC3;
    unfold eval_cast, force_val1 in TC3; rewrite EC in TC3;
    destruct t1; try destruct f;
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
    try destruct (eqb_type _ _); contradiction.
  destruct H0 as [H0 _].
   assert ((|> (F rho * P rho))%pred (m_phi jm)). {
    rewrite later_sepcon.
    eapply sepcon_derives; try apply H0; auto.
  }
  specialize (H3 _ (age_laterR (age_jm_phi H))).
  rewrite sepcon_comm in H3.
  assert ((mapsto sh (typeof e1) (eval_lvalue e1 rho) v2 * TT)%pred (m_phi jm1)). {
    rewrite <- TT_sepcon_TT. rewrite <- sepcon_assoc.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
    eapply sepcon_derives; try apply H3; auto.
    eapply derives_trans; [ | apply H99'].
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
    apply andp_right; auto. intros ? _ ; do 3 red. destruct TC'; auto.
 }
   clear H3; rename H4 into H3.
   destruct H3 as [m1 [m2 [? [? _]]]].
   unfold mapsto in H4.
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
   revert H4; case_eq (access_mode (typeof e1)); intros; try contradiction.
   rename m into ch.
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
   destruct (type_is_volatile (typeof e1)) eqn:NONVOL; try contradiction.
   rewrite H2 in H5.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
   rewrite if_true in H5 by auto.
   destruct H5 as [[H5' H5] | [H5 _]];
    [ | hnf in TC3; rewrite H5, eval_cast_Vundef in TC3; exfalso; revert TC3; apply tc_val_Vundef].
   apply Clight.eval_Ecast with v2.
  2: apply sem_cast_e1; auto;
(* Goal: @eq resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) *)
(* Goal: @eq resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc))) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
      unfold eval_cast, force_val1; rewrite !EC; reflexivity.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
   eapply Clight.eval_Elvalue; eauto.
   assert (core_load ch  (b, Ptrofs.unsigned ofs) v2 (m_phi jm1)).
   apply mapsto_core_load with sh.
(* Goal: @app_pred rmap ag_rmap (@prop rmap ag_rmap (and (@eq nat (@Datatypes.length memval (encode_val ch v')) (size_chunk_nat ch)) (and (@eq val (decode_val ch (encode_val ch v')) v') (Z.divide (align_chunk ch) (@snd block Z (@pair block Z b i)))))) mf *)
(* Goal: @app_pred rmap ag_rmap (@allp rmap ag_rmap address (@jam rmap Join_rmap Perm_rmap ag_rmap Age_rmap address (adr_range (@pair block Z b i) (size_chunk ch)) (adr_range_dec (@pair block Z b i) (size_chunk ch)) (fun loc : address => yesat NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) sh loc) noat)) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
   exists m1; exists m2; split3; auto.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
   apply Clight.deref_loc_value with ch; auto.
   unfold loadv.
   rewrite (age_jm_dry H).
   apply core_load_load.
(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
   intros.
   destruct H6 as [bl [_ ?]]. specialize (H6 (b,z)). hnf in H6.
   rewrite if_true in H6 by (split; auto; omega).
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
   destruct H6 as [? [? ?]]. rewrite H6. simpl.
   clear - x0.
   unfold perm_of_sh. if_tac. if_tac; constructor. if_tac; [ | contradiction]. constructor.
   apply H6.
* apply age1_resource_decay; auto.
* split; [apply age_level; auto|].
  apply age1_ghost_of, age_jm_phi; auto.
* rewrite <- map_ptree_rel.
  rewrite <- (Hcl rho (Map.set id (eval_cast (typeof e1) t1 v2) (make_tenv te))).
 + normalize.
   exists (eval_id id rho).
(* Goal: match resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o)) as anonymous' return (forall _ : @eq resource anonymous' (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))), Prop) with | NO sh wildcard' => fun _ : @eq resource (NO sh wildcard') (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => @nonidentity Share.t Share.Join_ba pa_share sh | YES wildcard' wildcard'0 wildcard'1 pp => fun _ : @eq resource (YES wildcard' wildcard'0 wildcard'1 pp) (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => True | PURE k p => fun _ : @eq resource (PURE k p) (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => False end (@eq_refl resource (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o)))) *)
   destruct H0.
   apply later_sepcon2 in H0.
   specialize (H0 _ (age_laterR (age_jm_phi H))).
   split; [ |  apply pred_hereditary with (m_phi jm); auto; apply age_jm_phi; eauto].
   eapply sepcon_derives; try apply H0; auto.
   assert (env_set
         (mkEnviron (ge_of rho) (ve_of rho) (Map.set id (eval_cast (typeof e1) t1 v2) (make_tenv te))) id
         (eval_id id rho) = rho).
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
  unfold env_set. simpl.
  rewrite Map.override. unfold eval_id.
  destruct TC' as [TC' _].
  unfold typecheck_environ in TC'. repeat rewrite andb_true_iff in TC'. destruct TC' as [TC'[ _ _]].
  unfold typecheck_temp_environ in *.
  specialize (TC' id).
  unfold typeof_temp in Hid. destruct ((temp_types Delta') ! id); inv Hid.
  specialize (TC' _ (eq_refl _)).
(* Goal: @join resource Join_resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join resource Join_resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
   destruct TC'. destruct H4. rewrite H4. simpl.
  rewrite Map.override_same; subst; auto.
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
  unfold subst.
(* Goal: @eq nat (@level rmap ag_rmap mf) (@level rmap ag_rmap (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @eq nat (@level rmap ag_rmap m2) (@level rmap ag_rmap (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: forall loc : AV.address, @join resource Join_resource (resource_at mf loc) (resource_at m2 loc) (resource_at (m_phi (store_juicy_mem jm m' ch b i v' STORE)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
  rewrite H4.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
  apply andp_right; auto.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
  intros ? ?; simpl.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
  unfold eval_id, force_val. simpl. rewrite Map.gss. auto.
 + intro i; destruct (Pos.eq_dec id i); [left; auto | right; rewrite Map.gso; auto].
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
   subst; unfold modifiedvars. simpl.
   unfold insert_idset; rewrite PTree.gss; hnf; auto.
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
   subst. auto.
Qed.

Lemma res_option_core: forall r, res_option (core r) = None.
Proof.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
 destruct r. rewrite core_NO; auto. rewrite core_YES; auto. rewrite core_PURE; auto.
Qed.

Lemma writable0_lub_retainer_Rsh: 
 forall sh, writable0_share sh ->
  Share.lub (retainer_part sh) Share.Rsh = sh.
(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
  intros. symmetry.  
(* Goal: @eq Share.t sh (Share.lub (retainer_part sh) Share.Rsh) *)
  unfold retainer_part.
(* Goal: @eq Share.t sh (Share.lub (Share.glb Share.Lsh sh) Share.Rsh) *)
  rewrite (comp_parts comp_Lsh_Rsh sh) at 1.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
  f_equal; auto.
(* Goal: @eq Share.t (Share.glb Share.Rsh sh) Share.Rsh *)
  unfold writable0_share in H.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
  apply leq_join_sub in H.  apply Share.ord_spec1 in H. auto.
Qed.

Lemma address_mapsto_can_store: forall jm ch v sh (wsh: writable0_share sh) b ofs v' my,
       (address_mapsto ch v sh (b, Ptrofs.unsigned ofs) * exactly my)%pred (m_phi jm) ->
       decode_val ch (encode_val ch v') = v' ->
       exists m',
(* Goal: @eq Z (size_chunk ch) (@sizeof (@cenv_cs CS) t) *)
(* Goal: @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
       {H: Mem.store ch (m_dry jm) b (Ptrofs.unsigned ofs) v' = Some m'|
       (address_mapsto ch v' sh (b, Ptrofs.unsigned ofs) * exactly my)%pred 
       (m_phi (store_juicy_mem _ _ _ _ _ _ H))}.
Proof.
(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
intros. rename H0 into DE.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
destruct (mapsto_can_store ch v sh wsh b (Ptrofs.unsigned ofs) jm v') as [m' STORE]; auto.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
eapply sepcon_derives; eauto.
(* Goal: @ex mem (fun m' : mem => @sig (@eq (option mem) (store ch (m_dry jm) b (Ptrofs.unsigned ofs) v') (@Some mem m')) (fun H : @eq (option mem) (store ch (m_dry jm) b (Ptrofs.unsigned ofs) v') (@Some mem m') => @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b (Ptrofs.unsigned ofs))) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b (Ptrofs.unsigned ofs) v' H)))) *)
exists m'.
(* Goal: @sig (@eq (option mem) (store ch (m_dry jm) b (Ptrofs.unsigned ofs) v') (@Some mem m')) (fun H : @eq (option mem) (store ch (m_dry jm) b (Ptrofs.unsigned ofs) v') (@Some mem m') => @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b (Ptrofs.unsigned ofs))) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b (Ptrofs.unsigned ofs) v' H))) *)
exists STORE.
(* Goal: @eq resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES sh (@writable0_readable sh wsh) (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) (preds_fmap (approx (@level rmap ag_rmap mf)) (approx (@level rmap ag_rmap mf)) NoneP)) *)
(* Goal: @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
pose proof I.
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b (Ptrofs.unsigned ofs))) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b (Ptrofs.unsigned ofs) v' STORE)) *)
destruct H as [m1 [m2 [? [? Hmy]]]].
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b (Ptrofs.unsigned ofs))) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b (Ptrofs.unsigned ofs) v' STORE)) *)
do 3 red in Hmy.
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b (Ptrofs.unsigned ofs))) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b (Ptrofs.unsigned ofs) v' STORE)) *)
assert (H2 := I); assert (H3 := I).
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b (Ptrofs.unsigned ofs))) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b (Ptrofs.unsigned ofs) v' STORE)) *)
forget (Ptrofs.unsigned ofs) as i. clear ofs.
pose (f loc := if adr_range_dec (b,i) (size_chunk ch) loc
                      then YES (Share.lub (res_retain (m1 @ loc)) Share.Rsh) 
                               (readable_share_lub (writable0_readable writable0_Rsh))
                               (VAL (contents_at m' loc)) NoneP
                     else core (m_phi jm @ loc)).
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
destruct (make_rmap f (core (ghost_of (m_phi jm))) (level jm)) as [mf [? [? Hg]]].
(* Goal: @eq (forall _ : AV.address, resource) (@compose AV.address resource resource (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm))) f) f *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
unfold f, compose; clear f; extensionality loc.
(* Goal: if adr_range_dec (@pair block Z b i) (size_chunk ch) loc then @app_pred rmap ag_rmap (yesat NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) sh loc) mf else @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
symmetry. if_tac.
(* Goal: @eq resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP)) *)
(* Goal: @eq resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc))) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
unfold resource_fmap. rewrite preds_fmap_NoneP.
(* Goal: @eq resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) *)
(* Goal: @eq resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc))) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
reflexivity.
generalize (resource_at_approx (m_phi jm) loc);
(* Goal: @eq resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) *)
(* Goal: @eq resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc))) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
destruct (m_phi jm @ loc); [rewrite core_NO | rewrite core_YES | rewrite core_PURE]; try reflexivity.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
auto.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
rewrite ghost_core; auto.

(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
unfold f in H5; clear f.
(* Goal: @app_pred rmap ag_rmap (@prop rmap ag_rmap (and (@eq nat (@Datatypes.length memval (encode_val ch v')) (size_chunk_nat ch)) (and (@eq val (decode_val ch (encode_val ch v')) v') (Z.divide (align_chunk ch) (@snd block Z (@pair block Z b i)))))) mf *)
(* Goal: @app_pred rmap ag_rmap (@allp rmap ag_rmap address (@jam rmap Join_rmap Perm_rmap ag_rmap Age_rmap address (adr_range (@pair block Z b i) (size_chunk ch)) (adr_range_dec (@pair block Z b i) (size_chunk ch)) (fun loc : address => yesat NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) sh loc) noat)) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
exists mf; exists m2; split3; auto.
(* Goal: @join rmap Join_rmap mf m2 (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
apply resource_at_join2.
(* Goal: @eq nat (@level rmap ag_rmap mf) (@level rmap ag_rmap (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @eq nat (@level rmap ag_rmap m2) (@level rmap ag_rmap (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: forall loc : AV.address, @join resource Join_resource (resource_at mf loc) (resource_at m2 loc) (resource_at (m_phi (store_juicy_mem jm m' ch b i v' STORE)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
rewrite H4. symmetry. apply (level_store_juicy_mem _ _ _ _ _ _ STORE).
(* Goal: @eq attr (mk_attr v a) (mk_attr v' a') *)
apply join_level in H; destruct H.
change R.rmap with rmap in *. change R.ag_rmap with ag_rmap in *.
(* Goal: @eq nat (@level juicy_mem juicy_mem_ageable jm) (@level rmap ag_rmap (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @eq nat (@level rmap ag_rmap m2) (@level rmap ag_rmap (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: forall loc : AV.address, @join resource Join_resource (resource_at mf loc) (resource_at m2 loc) (resource_at (m_phi (store_juicy_mem jm m' ch b i v' STORE)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
rewrite H6; symmetry. apply (level_store_juicy_mem _ _ _ _ _ _ STORE).
(* Goal: forall loc : AV.address, @join resource Join_resource (resource_at mf loc) (resource_at m2 loc) (resource_at (m_phi (store_juicy_mem jm m' ch b i v' STORE)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
intro; rewrite H5. clear mf H4 H5 Hg.
(* Goal: @join resource Join_resource (if adr_range_dec (@pair block Z b i) (size_chunk ch) loc then YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP else @core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_at m2 loc) (resource_at (m_phi (store_juicy_mem jm m' ch b i v' STORE)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
simpl m_phi.
(* Goal: @join resource Join_resource (if adr_range_dec (@pair block Z b i) (size_chunk ch) loc then YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP else @core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
apply (resource_at_join _ _ _ loc) in H.
(* Goal: @join resource Join_resource (if adr_range_dec (@pair block Z b i) (size_chunk ch) loc then YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP else @core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
destruct H1 as [vl [[? ?] Hg]]. specialize (H4 loc). hnf in H4.
(* Goal: if adr_range_dec (@pair block Z b i) (size_chunk ch) loc then @app_pred rmap ag_rmap (yesat NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) sh loc) mf else @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
if_tac.
(* Goal: @join resource Join_resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join resource Join_resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
destruct H4. hnf in H4. rewrite H4 in H.
rewrite (proof_irr x (writable0_readable wsh)) in *; clear x.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
destruct (YES_join_full _ _ _ _ _ _ H) as [sh' [nsh' H6]]; auto.
(* Goal: @join resource Join_resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join resource Join_resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
rewrite H6.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
unfold inflate_store; simpl.
(* Goal: @join resource Join_resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_at (m_phi jm) loc) (resource_at (@proj1_sig rmap (fun phi : rmap => and (@eq nat (@level rmap ag_rmap phi) (@level rmap ag_rmap (m_phi jm))) (and (@eq (forall _ : AV.address, resource) (resource_at phi) (fun loc : AV.address => match resource_at (m_phi jm) loc with | NO sh n => resource_at (m_phi jm) loc | YES sh rsh (VAL m0 as k) p => YES sh rsh (VAL (contents_at m' loc)) NoneP | YES sh rsh (LK n i as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) loc) | YES sh rsh (FUN f c as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) loc) | PURE k p => resource_at (m_phi jm) loc end)) (@eq ghost (ghost_of phi) (ghost_of (m_phi jm))))) (make_rmap (fun loc : AV.address => match resource_at (m_phi jm) loc with | NO sh n => resource_at (m_phi jm) loc | YES sh rsh (VAL m0 as k) p => YES sh rsh (VAL (contents_at m' loc)) NoneP | YES sh rsh (LK n i as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) loc) | YES sh rsh (FUN f c as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) loc) | PURE k p => resource_at (m_phi jm) loc end) (ghost_of (m_phi jm)) (@level rmap ag_rmap (m_phi jm)) (@functional_extensionality AV.address resource (fun x : AV.address => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) match resource_at (m_phi jm) x with | NO sh n => resource_at (m_phi jm) x | YES sh rsh (VAL m0 as k) p => YES sh rsh (VAL (contents_at m' x)) NoneP | YES sh rsh (LK n i as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) x) | YES sh rsh (FUN f c as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) x) | PURE k p => resource_at (m_phi jm) x end) (fun loc : AV.address => match resource_at (m_phi jm) loc with | NO sh n => resource_at (m_phi jm) loc | YES sh rsh (VAL m0 as k) p => YES sh rsh (VAL (contents_at m' loc)) NoneP | YES sh rsh (LK n i as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) loc) | YES sh rsh (FUN f c as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) loc) | PURE k p => resource_at (m_phi jm) loc end) (fun l : AV.address => let (b, ofs) as p return (@eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) match resource_at (m_phi jm) p with | NO sh n => resource_at (m_phi jm) p | YES sh rsh (VAL m0 as k) p0 => YES sh rsh (VAL (contents_at m' p)) NoneP | YES sh rsh (LK n i as k) p0 => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) p) | YES sh rsh (FUN f c as k) p0 => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) p) | PURE k p0 => resource_at (m_phi jm) p end) match resource_at (m_phi jm) p with | NO sh n => resource_at (m_phi jm) p | YES sh rsh (VAL m0 as k) p0 => YES sh rsh (VAL (contents_at m' p)) NoneP | YES sh rsh (LK n i as k) p0 => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) p) | YES sh rsh (FUN f c as k) p0 => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) p) | PURE k p0 => resource_at (m_phi jm) p end) := l in match resource_at (m_phi jm) (@pair block Z b ofs) as r return (forall _ : @eq resource r (resource_at (m_phi jm) (@pair block Z b ofs)), @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) match r with | NO sh n => r | YES sh rsh (VAL m0 as k) p => YES sh rsh (VAL (contents_at m' (@pair block Z b ofs))) NoneP | YES sh rsh (LK n i as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) r | YES sh rsh (FUN f c as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) r | PURE k p => r end) match r with | NO sh n => r | YES sh rsh (VAL m0 as k) p => YES sh rsh (VAL (contents_at m' (@pair block Z b ofs))) NoneP | YES sh rsh (LK n i as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) r | YES sh rsh (FUN f c as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) r | PURE k p => r end) with | NO sh n => fun _ : @eq resource (NO sh n) (resource_at (m_phi jm) (@pair block Z b ofs)) => @eq_refl resource (NO sh n) | YES sh r k p => fun HeqHPHI : @eq resource (YES sh r k p) (resource_at (m_phi jm) (@pair block Z b ofs)) => match k as k0 return (forall _ : @eq resource (YES sh r k0 p) (resource_at (m_phi jm) (@pair block Z b ofs)), @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) match k0 with | VAL m0 => YES sh r (VAL (contents_at m' (@pair block Z b ofs))) NoneP | LK n i => YES sh r k0 (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p) | FUN f c => YES sh r k0 (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p) end) match k0 with | VAL m0 => YES sh r (VAL (contents_at m' (@pair block Z b ofs))) NoneP | LK n i => YES sh r k0 (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p) | FUN f c => YES sh r k0 (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p) end) with | VAL m0 => fun _ : @eq resource (YES sh r (VAL m0) p) (resource_at (m_phi jm) (@pair block Z b ofs)) => @eq_ind_r preds NoneP (fun p0 : preds => @eq resource (YES sh r (VAL (contents_at m' (@pair block Z b ofs))) p0) (YES sh r (VAL (contents_at m' (@pair block Z b ofs))) NoneP)) (@eq_refl resource (YES sh r (VAL (contents_at m' (@pair block Z b ofs))) NoneP)) (SomeP (ConstType unit) (fun _ : list Type => tt)) (preds_fmap_NoneP (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm)))) | LK n i => fun _ : @eq resource (YES sh r (LK n i) p) (resource_at (m_phi jm) (@pair block Z b ofs)) => @eq_ind_r preds (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p) (fun p0 : preds => @eq resource (YES sh r (LK n i) p0) (YES sh r (LK n i) (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p))) (@eq_refl resource (YES sh r (LK n i) (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p))) (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p)) (approx_map_idem (@level rmap ag_rmap (m_phi jm)) p) | FUN f c => fun _ : @eq resource (YES sh r (FUN f c) p) (resource_at (m_phi jm) (@pair block Z b ofs)) => @eq_ind_r preds (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p) (fun p0 : preds => @eq resource (YES sh r (FUN f c) p0) (YES sh r (FUN f c) (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p))) (@eq_refl resource (YES sh r (FUN f c) (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p))) (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p)) (approx_map_idem (@level rmap ag_rmap (m_phi jm)) p) end HeqHPHI | PURE k p => fun HeqHPHI : @eq resource (PURE k p) (resource_at (m_phi jm) (@pair block Z b ofs)) => @eq_ind_r resource (resource_at (m_phi jm) (@pair block Z b ofs)) (fun r : resource => @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) r) r) (resource_at_approx (m_phi jm) (@pair block Z b ofs)) (PURE k p) HeqHPHI end (@eq_refl resource (resource_at (m_phi jm) (@pair block Z b ofs))))) (ghost_of_approx (m_phi jm)))) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
rewrite resource_at_make_rmap.
(* Goal: @join resource Join_resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (NO sh' nsh') match resource_at (m_phi jm) loc with | NO sh n => resource_at (m_phi jm) loc | YES sh rsh (VAL m0 as k) p => YES sh rsh (VAL (contents_at m' loc)) NoneP | YES sh rsh (LK n i as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) loc) | YES sh rsh (FUN f c as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) loc) | PURE k p => resource_at (m_phi jm) loc end *)
(* Goal: @join resource Join_resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
rewrite H6 in H.
(* Goal: @join resource Join_resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (NO sh' nsh') match resource_at (m_phi jm) loc with | NO sh n => resource_at (m_phi jm) loc | YES sh rsh (VAL m0 as k) p => YES sh rsh (VAL (contents_at m' loc)) NoneP | YES sh rsh (LK n i as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) loc) | YES sh rsh (FUN f c as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) loc) | PURE k p => resource_at (m_phi jm) loc end *)
(* Goal: @join resource Join_resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
inversion H; clear H.
(* Goal: @join resource Join_resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (NO sh' nsh') (YES sh3 rsh3 (VAL (contents_at m' loc)) NoneP) *)
(* Goal: @join resource Join_resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
subst sh2 k sh p.
(* Goal: @join resource Join_resource (NO Share.bot bot_unreadable) (YES sh0 r (VAL m) NoneP) (YES sh0 r (VAL m) NoneP) *)
(* Goal: @join resource Join_resource (@core resource Join_resource Sep_resource (PURE k p)) (PURE k p) (PURE k p) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
constructor.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
rewrite H4; simpl.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
rewrite writable0_lub_retainer_Rsh; auto.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
apply join_unit1_e in H; auto.
(* Goal: @join resource Join_resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
rewrite H.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
unfold inflate_store; simpl.
(* Goal: @join resource Join_resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_at (m_phi jm) loc) (resource_at (@proj1_sig rmap (fun phi : rmap => and (@eq nat (@level rmap ag_rmap phi) (@level rmap ag_rmap (m_phi jm))) (and (@eq (forall _ : AV.address, resource) (resource_at phi) (fun loc : AV.address => match resource_at (m_phi jm) loc with | NO sh n => resource_at (m_phi jm) loc | YES sh rsh (VAL m0 as k) p => YES sh rsh (VAL (contents_at m' loc)) NoneP | YES sh rsh (LK n i as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) loc) | YES sh rsh (FUN f c as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) loc) | PURE k p => resource_at (m_phi jm) loc end)) (@eq ghost (ghost_of phi) (ghost_of (m_phi jm))))) (make_rmap (fun loc : AV.address => match resource_at (m_phi jm) loc with | NO sh n => resource_at (m_phi jm) loc | YES sh rsh (VAL m0 as k) p => YES sh rsh (VAL (contents_at m' loc)) NoneP | YES sh rsh (LK n i as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) loc) | YES sh rsh (FUN f c as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) loc) | PURE k p => resource_at (m_phi jm) loc end) (ghost_of (m_phi jm)) (@level rmap ag_rmap (m_phi jm)) (@functional_extensionality AV.address resource (fun x : AV.address => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) match resource_at (m_phi jm) x with | NO sh n => resource_at (m_phi jm) x | YES sh rsh (VAL m0 as k) p => YES sh rsh (VAL (contents_at m' x)) NoneP | YES sh rsh (LK n i as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) x) | YES sh rsh (FUN f c as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) x) | PURE k p => resource_at (m_phi jm) x end) (fun loc : AV.address => match resource_at (m_phi jm) loc with | NO sh n => resource_at (m_phi jm) loc | YES sh rsh (VAL m0 as k) p => YES sh rsh (VAL (contents_at m' loc)) NoneP | YES sh rsh (LK n i as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) loc) | YES sh rsh (FUN f c as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) loc) | PURE k p => resource_at (m_phi jm) loc end) (fun l : AV.address => let (b, ofs) as p return (@eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) match resource_at (m_phi jm) p with | NO sh n => resource_at (m_phi jm) p | YES sh rsh (VAL m0 as k) p0 => YES sh rsh (VAL (contents_at m' p)) NoneP | YES sh rsh (LK n i as k) p0 => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) p) | YES sh rsh (FUN f c as k) p0 => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) p) | PURE k p0 => resource_at (m_phi jm) p end) match resource_at (m_phi jm) p with | NO sh n => resource_at (m_phi jm) p | YES sh rsh (VAL m0 as k) p0 => YES sh rsh (VAL (contents_at m' p)) NoneP | YES sh rsh (LK n i as k) p0 => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) p) | YES sh rsh (FUN f c as k) p0 => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) p) | PURE k p0 => resource_at (m_phi jm) p end) := l in match resource_at (m_phi jm) (@pair block Z b ofs) as r return (forall _ : @eq resource r (resource_at (m_phi jm) (@pair block Z b ofs)), @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) match r with | NO sh n => r | YES sh rsh (VAL m0 as k) p => YES sh rsh (VAL (contents_at m' (@pair block Z b ofs))) NoneP | YES sh rsh (LK n i as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) r | YES sh rsh (FUN f c as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) r | PURE k p => r end) match r with | NO sh n => r | YES sh rsh (VAL m0 as k) p => YES sh rsh (VAL (contents_at m' (@pair block Z b ofs))) NoneP | YES sh rsh (LK n i as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) r | YES sh rsh (FUN f c as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) r | PURE k p => r end) with | NO sh n => fun _ : @eq resource (NO sh n) (resource_at (m_phi jm) (@pair block Z b ofs)) => @eq_refl resource (NO sh n) | YES sh r k p => fun HeqHPHI : @eq resource (YES sh r k p) (resource_at (m_phi jm) (@pair block Z b ofs)) => match k as k0 return (forall _ : @eq resource (YES sh r k0 p) (resource_at (m_phi jm) (@pair block Z b ofs)), @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) match k0 with | VAL m0 => YES sh r (VAL (contents_at m' (@pair block Z b ofs))) NoneP | LK n i => YES sh r k0 (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p) | FUN f c => YES sh r k0 (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p) end) match k0 with | VAL m0 => YES sh r (VAL (contents_at m' (@pair block Z b ofs))) NoneP | LK n i => YES sh r k0 (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p) | FUN f c => YES sh r k0 (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p) end) with | VAL m0 => fun _ : @eq resource (YES sh r (VAL m0) p) (resource_at (m_phi jm) (@pair block Z b ofs)) => @eq_ind_r preds NoneP (fun p0 : preds => @eq resource (YES sh r (VAL (contents_at m' (@pair block Z b ofs))) p0) (YES sh r (VAL (contents_at m' (@pair block Z b ofs))) NoneP)) (@eq_refl resource (YES sh r (VAL (contents_at m' (@pair block Z b ofs))) NoneP)) (SomeP (ConstType unit) (fun _ : list Type => tt)) (preds_fmap_NoneP (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm)))) | LK n i => fun _ : @eq resource (YES sh r (LK n i) p) (resource_at (m_phi jm) (@pair block Z b ofs)) => @eq_ind_r preds (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p) (fun p0 : preds => @eq resource (YES sh r (LK n i) p0) (YES sh r (LK n i) (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p))) (@eq_refl resource (YES sh r (LK n i) (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p))) (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p)) (approx_map_idem (@level rmap ag_rmap (m_phi jm)) p) | FUN f c => fun _ : @eq resource (YES sh r (FUN f c) p) (resource_at (m_phi jm) (@pair block Z b ofs)) => @eq_ind_r preds (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p) (fun p0 : preds => @eq resource (YES sh r (FUN f c) p0) (YES sh r (FUN f c) (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p))) (@eq_refl resource (YES sh r (FUN f c) (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p))) (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p)) (approx_map_idem (@level rmap ag_rmap (m_phi jm)) p) end HeqHPHI | PURE k p => fun HeqHPHI : @eq resource (PURE k p) (resource_at (m_phi jm) (@pair block Z b ofs)) => @eq_ind_r resource (resource_at (m_phi jm) (@pair block Z b ofs)) (fun r : resource => @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) r) r) (resource_at_approx (m_phi jm) (@pair block Z b ofs)) (PURE k p) HeqHPHI end (@eq_refl resource (resource_at (m_phi jm) (@pair block Z b ofs))))) (ghost_of_approx (m_phi jm)))) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
rewrite resource_at_make_rmap.
(* Goal: @join resource Join_resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_at (m_phi jm) loc) match resource_at (m_phi jm) loc with | NO sh n => resource_at (m_phi jm) loc | YES sh rsh (VAL m0 as k) p => YES sh rsh (VAL (contents_at m' loc)) NoneP | YES sh rsh (LK n i as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) loc) | YES sh rsh (FUN f c as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) loc) | PURE k p => resource_at (m_phi jm) loc end *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
rewrite resource_at_approx.
(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
case_eq (m_phi jm @ loc); simpl; intros.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
rewrite core_NO. constructor. apply join_unit1; auto.
(* Goal: @join resource Join_resource (@core resource Join_resource Sep_resource (YES sh0 r k p)) (YES sh0 r k p) match k with | VAL m0 => YES sh0 r (VAL (contents_at m' loc)) NoneP | LK n i => YES sh0 r k p | FUN f c => YES sh0 r k p end *)
(* Goal: @join resource Join_resource (@core resource Join_resource Sep_resource (PURE k p)) (PURE k p) (PURE k p) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
destruct k; try solve [rewrite core_YES; constructor; apply join_unit1; auto].
(* Goal: @join resource Join_resource (@core resource Join_resource Sep_resource (YES sh0 r (VAL m) p)) (YES sh0 r (VAL m) p) (YES sh0 r (VAL (contents_at m' loc)) NoneP) *)
(* Goal: @join resource Join_resource (@core resource Join_resource Sep_resource (PURE k p)) (PURE k p) (PURE k p) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
rewrite core_YES.
(* Goal: @join resource Join_resource (NO Share.bot bot_unreadable) (YES sh0 r (VAL m) p) (YES sh0 r (VAL (contents_at m' loc)) NoneP) *)
(* Goal: @join resource Join_resource (@core resource Join_resource Sep_resource (PURE k p)) (PURE k p) (PURE k p) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
destruct (juicy_mem_contents _ _ _ _ _ _ H6). subst p.
(* Goal: @join resource Join_resource (NO Share.bot bot_unreadable) (YES sh0 r (VAL m) NoneP) (YES sh0 r (VAL (contents_at m' loc)) NoneP) *)
(* Goal: @join resource Join_resource (@core resource Join_resource Sep_resource (PURE k p)) (PURE k p) (PURE k p) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
pose proof (store_phi_elsewhere_eq _ _ _ _ _ _ STORE _ _ _ _ H5 H6).
(* Goal: @eq resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES sh (@writable0_readable sh wsh) (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) NoneP) *)
(* Goal: @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
rewrite H8.
(* Goal: @join resource Join_resource (NO Share.bot bot_unreadable) (YES sh0 r (VAL m) NoneP) (YES sh0 r (VAL m) NoneP) *)
(* Goal: @join resource Join_resource (@core resource Join_resource Sep_resource (PURE k p)) (PURE k p) (PURE k p) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
constructor.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
apply join_unit1; auto.
(* Goal: @join resource Join_resource (NO Share.bot bot_unreadable) (YES sh0 r (VAL m) NoneP) (YES sh0 r (VAL m) NoneP) *)
(* Goal: @join resource Join_resource (@core resource Join_resource Sep_resource (PURE k p)) (PURE k p) (PURE k p) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
rewrite core_PURE; constructor.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
rewrite Hg; simpl.
(* Goal: @join ghost ghost_join (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) (ghost_of m2) (ghost_of (inflate_store m' (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
unfold inflate_store; rewrite ghost_of_make_rmap.
(* Goal: @join ghost ghost_join (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) (ghost_of m2) (ghost_of (m_phi jm)) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
destruct H1 as [? [? Hid]].
(* Goal: @join ghost ghost_join (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) (ghost_of m2) (ghost_of (m_phi jm)) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
rewrite (Hid _ _ (ghost_of_join _ _ _ H)).
(* Goal: @join ghost ghost_join (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) (ghost_of (m_phi jm)) (ghost_of (m_phi jm)) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
apply core_unit.

unfold address_mapsto in *.
(* Goal: @app_pred rmap ag_rmap (@exp rmap ag_rmap (list memval) (fun bl : list memval => @andp rmap ag_rmap (@andp rmap ag_rmap (@prop rmap ag_rmap (and (@eq nat (@Datatypes.length memval bl) (size_chunk_nat ch)) (and (@eq val (decode_val ch bl) v') (Z.divide (align_chunk ch) (@snd block Z (@pair block Z b i)))))) (@allp rmap ag_rmap address (@jam rmap Join_rmap Perm_rmap ag_rmap Age_rmap address (adr_range (@pair block Z b i) (size_chunk ch)) (adr_range_dec (@pair block Z b i) (size_chunk ch)) (fun loc : address => yesat NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) bl Undef)) sh loc) noat))) noghost)) mf *)
exists (encode_val ch v').
(* Goal: @app_pred rmap ag_rmap (@andp rmap ag_rmap (@andp rmap ag_rmap (@prop rmap ag_rmap (and (@eq nat (@Datatypes.length memval (encode_val ch v')) (size_chunk_nat ch)) (and (@eq val (decode_val ch (encode_val ch v')) v') (Z.divide (align_chunk ch) (@snd block Z (@pair block Z b i)))))) (@allp rmap ag_rmap address (@jam rmap Join_rmap Perm_rmap ag_rmap Age_rmap address (adr_range (@pair block Z b i) (size_chunk ch)) (adr_range_dec (@pair block Z b i) (size_chunk ch)) (fun loc : address => yesat NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) sh loc) noat))) noghost) mf *)
destruct H1 as [vl [[[? [? ?]] ?] Hg1]].
(* Goal: @app_pred rmap ag_rmap (@andp rmap ag_rmap (@andp rmap ag_rmap (@prop rmap ag_rmap (and (@eq nat (@Datatypes.length memval (encode_val ch v')) (size_chunk_nat ch)) (and (@eq val (decode_val ch (encode_val ch v')) v') (Z.divide (align_chunk ch) (@snd block Z (@pair block Z b i)))))) (@allp rmap ag_rmap address (@jam rmap Join_rmap Perm_rmap ag_rmap Age_rmap address (adr_range (@pair block Z b i) (size_chunk ch)) (adr_range_dec (@pair block Z b i) (size_chunk ch)) (fun loc : address => yesat NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) sh loc) noat))) noghost) mf *)
split; [split|].
(* Goal: @app_pred rmap ag_rmap (@prop rmap ag_rmap (and (@eq nat (@Datatypes.length memval (encode_val ch v')) (size_chunk_nat ch)) (and (@eq val (decode_val ch (encode_val ch v')) v') (Z.divide (align_chunk ch) (@snd block Z (@pair block Z b i)))))) mf *)
(* Goal: @app_pred rmap ag_rmap (@allp rmap ag_rmap address (@jam rmap Join_rmap Perm_rmap ag_rmap Age_rmap address (adr_range (@pair block Z b i) (size_chunk ch)) (adr_range_dec (@pair block Z b i) (size_chunk ch)) (fun loc : address => yesat NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) sh loc) noat)) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
split3; auto.
(* Goal: @eq nat (@Datatypes.length memval (encode_val ch v')) (size_chunk_nat ch) *)
(* Goal: @app_pred rmap ag_rmap (@allp rmap ag_rmap address (@jam rmap Join_rmap Perm_rmap ag_rmap Age_rmap address (adr_range (@pair block Z b i) (size_chunk ch)) (adr_range_dec (@pair block Z b i) (size_chunk ch)) (fun loc : address => yesat NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) sh loc) noat)) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
apply encode_val_length.
(* Goal: @app_pred rmap ag_rmap (@jam rmap Join_rmap Perm_rmap ag_rmap Age_rmap address (adr_range (@pair block Z b i) (size_chunk ch)) (adr_range_dec (@pair block Z b i) (size_chunk ch)) (fun loc : address => yesat NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) sh loc) noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
intro loc. hnf.
(* Goal: if adr_range_dec (@pair block Z b i) (size_chunk ch) loc then @app_pred rmap ag_rmap (yesat NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) sh loc) mf else @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
if_tac. exists (writable0_readable wsh).
(* Goal: @app_pred rmap ag_rmap (yesat_raw NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) sh (@writable0_readable sh wsh) loc) mf *)
(* Goal: @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
hnf; rewrite H5.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
rewrite if_true; auto.
(* Goal: @eq resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES sh (@writable0_readable sh wsh) (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) (preds_fmap (approx (@level rmap ag_rmap mf)) (approx (@level rmap ag_rmap mf)) NoneP)) *)
(* Goal: @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
assert (STORE' := Mem.store_mem_contents _ _ _ _ _ _ STORE).
(* Goal: @eq resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES sh (@writable0_readable sh wsh) (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) (preds_fmap (approx (@level rmap ag_rmap mf)) (approx (@level rmap ag_rmap mf)) NoneP)) *)
(* Goal: @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
pose proof (juicy_mem_contents (store_juicy_mem jm m' ch b i v' STORE)).
(* Goal: @eq resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES sh (@writable0_readable sh wsh) (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) (preds_fmap (approx (@level rmap ag_rmap mf)) (approx (@level rmap ag_rmap mf)) NoneP)) *)
(* Goal: @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
pose proof (juicy_mem_access (store_juicy_mem jm m' ch b i v' STORE)).
(* Goal: @eq resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES sh (@writable0_readable sh wsh) (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) (preds_fmap (approx (@level rmap ag_rmap mf)) (approx (@level rmap ag_rmap mf)) NoneP)) *)
(* Goal: @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
pose proof (juicy_mem_max_access (store_juicy_mem jm m' ch b i v' STORE)).
(* Goal: @eq resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES sh (@writable0_readable sh wsh) (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) (preds_fmap (approx (@level rmap ag_rmap mf)) (approx (@level rmap ag_rmap mf)) NoneP)) *)
(* Goal: @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
pose proof I.
(* Goal: @eq resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES sh (@writable0_readable sh wsh) (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) (preds_fmap (approx (@level rmap ag_rmap mf)) (approx (@level rmap ag_rmap mf)) NoneP)) *)
(* Goal: @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
unfold contents_cohere in H10.
(* Goal: @eq resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES sh (@writable0_readable sh wsh) (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) (preds_fmap (approx (@level rmap ag_rmap mf)) (approx (@level rmap ag_rmap mf)) NoneP)) *)
(* Goal: @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
rewrite preds_fmap_NoneP.
(* Goal: @eq resource (YES (Share.lub (retainer_part sh) Share.Rsh) (@readable_share_lub (retainer_part sh) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES sh (@writable0_readable sh wsh) (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) i)) (encode_val ch v') Undef)) NoneP) *)
(* Goal: @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
f_equal.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
specialize (H8 loc). rewrite jam_true in H8 by auto.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
destruct H8. hnf in H8. rewrite H8. simpl; auto.
(* Goal: @eq resource (YES (Share.lub (retainer_part sh) Share.Rsh) (@readable_share_lub (retainer_part sh) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES sh (@writable0_readable sh wsh) (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) i)) (encode_val ch v') Undef)) NoneP) *)
(* Goal: @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
f_equal.
clear - STORE H9.
(* Goal: @eq resource (YES (Share.lub (retainer_part sh) Share.Rsh) (@readable_share_lub (retainer_part sh) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES sh (@writable0_readable sh wsh) (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) i)) (encode_val ch v') Undef)) NoneP) *)
(* Goal: @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
destruct loc as [b' z].
(* Goal: @eq resource (YES (Share.lub (retainer_part sh) Share.Rsh) (@readable_share_lub (retainer_part sh) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' (@pair block Z b' z))) NoneP) (YES sh (@writable0_readable sh wsh) (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z (@pair block Z b' z)) i)) (encode_val ch v') Undef)) NoneP) *)
(* Goal: @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
destruct H9.
(* Goal: @eq resource (YES (Share.lub (retainer_part sh) Share.Rsh) (@readable_share_lub (retainer_part sh) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' (@pair block Z b' z))) NoneP) (YES sh (@writable0_readable sh wsh) (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z (@pair block Z b' z)) i)) (encode_val ch v') Undef)) NoneP) *)
(* Goal: @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
subst b'.
(* Goal: @eq resource (YES (Share.lub (retainer_part sh) Share.Rsh) (@readable_share_lub (retainer_part sh) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' (@pair block Z b z))) NoneP) (YES sh (@writable0_readable sh wsh) (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z (@pair block Z b z)) i)) (encode_val ch v') Undef)) NoneP) *)
(* Goal: @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
rewrite (nth_getN m' b _ _ _ H0).
(* Goal: @eq resource (YES (Share.lub (retainer_part sh) Share.Rsh) (@readable_share_lub (retainer_part sh) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (@nth memval (nat_of_Z (Z.sub z i)) (getN (nat_of_Z (size_chunk ch)) i (@PMap.get (ZMap.t memval) b (mem_contents m'))) Undef)) NoneP) (YES sh (@writable0_readable sh wsh) (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z (@pair block Z b z)) i)) (encode_val ch v') Undef)) NoneP) *)
(* Goal: Z.ge (size_chunk ch) Z0 *)
(* Goal: @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
rewrite (store_mem_contents _ _ _ _ _ _ STORE).
(* Goal: @eq resource (YES (Share.lub (retainer_part sh) Share.Rsh) (@readable_share_lub (retainer_part sh) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (@nth memval (nat_of_Z (Z.sub z i)) (getN (nat_of_Z (size_chunk ch)) i (@PMap.get (ZMap.t memval) b (@PMap.set (ZMap.t memval) b (setN (encode_val ch v') i (@PMap.get (ZMap.t memval) b (mem_contents (m_dry jm)))) (mem_contents (m_dry jm))))) Undef)) NoneP) (YES sh (@writable0_readable sh wsh) (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z (@pair block Z b z)) i)) (encode_val ch v') Undef)) NoneP) *)
(* Goal: Z.ge (size_chunk ch) Z0 *)
(* Goal: @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
rewrite PMap.gss.
(* Goal: @eq resource (YES (Share.lub (retainer_part sh) Share.Rsh) (@readable_share_lub (retainer_part sh) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (@nth memval (nat_of_Z (Z.sub z i)) (getN (nat_of_Z (size_chunk ch)) i (setN (encode_val ch v') i (@PMap.get (ZMap.t memval) b (mem_contents (m_dry jm))))) Undef)) NoneP) (YES sh (@writable0_readable sh wsh) (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z (@pair block Z b z)) i)) (encode_val ch v') Undef)) NoneP) *)
(* Goal: Z.ge (size_chunk ch) Z0 *)
(* Goal: @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
replace (nat_of_Z (size_chunk ch)) with (size_chunk_nat ch) by (destruct ch; simpl; auto).
rewrite <- (encode_val_length ch v').
(* Goal: @eq resource (YES (Share.lub (retainer_part sh) Share.Rsh) (@readable_share_lub (retainer_part sh) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (@nth memval (nat_of_Z (Z.sub z i)) (getN (@Datatypes.length memval (encode_val ch v')) i (setN (encode_val ch v') i (@PMap.get (ZMap.t memval) b (mem_contents (m_dry jm))))) Undef)) NoneP) (YES sh (@writable0_readable sh wsh) (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z (@pair block Z b z)) i)) (encode_val ch v') Undef)) NoneP) *)
(* Goal: Z.ge (size_chunk ch) Z0 *)
(* Goal: @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
rewrite getN_setN_same.
(* Goal: @eq resource (YES (Share.lub (retainer_part sh) Share.Rsh) (@readable_share_lub (retainer_part sh) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (@nth memval (nat_of_Z (Z.sub z i)) (encode_val ch v') Undef)) NoneP) (YES sh (@writable0_readable sh wsh) (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z (@pair block Z b z)) i)) (encode_val ch v') Undef)) NoneP) *)
(* Goal: Z.ge (size_chunk ch) Z0 *)
(* Goal: @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
apply YES_ext.
(* Goal: @eq Share.t (Share.lub (retainer_part sh) Share.Rsh) sh *)
(* Goal: Z.ge (size_chunk ch) Z0 *)
(* Goal: @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
apply (writable0_lub_retainer_Rsh _ wsh).
(* Goal: Z.le (Ptrofs.unsigned o) (Ptrofs.unsigned o) *)
(* Goal: Z.lt (Ptrofs.unsigned o) (Z.add (Ptrofs.unsigned o) (size_chunk m)) *)
generalize (size_chunk_pos ch); omega.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
do 3 red. rewrite H5. rewrite if_false by auto.
(* Goal: @identity resource Join_resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
apply core_identity.
(* Goal: @identity resource Join_resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
simpl; rewrite Hg; apply core_identity.
Qed.

Ltac dec_enc :=
match goal with
[ |- decode_val ?CH _ = ?V] => assert (DE := decode_encode_val_general V CH CH);
                               apply decode_encode_val_similar in DE; auto
end.


Lemma load_cast:
 forall (t: type) (e2 : expr) (ch : memory_chunk) rho phi m,
   tc_val (typeof e2) (eval_expr e2 rho) ->
   denote_tc_assert (isCastResultType (typeof e2) t e2)
     rho phi ->
   access_mode t = By_value ch ->
   Val.load_result ch
     (force_val (Cop.sem_cast (eval_expr e2 rho) (typeof e2) t m)) =
   force_val (Cop.sem_cast (eval_expr e2 rho) (typeof e2) t m).
Proof.
(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
intros.
(* Goal: @eq Z (size_chunk ch) (@sizeof (@cenv_cs CS) t) *)
(* Goal: @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
assert (size_chunk ch = sizeof t). {
  clear - H1.
(* Goal: @eq resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) *)
(* Goal: @eq resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc))) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
  destruct t as [ | [ | | | ] [ | ] | [ | ] | [ | ] | | | | | ], ch; inv H1; reflexivity.
}
destruct ch;
 destruct t as [ | [ | | | ] [ | ] | [ | ] | [ | ] | | | | | ]; try solve [inv H1];
simpl in *; (*try destruct i; try destruct s; try destruct f;*)
 try solve [inv H1]; clear H1; destruct (eval_expr e2 rho);
 destruct (typeof e2) as [ | [ | | | ] [ | ] | [ | ] | [ | ] | | | | | ] ;
 try solve [inv H];
unfold Cop.sem_cast; simpl;
destruct Archi.ptr64 eqn:Hp;
try destruct (Float.to_int f);
try destruct (Float.to_intu f);
try destruct (Float.to_long f);
try destruct (Float.to_longu f);
try destruct (Float32.to_int f);
try destruct (Float32.to_intu f);
try destruct (Float32.to_long f);
try destruct (Float32.to_longu f);
 auto; simpl;
try solve [try rewrite Int.sign_ext_idem; auto; simpl; omega];
try rewrite Int.zero_ext_idem; auto; simpl; try omega;
try solve [simple_if_tac; auto].
Qed.


Lemma semax_store:
 forall Delta e1 e2 sh P,
   writable0_share sh ->
   semax Espec Delta
          (fun rho =>
          |> (tc_lvalue Delta e1 rho && tc_expr Delta (Ecast e2 (typeof e1)) rho  &&
             (mapsto_ sh (typeof e1) (eval_lvalue e1 rho) * P rho)))
          (Sassign e1 e2)
          (normal_ret_assert (fun rho => mapsto sh (typeof e1) (eval_lvalue e1 rho)
                                           (force_val (sem_cast  (typeof e2) (typeof e1) (eval_expr e2 rho))) * P rho)).
Proof.
intros until P. intros WS.
apply semax_pre with
  (fun rho : environ =>
   EX v3: val,
      |> tc_lvalue Delta e1 rho && |> tc_expr Delta (Ecast e2 (typeof e1)) rho &&
      |> (mapsto sh (typeof e1) (eval_lvalue e1 rho) v3 * P rho)).
(* Goal: @nonidentity Share.t Share.Join_ba pa_share sh3 *)
intro. apply andp_left2.
unfold mapsto_.
apply exp_right with Vundef.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
repeat rewrite later_andp; auto.
apply extract_exists_pre; intro v3.
apply semax_straight_simple; auto.
intros jm jm1 Delta' ge ve te rho k F TS [TC1 TC2] TC4 Hcl Hge Hage [H0 H0'] HGG'.
specialize (TC1 (m_phi jm1) (age_laterR (age_jm_phi Hage))).
specialize (TC2 (m_phi jm1) (age_laterR (age_jm_phi Hage))).
assert (typecheck_environ Delta rho) as TC.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
{ destruct TC4. eapply typecheck_environ_sub; eauto. } 
pose proof TC1 as TC1'.
pose proof TC2 as TC2'.
apply (tc_lvalue_sub _ _ _ TS) in TC1'; [| auto].
apply (tc_expr_sub _ _ _ TS) in TC2'; [| auto].
unfold tc_expr in TC2, TC2'; simpl in TC2, TC2'.
rewrite denote_tc_assert_andp in TC2, TC2'.
simpl in TC2,TC2'; super_unfold_lift.
destruct TC2 as [TC2 TC3].
destruct TC2' as [TC2' TC3'].
apply later_sepcon2 in H0.
specialize (H0 _ (age_laterR (age_jm_phi Hage))).
(* Goal: @eq resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES sh (@writable0_readable sh wsh) (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) (preds_fmap (approx (@level rmap ag_rmap mf)) (approx (@level rmap ag_rmap mf)) NoneP)) *)
(* Goal: @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
pose proof I.
destruct H0 as [?w [?w [? [? [?w [?w [H3 [H4 H5]]]]]]]].
unfold mapsto in H4.
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
revert H4; case_eq (access_mode (typeof e1)); intros; try contradiction.
rename H2 into Hmode. rename m into ch.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
destruct (eval_lvalue_relate _ _ _ _ _ e1 jm1 HGG' Hge (guard_environ_e1 _ _ _ TC4)) as [b0 [i [He1 He1']]]; auto.
(*rewrite <- (age_jm_dry H) in He1'.*)
rewrite He1' in *.
destruct (join_assoc H3 (join_comm H0)) as [?w [H6 H7]].
(* rewrite writable0_share_right in H4 by auto. *)
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
destruct (type_is_volatile (typeof e1)) eqn:NONVOL; try contradiction.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
rewrite if_true in H4 by auto.
assert (exists v, address_mapsto ch v 
             sh (*(Share.lub (retainer_part sh) Share.Rsh)*)
        (b0, Ptrofs.unsigned i) w1)
       by (destruct H4 as [[H4' H4] |[? [? ?]]]; eauto).
clear v3 H4; destruct H2 as [v3 H4].

assert (H11': (res_predicates.address_mapsto ch v3 sh
        (b0, Ptrofs.unsigned i) * TT)%pred (m_phi jm1))
 by (exists w1; exists w3; split3; auto).
assert (H11: (res_predicates.address_mapsto ch v3  sh
        (b0, Ptrofs.unsigned i) * exactly w3)%pred (m_phi jm1)).
(* Goal: @nonidentity Share.t Share.Join_ba pa_share sh3 *)
generalize (address_mapsto_precise ch v3 sh (b0,Ptrofs.unsigned i)); unfold precise; intro.
destruct H11' as [m7 [m8 [? [? _]]]].
specialize (H2 (m_phi jm1) _ _ H4 H9).
spec H2; [ eauto with typeclass_instances| ].
spec H2; [ eauto with typeclass_instances | ].
subst m7.
(* Goal: @app_pred rmap ag_rmap (@jam rmap Join_rmap Perm_rmap ag_rmap Age_rmap address (adr_range (@pair block Z b i) (size_chunk ch)) (adr_range_dec (@pair block Z b i) (size_chunk ch)) (fun loc : address => yesat NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) sh loc) noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
exists w1; exists w3; split3; auto. hnf. apply necR_refl.
apply address_mapsto_can_store 
   with (v':=((force_val (Cop.sem_cast (eval_expr e2 rho) (typeof e2) (typeof e1) (m_dry jm1))))) in H11;
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
  auto.
(* Goal: @eq Z (size_chunk ch) (@sizeof (@cenv_cs CS) t) *)
(* Goal: @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
2: {
  unfold typecheck_store in *.
  destruct TC4 as [TC4 _].
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
  simpl in TC2'. apply typecheck_expr_sound in TC2'; auto.
  remember (eval_expr e2 rho).
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
  dec_enc. rewrite DE. clear DE. subst. 
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
  eapply load_cast; eauto.
}
destruct H11 as [m' [H11 AM]].
exists (store_juicy_mem _ _ _ _ _ _ H11).
(* Goal: @app_pred rmap ag_rmap (@prop rmap ag_rmap (and (@eq nat (@Datatypes.length memval (encode_val ch v')) (size_chunk_nat ch)) (and (@eq val (decode_val ch (encode_val ch v')) v') (Z.divide (align_chunk ch) (@snd block Z (@pair block Z b i)))))) mf *)
(* Goal: @app_pred rmap ag_rmap (@allp rmap ag_rmap address (@jam rmap Join_rmap Perm_rmap ag_rmap Age_rmap address (adr_range (@pair block Z b i) (size_chunk ch)) (adr_range_dec (@pair block Z b i) (size_chunk ch)) (fun loc : address => yesat NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) sh loc) noat)) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
exists (te);  exists rho; split3; auto.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
subst; simpl; auto.
rewrite level_store_juicy_mem. apply age_level; auto.
(* Goal: @app_pred rmap ag_rmap (@andp rmap ag_rmap (@prop rmap ag_rmap (guard_environ Delta' (current_function k) (construct_rho (filter_genv psi) ve te'))) (proj_ret_assert (frame_ret_assert (normal_ret_assert Q) F) EK_normal (@None val) (construct_rho (filter_genv psi) ve te'))) (m_phi jm') *)
(* Goal: @jm_bupd (@OK_ty Espec) ora (@jsafeN_ genv corestate (@OK_ty Espec) (fun ge : genv => @genv_symb_injective fundef type (genv_genv ge)) (cl_core_sem psi) (@OK_spec Espec) psi (@level juicy_mem juicy_mem_ageable jm1) ora (State ve te' k)) jm' *)
split; auto.
split.
(* Goal: @app_pred rmap ag_rmap (@prop rmap ag_rmap (and (@eq nat (@Datatypes.length memval (encode_val ch v')) (size_chunk_nat ch)) (and (@eq val (decode_val ch (encode_val ch v')) v') (Z.divide (align_chunk ch) (@snd block Z (@pair block Z b i)))))) mf *)
(* Goal: @app_pred rmap ag_rmap (@allp rmap ag_rmap address (@jam rmap Join_rmap Perm_rmap ag_rmap Age_rmap address (adr_range (@pair block Z b i) (size_chunk ch)) (adr_range_dec (@pair block Z b i) (size_chunk ch)) (fun loc : address => yesat NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) sh loc) noat)) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
split3; auto.
(* Goal: @nonidentity Share.t Share.Join_ba pa_share sh3 *)
generalize (eval_expr_relate _ _ _ _ _ e2 jm1 HGG' Hge (guard_environ_e1 _ _ _ TC4)); intro.
spec H2; [ assumption | ].
rewrite <- (age_jm_dry Hage) in H2, He1.
econstructor; try eassumption.
unfold tc_lvalue in TC1. simpl in TC1.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
auto.
instantiate (1:=(force_val (Cop.sem_cast (eval_expr e2 rho) (typeof e2) (typeof e1) (m_dry jm)))).
rewrite (age_jm_dry Hage).
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
rewrite cop2_sem_cast'; auto.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
2: eapply typecheck_expr_sound; eauto.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
eapply cast_exists; eauto. destruct TC4; auto.
eapply Clight.assign_loc_value.
apply Hmode.
unfold tc_lvalue in TC1. simpl in TC1.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
auto.
unfold Mem.storev.
simpl m_dry.
rewrite (age_jm_dry Hage).
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
auto.
apply (resource_decay_trans _ (nextblock (m_dry jm1)) _ (m_phi jm1)).
(* Goal: Z.le (Ptrofs.unsigned o) (Ptrofs.unsigned o) *)
(* Goal: Z.lt (Ptrofs.unsigned o) (Z.add (Ptrofs.unsigned o) (size_chunk m)) *)
rewrite (age_jm_dry Hage); xomega.
apply (age1_resource_decay _ _ Hage).
apply resource_nodecay_decay.
apply juicy_store_nodecay.
(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
{intros.
 clear - H11' H2 WS.
 destruct H11' as [phi1 [phi2 [? [? ?]]]].
 destruct H0 as [bl [[_ ?] Hg]]. specialize  (H0 (b0,z)).
 hnf in H0. rewrite if_true in H0 by (split; auto; omega).
(* Goal: match resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o)) as anonymous' return (forall _ : @eq resource anonymous' (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))), Prop) with | NO sh wildcard' => fun _ : @eq resource (NO sh wildcard') (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => @nonidentity Share.t Share.Join_ba pa_share sh | YES wildcard' wildcard'0 wildcard'1 pp => fun _ : @eq resource (YES wildcard' wildcard'0 wildcard'1 pp) (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => True | PURE k p => fun _ : @eq resource (PURE k p) (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => False end (@eq_refl resource (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o)))) *)
 destruct H0. hnf in H0.
 apply (resource_at_join _ _ _ (b0,z)) in H.
 rewrite H0 in H.
 inv H; simpl; apply join_writable01 in RJ; auto;
 unfold perm_of_sh; rewrite if_true by auto; if_tac; constructor. 
}
rewrite level_store_juicy_mem. split; [apply age_level; auto|].
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
simpl. unfold inflate_store; rewrite ghost_of_make_rmap.
apply age1_ghost_of, age_jm_phi; auto.
split.
(* Goal: @eq Z (size_chunk ch) (@sizeof (@cenv_cs CS) t) *)
(* Goal: @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
2 : {
      rewrite corable_funassert.
      replace (core  (m_phi (store_juicy_mem _ _ _ _ _ _ H11))) with (core (m_phi jm1)).
      rewrite <- corable_funassert.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
      eapply pred_hereditary; eauto. apply age_jm_phi; auto.
(* Goal: @eq nat (@level juicy_mem juicy_mem_ageable jm) (@level rmap ag_rmap (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @eq nat (@level rmap ag_rmap m2) (@level rmap ag_rmap (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: forall loc : AV.address, @join resource Join_resource (resource_at mf loc) (resource_at m2 loc) (resource_at (m_phi (store_juicy_mem jm m' ch b i v' STORE)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
      symmetry.
      forget (force_val (Cop.sem_cast (eval_expr e2 rho) (typeof e2) (typeof e1) (m_dry jm1))) as v.
      apply rmap_ext.
      do 2 rewrite level_core.
      rewrite <- level_juice_level_phi; rewrite level_store_juicy_mem.
(* Goal: @eq resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) *)
(* Goal: @eq resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc))) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
      reflexivity.
(* Goal: @app_pred rmap ag_rmap (@allp rmap ag_rmap address (@jam rmap Join_rmap Perm_rmap ag_rmap Age_rmap address (adr_range (@pair block Z b i) (size_chunk ch)) (adr_range_dec (@pair block Z b i) (size_chunk ch)) (fun loc : address => yesat NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) sh loc) noat)) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
      intro loc.
      unfold store_juicy_mem.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
      simpl. rewrite <- core_resource_at. unfold inflate_store. simpl.
      rewrite resource_at_make_rmap. rewrite <- core_resource_at.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
      case_eq (m_phi jm1 @ loc); intros; auto.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
      destruct k0; simpl; repeat rewrite core_YES; auto.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
      simpl.
      rewrite !ghost_of_core.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
      unfold inflate_store; rewrite ghost_of_make_rmap; auto.
}
rewrite sepcon_comm.
rewrite sepcon_assoc.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
eapply sepcon_derives; try apply AM; auto.
unfold mapsto.
destruct TC4 as [TC4 _].

rewrite Hmode.
rewrite He1'. 
*
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
rewrite cop2_sem_cast'; auto.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
2: eapply typecheck_expr_sound; eauto.
rewrite NONVOL.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
rewrite if_true by auto.
apply orp_right1.
apply andp_right.
(* Goal: @app_pred A AG (@box A AG (@extendM A JA PA AG Aga) (@sepcon A JA PA AG Aga P (@TT A AG))) a *)
intros ? ?.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
eapply tc_val_sem_cast; eauto.
(* Goal: @app_pred A AG (@box A AG (@extendM A JA PA AG Aga) (@sepcon A JA PA AG Aga P (@TT A AG))) a *)
intros ? ?. apply H2.
*
(* Goal: @app_pred A AG (@box A AG (@extendM A JA PA AG Aga) (@sepcon A JA PA AG Aga P (@TT A AG))) a *)
intros ? ?.
do 3 red in H2.
destruct (nec_join2 H6 H2) as [w2' [w' [? [? ?]]]].
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
exists w2'; exists w'; split3; auto; eapply pred_nec_hereditary; eauto.
Qed.

Lemma semax_set_forward_nl:
forall (Delta: tycontext) (P: assert) id e v t,
    typeof_temp Delta id = Some t ->
    (forall rho, P rho |-- rel_expr e v rho) ->
    tc_val t v ->
    semax Espec Delta
        (fun rho => |> (P rho))
          (Sset id e)
        (normal_ret_assert
          (fun rho => (EX old:val, !! (v = eval_id id rho) && subst id old P rho))).
Proof.
(* Goal: @eq resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES sh (@writable0_readable sh wsh) (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) (preds_fmap (approx (@level rmap ag_rmap mf)) (approx (@level rmap ag_rmap mf)) NoneP)) *)
(* Goal: @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
intros until 1; pose proof I. intros H2 H1.
apply semax_pre with (fun rho => (fun _ => TT) rho && |> P rho).
1: intros; normalize.
apply semax_straight_simple; auto.
intros jm jm' Delta' ge vx tx rho k F TS _ TC' Hcl Hge ? ? HGG'.
apply (typeof_temp_sub _ _ TS) in H.
exists jm', (PTree.set id v (tx)).
econstructor.
split; [reflexivity |].
split3; [apply age_level; auto | |].
+ normalize in H0.
  clear - TC' Hge H H1.
  simpl in *. simpl. rewrite <- map_ptree_rel.
  apply guard_environ_put_te'; auto.
  - subst; simpl in *.
    unfold construct_rho in *; auto.
(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
  - intros. simpl in *. unfold typecheck_temp_id in *.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
    unfold typeof_temp in H. rewrite H0 in H. simpl. inv H.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
    apply tc_val_tc_val'; auto.
+ split.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
  - simpl.
    split; [| split; [| split]].
    2: apply age1_resource_decay; auto.
    2: apply age_level; auto.
    2: apply age1_ghost_of, age_jm_phi; auto.
    destruct (age1_juicy_mem_unpack _ _ H3).
    rewrite <- H6.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
    econstructor; eauto.
    destruct H4 as [H4 _].
    apply later_sepcon2 in H4.
    specialize (H4 _ (age_laterR H5)).
    destruct H4 as [w1 [w2 [? [_ ?]]]].
(* Goal: @join resource Join_resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join resource Join_resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_at m2 loc) (resource_at (inflate_store m' (m_phi jm)) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
    specialize (H2 _ _ H7). rewrite H6.
    pose proof (boxy_e _ _ (rel_expr_extend e v rho) w2 (m_phi jm')).
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
    eapply rel_expr_relate; try eassumption; eauto.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
    apply H8; auto.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
    exists w1; auto.
  - split.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
    2: eapply pred_hereditary; try apply H4; destruct (age1_juicy_mem_unpack _ _ H3); auto.
    assert (app_pred (|>  (F rho * P rho)) (m_phi jm)).
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
    1: rewrite later_sepcon; eapply sepcon_derives; try apply H4; auto.
    assert (laterR (m_phi jm) (m_phi jm')).
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
    1: constructor 1; destruct (age1_juicy_mem_unpack _ _ H3); auto.
    specialize (H5 _ H6).
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
    eapply sepcon_derives; try apply H5; auto.
    * clear - Hcl Hge.
      rewrite <- map_ptree_rel.
      specialize (Hcl rho (Map.set id v (make_tenv tx))).
      rewrite <- Hcl; auto.
(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
      intros.
      destruct (Pos.eq_dec id i).
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
     ++ subst.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
        left. unfold modifiedvars. simpl.
        unfold insert_idset; rewrite PTree.gss; hnf; auto.
     ++ right.
        rewrite Map.gso; auto. subst; auto.
    * apply exp_right with (eval_id id rho).
      rewrite <- map_ptree_rel.
      assert (env_set
               (mkEnviron (ge_of rho) (ve_of rho)
                  (Map.set id v (make_tenv tx))) id (eval_id id rho) = rho).
(* Goal: @eq Z (size_chunk ch) (@sizeof (@cenv_cs CS) t) *)
(* Goal: @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
      {
        unfold env_set;
(* Goal: @eq resource (YES (Share.lub (retainer_part sh) Share.Rsh) (@readable_share_lub (retainer_part sh) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES sh (@writable0_readable sh wsh) (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) i)) (encode_val ch v') Undef)) NoneP) *)
(* Goal: @app_pred rmap ag_rmap (noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
        f_equal.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
        unfold eval_id; simpl.
        rewrite Map.override.
        rewrite Map.override_same. subst; auto.
        rewrite Hge in TC'.
        destruct TC' as [TC' _].
        destruct TC' as [TC' _]. unfold typecheck_temp_environ in *.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
        rewrite Hge. simpl.
        unfold typeof_temp in H.
        destruct ((temp_types Delta') ! id) eqn:?; inv H.
        specialize (TC' _ _ Heqo). destruct TC' as [? [? ?]].
(* Goal: @eq resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) *)
(* Goal: @eq resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc))) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
        simpl in H. rewrite H. reflexivity.
      }
      apply andp_right.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
     ++ intros ? _. simpl.
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
        unfold subst.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
        unfold eval_id at 1. unfold force_val; simpl.
        rewrite Map.gss. auto.
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
     ++ unfold subst. rewrite H7.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
        auto.
Qed.

Lemma semax_loadstore:
 forall v0 v1 v2 (Delta: tycontext) e1 e2 sh P P',
   writable0_share sh ->
   (forall rho, P rho |-- !! (tc_val (typeof e1) v2)
                                    && rel_lvalue e1 v1 rho
                                    && rel_expr (Ecast e2 (typeof e1)) v2 rho
                                    && (mapsto sh (typeof e1) v1 v0 * P' rho)) ->
   semax Espec Delta (fun rho => |> P rho) (Sassign e1 e2)
          (normal_ret_assert (fun rho => mapsto sh (typeof e1) v1 v2 * P' rho)).
Proof.
intros until 1.
intro E.
apply semax_pre with (fun rho => TT && |> P rho).
(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
intros. apply andp_left2; apply andp_right; auto.
apply semax_straight_simple; auto.

intros jm jm1 Delta' ge ve te rho k F TS _ TC4 Hcl Hge Hage [H0 H0'] HGG'.
apply later_sepcon2 in H0.
specialize (H0 _ (age_laterR (age_jm_phi Hage))).
destruct H0 as [?w [?w [? [? ?]]]].
specialize (E _ _ H2).
destruct E as [[[E4 E1] E2] E3].
do 3 red in E4.
apply (boxy_e _ _ (rel_lvalue_extend e1 v1 rho) _ (m_phi jm1) )  in E1;
 [ | econstructor; eauto].
apply (boxy_e _ _ (rel_expr_extend _ _ rho) _ (m_phi jm1) )  in E2;
 [ | econstructor; eauto].
destruct E3 as [?w [?w [H3 [H4 H5]]]].
clear P H2.
unfold mapsto in H4.
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
revert H4; case_eq (access_mode (typeof e1)); intros; try contradiction.
rename H2 into Hmode. rename m into ch.
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
destruct (type_is_volatile (typeof e1)) eqn:NONVOL; try contradiction.
(* Goal: perm_order' (@None permission) Nonempty *)
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
destruct v1; try contradiction.
rename i into z. rename b into b0.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
rewrite if_true in H4 by auto.
assert (exists v, address_mapsto ch v sh (b0, Ptrofs.unsigned z) w1)
  by (destruct H4 as [[? H4] | [_ [? ?]]]; eauto).
clear v0 H4; destruct H2 as [v3 H4].
assert (He1 := rel_lvalue_relate ge te ve rho e1 _ _ _ HGG' Hge E1).
rename z into i.
assert (He2 := rel_expr_relate ge te ve rho _ _ _ HGG' Hge E2).
destruct (join_assoc H3 (join_comm H0)) as [?w [H6 H7]].

assert (H11': (res_predicates.address_mapsto ch v3 sh
        (b0, Ptrofs.unsigned i) * TT)%pred (m_phi jm1))
 by (exists w1; exists w3; split3; auto).
assert (H11: (res_predicates.address_mapsto ch v3  sh
        (b0, Ptrofs.unsigned i) * exactly w3)%pred (m_phi jm1)).
(* Goal: @nonidentity Share.t Share.Join_ba pa_share sh3 *)
generalize (address_mapsto_precise ch v3 sh (b0,Ptrofs.unsigned i)); unfold precise; intro.
destruct H11' as [m7 [m8 [? [? _]]]].
specialize (H2 (m_phi jm1) _ _ H4 H9).
spec H2; [ eauto with typeclass_instances| ].
spec H2; [ eauto with typeclass_instances | ].
subst m7.
(* Goal: @app_pred rmap ag_rmap (@jam rmap Join_rmap Perm_rmap ag_rmap Age_rmap address (adr_range (@pair block Z b i) (size_chunk ch)) (adr_range_dec (@pair block Z b i) (size_chunk ch)) (fun loc : address => yesat NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) sh loc) noat loc) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
exists w1; exists w3; split3; auto. hnf. apply necR_refl.
apply address_mapsto_can_store 
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
  with (v':=v2) in H11; auto.
(* Goal: @eq Z (size_chunk ch) (@sizeof (@cenv_cs CS) t) *)
(* Goal: @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
2 : {
      clear - He2  Hmode.
      dec_enc; rewrite DE; clear DE.
      inv He2.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
      eapply sem_cast_load_result; eauto.
(* Goal: @eq bool (Mem.valid_pointer (m_dry jm) b (Ptrofs.unsigned o)) true *)
      simpl in H0.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
      eapply deref_loc_load_result; eauto. }
destruct H11 as [m' [H11 AM]].
exists (store_juicy_mem _ _ _ _ _ _ H11).
(* Goal: @app_pred rmap ag_rmap (@prop rmap ag_rmap (and (@eq nat (@Datatypes.length memval (encode_val ch v')) (size_chunk_nat ch)) (and (@eq val (decode_val ch (encode_val ch v')) v') (Z.divide (align_chunk ch) (@snd block Z (@pair block Z b i)))))) mf *)
(* Goal: @app_pred rmap ag_rmap (@allp rmap ag_rmap address (@jam rmap Join_rmap Perm_rmap ag_rmap Age_rmap address (adr_range (@pair block Z b i) (size_chunk ch)) (adr_range_dec (@pair block Z b i) (size_chunk ch)) (fun loc : address => yesat NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) sh loc) noat)) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
exists (te);  exists rho; split3; auto.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
subst; simpl; auto.
rewrite level_store_juicy_mem. apply age_level; auto.
(* Goal: @app_pred rmap ag_rmap (@andp rmap ag_rmap (@prop rmap ag_rmap (guard_environ Delta' (current_function k) (construct_rho (filter_genv psi) ve te'))) (proj_ret_assert (frame_ret_assert (normal_ret_assert Q) F) EK_normal (@None val) (construct_rho (filter_genv psi) ve te'))) (m_phi jm') *)
(* Goal: @jm_bupd (@OK_ty Espec) ora (@jsafeN_ genv corestate (@OK_ty Espec) (fun ge : genv => @genv_symb_injective fundef type (genv_genv ge)) (cl_core_sem psi) (@OK_spec Espec) psi (@level juicy_mem juicy_mem_ageable jm1) ora (State ve te' k)) jm' *)
split; auto.
split.
(* Goal: @app_pred rmap ag_rmap (@prop rmap ag_rmap (and (@eq nat (@Datatypes.length memval (encode_val ch v')) (size_chunk_nat ch)) (and (@eq val (decode_val ch (encode_val ch v')) v') (Z.divide (align_chunk ch) (@snd block Z (@pair block Z b i)))))) mf *)
(* Goal: @app_pred rmap ag_rmap (@allp rmap ag_rmap address (@jam rmap Join_rmap Perm_rmap ag_rmap Age_rmap address (adr_range (@pair block Z b i) (size_chunk ch)) (adr_range_dec (@pair block Z b i) (size_chunk ch)) (fun loc : address => yesat NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) sh loc) noat)) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
split3; auto.
(* Goal: @eq Z (size_chunk ch) (@sizeof (@cenv_cs CS) t) *)
(* Goal: @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
{
 inv He2.
 * econstructor; try eassumption.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
    rewrite (age_jm_dry Hage); eauto.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
    rewrite (age_jm_dry Hage); eauto.
    replace (m_dry jm) with (m_dry jm1); [eassumption |].
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
    symmetry; apply age_jm_dry; auto.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
    simpl.
    eapply Clight.assign_loc_value.
    apply Hmode.
    unfold Mem.storev.
    simpl m_dry.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
    rewrite (age_jm_dry Hage); auto.
 * inv H2.
}
apply (resource_decay_trans _ (nextblock (m_dry jm1)) _ (m_phi jm1)).
(* Goal: Z.le (Ptrofs.unsigned o) (Ptrofs.unsigned o) *)
(* Goal: Z.lt (Ptrofs.unsigned o) (Z.add (Ptrofs.unsigned o) (size_chunk m)) *)
rewrite (age_jm_dry Hage); xomega.
apply (age1_resource_decay _ _ Hage).
apply resource_nodecay_decay.
apply juicy_store_nodecay.
(* Goal: forall (t : type) (e2 : expr) (ch : memory_chunk) (rho : environ) (phi : rmap) (m : mem) (_ : tc_val (typeof e2) (@eval_expr CS e2 rho)) (_ : @app_pred rmap ag_rmap (@denote_tc_assert CS (@isCastResultType CS (typeof e2) t e2) rho) phi) (_ : @eq mode (access_mode t) (By_value ch)), @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
{intros.
 clear - H11' H2 H. rename H into wsh.
 destruct H11' as [phi1 [phi2 [? [? ?]]]].
 destruct H0 as [bl [[_ ?] Hg]]. specialize  (H0 (b0,z)).
 hnf in H0. rewrite if_true in H0 by (split; auto; omega).
(* Goal: match resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o)) as anonymous' return (forall _ : @eq resource anonymous' (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))), Prop) with | NO sh wildcard' => fun _ : @eq resource (NO sh wildcard') (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => @nonidentity Share.t Share.Join_ba pa_share sh | YES wildcard' wildcard'0 wildcard'1 pp => fun _ : @eq resource (YES wildcard' wildcard'0 wildcard'1 pp) (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => True | PURE k p => fun _ : @eq resource (PURE k p) (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o))) => False end (@eq_refl resource (resource_at (m_phi jm) (@pair block Z b (Ptrofs.unsigned o)))) *)
 destruct H0. hnf in H0.
 apply (resource_at_join _ _ _ (b0,z)) in H.
 rewrite H0 in H.
 inv H; simpl; apply join_writable01 in RJ; auto; unfold perm_of_sh; rewrite if_true by auto; if_tac; constructor.
}
rewrite level_store_juicy_mem. split; [apply age_level; auto|].
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
simpl.
(* Goal: @join ghost ghost_join (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) (ghost_of m2) (ghost_of (inflate_store m' (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
unfold inflate_store; rewrite ghost_of_make_rmap.
apply age1_ghost_of, age_jm_phi; auto.
split.
(* Goal: @eq Z (size_chunk ch) (@sizeof (@cenv_cs CS) t) *)
(* Goal: @eq val (Val.load_result ch (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m))) (force_val (Cop.sem_cast (@eval_expr CS e2 rho) (typeof e2) t m)) *)
2: {
     rewrite corable_funassert.
     replace (core  (m_phi (store_juicy_mem _ _ _ _ _ _ H11))) with (core (m_phi jm1)).
     rewrite <- corable_funassert.
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
     eapply pred_hereditary; eauto. apply age_jm_phi; auto.
     apply rmap_ext.
     do 2 rewrite level_core.
     rewrite <- !level_juice_level_phi;
       rewrite level_store_juicy_mem.
(* Goal: @eq resource (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) (YES (Share.lub (res_retain (resource_at m1 loc)) Share.Rsh) (@readable_share_lub (res_retain (resource_at m1 loc)) Share.Rsh (@writable0_readable Share.Rsh writable0_Rsh)) (VAL (contents_at m' loc)) NoneP) *)
(* Goal: @eq resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc))) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
     reflexivity.
(* Goal: @app_pred rmap ag_rmap (@allp rmap ag_rmap address (@jam rmap Join_rmap Perm_rmap ag_rmap Age_rmap address (adr_range (@pair block Z b i) (size_chunk ch)) (adr_range_dec (@pair block Z b i) (size_chunk ch)) (fun loc : address => yesat NoneP (VAL (@nth memval (nat_of_Z (Z.sub (@snd block Z loc) (@snd block Z (@pair block Z b i)))) (encode_val ch v') Undef)) sh loc) noat)) mf *)
(* Goal: @app_pred rmap ag_rmap noghost mf *)
     intro loc.
     unfold store_juicy_mem.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
     simpl. rewrite <- !core_resource_at. unfold inflate_store. simpl.
(* Goal: @join resource Join_resource (@core resource Join_resource Sep_resource (resource_at (m_phi jm) loc)) (resource_at (m_phi jm) loc) (resource_at (@proj1_sig rmap (fun phi : rmap => and (@eq nat (@level rmap ag_rmap phi) (@level rmap ag_rmap (m_phi jm))) (and (@eq (forall _ : AV.address, resource) (resource_at phi) (fun loc : AV.address => match resource_at (m_phi jm) loc with | NO sh n => resource_at (m_phi jm) loc | YES sh rsh (VAL m0 as k) p => YES sh rsh (VAL (contents_at m' loc)) NoneP | YES sh rsh (LK n i as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) loc) | YES sh rsh (FUN f c as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) loc) | PURE k p => resource_at (m_phi jm) loc end)) (@eq ghost (ghost_of phi) (ghost_of (m_phi jm))))) (make_rmap (fun loc : AV.address => match resource_at (m_phi jm) loc with | NO sh n => resource_at (m_phi jm) loc | YES sh rsh (VAL m0 as k) p => YES sh rsh (VAL (contents_at m' loc)) NoneP | YES sh rsh (LK n i as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) loc) | YES sh rsh (FUN f c as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) loc) | PURE k p => resource_at (m_phi jm) loc end) (ghost_of (m_phi jm)) (@level rmap ag_rmap (m_phi jm)) (@functional_extensionality AV.address resource (fun x : AV.address => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) match resource_at (m_phi jm) x with | NO sh n => resource_at (m_phi jm) x | YES sh rsh (VAL m0 as k) p => YES sh rsh (VAL (contents_at m' x)) NoneP | YES sh rsh (LK n i as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) x) | YES sh rsh (FUN f c as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) x) | PURE k p => resource_at (m_phi jm) x end) (fun loc : AV.address => match resource_at (m_phi jm) loc with | NO sh n => resource_at (m_phi jm) loc | YES sh rsh (VAL m0 as k) p => YES sh rsh (VAL (contents_at m' loc)) NoneP | YES sh rsh (LK n i as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) loc) | YES sh rsh (FUN f c as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) loc) | PURE k p => resource_at (m_phi jm) loc end) (fun l : AV.address => let (b, ofs) as p return (@eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) match resource_at (m_phi jm) p with | NO sh n => resource_at (m_phi jm) p | YES sh rsh (VAL m0 as k) p0 => YES sh rsh (VAL (contents_at m' p)) NoneP | YES sh rsh (LK n i as k) p0 => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) p) | YES sh rsh (FUN f c as k) p0 => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) p) | PURE k p0 => resource_at (m_phi jm) p end) match resource_at (m_phi jm) p with | NO sh n => resource_at (m_phi jm) p | YES sh rsh (VAL m0 as k) p0 => YES sh rsh (VAL (contents_at m' p)) NoneP | YES sh rsh (LK n i as k) p0 => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) p) | YES sh rsh (FUN f c as k) p0 => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (resource_at (m_phi jm) p) | PURE k p0 => resource_at (m_phi jm) p end) := l in match resource_at (m_phi jm) (@pair block Z b ofs) as r return (forall _ : @eq resource r (resource_at (m_phi jm) (@pair block Z b ofs)), @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) match r with | NO sh n => r | YES sh rsh (VAL m0 as k) p => YES sh rsh (VAL (contents_at m' (@pair block Z b ofs))) NoneP | YES sh rsh (LK n i as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) r | YES sh rsh (FUN f c as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) r | PURE k p => r end) match r with | NO sh n => r | YES sh rsh (VAL m0 as k) p => YES sh rsh (VAL (contents_at m' (@pair block Z b ofs))) NoneP | YES sh rsh (LK n i as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) r | YES sh rsh (FUN f c as k) p => resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) r | PURE k p => r end) with | NO sh n => fun _ : @eq resource (NO sh n) (resource_at (m_phi jm) (@pair block Z b ofs)) => @eq_refl resource (NO sh n) | YES sh r k p => fun HeqHPHI : @eq resource (YES sh r k p) (resource_at (m_phi jm) (@pair block Z b ofs)) => match k as k0 return (forall _ : @eq resource (YES sh r k0 p) (resource_at (m_phi jm) (@pair block Z b ofs)), @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) match k0 with | VAL m0 => YES sh r (VAL (contents_at m' (@pair block Z b ofs))) NoneP | LK n i => YES sh r k0 (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p) | FUN f c => YES sh r k0 (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p) end) match k0 with | VAL m0 => YES sh r (VAL (contents_at m' (@pair block Z b ofs))) NoneP | LK n i => YES sh r k0 (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p) | FUN f c => YES sh r k0 (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p) end) with | VAL m0 => fun _ : @eq resource (YES sh r (VAL m0) p) (resource_at (m_phi jm) (@pair block Z b ofs)) => @eq_ind_r preds NoneP (fun p0 : preds => @eq resource (YES sh r (VAL (contents_at m' (@pair block Z b ofs))) p0) (YES sh r (VAL (contents_at m' (@pair block Z b ofs))) NoneP)) (@eq_refl resource (YES sh r (VAL (contents_at m' (@pair block Z b ofs))) NoneP)) (SomeP (ConstType unit) (fun _ : list Type => tt)) (preds_fmap_NoneP (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm)))) | LK n i => fun _ : @eq resource (YES sh r (LK n i) p) (resource_at (m_phi jm) (@pair block Z b ofs)) => @eq_ind_r preds (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p) (fun p0 : preds => @eq resource (YES sh r (LK n i) p0) (YES sh r (LK n i) (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p))) (@eq_refl resource (YES sh r (LK n i) (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p))) (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p)) (approx_map_idem (@level rmap ag_rmap (m_phi jm)) p) | FUN f c => fun _ : @eq resource (YES sh r (FUN f c) p) (resource_at (m_phi jm) (@pair block Z b ofs)) => @eq_ind_r preds (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p) (fun p0 : preds => @eq resource (YES sh r (FUN f c) p0) (YES sh r (FUN f c) (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p))) (@eq_refl resource (YES sh r (FUN f c) (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p))) (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (preds_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) p)) (approx_map_idem (@level rmap ag_rmap (m_phi jm)) p) end HeqHPHI | PURE k p => fun HeqHPHI : @eq resource (PURE k p) (resource_at (m_phi jm) (@pair block Z b ofs)) => @eq_ind_r resource (resource_at (m_phi jm) (@pair block Z b ofs)) (fun r : resource => @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) r) r) (resource_at_approx (m_phi jm) (@pair block Z b ofs)) (PURE k p) HeqHPHI end (@eq_refl resource (resource_at (m_phi jm) (@pair block Z b ofs))))) (ghost_of_approx (m_phi jm)))) loc) *)
(* Goal: @join ghost ghost_join (ghost_of mf) (ghost_of m2) (ghost_of (m_phi (store_juicy_mem jm m' ch b i v' STORE))) *)
(* Goal: @app_pred rmap ag_rmap (address_mapsto ch v' sh (@pair block Z b i)) mf *)
     rewrite resource_at_make_rmap.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
     case_eq (m_phi jm1 @ loc); intros; auto.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
     destruct k0; simpl; repeat rewrite core_YES; auto.
(* Goal: @eq (option val) match cmp with | Oadd => Cop.sem_add (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Osub => Cop.sem_sub (@cenv_cs CS) (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omul => Cop.sem_mul (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Odiv => Cop.sem_div (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Omod => Cop.sem_mod (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oand => Cop.sem_and (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oor => Cop.sem_or (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oxor => Cop.sem_xor (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) (m_dry jm) | Oshl => Cop.sem_shl (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oshr => Cop.sem_shr (Vptr x3 x4) (Tpointer t1 a) (Vptr x5 x6) (Tpointer t2 a0) | Oeq => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.eq x4 x6) else @Some bool false) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | One => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.eq x4 x6)) else @Some bool true) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Olt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x4 x6) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ogt => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (Ptrofs.ltu x6 x4) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Ole => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x6 x4)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end | Oge => match match typeconv (Tpointer t1 a) with | Tvoid => cmp_default | Tint i si a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i0 s a0 => cmp_default | Tlong s a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_ip si | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i0 a0 => cmp_default | Tunion i0 a0 => cmp_default end | Tlong s a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i s0 a0 => cmp_default | Tlong s0 a0 => cmp_default | Tfloat f a0 => cmp_default | Tpointer t a0 => cmp_case_lp | Tarray t z a0 => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tfloat f a => cmp_default | Tpointer t a => match typeconv (Tpointer t2 a0) with | Tvoid => cmp_default | Tint i si a0 => cmp_case_pi si | Tlong s a0 => cmp_case_pl | Tfloat f a0 => cmp_default | Tpointer t0 a0 => cmp_case_pp | Tarray t0 z a0 => cmp_default | Tfunction t0 t1 c => cmp_default | Tstruct i a0 => cmp_default | Tunion i a0 => cmp_default end | Tarray t z a => cmp_default | Tfunction t t0 c => cmp_default | Tstruct i a => cmp_default | Tunion i a => cmp_default end with | cmp_case_pp => @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pi si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_ip si => if Archi.ptr64 then @None val else @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) | cmp_case_pl => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_case_lp => if Archi.ptr64 then @option_map bool val Val.of_bool (if Archi.ptr64 then if negb Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool else if Archi.ptr64 then @None bool else if eq_block x3 x5 then @Some bool (negb (Ptrofs.ltu x4 x6)) else @None bool) else @None val | cmp_default => match Cop.sem_cast (Vptr x3 x4) (Tpointer t1 a) (binarith_type bin_default) (m_dry jm) with | Some v1' => match Cop.sem_cast (Vptr x5 x6) (Tpointer t2 a0) (binarith_type bin_default) (m_dry jm) with | Some v2' => @None val | None => @None val end | None => @None val end end end (@Some val (force_val (@sem_binary_operation' CS cmp (Tpointer t1 a) (Tpointer t2 a0) (Vptr x3 x4) (Vptr x5 x6)))) *)
     rewrite !ghost_of_core; simpl.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
     unfold inflate_store; rewrite ghost_of_make_rmap; auto.
} 
rewrite sepcon_comm.
rewrite sepcon_assoc.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
eapply sepcon_derives; try apply AM; auto.
unfold mapsto.

rewrite Hmode.
rewrite NONVOL.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
rewrite if_true by auto.
apply orp_right1.
apply andp_right.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
intros ? _; do 3 red. auto.
(* Goal: forall _ : @eq resource (resource_fmap (approx (@level rmap ag_rmap (m_phi jm))) (approx (@level rmap ag_rmap (m_phi jm))) (PURE k p)) (PURE k p), @eq resource (PURE k p) (resource_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (PURE k p)) *)
(* Goal: @eq ghost (ghost_fmap (approx (@level juicy_mem juicy_mem_ageable jm)) (approx (@level juicy_mem juicy_mem_ageable jm)) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm)))) (@core ghost ghost_join Sep_ghost (ghost_of (m_phi jm))) *)
(* Goal: @app_pred rmap ag_rmap (@sepcon rmap Join_rmap Perm_rmap ag_rmap Age_rmap (address_mapsto ch v' sh (@pair block Z b i)) (@exactly rmap ag_rmap my)) (m_phi (store_juicy_mem jm m' ch b i v' STORE)) *)
auto.

(* Goal: @app_pred A AG (@box A AG (@extendM A JA PA AG Aga) (@sepcon A JA PA AG Aga P (@TT A AG))) a *)
intros ? ?.
do 3 red in H2.
destruct (nec_join2 H6 H2) as [w2' [w' [? [? ?]]]].
(* Goal: @ex block (fun b0 : block => @ex Ptrofs.int (fun o : Ptrofs.int => @eq val (Vptr b i) (Vptr b0 o))) *)
exists w2'; exists w'; split3; auto; eapply pred_nec_hereditary; eauto.
Qed.

End extensions.
