static long clampedAdd(final long a, final long b) {
    long r = a + b;
    if (((a ^ r) & (b ^ r)) < 0) {
      // out of bounds, clamp it!
      return a > 0 ? Long.MAX_VALUE : Long.MIN_VALUE;
    } else {
      return r;
    }
  }
Adds a and b, but if an underflow/overflow occurs return the Long max/min value

@param a first value
@param b second value
@return value of a plus b if no over/underflows or Long.MAX_VALUE/Long.MIN_VALUE otherwise
evm/src/main/java/org/hyperledger/besu/evm/internal/Words.java