ID (final ID id, final Pointer selector, Object... args) { // objc_msgSend is called with the calling convention of the target method // on x86_64 this does not make a difference, but arm64 uses a different calling convention for varargs // it is therefore important to not call objc_msgSend as a vararg function return new ID(myObjcMsgSend.invokeLong(prepInvoke(id, selector, args))); }