Section InternalCall.

Lemma MS_structured_match_callstack_alloc_variables_rec:
forall tm sp tf cenv lenv te lo cs,
Mem.valid_block tm sp ->
fn_stackspace tf <= Int.max_unsigned ->
(forall ofs k p, Mem.perm tm sp ofs k p -> 0 <= ofs < fn_stackspace tf) ->
(forall ofs k p, 0 <= ofs < fn_stackspace tf -> Mem.perm tm sp ofs k p) ->
forall e1 m1 vars e2 m2,
alloc_variables e1 m1 vars e2 m2 ->
forall mu,
list_norepet (map fst vars) ->
cenv_compat cenv vars (fn_stackspace tf) ->
cenv_separated cenv vars ->
cenv_mem_separated cenv vars (as_inj mu) sp m1 ->
(forall id sz, In (id, sz) vars -> e1!id = None) ->
structured_match_callstack mu m1 tm
(Frame (cenv_remove cenv vars) tf e1 lenv te sp lo (Mem.nextblock m1) :: cs)
(Mem.nextblock m1) (Mem.nextblock tm) ->
REACH_closed m1 (vis mu) -> sm_valid mu m1 tm -> SM_wd mu ->
Mem.inject (as_inj mu) m1 tm ->
exists mu2,
structured_match_callstack mu2 m2 tm
(Frame cenv tf e2 lenv te sp lo (Mem.nextblock m2) :: cs)
(Mem.nextblock m2) (Mem.nextblock tm)
/\ Mem.inject (as_inj mu2) m2 tm
/\ (*LENB: THIS IS NEW*) intern_incr mu mu2
/\ (forall b, Mem.valid_block m1 b -> as_inj mu2 b = as_inj mu b)
/\ (forall b b' d', as_inj mu b = None -> as_inj mu2 b = Some (b',d') -> b' = sp)
/\ sm_locally_allocated mu mu2 m1 tm m2 tm
/\ SM_wd mu2 /\ sm_valid mu2 m2 tm
/\ REACH_closed m2 (vis mu2)
/\ forall mu', SM_wd mu' ->  intern_incr mu2 mu' -> sm_inject_separated mu2 mu' m2 tm ->
sm_inject_separated mu2 mu' m1 tm.