(*Require Import VST.concurrency.cl_step_lemmas. Require Import VST.concurrency.resource_decay_lemmas. Require Import VST.concurrency.resource_decay_join.*)
Set Bullet Behavior "Strict Subproofs".

(* Specifications: *)
Lemma load_at_phi_restrict ge i (tp : jstate ge) (cnti : containsThread tp i) m
(compat : mem_compatible tp m) b ofs v sh R phi0 o :
join_sub phi0 (getThreadR cnti) ->
(LKspec LKSIZE R sh (b, ofs)) phi0 ->
AMap.find (elt:=option rmap) (b, ofs) (lset tp) = Some o ->
load Mint32 (restrPermMap (mem_compatible_locks_ltwritable compat)) b ofs = Some v ->
load Mint32 (@juicyRestrict_locks _ m (mem_compat_thread_max_cohere compat cnti)) b ofs = Some v.