boolean (UCallExpression expression) { int argumentCount = expression.getValueArgumentCount(); if (!(argumentCount == 1 || argumentCount == 2 || argumentCount == 4)) { return false; } List<UExpression> params = expression.getValueArguments(); for (UExpression param : params) { if (!PsiTypes.intType().equals(param.getExpressionType())) { return false; } } switch (params.size()) { case 1 -> { return isZero(params.get(0)); } case 2 -> { return areSame(params.get(0), params.get(1)); } case 4 -> { UExpression top = params.get(0); UExpression left = params.get(1); UExpression bottom = params.get(2); UExpression right = params.get(3); if (areSame(top, left, bottom, right) || (areSame(top, bottom) && areSame(left, right))) { return true; } int zeros = 0; for (UExpression param : params) { zeros += isZero(param) ? 1 : 0; } return zeros == 3; } } return false; }