public static void simplifySwitchesOnReferences(@NotNull RootStatement root, StructClass cl) {
    List<SwitchOnCandidate> candidates = new ArrayList<>();
    ArrayList<SwitchRecognizer> recognizers = new ArrayList<>(
      Arrays.asList(new StringSwitchRecognizer.JavacStringRecognizer(), new StringSwitchRecognizer.EcjStringRecognizer()));
    if (cl.hasRecordPatternSupport() && DecompilerContext.getOption(IFernflowerPreferences.CONVERT_PATTERN_SWITCH)) {
      recognizers.add(new SwitchPatternHelper.JavacReferenceRecognizer());
    }
    collectSwitchesOn(root, recognizers, candidates, new HashSet<>());
    if (candidates.isEmpty()) return;
    List<TempVarAssignmentItem> tempVarAssignments = new ArrayList<>();
    candidates.forEach(candidate -> tempVarAssignments.addAll(candidate.prepareTempAssignments()));
    if (!checkAssignmentsToDelete(root, tempVarAssignments)) {
      return;
    }
    candidates.forEach(candidate -> candidate.simplify());
    removeTempVariableDeclarations(tempVarAssignments);
  }
public static void simplifySwitchesOnReferences(@NotNull RootStatement root, StructClass cl)