//
// GJBaseGameLayer::addToGroups from 0x9a0518 to 0x9a058c (116 bytes)
//
// 5 xrefs:
// > PlayLayer::addObject @ 0x6f4240
// > PlayLayer::addObject @ 0x6f46c0
// > PlayLayer::addObject @ 0x6f4914
// > LevelEditorLayer::addSpecial @ 0x7a0a0c
// > ??> @ 0x84f88
//
// 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::addToGroups(GJBaseGameLayer *this, GameObject *a2, unsigned __int8 a3)
{
__int64 result; // x0
unsigned int v6; // w22
int i; // w19
unsigned int v8; // w1
unsigned int GroupID; // w0
result = (unsigned int)*((__int16 *)a2 + 584);
v6 = a3;
for ( i = 0; (int)result > i; result = (unsigned int)*((__int16 *)a2 + 584) )
{
v8 = i++;
GroupID = GameObject::getGroupID(a2, v8);
(*(void (__fastcall **)(GJBaseGameLayer *, GameObject *, _QWORD, _QWORD))(*(_QWORD *)this + 1352LL))(
this,
a2,
GroupID,
v6);
}
return result;
}