//
// SetGroupIDLayer::addGroupID from 0xabacf8 to 0xabadd8 (224 bytes)
//
// 2 xrefs:
// > SetGroupIDLayer::onAddGroup @ 0xabaddc
// > ??> @ 0xb4178
//
// 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 13:01:01 +0000
//
__int64 __fastcall SetGroupIDLayer::addGroupID(SetGroupIDLayer *this, unsigned int a2)
{
__int64 v4; // x0
GameManager *v5; // x0
unsigned int v7; // w19
bool v8; // cf
unsigned int v9; // w1
__int64 v10; // x21
GameManager *v11; // x0
__int64 v12; // x0
__int64 v13; // x0
v4 = *((_QWORD *)this + 84);
*((_BYTE *)this + 804) = 1;
if ( v4 )
{
v5 = (GameManager *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 1600LL))(v4);
if ( (_DWORD)v5 == 1 )
{
v13 = GameManager::sharedState(v5);
(*(void (__fastcall **)(_QWORD, _QWORD, _QWORD, _QWORD))(**(_QWORD **)(v13 + 552) + 1352LL))(
*(_QWORD *)(v13 + 552),
*((_QWORD *)this + 84),
a2,
0);
}
}
else
{
v7 = 0;
while ( 1 )
{
v8 = v7 >= (unsigned int)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 85));
v9 = v7++;
if ( v8 )
break;
v10 = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 85), v9);
v11 = (GameManager *)(*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v10 + 1600LL))(v10, a2);
if ( (_DWORD)v11 == 1 )
{
v12 = GameManager::sharedState(v11);
(*(void (__fastcall **)(_QWORD, __int64, _QWORD, _QWORD))(**(_QWORD **)(v12 + 552) + 1352LL))(
*(_QWORD *)(v12 + 552),
v10,
a2,
0);
}
}
}
return SetGroupIDLayer::updateGroupIDButtons((cocos2d::CCArray **)this);
}