//
// GJBaseGameLayer::orderSpawnObjects from 0x9ab4ec to 0x9ab5c4 (216 bytes)
//
// 3 xrefs:
// > PlayLayer::createObjectsFromSetupFinished @ 0x6fdccc
// > LevelEditorLayer::onPlaytest @ 0x7965a0
// > ??> @ 0xb9848
//
// This function is hookable on this platform (idp: arm, 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:58:12 +0000
//
__int64 __fastcall GJBaseGameLayer::orderSpawnObjects(cocos2d::CCDictionary **this)
{
LevelTools *v2; // x0
unsigned int *v3; // x2
__int64 *v4; // x20
__int64 *v5; // x22
__int64 v6; // x19
_BYTE v8[8]; // [xsp+40h] [xbp+40h] BYREF
cocos2d::CCDictionary::removeAllObjects(*(this + 414));
v2 = *(this + 413);
if ( v2 )
{
v3 = *((unsigned int **)v2 + 7);
if ( *v3 )
{
v4 = *((__int64 **)v3 + 2);
v5 = &v4[*v3 - 1];
if ( v4 <= v5 )
{
v6 = *v4;
if ( *v4 )
{
do
{
++v4;
(*(void (__fastcall **)(__int64))(*(_QWORD *)v6 + 1816LL))(v6);
cocos2d::CCPoint::operator=(v6 + 1784, v8);
if ( v5 < v4 )
break;
v6 = *v4;
}
while ( *v4 );
v2 = *(this + 413);
}
}
}
}
LevelTools::sortChannelOrderObjects(v2, *(this + 414), nullptr);
return _stack_chk_guard;
}