//
// GJBaseGameLayer::sortStartPosObjects from 0x100100d20 to 0x100100d9c (124 bytes)
//
// 1 xrefs:
// > PlayLayer::addLiveStartPosObject @ 0x10008c1bf
//
// 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 12:21:20 +0000
//
__int64 __fastcall GJBaseGameLayer::sortStartPosObjects(__int64 a1)
{
__int64 result; // rax
__int64 v2; // r14
unsigned int v3; // r15d
__int64 v4; // r12
__int64 v5; // rax
result = sub_1007FEF90(*(_QWORD *)(a1 + 12440));
if ( (unsigned int)result >= 2 )
{
v2 = sub_100100AD0(*(_QWORD *)(a1 + 12440));
sub_1007FF190(*(_QWORD *)(a1 + 12440));
result = sub_1007FEF90(v2);
v3 = result - 1;
if ( (int)result - 1 >= 0 )
{
do
{
v4 = *(_QWORD *)(a1 + 12440);
v5 = sub_1007FEFE0(v2, v3);
result = sub_1007FEBF0(v4, v5);
}
while ( v3-- != 0 );
}
}
return result;
}