//
// cocos2d::CCSet::removeObject from 0x100898d20 to 0x100898dc4 (164 bytes)
//
// 2 xrefs:
// > cocos2d::CCTouchDispatcher::touches @ 0x1004c8179
// > cocos2d::CCTouchDispatcher::touches @ 0x1004c81d7
//
// 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:37:08 +0000
//
void __fastcall cocos2d::CCSet::removeObject(__int64 a1, _DWORD *a2)
{
__int64 **v2; // rax
__int64 *v3; // rdi
__int64 *v4; // rbx
__int64 *v5; // rdx
__int64 *v6; // rdx
__int64 *v7; // rcx
__int64 *v8; // rdx
bool v9; // zf
v2 = *(__int64 ***)(a1 + 56);
v3 = v2[1];
if ( v3 )
{
v4 = (__int64 *)(v2 + 1);
v5 = v2[1];
do
{
if ( v5[4] >= (unsigned __int64)a2 )
v4 = v5;
v5 = (__int64 *)v5[v5[4] < (unsigned __int64)a2];
}
while ( v5 );
if ( v4 != (__int64 *)(v2 + 1) && v4[4] <= (unsigned __int64)a2 )
{
v6 = (__int64 *)v4[1];
if ( v6 )
{
do
{
v7 = v6;
v6 = (__int64 *)*v6;
}
while ( v6 );
}
else
{
v8 = v4;
do
{
v7 = (__int64 *)v8[2];
v9 = *v7 == (_QWORD)v8;
v8 = v7;
}
while ( !v9 );
}
if ( *v2 == v4 )
*v2 = v7;
v2[2] = (__int64 *)((char *)v2[2] - 1);
sub_1001454C0(v3, v4);
operator delete(v4);
}
}
if ( a2 )
cocos2d::CCObject::release(a2);
}