//
// cocos2d::CCIMEDispatcher::addDelegate from 0x10026b8c0 to 0x10026b928 (104 bytes)
//
// 1 xrefs:
// > cocos2d::CCIMEDelegate::CCIMEDelegate @ 0x10026b814
//
// 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 11:01:44 +0000
//
__int64 *__fastcall cocos2d::CCIMEDispatcher::addDelegate(__int64 *result, __int64 a2)
{
__int64 v2; // x20
__int64 v4; // x8
__int64 **v5; // x8
__int64 v6; // x9
if ( a2 )
{
v2 = *result;
if ( *result )
{
v4 = *result;
while ( 1 )
{
v4 = *(_QWORD *)(v4 + 8);
if ( v4 == v2 )
break;
if ( *(_QWORD *)(v4 + 16) == a2 )
return result;
}
result = (__int64 *)operator new(0x18u);
result[2] = a2;
v5 = *(__int64 ***)(v2 + 8);
v6 = *(_QWORD *)(v2 + 16);
*result = v2;
result[1] = (__int64)v5;
*v5 = result;
*(_QWORD *)(v2 + 8) = result;
*(_QWORD *)(v2 + 16) = v6 + 1;
}
}
return result;
}