//
// cocos2d::CCIMEDispatcher::removeDelegate from 0xda0ba4 to 0xda0c28 (132 bytes)
//
// 2 xrefs:
// > cocos2d::CCIMEDelegate::~CCIMEDelegate @ 0xda0fc4
// > ??> @ 0xbf668
//
// 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:29 +0000
//
void __fastcall cocos2d::CCIMEDispatcher::removeDelegate(cocos2d::CCIMEDispatcher *this, cocos2d::CCIMEDelegate *a2)
{
_QWORD *v2; // x4
_QWORD *v3; // x2
__int64 v4; // x1
if ( a2 )
{
v2 = *(_QWORD **)this;
if ( *(_QWORD *)this )
{
v3 = (_QWORD *)v2[1];
if ( v2 != v3 )
{
while ( a2 != (cocos2d::CCIMEDelegate *)v3[2] )
{
v3 = (_QWORD *)v3[1];
if ( v2 == v3 )
return;
}
v4 = v2[3];
if ( v4 )
{
if ( v4 == v3[2] )
{
v2[3] = 0;
v2 = *(_QWORD **)this;
}
}
*(_QWORD *)(*v3 + 8LL) = v3[1];
*(_QWORD *)v3[1] = *v3;
--v2[2];
operator delete(v3);
}
}
}
}