Definition maybe_retval (Q: environ -> mpred) retty ret :=
match ret with
| Some id => fun rho => Q (get_result1 id rho)
| None =>
match retty with
| Tvoid => (fun rho => Q (globals_only rho))
| _ => fun rho => EX v: val, Q (make_args (ret_temp::nil) (v::nil) rho)
end
end.

Lemma VALspec_range_free:
forall n b phi1 jm,
app_pred (VALspec_range n Share.top (b, 0)) phi1 ->
join_sub phi1 (m_phi jm) ->
{m' | free (m_dry jm) b 0 n = Some m' }.