//
// cocos2d::CCMouseDispatcher::flushPendingDelegates from 0xdb4384 to 0xdb4430 (172 bytes)
//
// 3 xrefs:
// > cocos2d::CCMouseDispatcher::dispatchScrollMSG @ 0xdb44d4
// > cocos2d::CCMouseDispatcher::dispatchRightClick @ 0xdb4594
// > ??> @ 0x5fd28
//
// 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:41 +0000
//
__int64 __fastcall cocos2d::CCMouseDispatcher::flushPendingDelegates(cocos2d::CCMouseDispatcher *this)
{
__int64 v2; // x0
unsigned int v3; // w20
cocos2d::CCMouseDelegate *v4; // x1
__int64 result; // x0
__int64 v6; // x0
unsigned int v7; // w20
cocos2d::CCMouseDelegate *v8; // x1
if ( *((_BYTE *)this + 66) )
{
v2 = *((_QWORD *)this + 10);
*((_BYTE *)this + 66) = 0;
if ( *(_DWORD *)v2 )
{
v3 = 0;
do
{
v4 = *(cocos2d::CCMouseDelegate **)(*(_QWORD *)(v2 + 16) + 8LL * v3++);
cocos2d::CCMouseDispatcher::forceRemoveDelegate(this, v4);
v2 = *((_QWORD *)this + 10);
}
while ( *(_DWORD *)v2 > v3 );
}
cocos2d::ccCArrayRemoveAllValues((_DWORD *)v2);
}
result = *((unsigned __int8 *)this + 65);
if ( *((_BYTE *)this + 65) )
{
v6 = *((_QWORD *)this + 9);
*((_BYTE *)this + 65) = 0;
if ( *(_DWORD *)v6 )
{
v7 = 0;
do
{
v8 = *(cocos2d::CCMouseDelegate **)(*(_QWORD *)(v6 + 16) + 8LL * v7++);
cocos2d::CCMouseDispatcher::forceAddDelegate((cocos2d::CCArray **)this, v8);
v6 = *((_QWORD *)this + 9);
}
while ( v7 < *(_DWORD *)v6 );
}
return (__int64)cocos2d::ccCArrayRemoveAllValues((_DWORD *)v6);
}
return result;
}