//
// GJBaseGameLayer::addToGroups from 0x10028ded0 to 0x10028df44 (116 bytes)
//
// 4 xrefs:
// > PlayLayer::addObject @ 0x1001416a0
// > PlayLayer::addObject @ 0x100141ca8
// > PlayLayer::addObject @ 0x100141fac
// > LevelEditorLayer::addSpecial @ 0x1003f9f98
//
// 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 11:02:01 +0000
//
__int64 __fastcall GJBaseGameLayer::addToGroups(__int64 result, __int64 a2, __int64 a3)
{
__int64 v5; // x21
__int64 v6; // x22
__int64 v7; // x0
if ( *(__int16 *)(a2 + 1168) >= 1 )
{
v5 = result;
v6 = 0;
do
{
v7 = sub_1002FA6C4(a2, v6);
result = (*(__int64 (__fastcall **)(__int64, __int64, __int64, __int64))(*(_QWORD *)v5 + 1352LL))(v5, a2, v7, a3);
v6 = (unsigned int)(v6 + 1);
}
while ( (int)v6 < *(__int16 *)(a2 + 1168) );
}
return result;
}