Use checked versions of integer functions to avoid UB for over/under-flow. Currently just produces a non-constant value if there would be overflow or underflow, at some point we might make this an undef value instead.