private static boolean checkRegUsed(BitSet regsUsed, RegisterSpec rs) {
    int reg = rs.getReg();
    int category = rs.getCategory();

    return regsUsed.get(reg) || (category == 2 && regsUsed.get(reg + 1));
  }
Checks to see if the register is used in a bitset, taking into account its category/width.

@param regsUsed set, indexed by register number
@param rs register to mark as used
@return true if register is fully or partially (for the case of wide registers) used.
android/android_framework/dex-maker/src/main/java/com/android/dx/ssa/SsaBasicBlock.java