Local Open Scope nat.
Local Open Scope logic.
Definition fsig_of_funspec (fs: funspec)  :=
match fs with mk_funspec fsig _ _ _ _ _ _=> fsig end.
Local Arguments nested_field_type cs t gfs : simpl never.

Lemma call_memset_tuchar:
forall (shp : share) (tp: type) (pathp: list gfield) (lop: Z) (vp': list val) (p: val)
(c: int) (len : Z)
(R': list mpred)
(np : Z)
(vp vp'': reptype (nested_field_type tp pathp))
(e_p e_c e_n : expr)
Espec Delta P Q R (s: signedness)
(TCp : typeof e_p = tptr tuchar)
(TCc : typeof e_c = tint)
(TCn : typeof e_n = Tint I32 s noattr)
(Hvar : (var_types Delta) ! _memset = None)
(Hspec : (glob_specs Delta) ! _memset = Some (snd memset_spec))
(Hglob : (glob_types Delta) ! _memset =
Some (type_of_funspec (snd memset_spec)))
(H:  writable_share shp)
(Hlop : (0 <= lop)%Z)
(Hlen: (0 <= len <= Int.max_unsigned)%Z)
(H0:  nested_field_type tp pathp = tarray tuchar np)
(Hnp : (lop + len <= np)%Z)
(H3:  JMeq vp vp')
(H4:  JMeq vp'' (splice_into_list lop (lop+len) (list_repeat (Z.to_nat len) (Vint c)) vp'))
(H5: ENTAIL Delta, PROPx P (LOCALx Q (SEPx R)) |--
tc_exprlist Delta [tptr tvoid; tint; tuint] [e_p; e_c; e_n] &&
local (`(eq (field_address0 tp (ArraySubsc lop :: pathp) p)) (eval_expr e_p)) &&
local (`(eq (Vint c)) (eval_expr e_c)) &&
local (`(eq (Vint (Int.repr len))) (eval_expr e_n)) &&
PROP () (LOCALx Q (SEPx (field_at shp tp pathp vp p :: R')))),
@semax _ Espec Delta
(PROPx P (LOCALx Q (SEPx R)))
(Scall None
(Evar _memset
(Tfunction
(Tcons (tptr tvoid) (Tcons tint (Tcons tuint Tnil)))
(tptr tvoid) cc_default))
[e_p; e_c; e_n])
(normal_ret_assert (PROPx P (LOCALx Q
(SEPx (field_at shp tp pathp vp'' p :: R'))))).