(*
Lemma FUNspec_parametric: forall fml cc A P Q,
   spec_parametric (fun l sh => yesat (SomeP (SpecTT A) (packPQ P Q)) (FUN fml cc) sh).
Proof.
intros.
exists (SomeP (SpecTT A) (packPQ P Q)).
exists (fun k => k=FUN fml cc).
intros.
simpl.
apply exists_ext; intro p.
unfold yesat_raw.
apply prop_ext; split; intros.
econstructor; eauto.
destruct H as [k [? ?]].
subst; auto.
Qed.
*)
Definition val2address (v: val) : option AV.address := 
  match v with Vptr b ofs => Some (b, Ptrofs.signed ofs) | _ => None end.

Lemma nonlock_permission_bytes_split2: forall (n m r: Z) (sh: Share.t) (b: block) (ofs: Z), r = n + m -> n >= 0 -> m >= 0 -> nonlock_permission_bytes sh (b, ofs) r = nonlock_permission_bytes sh (b, ofs) n * nonlock_permission_bytes sh (b, ofs + n) m.