code: private static InsnList popMethodResult(AbstractInsnNode invokeInsnNode) {
          Validate.notNull(invokeInsnNode);
          
          Type returnType = getReturnTypeOfInvocation(invokeInsnNode);
          
          InsnList ret = new InsnList();
          switch (returnType.getSort()) {
              case Type.LONG:
              case Type.DOUBLE:
                  ret.add(new InsnNode(Opcodes.POP2));
                  break;
              case Type.VOID:
                  break;
              case Type.METHOD:
                  throw new IllegalStateException(); // this should never happen
              default:
                  ret.add(new InsnNode(Opcodes.POP));
                  break;
          }
  
          return ret;
      }
docs: Generates instructions to pop the result of the method off the stack. This will only generate instructions if the method being
  invoked generates a return value.
  @param invokeInsnNode instruction for the method that was invoked (can either be of type {@link MethodInsnNode} or
  {@link InvokeDynamicInsnNode} -- this is used to determine how many items to pop off the stack
  @return instructions for a pop (only if the method being invoked generates a return value)
  @throws IllegalArgumentException if {@code invokeInsnNode} isn't of type {@link MethodInsnNode} or {@link InvokeDynamicInsnNode}
  @throws NullPointerException if any argument is {@code null}