//
// cocos2d::CCSet::addObject from 0x100898c70 to 0x100898d16 (166 bytes)
//
// 15 xrefs:
// > cocos2d::CCActionManager::pauseAllRunningActions @ 0x10021849c
// > sub_100390340 @ 0x1003903a1
// > BoomScrollLayer::cancelAndStoleTouch @ 0x1003903df
// > BoomScrollLayer::cancelAndStoleTouch @ 0x100390478
// > cocos2d::CCScheduler::pauseAllTargetsWithMinPriority @ 0x10043802e
// > cocos2d::CCScheduler::pauseAllTargetsWithMinPriority @ 0x10043806f
// > cocos2d::CCScheduler::pauseAllTargetsWithMinPriority @ 0x1004380bc
// > cocos2d::CCScheduler::pauseAllTargetsWithMinPriority @ 0x1004380f0
// > cocos2d::CCTouchDispatcher::touches @ 0x1004c815b
// > cocos2d::CCEGLViewProtocol::handleTouchesBegin @ 0x1005112e5
// > cocos2d::CCEGLViewProtocol::handleTouchesMove @ 0x1005113f0
// > cocos2d::CCEGLViewProtocol::getSetOfTouchesEndOrCancel @ 0x100511651
// > sub_1006FF300 @ 0x1006ff361
// > TableView::cancelAndStoleTouch @ 0x1006ff39f
// > TableView::cancelAndStoleTouch @ 0x1006ff438
//
// 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:07 +0000
//
void __fastcall cocos2d::CCSet::addObject(__int64 a1, unsigned __int64 a2)
{
__int64 **v2; // r14
__int64 *v3; // rax
__int64 **v4; // r12
__int64 **v5; // r15
__int64 *v6; // rax
__int64 *v7; // rcx
if ( a2 )
cocos2d::CCObject::retain(a2);
v2 = *(__int64 ***)(a1 + 56);
v3 = v2[1];
if ( v3 )
{
while ( 1 )
{
while ( 1 )
{
v5 = (__int64 **)v3;
if ( v3[4] <= a2 )
break;
v3 = (__int64 *)*v3;
v4 = v5;
if ( !*v5 )
goto LABEL_10;
}
if ( v3[4] >= a2 )
break;
v3 = (__int64 *)v3[1];
if ( !v3 )
{
v4 = v5 + 1;
goto LABEL_10;
}
}
}
else
{
v4 = v2 + 1;
v5 = v2 + 1;
LABEL_10:
v6 = (__int64 *)operator new(0x28u);
v6[4] = a2;
*(_OWORD *)v6 = 0;
v6[2] = (__int64)v5;
*v4 = v6;
v7 = (__int64 *)**v2;
if ( v7 )
*v2 = v7;
sub_10001B680(v2[1], v6);
v2[2] = (__int64 *)((char *)v2[2] + 1);
}
}