//
// cocos2d::CCSet::removeObject from 0x18000fdc0 to 0x18000fe67 (167 bytes)
//
// 5 xrefs:
// > cocos2d::CCTouchDispatcher::touches @ 0x1800b7077
// > cocos2d::CCTouchDispatcher::touches @ 0x1800b70a7
// > cocos2d::CCTouchDispatcher::touches @ 0x1800b7141
// > ??> @ 0x18014cf68
// > ??> @ 0x1801b80ec
//
// 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 11:21:21 +0000
//
void __fastcall cocos2d::CCSet::removeObject(cocos2d::CCSet *this, struct cocos2d::CCObject *a2)
{
__int64 ***v2; // r10
__int64 *v4; // r9
__int64 v5; // r8
__int64 v6; // rax
__int64 i; // rcx
unsigned __int64 v8; // rdx
__int64 *v9[3]; // [rsp+20h] [rbp-18h] BYREF
v2 = *((__int64 ****)this + 7);
v4 = (__int64 *)*v2;
v5 = (__int64)*v2;
v6 = (__int64)(*v2)[1];
for ( i = v6; !*(_BYTE *)(i + 25); i = *(_QWORD *)i )
{
v8 = *(_QWORD *)(i + 32);
if ( v8 >= (unsigned __int64)a2 )
{
if ( *(_BYTE *)(v5 + 25) && (unsigned __int64)a2 < v8 )
v5 = i;
v4 = (__int64 *)i;
}
else
{
i += 16;
}
}
if ( !*(_BYTE *)(v5 + 25) )
v6 = *(_QWORD *)v5;
while ( !*(_BYTE *)(v6 + 25) )
{
if ( (unsigned __int64)a2 >= *(_QWORD *)(v6 + 32) )
{
v6 = *(_QWORD *)(v6 + 16);
}
else
{
v5 = v6;
v6 = *(_QWORD *)v6;
}
}
v9[0] = v4;
v9[1] = (__int64 *)v5;
sub_18000F190(v2, v9);
if ( a2 )
cocos2d::CCObject::release(a2);
}