//
// cocos2d::CCSet::addObject from 0x18000fa90 to 0x18000fb7e (238 bytes)
//
// 11 xrefs:
// > cocos2d::CCActionManager::pauseAllRunningActions @ 0x180038932
// > cocos2d::CCEGLViewProtocol::getSetOfTouchesEndOrCancel @ 0x18006d9b5
// > cocos2d::CCEGLViewProtocol::handleTouchesBegin @ 0x18006dd71
// > cocos2d::CCEGLViewProtocol::handleTouchesMove @ 0x18006e04b
// > cocos2d::CCTouchDispatcher::touches @ 0x1800b7017
// > cocos2d::CCScheduler::pauseAllTargetsWithMinPriority @ 0x1800c457b
// > cocos2d::CCScheduler::pauseAllTargetsWithMinPriority @ 0x1800c45aa
// > cocos2d::CCScheduler::pauseAllTargetsWithMinPriority @ 0x1800c45df
// > cocos2d::CCScheduler::pauseAllTargetsWithMinPriority @ 0x1800c4609
// > ??> @ 0x18014cf68
// > ??> @ 0x1801b80bc
//
// 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
//
// Hidden C++ exception states: #wind=1
void __fastcall cocos2d::CCSet::addObject(cocos2d::CCSet *this, struct cocos2d::CCObject *a2)
{
_QWORD *v4; // rdi
__int64 *v5; // rsi
__int64 *v6; // rdx
int v7; // ecx
__int64 *v8; // r8
__int64 *v9; // rax
__int64 v10; // rax
__int128 v11; // [rsp+20h] [rbp-38h] BYREF
__int128 v12; // [rsp+30h] [rbp-28h]
if ( a2 )
cocos2d::CCObject::retain(a2);
v4 = *((_QWORD **)this + 7);
v5 = (__int64 *)*v4;
v6 = *(__int64 **)(*v4 + 8LL);
v7 = 0;
v8 = (__int64 *)*v4;
if ( !*((_BYTE *)v6 + 25) )
{
v9 = *(__int64 **)(*v4 + 8LL);
do
{
v6 = v9;
if ( v9[4] >= (unsigned __int64)a2 )
{
v7 = 1;
v8 = v9;
}
else
{
v7 = 0;
v9 += 2;
}
v9 = (__int64 *)*v9;
}
while ( !*((_BYTE *)v9 + 25) );
}
*(_QWORD *)&v12 = v6;
DWORD2(v12) = v7;
if ( *((_BYTE *)v8 + 25) || (unsigned __int64)a2 < v8[4] )
{
if ( v4[1] == 0x666666666666666LL )
std::vector::_Xlen();
v10 = sub_1800E4AC0(0x28u);
*(_QWORD *)(v10 + 32) = a2;
*(_QWORD *)v10 = v5;
*(_QWORD *)(v10 + 8) = v5;
*(_QWORD *)(v10 + 16) = v5;
*(_WORD *)(v10 + 24) = 0;
v11 = v12;
sub_18000F740(v4, (__int64)&v11, v10);
}
}