[x86] Rewrite the byte shift detection to not use boolean variables to