move registers to handle control flow properly