private void processPattern(@NotNull PsiPattern sourcePattern, @Nullable PsiPattern innerPattern,
                              @NotNull PsiType checkType, @Nullable DfaAnchor instanceofAnchor, @NotNull DeferredOffset endPatternOffset) {
    if (innerPattern == null) return;
    else if (innerPattern instanceof PsiDeconstructionPattern deconstructionPattern) {
      PsiPatternVariable variable = deconstructionPattern.getPatternVariable();
      PsiType patternType = deconstructionPattern.getTypeElement().getType();
      DfaVariableValue patternDfaVar = variable == null ? createTempVariable(patternType) :
                                       PlainDescriptor.createVariableValue(getFactory(), variable);

      addTypeCheckPattern(sourcePattern, innerPattern, checkType, endPatternOffset, patternDfaVar, instanceofAnchor);

      addInstruction(new PopInstruction());

      PsiPattern[] components = deconstructionPattern.getDeconstructionList().getDeconstructionComponents();
      if (patternType instanceof PsiClassType patternClassType) {
        PsiClassType.ClassResolveResult resolveResult = patternClassType.resolveGenerics();
        PsiClass recordClass = resolveResult.getElement();
        boolean unchecked = JavaGenericsUtil.isUncheckedCast(patternClassType, checkType);
        PsiSubstitutor substitutor = unchecked ? PsiSubstitutor.EMPTY : resolveResult.getSubstitutor();
        if (recordClass != null && recordClass.isRecord()) {
          PsiRecordComponent[] recordComponents = recordClass.getRecordComponents();
          if (components.length == recordComponents.length) {
            for (int i = 0; i < components.length; i++) {
              PsiRecordComponent recordComponent = recordComponents[i];
              PsiPattern patternComponent = components[i];
              PsiMethod accessor = JavaPsiRecordUtil.getAccessorForRecordComponent(recordComponent);
              if (accessor == null) continue;
              DfaVariableValue accessorDfaVar =
                getFactory().getVarFactory().createVariableValue(new GetterDescriptor(accessor), patternDfaVar);
              addInstruction(new JvmPushInstruction(accessorDfaVar, null));
              processPattern(sourcePattern, patternComponent, substitutor.substitute(recordComponent.getType()), null, endPatternOffset);
            }
          }
        }
      }
    }
    else if (innerPattern instanceof PsiTypeTestPattern typeTestPattern) {
      PsiPatternVariable variable = typeTestPattern.getPatternVariable();
      if (variable == null) return;
      DfaVariableValue patternDfaVar = PlainDescriptor.createVariableValue(getFactory(), variable);

      addTypeCheckPattern(sourcePattern, innerPattern, checkType, endPatternOffset, patternDfaVar, instanceofAnchor);

      addInstruction(new PopInstruction());
    }

    if (sourcePattern == innerPattern) {
      addInstruction(new PushValueInstruction(DfTypes.TRUE));
    }
  }
private void processPattern(@NotNull PsiPattern sourcePattern, @Nullable PsiPattern innerPattern,
                              @NotNull PsiType checkType, @Nullable DfaAnchor instanceofAnchor, @NotNull DeferredOffset endPatternOffset)