public static OperationResult staticOperation(final MessageFrame frame) {
    final Bytes value0 = frame.popStackItem();
    final Bytes value1 = frame.popStackItem();

    if (value1.isZero()) {
      frame.pushStackItem(Bytes.EMPTY);
    } else {
      final BigInteger b1 =
          value0.size() < 32
              ? new BigInteger(1, value0.toArrayUnsafe())
              : new BigInteger(value0.toArrayUnsafe());
      final BigInteger b2 =
          value1.size() < 32
              ? new BigInteger(1, value1.toArrayUnsafe())
              : new BigInteger(value1.toArrayUnsafe());
      final BigInteger result = b1.divide(b2);
      Bytes resultBytes = Bytes.wrap(result.toByteArray());
      if (resultBytes.size() > 32) {
        resultBytes = resultBytes.slice(resultBytes.size() - 32, 32);
      }

      frame.pushStackItem(Bytes32.leftPad(resultBytes, result.signum() < 0 ? (byte) 0xFF : 0x00));
    }

    return sdivSuccess;
  }
Performs SDiv operation.

@param frame the frame
@return the operation result
evm/src/main/java/org/hyperledger/besu/evm/operation/SDivOperation.java