//
// GJBaseGameLayer::orderSpawnObjects from 0x597f30 to 0x597fb4 (132 bytes)
//
// 2 xrefs:
// > PlayLayer::createObjectsFromSetupFinished @ 0x404a0c
// > LevelEditorLayer::onPlaytest @ 0x46839c
//
// 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 11:53:10 +0000
//
cocos2d::CCDictionary *__fastcall GJBaseGameLayer::orderSpawnObjects(cocos2d::CCDictionary **this)
{
int v2; // r3
int *v4; // r2
int *v5; // r5
int *v6; // r4
int v7; // r6
int v8; // t1
_BYTE v9[8]; // [sp+4h] [bp-10h] BYREF
cocos2d::CCDictionary::removeAllObjects(*(this + 526));
v2 = (int)*(this + 525);
if ( v2 )
{
v4 = *(int **)(v2 + 52);
v2 = *v4;
if ( *v4 )
{
v5 = (int *)v4[3];
v2 += 0x3FFFFFFF;
v6 = &v5[v2];
while ( v5 <= v6 )
{
v8 = *v5++;
v7 = v8;
if ( !v8 )
break;
(*(void (__fastcall **)(_BYTE *, int))(*(_DWORD *)v7 + 908))(v9, v7);
cocos2d::CCPoint::operator=(v7 + 1600, v9);
}
}
}
return LevelTools::sortChannelOrderObjects(*(this + 525), *(this + 526), nullptr, v2);
}