public RegisterSpec specForRegister(int reg) {
    int sz = size();
    for (int i = 0; i < sz; i++) {
      RegisterSpec rs;

      rs = get(i);

      if (rs.getReg() == reg) {
        return rs;
      }
    }

    return null;
  }
Returns a RegisterSpec in this list that uses the specified register, or null if there is none
in this list.

@param reg Register to find
@return RegisterSpec that uses argument or null.
android/android_framework/dex-maker/src/main/java/com/android/dx/rop/code/RegisterSpecList.java