You can use a boolean expression that is convertible to
1, and which has no effect when the value is
multiplies the second number by 2 if the first one was bigger
second = second + (first > second) * second;
and divides the first one by 2 if the second one was bigger.
first = first - (second > first) * (first / 2);