private int mapOrAllocateLabel(int origLabel) {
      int resultLabel;
      Integer mappedLabel = origLabelToCopiedLabel.get(origLabel);

      if (mappedLabel != null) {
        resultLabel = mappedLabel;
      } else if (!involvedInSubroutine(origLabel, subroutineStart)) {
        /*
         * A subroutine has ended by some means other than a "ret"
         * (which really means a throw caught later).
         */
        resultLabel = origLabel;
      } else {
        resultLabel = labelAllocator.getNextLabel();
        workList.set(origLabel);
        origLabelToCopiedLabel.put(origLabel, resultLabel);

        // The new label has the same frame as the original label
        while (labelToSubroutines.size() <= resultLabel) {
          labelToSubroutines.add(null);
        }
        labelToSubroutines.set(resultLabel, labelToSubroutines.get(origLabel));
      }

      return resultLabel;
    }
Maps the label of a pre-copied block to the label of the inlined block, allocating a new
label and adding it to the worklist if necessary. If the origLabel is a "special" label, it
is returned exactly and not scheduled for duplication: copying never proceeds past a special
label, which likely is the function return block or an immediate predecessor.

@param origLabel label of original, pre-copied block
@return label for new, inlined block
android/android_framework/dex-maker/src/main/java/com/android/dx/cf/code/Ropper.java