Implement gen_getlocal
This extracts the generation code from getlocal_wc1, since this is the same just with more loops inside vm_get_ep.
Implement gen_getlocal
This extracts the generation code from getlocal_wc1, since this is the
same just with more loops inside vm_get_ep.