//
// GJBaseGameLayer::resetSpawnChannelIndex from 0x48b044 to 0x48b0b2 (110 bytes)
//
// 3 xrefs:
// > LevelEditorLayer::onPlaytest @ 0x36eb78
// > LevelEditorLayer::updateGameObjects @ 0x375d54
// > GJBaseGameLayer::resetLevelVariables @ 0x491ef4
//
// 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 GJBaseGameLayer::resetSpawnChannelIndex(GJBaseGameLayer *a1)
{
unsigned int v2; // r4
std::unordered_map *p_m_spawnChannelRelated0; // r10
cocos2d::CCArray *v4; // r7
int v5; // r0
GJBaseGameLayer *v6; // [sp+0h] [bp-8h] BYREF
v6 = a1;
v2 = 0;
a1->m_gameState.m_currentChannel = 0;
p_m_spawnChannelRelated0 = &a1->m_gameState.m_spawnChannelRelated0;
v4 = cocos2d::CCDictionary::allKeys(a1->m_spawnObjects);
while ( v2 < cocos2d::CCArray::count(v4) )
{
v5 = cocos2d::CCArray::objectAtIndex(v4, v2++);
v6 = *(GJBaseGameLayer **)(v5 + 52);
*std::__detail::_Map_base,std::allocator>,std::__detail::_Select1st,std::equal_to,std::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits,true>::operator[](
p_m_spawnChannelRelated0,
(unsigned int *)&v6) = 0;
*(_BYTE *)std::__detail::_Map_base,std::allocator>,std::__detail::_Select1st,std::equal_to,std::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits,true>::operator[](
&a1->m_gameState.m_spawnChannelRelated1._M_h._M_buckets,
(unsigned int *)&v6) = 0;
}
}