public int getOutsSize() {
    int sz = size();
    int result = 0;

    for (int i = 0; i < sz; i++) {
      DalvInsn insn = (DalvInsn) get0(i);
      int count = 0;

      if (insn instanceof CstInsn) {
        Constant cst = ((CstInsn) insn).getConstant();
        if (cst instanceof CstBaseMethodRef) {
          CstBaseMethodRef methodRef = (CstBaseMethodRef) cst;
          boolean isStatic = (insn.getOpcode().getFamily() == Opcodes.INVOKE_STATIC);
          count = methodRef.getParameterWordCount(isStatic);
        } else if (cst instanceof CstCallSiteRef) {
          CstCallSiteRef invokeDynamicRef = (CstCallSiteRef) cst;
          count = invokeDynamicRef.getPrototype().getParameterTypes().getWordCount();
        }
      } else if (insn instanceof MultiCstInsn) {
        if (insn.getOpcode().getFamily() != Opcodes.INVOKE_POLYMORPHIC) {
          throw new RuntimeException("Expecting invoke-polymorphic");
        }
        MultiCstInsn mci = (MultiCstInsn) insn;
        // Invoke-polymorphic has two constants: [0] method-ref and
        // [1] call site prototype. The number of arguments is based
        // on the call site prototype since these are the arguments
        // presented. The method-ref is always MethodHandle.invoke(Object[])
        // or MethodHandle.invokeExact(Object[]).
        CstProtoRef proto = (CstProtoRef) mci.getConstant(1);
        count = proto.getPrototype().getParameterTypes().getWordCount();
        count = count + 1; // And one for receiver (method handle).
      } else {
        continue;
      }

      if (count > result) {
        result = count;
      }
    }

    return result;
  }
Gets the size of the outgoing arguments area required by this method. This is equal to the
largest argument word count of any method referred to by this instance.

@return {@code >= 0;} the required outgoing arguments size
android/android_framework/dex-maker/src/main/java/com/android/dx/dex/code/DalvInsnList.java