"Bit-borrow" two numbers
Jelly, 11 bytes

~1¦&amp;N$^µ&lt;/¿


Try it online! or verify all test cases.

Background

We can extract the last set bit of an integer n as follows.

n + 1 toggles all trailing set bits of n and the adjacent unset bit. For example, 100112 + 1 = 101002.

Since ~n = -(n + 1) = -n - 1, -n = ~n + 1, so -n applies the above to the bitwise NOT of n (which toggles all bits), thus toggling all bits before the last 1.

For example, -101002 = ~101002 + 1 = 010112 + 1 = 011002.

By taking n &amp; -n the bitwise AND of n and -n all bits before the last set bit are nullified (since unequal in n and -n), thus yielding the last set bit of n.

For example, 101002 &amp; -101002 = 101002 &amp; 011002 = 001002.

Thus XORing n with n &amp; -n unsets the last set bit of n.

Conversely, to unset the last set bit of n, it suffices to apply the above to ~n, from where we derive the formula n ^ (~n &amp; -~n).

How it works

~1¦&amp;N$^µ&lt;/¿  Main link. Argument: A (list of pairs)

          ¿  While loop:
        &lt;/     Condition: Reduce p by less-than. True iff x &lt; y.
       µ       Body chain:
~1¦              Apply bitwise NOT to the x, first item of the pair.
     $           Convert the two links to the left into a monadic chain.
    N              Negate; multiply [~x, y] by -1, yielding [-~x, -y].
   &amp;               Logical AND. Yields [-~x &amp; ~x, -y &amp; y].
      ^            Vectorized XOR with p. Yields [(-~x &amp; ~x) ^ x, (-y &amp; y) ^ y].