//
// SetGroupIDLayer::onNextFreeOrderChannel from 0x1403fd890 to 0x1403fd92c (156 bytes)
//
// 2 xrefs:
// > SetGroupIDLayer::init @ 0x1403f9d9a
// > ??> @ 0x1406d85dc
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void SetGroupIDLayer::onNextFreeOrderChannel(SetGroupIDLayer *a1, cocos2d::CCObject *a2)
{
__int64 v2; // r8
__int64 v4; // rcx
std::unordered_set v5; // [rsp+20h] [rbp-48h] BYREF
void *v6; // [rsp+70h] [rbp+8h] BYREF
LODWORD(v6) = 0;
sub_14005E660((__int64)&v5, &v6, v2);
v4 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v6 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)v6);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v4 = qword_1406C2ED8;
}
a1->m_channelValue = LevelEditorLayer::getNextFreeOrderChannel(*(LevelEditorLayer **)(v4 + 528), &v5);
sub_14005D100((__int64)&v5._Vec);
sub_14005D870((void **)&v5._List._Mypair._Myval2._Myhead);
SetGroupIDLayer::updateOrderChannel(a1);
SetGroupIDLayer::updateOrderChannelLabel(a1);
}