//
// GJBaseGameLayer::getOptimizedGroup from 0x9a09d8 to 0x9a0a5c (132 bytes)
//
// 7 xrefs:
// > PlayLayer::addToGroupOld @ 0x6f4d88
// > GJBaseGameLayer::addToGroup @ 0x9a0ad4
// > GJBaseGameLayer::removeFromGroup @ 0x9a3748
// > GJBaseGameLayer::processMoveActions @ 0x9a65e8
// > GJBaseGameLayer::processRotationActions @ 0x9bfe04
// > GJBaseGameLayer::processTransformActions @ 0x9c0654
// > ??> @ 0xda590
//
// 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
//
cocos2d::CCObject *__fastcall GJBaseGameLayer::getOptimizedGroup(GJBaseGameLayer *this, int a2)
{
int v2; // w19
__int64 v3; // x1
cocos2d::CCObject *v6; // x20
if ( a2 > 9999 )
a2 = 9999;
if ( a2 < 0 )
v2 = 0;
else
v2 = a2;
v3 = *((_QWORD *)this + 458);
if ( *(_QWORD *)(v3 + 8LL * v2) )
return *(cocos2d::CCObject **)(v3 + 8LL * v2);
v6 = (cocos2d::CCObject *)cocos2d::CCArray::create(this);
cocos2d::CCDictionary::setObject(*((cocos2d::CCDictionary **)this + 451), v6, v2);
*(_QWORD *)(*((_QWORD *)this + 458) + 8LL * v2) = v6;
return v6;
}