Definition aaddr (a: VA.t) (r: reg) : aptr :=
match a with
| VA.Bot => Pbot
| VA.State ae am => aptr_of_aval (AE.get r ae)
end.

Lemma aaddr_sound:
forall cunit prog s f sp pc e m r b ofs,
sound_state prog (State s f (Vptr sp Ptrofs.zero) pc e m) ->
linkorder cunit prog ->
e#r = Vptr b ofs ->
exists bc,
pmatch bc b ofs (aaddr (analyze (romem_for cunit) f)!!pc r)
/\ genv_match bc (Genv.globalenv prog)
/\ bc sp = BCstack.