//
// cocos2d::CCSet::addObject from 0x7c8724 to 0x7c878c (104 bytes)
//
// 13 xrefs:
// > BoomScrollLayer::claimTouch @ 0x3c20a0
// > BoomScrollLayer::cancelAndStoleTouch @ 0x3c20be
// > TableView::claimTouch @ 0x3c9daa
// > TableView::cancelAndStoleTouch @ 0x3c9dc8
// > cocos2d::CCScheduler::pauseAllTargetsWithMinPriority @ 0x7b60ca
// > cocos2d::CCScheduler::pauseAllTargetsWithMinPriority @ 0x7b60f6
// > cocos2d::CCScheduler::pauseAllTargetsWithMinPriority @ 0x7b610e
// > cocos2d::CCScheduler::pauseAllTargetsWithMinPriority @ 0x7b612a
// > cocos2d::CCActionManager::pauseAllRunningActions @ 0x7bfe7a
// > cocos2d::CCEGLViewProtocol::getSetOfTouchesEndOrCancel @ 0x7ea4f8
// > cocos2d::CCEGLViewProtocol::handleTouchesBegin @ 0x7ea82c
// > cocos2d::CCEGLViewProtocol::handleTouchesMove @ 0x7ea94e
// > cocos2d::CCTouchDispatcher::touches @ 0x808376
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:00:27 +0000
//
_DWORD *__fastcall cocos2d::CCSet::addObject(cocos2d::CCSet *this, cocos2d::CCObject *a2)
{
int v3; // r4
_DWORD *result; // r0
_DWORD **v5; // r6
_DWORD *v6; // r0
int v7; // r3
int v8; // r3
cocos2d::CCObject *v9; // [sp+4h] [bp-10h] BYREF
int v10; // [sp+8h] [bp-Ch] BYREF
v9 = a2;
if ( a2 )
cocos2d::CCObject::retain((int)a2);
v3 = *((_DWORD *)this + 13);
result = std::__tree::__find_equal(v3, &v10, (unsigned int *)&v9);
v5 = (_DWORD **)result;
if ( !*result )
{
v6 = (_DWORD *)operator new(0x14u);
v6[4] = v9;
v7 = v10;
v6[1] = 0;
*v6 = 0;
v6[2] = v7;
*v5 = v6;
v8 = **(_DWORD **)v3;
if ( v8 )
*(_DWORD *)v3 = v8;
result = std::__tree_balance_after_insert *>(*(_DWORD **)(v3 + 4), *v5);
++*(_DWORD *)(v3 + 8);
}
return result;
}