//
// BrowseSmartTemplateLayer::addObjectToPage from 0x1405f0310 to 0x1405f03b0 (160 bytes)
//
// 6 xrefs:
// > BrowseSmartTemplateLayer::addPrefabMenuItem @ 0x1405f02c9
// > BrowseSmartKeyLayer::init @ 0x1405f1513
// > ??> @ 0x1408e306c
// > ??> @ 0x1408e307c
// > ??> @ 0x14092f1a4
// > ??> @ 0x14092f1b0
//
// 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:35:05 +0000
//
void __fastcall BrowseSmartTemplateLayer::addObjectToPage(__int64 a1, struct cocos2d::CCObject *a2, unsigned int a3)
{
unsigned int v4; // esi
__int64 v7; // rcx
cocos2d::CCArray *v8; // rbx
struct cocos2d::CCObject *v9; // rax
cocos2d::CCArray *v10; // rax
v4 = a3 + 1;
while ( cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 672)) < v4 )
{
v8 = *(cocos2d::CCArray **)(a1 + 672);
v9 = (struct cocos2d::CCObject *)cocos2d::CCArray::create(v7);
cocos2d::CCArray::addObject(v8, v9);
}
v10 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 672), a3);
cocos2d::CCArray::addObject(v10, a2);
}