//
// cocos2d::CCKeyboardDispatcher::forceRemoveDelegate from 0xdb2cbc to 0xdb2d64 (168 bytes)
//
// 3 xrefs:
// > cocos2d::CCKeyboardDispatcher::removeDelegate @ 0xdb2da4
// > cocos2d::CCKeyboardDispatcher::flushPendingDelegates @ 0xdb2de4
// > ??> @ 0x5c830
//
// 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:40 +0000
//
cocos2d::CCKeyboardDelegate *__fastcall cocos2d::CCKeyboardDispatcher::forceRemoveDelegate(
cocos2d::CCKeyboardDelegate *this,
cocos2d::CCKeyboardDelegate *a2)
{
__int64 v2; // x2
unsigned int *v3; // x2
cocos2d::CCKeyboardHandler **v4; // x19
cocos2d::CCKeyboardHandler **v5; // x21
cocos2d::CCKeyboardHandler *v6; // x20
cocos2d::CCKeyboardDelegate *v8; // x23
v2 = *((_QWORD *)this + 7);
if ( v2 )
{
v3 = *(unsigned int **)(v2 + 56);
if ( *v3 )
{
v4 = *((cocos2d::CCKeyboardHandler ***)v3 + 2);
v5 = &v4[*v3 - 1];
if ( v4 <= v5 )
{
v6 = *v4;
v8 = this;
if ( *v4 )
{
while ( 1 )
{
++v4;
this = (cocos2d::CCKeyboardDelegate *)cocos2d::CCKeyboardHandler::getDelegate(v6);
if ( a2 == this )
break;
if ( v5 >= v4 )
{
v6 = *v4;
if ( *v4 )
continue;
}
return this;
}
return (cocos2d::CCKeyboardDelegate *)cocos2d::CCArray::removeObject(*((cocos2d::CCArray **)v8 + 7), v6);
}
}
}
}
return this;
}