//
// cocos2d::CCNotificationCenter::registerScriptObserver from 0xd8eea0 to 0xd8ef44 (164 bytes)
//
// 1 xrefs:
// > ??> @ 0xf99a0
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:08:17 +0000
//
__int64 __fastcall cocos2d::CCNotificationCenter::registerScriptObserver(
cocos2d::CCArray **this,
cocos2d::CCObject *a2,
unsigned int a3,
const char *a4)
{
__int64 result; // x0
cocos2d::CCObject *v9; // x20
result = (unsigned __int8)cocos2d::CCNotificationCenter::observerExisted(
(cocos2d::CCNotificationCenter *)this,
a2,
a4);
if ( !(_BYTE)result )
{
v9 = (cocos2d::CCObject *)operator new(0x68u);
cocos2d::CCNotificationObserver::CCNotificationObserver((__int64)v9, (__int64)a2, 0, 0, a4, 0);
(*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)v9 + 120LL))(v9, a3);
cocos2d::CCObject::autorelease(v9);
return cocos2d::CCArray::addObject(*(this + 7), v9);
}
return result;
}