//
// GJBaseGameLayer::moveObjectToStaticGroup from 0x1002969f8 to 0x100296ac8 (208 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::optimizeMoveGroups @ 0x10027a748
// > GJBaseGameLayer::optimizeMoveGroups @ 0x10027a7d0
//
// 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:06 +0000
//
void __fastcall GJBaseGameLayer::moveObjectToStaticGroup(__int64 a1, __int64 a2)
{
__int64 v4; // x21
int v5; // w0
int v6; // w22
int v7; // w8
__int64 v8; // x23
int v9; // w25
int v10; // w0
int v11; // w8
__int64 StaticGroup; // x0
if ( *(_BYTE *)(a2 + 1290) == 1 )
{
*(_BYTE *)(a2 + 1290) = 0;
if ( *(__int16 *)(a2 + 1168) >= 1 )
{
v4 = 0;
do
{
v5 = sub_1002FA6C4(a2, v4);
v6 = v5;
if ( v5 >= 9999 )
v7 = 9999;
else
v7 = v5;
if ( (_DWORD)v4 )
{
v8 = 0;
v9 = v7 & ~(v7 >> 31);
while ( 1 )
{
v10 = sub_1002FA6C4(a2, v8);
v11 = v10 >= 9999 ? 9999 : v10;
if ( (v11 & ~(v11 >> 31)) == v9 )
break;
v8 = (unsigned int)(v8 + 1);
if ( (_DWORD)v4 == (_DWORD)v8 )
goto LABEL_14;
}
}
else
{
LABEL_14:
StaticGroup = GJBaseGameLayer::getStaticGroup(a1, v6);
sub_1002E74E0(StaticGroup, a2);
}
v4 = (unsigned int)(v4 + 1);
}
while ( (int)v4 < *(__int16 *)(a2 + 1168) );
}
}
}