private void adjustAndMapSourceRangeRange(NormalSsaInsn insn) {
    int newRegStart = findRangeAndAdjust(insn);

    RegisterSpecList sources = insn.getSources();
    int szSources = sources.size();
    int nextRopReg = newRegStart;

    for (int i = 0; i < szSources; i++) {
      RegisterSpec source = sources.get(i);
      int sourceReg = source.getReg();
      int category = source.getCategory();
      int curRopReg = nextRopReg;
      nextRopReg += category;

      if (ssaRegsMapped.get(sourceReg)) {
        continue;
      }

      LocalItem localItem = getLocalItemForReg(sourceReg);
      addMapping(source, curRopReg);

      if (localItem != null) {
        markReserved(curRopReg, category);
        ArrayList<RegisterSpec> similarRegisters = localVariables.get(localItem);

        int szSimilar = similarRegisters.size();

        /*
         * Try to map all SSA registers also associated with
         * this local.
         */
        for (int j = 0; j < szSimilar; j++) {
          RegisterSpec similarSpec = similarRegisters.get(j);
          int similarReg = similarSpec.getReg();

          // Don't map anything that's also a source.
          if (-1 != sources.indexOfRegister(similarReg)) {
            continue;
          }

          // Registers left unmapped will get handled later.
          tryMapReg(similarSpec, curRopReg, category);
        }
      }
    }
  }
Maps the source registers of the specified instruction such that they will fall in a contiguous
range in rop form. Moves are inserted as necessary to allow the range to be allocated.

@param insn {@code non-null;} insn whos sources to process
android/android_framework/dex-maker/src/main/java/com/android/dx/ssa/back/FirstFitLocalCombiningAllocator.java