Arbitrary bit precision rotate converted from psuedocode to RARVM assembly