private @Nullable DfaValue doCreate(DfaValue left, DfaValue right, DfaMemoryState state, DfIntegralType resultType, LongRangeBinOp op) {
      if (op != LongRangeBinOp.PLUS && op != LongRangeBinOp.MINUS && op != LongRangeBinOp.MOD) return null;
      DfType leftDfType = state.getDfType(left);
      Number leftConst = leftDfType.getConstantOfType(Number.class);
      if (leftConst != null) {
        left = left.getFactory().fromDfType(leftDfType);
      }
      DfType rightDfType = state.getDfType(right);
      Number rightConst = rightDfType.getConstantOfType(Number.class);
      if (rightConst != null) {
        right = right.getFactory().fromDfType(rightDfType);
      }
      if (op == LongRangeBinOp.MINUS && state.areEqual(left, right)) {
        return myFactory.fromDfType(resultType.meetRange(LongRangeSet.point(0)));
      }
      if (op == LongRangeBinOp.MOD) {
        if (leftDfType instanceof DfIntegralType && rightDfType instanceof DfIntegralType) {
          if (withinDivisorRange(state, left, right, ((DfIntegralType)leftDfType).getRange(), ((DfIntegralType)rightDfType).getRange())) {
            return left;
          }
        }
        if (left instanceof DfaVariableValue && rightConst != null) {
          long divisor = rightConst.longValue();
          if (divisor > 1 && divisor <= Long.SIZE) {
            return doCreate((DfaVariableValue)left, right, resultType, op);
          }
        }
        return null;
      }
      if (leftConst != null && (right instanceof DfaVariableValue || right instanceof DfaBinOpValue) && op == LongRangeBinOp.PLUS) {
        return doCreate(right, left, state, resultType, op);
      }
      if (left instanceof DfaVariableValue) {
        if (right instanceof DfaVariableValue) {
          if (op == LongRangeBinOp.PLUS && right.getID() > left.getID()) {
            return doCreate((DfaVariableValue)right, left, resultType, op);
          }
          return doCreate((DfaVariableValue)left, right, resultType, op);
        }
        if (rightConst != null) {
          long value = rightConst.longValue();
          if (value == 0) return left;
          if (op == LongRangeBinOp.MINUS) {
            right = myFactory.fromDfType(resultType.meetRange(LongRangeSet.point(value).negate(resultType.getLongRangeType())));
          }
          return doCreate((DfaVariableValue)left, right, resultType, LongRangeBinOp.PLUS);
        }
      }
      if (left instanceof DfaBinOpValue sumValue) {
        if (sumValue.getOperation() != LongRangeBinOp.PLUS && sumValue.getOperation() != LongRangeBinOp.MINUS) return null;
        if (rightConst != null) {
          if (sumValue.getRight() instanceof DfaTypeValue) {
            DfType rightType = sumValue.getRight().getDfType();
            LongRangeSet value1 = ((DfIntegralType)rightType).getRange();
            LongRangeSet value2 = LongRangeSet.point(rightConst.longValue());
            if (op == LongRangeBinOp.MINUS) {
              value2 = value2.negate(resultType.getLongRangeType());
            }
            LongRangeSet res = value1.plus(value2, resultType.getLongRangeType());
            right = myFactory.fromDfType(resultType.meetRange(res));
            return create(sumValue.getLeft(), right, state, resultType, LongRangeBinOp.PLUS);
          }
        }
        if (op == LongRangeBinOp.MINUS && sumValue.getOperation() == LongRangeBinOp.PLUS) {
          // a+b-a => b; a+b-b => a
          if (state.areEqual(right, sumValue.getLeft())) {
            return sumValue.getRight();
          }
          else if (state.areEqual(right, sumValue.getRight())) {
            return sumValue.getLeft();
          }
        }
      }
      return null;
    }
private @Nullable DfaValue doCreate(DfaValue left, DfaValue right, DfaMemoryState state, DfIntegralType resultType, LongRangeBinOp op)