If the two checks were independent (pure functions), it's not difficult for a compiler to determine that given enough program visibility.
If the two checks were independent (pure functions), it's not difficult for a compiler to determine that given enough program visibility.