//
// GJBaseGameLayer::moveObjectToStaticGroup from 0x595146 to 0x5951b6 (112 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::optimizeMoveGroups @ 0x5a68e2
// > GJBaseGameLayer::optimizeMoveGroups @ 0x5a6aa8
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:53:08 +0000
//
int __fastcall GJBaseGameLayer::moveObjectToStaticGroup(int this, GameObject *a2)
{
GJBaseGameLayer *v2; // r8
signed int v4; // r4
unsigned int v5; // r6
int GroupID; // r7
int v7; // r10
int v8; // r7
int v9; // r0
cocos2d::CCObject *StaticGroup; // r0
v2 = (GJBaseGameLayer *)this;
if ( *((_BYTE *)a2 + 1110) )
{
v4 = 0;
*((_BYTE *)a2 + 1110) = 0;
while ( v4 < *((__int16 *)a2 + 510) )
{
v5 = 0;
GroupID = GameObject::getGroupID(a2, v4);
v7 = GroupID;
if ( GroupID >= 9999 )
GroupID = 9999;
v8 = GroupID & ~(GroupID >> 31);
while ( v5 != v4 )
{
v9 = GameObject::getGroupID(a2, v5);
if ( v9 >= 9999 )
v9 = 9999;
this = v9 & ~(v9 >> 31);
if ( this == v8 )
goto LABEL_13;
++v5;
}
StaticGroup = GJBaseGameLayer::getStaticGroup(v2, v7);
this = cocos2d::CCArray::addObject(StaticGroup, a2);
LABEL_13:
++v4;
}
}
return this;
}