Instance CompSpecs : compspecs. make_compspecs prog. Defined.
Definition Vprog : varspecs. mk_varspecs prog. Defined.
Local Open Scope logic.
Definition t_struct_c := Tstruct _c noattr.
Definition get_spec0 :=
DECLARE _get
WITH v : reptype' t_struct_c, gv: globals
PRE  []
PROP  ()
LOCAL (gvars gv)
SEP   (data_at Ews t_struct_c (repinj _ v) (gv _p))
POST [ tint ]
PROP  ()
LOCAL (temp 1%positive (Vint (snd (snd (snd v)))))
SEP   (data_at Ews t_struct_c (repinj _ v) (gv _p)).
Definition get_spec : ident * funspec.
let t := eval compute in (reptype' t_struct_c) in
exact (DECLARE _get
WITH v : t, gv: globals
PRE  []
PROP  ()
LOCAL (gvars gv)
SEP   (data_at Ews t_struct_c (repinj t_struct_c v) (gv _p))
POST [ tint ]
PROP  ()
LOCAL (temp 1%positive (Vint (snd (snd (snd v)))))
SEP   (data_at Ews t_struct_c (repinj t_struct_c v) (gv _p))).
Defined.
Definition update222 (i: int) (v: reptype' t_struct_c) : reptype' t_struct_c :=
(fst v, (fst (snd v), (fst (snd (snd v)), i))).
Definition set_spec :=
DECLARE _set
WITH i : int, v : reptype' t_struct_c, gv : globals
PRE  [ _i OF tint ]
PROP ()
LOCAL(temp _i (Vint i); gvars gv)
SEP(data_at Ews t_struct_c (repinj _ v) (gv _p))
POST [ tvoid ]
PROP() LOCAL()
SEP(data_at Ews t_struct_c (repinj _ (update222 i v)) (gv _p)).
Definition Gprog : funspecs :=   ltac:(with_library prog [get_spec; set_spec]).

Lemma body_get:  semax_body Vprog Gprog f_get get_spec.