//
// SetGroupIDLayer::onNextFreeOrderChannel from 0xabc5cc to 0xabc6b8 (236 bytes)
//
// 3 xrefs:
// > ??> @ 0x6c268
// > SetGroupIDLayer::init @ 0xac0550
// > ??> @ 0x1542ab8
//
// 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 13:01:02 +0000
//
__int64 __fastcall SetGroupIDLayer::onNextFreeOrderChannel(SetGroupIDLayer *this, cocos2d::CCObject *a2)
{
LevelEditorLayer *v3; // x0
int NextFreeOrderChannel; // w0
_QWORD *v5; // x1
_QWORD *v6; // x19
void *v7; // x0
void *v9[2]; // [xsp+30h] [xbp+30h] BYREF
void *v10; // [xsp+40h] [xbp+40h]
__int64 v11; // [xsp+48h] [xbp+48h]
float v12; // [xsp+50h] [xbp+50h]
v3 = *(LevelEditorLayer **)(GameManager::sharedState(_stack_chk_guard) + 552);
v9[0] = nullptr;
v9[1] = nullptr;
v10 = nullptr;
v11 = 0;
v12 = 1.0;
NextFreeOrderChannel = LevelEditorLayer::getNextFreeOrderChannel(v3, (__int64)v9);
v5 = v10;
*((_DWORD *)this + 189) = NextFreeOrderChannel;
if ( v5 )
{
do
{
v6 = (_QWORD *)*v5;
operator delete(v5);
v5 = v6;
}
while ( v6 );
}
v7 = v9[0];
v9[0] = nullptr;
if ( v7 )
operator delete(v7);
SetGroupIDLayer::updateOrderChannel(this);
SetGroupIDLayer::updateOrderChannelLabel(this);
return _stack_chk_guard;
}