//
// GJBaseGameLayer::getCenterGroupObject from 0x10013d520 to 0x10013d5bc (156 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// local variable allocation has failed, the output may be wrong!
GameObject *__fastcall GJBaseGameLayer::getCenterGroupObject(GJBaseGameLayer *a1, int a2, int a3)
{
int v4; // eax
intptr_t v5; // r12
cocos2d::CCArray *v6; // r15
if ( a2 > 0 )
a3 = a2;
v4 = 9999;
if ( a3 < 9999 )
v4 = a3;
v5 = 0;
if ( v4 > 0 )
v5 = (unsigned int)v4;
v6 = a1->m_groups.__begin_[v5];
if ( (v6
|| (v6 = (cocos2d::CCArray *)sub_10071F9E0(a1, *(_QWORD *)&a2),
cocos2d::CCDictionary::setObject(a1->m_groupDict, v6, v5),
(a1->m_groups.__begin_[v5] = v6) != nullptr))
&& (unsigned int)sub_100720070(v6) == 1 )
{
return (GameObject *)sub_1007200C0(v6, 0);
}
else
{
return (GameObject *)cocos2d::CCDictionary::objectForKey(a1->m_parentGroupsDict, a3);
}
}