//
// LevelEditorLayer::updateToggledGroups from 0x1003612ac to 0x1003613a8 (252 bytes)
//
// 1 xrefs:
// > LevelEditorLayer::updateGameObjects @ 0x100358df4
//
// 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 __fastcall LevelEditorLayer::updateToggledGroups(LevelEditorLayer *a1)
{
unsigned __int64 i; // x20
cocos2d::CCArray *v3; // x24
_BOOL4 isGroupEnabled; // w0
std::__vector_base::pointer begin; // x8
__int64 v6; // x10
__int64 v7; // x11
_BOOL4 v8; // w21
__int64 v9; // x12
__int64 v10; // x10
cocos2d::ccArray *data; // x9
__int64 num; // x8
GameObject **arr; // x24
unsigned __int64 v14; // x25
GameObject *v15; // x0
for ( i = 0; i != 10000; ++i )
{
if ( a1->m_toggledGroupStates.__begin_[i] )
{
v3 = a1->m_groups.__begin_[i];
if ( v3 )
{
isGroupEnabled = GJEffectManager::isGroupEnabled(a1->m_effectManager, i);
begin = a1->m_toggledGroups.__begin_;
v6 = 1LL << i;
v7 = *(_QWORD *)&begin[8 * (i >> 6)];
if ( ((isGroupEnabled ^ ((v7 & (1LL << i)) != 0)) & 1) == 0 )
{
v8 = isGroupEnabled;
v9 = v7 & ~v6;
v10 = v7 | v6;
if ( isGroupEnabled )
v10 = v9;
*(_QWORD *)&begin[8 * (i >> 6)] = v10;
data = v3->data;
num = data->num;
if ( (_DWORD)num )
{
arr = (GameObject **)data->arr;
v14 = (unsigned __int64)&arr[num - 1];
do
{
v15 = *arr;
if ( !*arr )
break;
if ( !v15->m_isSpawnOrderTrigger )
{
if ( v8 )
GameObject::groupWasEnabled(v15);
else
GameObject::groupWasDisabled(v15);
}
++arr;
}
while ( (unsigned __int64)arr <= v14 );
}
}
}
--a1->m_toggledGroupStates.__begin_[i];
}
}
}