//
// GJBaseGameLayer::toggleGroup from 0x9a07cc to 0x9a08e0 (276 bytes)
//
// 3 xrefs:
// > EffectGameObject::triggerObject @ 0x89838c
// > GJBaseGameLayer::toggleGroupTriggered @ 0x9a090c
// > ??> @ 0x99568
//
// 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 12:58:06 +0000
//
__int64 __fastcall GJBaseGameLayer::toggleGroup(GJEffectManager **this, int a2, unsigned __int8 a3)
{
int v4; // w21
__int64 result; // x0
cocos2d::CCObject *Group; // x0
unsigned int *v8; // x1
__int64 *v9; // x19
__int64 *v10; // x23
__int64 v11; // x0
unsigned int *v12; // x1
__int64 *v13; // x19
__int64 *v14; // x23
__int64 v15; // x0
v4 = a3;
result = GJEffectManager::isGroupEnabled(*(this + 269), a2);
if ( v4 != (unsigned __int8)result )
{
Group = GJBaseGameLayer::getGroup((GJBaseGameLayer *)this, a2);
if ( v4 )
{
if ( Group )
{
v8 = *((unsigned int **)Group + 7);
if ( *v8 )
{
v9 = *((__int64 **)v8 + 2);
v10 = &v9[*v8 - 1];
while ( v10 >= v9 )
{
v11 = *v9;
if ( !*v9 )
break;
++v9;
GameObject::groupWasEnabled(v11);
}
}
}
}
else if ( Group )
{
v12 = *((unsigned int **)Group + 7);
if ( *v12 )
{
v13 = *((__int64 **)v12 + 2);
v14 = &v13[*v12 - 1];
while ( v14 >= v13 )
{
v15 = *v13;
if ( !*v13 )
break;
++v13;
GameObject::groupWasDisabled(v15);
}
}
}
return GJEffectManager::toggleGroup(*(this + 269), a2, v4);
}
return result;
}