//
// GJBaseGameLayer::sortStartPosObjects from 0x58eca6 to 0x58ecf0 (74 bytes)
//
// 2 xrefs:
// > PlayLayer::addLiveStartPosObject @ 0x40677e
// > GJBaseGameLayer::processStartPosObjects @ 0x58ecf4
//
// 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:04 +0000
//
unsigned int __fastcall GJBaseGameLayer::sortStartPosObjects(cocos2d::CCArray **this)
{
unsigned int result; // r0
cocos2d::CCArray *started; // r6
cocos2d::CCArray **v4; // r4
signed int i; // r5
cocos2d::CCArray *v6; // r7
cocos2d::CCObject *v7; // r0
result = cocos2d::CCArray::count(*(this + 2681));
if ( result > 1 )
{
started = rankStartPosObjectsByRepeatedWinner(*(this + 2681));
cocos2d::CCArray::removeAllObjects(*(this + 2681));
result = cocos2d::CCArray::count(started);
v4 = this + 2681;
for ( i = result - 1; i >= 0; --i )
{
v6 = *v4;
v7 = (cocos2d::CCObject *)cocos2d::CCArray::objectAtIndex(started, i);
result = cocos2d::CCArray::addObject(v6, v7);
}
}
return result;
}