//
// cocos2d::CCMouseDispatcher::forceRemoveDelegate from 0xdb4298 to 0xdb4340 (168 bytes)
//
// 3 xrefs:
// > cocos2d::CCMouseDispatcher::removeDelegate @ 0xdb4380
// > cocos2d::CCMouseDispatcher::flushPendingDelegates @ 0xdb43c0
// > ??> @ 0xd4d88
//
// 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
//
cocos2d::CCMouseDelegate *__fastcall cocos2d::CCMouseDispatcher::forceRemoveDelegate(
cocos2d::CCMouseDelegate *this,
cocos2d::CCMouseDelegate *a2)
{
__int64 v2; // x2
unsigned int *v3; // x2
cocos2d::CCMouseHandler **v4; // x19
cocos2d::CCMouseHandler **v5; // x21
cocos2d::CCMouseHandler *v6; // x20
cocos2d::CCMouseDelegate *v8; // x23
v2 = *((_QWORD *)this + 7);
if ( v2 )
{
v3 = *(unsigned int **)(v2 + 56);
if ( *v3 )
{
v4 = *((cocos2d::CCMouseHandler ***)v3 + 2);
v5 = &v4[*v3 - 1];
if ( v4 <= v5 )
{
v6 = *v4;
v8 = this;
if ( *v4 )
{
while ( 1 )
{
++v4;
this = (cocos2d::CCMouseDelegate *)cocos2d::CCMouseHandler::getDelegate(v6);
if ( a2 == this )
break;
if ( v5 >= v4 )
{
v6 = *v4;
if ( *v4 )
continue;
}
return this;
}
return (cocos2d::CCMouseDelegate *)cocos2d::CCArray::removeObject(*((cocos2d::CCArray **)v8 + 7), v6);
}
}
}
}
return this;
}