//
// func from 0x1004b5510 to 0x1004b557b (107 bytes)
//
// 5 xrefs:
// > cocos2d::CCIMEDelegate::CCIMEDelegate @ 0x1004b4e0c
// > cocos2d::CCIMEDispatcher::sharedDispatcher @ 0x1004b4eae
// > cocos2d::CCIMEDelegate::dCCIMEDelegate @ 0x1004b5010
// > cocos2d::CCIMEDelegate::attachWithIME @ 0x1004b51e0
// > cocos2d::CCIMEDelegate::detachWithIME @ 0x1004b5377
//
// This function is hookable on this platform (idp: pc, 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 12:31:00 +0000
//
void __fastcall func(__int64 **a1)
{
__int64 *v1; // r14
__int64 *v3; // rdi
_QWORD *v4; // rax
__int64 v5; // rcx
__int64 *v6; // r15
v1 = *a1;
if ( *a1 )
{
if ( v1[2] )
{
v3 = (__int64 *)v1[1];
v4 = *(_QWORD **)(*v1 + 8);
v5 = *v3;
*(_QWORD *)(v5 + 8) = v4;
*v4 = v5;
v1[2] = 0;
if ( v3 != v1 )
{
do
{
v6 = (__int64 *)v3[1];
operator delete(v3);
v3 = v6;
}
while ( v6 != v1 );
}
}
operator delete(v1);
*a1 = nullptr;
}
}