(*Similar constructors as CC.State, but without all the mem's*)
Inductive match_states: forall (qm: corestate) (st: CC'.CC_core), Prop :=
 | match_states_seq: forall f ve te s k k'
      (CUR: match current_function k with Some f' => f'=f | _ => True end),
      match_cont (strip_skip k) (strip_skip' (CC.Kseq s k')) ->
      match_states (State ve te k) (CC'.CC_core_State f s k' ve te)
 | match_states_ext: forall k f ef tyargs tyres cc args lid ve te k'
      (CUR: match current_function k with Some f' => f'=f | _ => True end),
      match_cont (strip_skip k) (strip_skip' k') ->
      match_states (ExtCall ef args lid ve te k)
           (CC'.CC_core_Callstate (External ef tyargs tyres cc) args (CC.Kcall lid f ve te k')).(*Similar constructors as CC.State, but without all the mem's*)
Inductive match_states: forall (qm: corestate) (st: CC'.CC_core), Prop :=
 | match_states_seq: forall f ve te s k k'
      (CUR: match current_function k with Some f' => f'=f | _ => True end),
      match_cont (strip_skip k) (strip_skip' (CC.Kseq s k')) ->
      match_states (State ve te k) (CC'.CC_core_State f s k' ve te)
 | match_states_ext: forall k f ef tyargs tyres cc args lid ve te k'
      (CUR: match current_function k with Some f' => f'=f | _ => True end),
      match_cont (strip_skip k) (strip_skip' k') ->
      match_states (ExtCall ef args lid ve te k)
           (CC'.CC_core_Callstate (External ef tyargs tyres cc) args (CC.Kcall lid f ve te k')).(*Similar constructors as CC.State, but without all the mem's*)
Inductive match_states: forall (qm: corestate) (st: CC'.CC_core), Prop :=
 | match_states_seq: forall f ve te s k k'
      (CUR: match current_function k with Some f' => f'=f | _ => True end),
      match_cont (strip_skip k) (strip_skip' (CC.Kseq s k')) ->
      match_states (State ve te k) (CC'.CC_core_State f s k' ve te)
 | match_states_ext: forall k f ef tyargs tyres cc args lid ve te k'
      (CUR: match current_function k with Some f' => f'=f | _ => True end),
      match_cont (strip_skip k) (strip_skip' k') ->
      match_states (ExtCall ef args lid ve te k)
           (CC'.CC_core_Callstate (External ef tyargs tyres cc) args (CC.Kcall lid f ve te k')).

Lemma Clightnew_Clight_sim_eq_noOrder_SSplusConclusion: forall (c1 : corestate) (m : mem) (c1' : corestate) (m' : mem), corestep (cl_core_sem ge) c1 m c1' m' -> forall (c2 : CC'.CC_core), match_states c1 c2 -> exists c2' : CC'.CC_core, plus (CC'.CC_core_to_CC_state c2 m) (CC'.CC_core_to_CC_state c2' m') /\ match_states c1' c2'.