//
// cocos2d::CCNotificationCenter::removeAllObservers from 0xb1dfb0 to 0xb1e068 (184 bytes)
//
// 1 xrefs:
// > ??> @ 0x518a0
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int cocos2d::CCNotificationCenter::removeAllObservers(cocos2d::CCNotificationCenter *a1, cocos2d::CCObject *a2)
{
__int64 data; // x2
cocos2d::CCArray *v5; // x24
cocos2d::CCArray *v6; // x0
unsigned int v7; // w1
cocos2d::_ccArray **v8; // x19
__int64 v9; // x1
char *v10; // x21
cocos2d::_ccArray *v11; // x20
v5 = cocos2d::CCArray::create((cocos2d::CCArray *)a1);
v6 = (cocos2d::CCArray *)a1[1].__vftable;
if ( v6 )
{
data = (__int64)v6->data;
v7 = *(_DWORD *)data;
if ( *(_DWORD *)data )
{
v8 = *(cocos2d::_ccArray ***)(data + 16);
data = -8;
v9 = 8LL * v7 - 8;
v10 = (char *)v8 + v9;
if ( v8 <= (cocos2d::_ccArray **)((char *)v8 + v9) )
{
v11 = *v8;
if ( *v8 )
{
do
{
if ( a2 == (cocos2d::CCObject *)(*(__int64 (__fastcall **)(cocos2d::_ccArray *))(*(_QWORD *)&v11->num + 80LL))(v11) )
cocos2d::CCArray::addObject(v5, v11, (cocos2d::CCObject *)data);
if ( v10 < (char *)++v8 )
break;
v11 = *v8;
}
while ( *v8 );
v6 = (cocos2d::CCArray *)a1[1].__vftable;
}
}
}
}
cocos2d::CCArray::removeObjectsInArray(v6, v5, (cocos2d::_ccArray *)data);
return cocos2d::CCArray::count(v5);
}