//
// cocos2d::extension::CCControl::removeHandleOfControlEvent from 0xd0bf60 to 0xd0c044 (228 bytes)
//
// 1 xrefs:
// > ??> @ 0x913a8
//
// 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:07:00 +0000
//
void __fastcall cocos2d::extension::CCControl::removeHandleOfControlEvent(cocos2d::extension::CCControl *this, int a2)
{
__int64 *v2; // x5
char *v3; // x19
char *v4; // x2
char *v5; // x3
char *v6; // x1
char *v7; // x2
bool v8; // zf
v2 = *((__int64 **)this + 57);
if ( v2 )
{
v3 = (char *)this + 456;
v4 = *((char **)this + 57);
do
{
while ( a2 <= *((_DWORD *)v4 + 7) )
{
v3 = v4;
v4 = *(char **)v4;
if ( !v4 )
goto LABEL_5;
}
v4 = *((char **)v4 + 1);
}
while ( v4 );
LABEL_5:
v5 = v3;
if ( (char *)this + 456 != v3 && a2 >= *((_DWORD *)v3 + 7) )
{
v6 = *((char **)v3 + 1);
if ( v6 )
{
while ( *(_QWORD *)v6 )
v6 = *(char **)v6;
if ( *((char **)this + 56) != v3 )
goto LABEL_12;
}
else
{
do
{
v7 = *((char **)v5 + 2);
v8 = v5 == *(char **)v7;
v5 = v7;
}
while ( !v8 );
v6 = v7;
if ( *((char **)this + 56) != v3 )
goto LABEL_12;
}
*((_QWORD *)this + 56) = v6;
LABEL_12:
--*((_QWORD *)this + 58);
std::__tree_remove *>(v2, (__int64 *)v3);
operator delete(v3);
}
}
}