private boolean tryMapRegs(
      ArrayList<RegisterSpec> specs, int ropReg, int maxAllowedCategory, boolean markReserved) {
    boolean remaining = false;
    for (RegisterSpec spec : specs) {
      if (ssaRegsMapped.get(spec.getReg())) {
        continue;
      }

      boolean succeeded;
      succeeded = tryMapReg(spec, ropReg, maxAllowedCategory);
      remaining = !succeeded || remaining;
      if (succeeded && markReserved) {
        // This only needs to be called once really with
        // the widest category used, but <shrug>
        markReserved(ropReg, spec.getCategory());
      }
    }
    return !remaining;
  }
Tries to map a list of SSA registers into the a rop reg, marking used rop space as reserved.
SSA registers that don't fit are left unmapped.

@param specs {@code non-null;} SSA registers to attempt to map
@param ropReg {@code >=0;} rop register to map to
@param maxAllowedCategory {@code 1..2;} maximum category allowed in mapping.
@param markReserved do so if {@code true}
@return {@code true} if all registers were mapped, {@code false} if some remain unmapped
android/android_framework/dex-maker/src/main/java/com/android/dx/ssa/back/FirstFitLocalCombiningAllocator.java