Definition must_return (ek: exitkind) : bool :=
  match ek with EK_return => true | _ => false end.

(* Specifications: *)
Lemma eliminate_extra_return: forall Espec {cs: compspecs} Delta P c ty Q Post, quickflow c must_return = true -> Post = (function_body_ret_assert ty Q) -> @semax cs Espec Delta P c Post -> @semax cs Espec Delta P (Ssequence c (Sreturn None)) Post.
Lemma eliminate_extra_return': forall Espec {cs: compspecs} Delta P c ty Q F Post, quickflow c must_return = true -> Post = (frame_ret_assert (function_body_ret_assert ty Q) F) -> @semax cs Espec Delta P c Post -> @semax cs Espec Delta P (Ssequence c (Sreturn None)) Post.