protected static int argIndex(DalvInsn insn) {
    int arg = ((CstInteger) ((CstInsn) insn).getConstant()).getValue();

    if (arg < 0) {
      throw new IllegalArgumentException("bogus insn");
    }

    return arg;
  }
Helper method to extract the callout-argument index from an appropriate instruction.

@param insn {@code non-null;} the instruction
@return {@code >= 0;} the callout argument index
android/android_framework/dex-maker/src/main/java/com/android/dx/dex/code/InsnFormat.java