reduce double logical reverse and try it for all test cases. However, the result is wrong for some registers. Digging it