//
// GJBaseGameLayer::resetSpawnChannelIndex from 0x10029f99c to 0x10029fa60 (196 bytes)
//
// 3 xrefs:
// > GJBaseGameLayer::resetLevelVariables @ 0x10029f4c8
// > sub_1003F823C @ 0x1003f86b4
// > LevelEditorLayer::onPlaytest @ 0x100404934
//
// 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 11:02:12 +0000
//
__int64 __fastcall GJBaseGameLayer::resetSpawnChannelIndex(__int64 a1)
{
__int64 v2; // x20
__int64 result; // x0
__int64 v4; // x21
int v5; // [xsp+0h] [xbp-40h] BYREF
int *v6; // [xsp+8h] [xbp-38h] BYREF
*(_DWORD *)(a1 + 828) = 0;
v2 = cocos2d::CCDictionary::allKeys(*(_QWORD *)(a1 + 3312));
result = sub_1002E757C(v2);
if ( (_DWORD)result )
{
v4 = 0;
do
{
v5 = *(_DWORD *)(sub_1002E75A0(v2, v4) + 56);
v6 = &v5;
*((_DWORD *)sub_10001DBA4(a1 + 840, &v5, (__int64)&unk_100763014, &v6) + 5) = 0;
v6 = &v5;
*((_BYTE *)sub_100019574((float *)(a1 + 880), &v5, (__int64)&unk_100763014, &v6) + 20) = 0;
v4 = (unsigned int)(v4 + 1);
result = sub_1002E757C(v2);
}
while ( (unsigned int)v4 < (unsigned int)result );
}
return result;
}