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 free_juicy_mem_resource_decay:
forall jm b lo hi m' jm'
(H : free (m_dry jm) b lo hi = Some m')
(H0 : forall ofs : Z,  lo <= ofs < hi ->
perm_of_res (m_phi jm @ (b, ofs)) = Some Freeable),
free_juicy_mem jm m' b lo hi H = jm' ->
resource_decay (nextblock (m_dry jm)) (m_phi jm) (m_phi jm').