//
// GJBaseGameLayer::getOptimizedGroup from 0x10011a560 to 0x10011a5c5 (101 bytes)
//
// 1 xrefs:
// > PlayLayer::addToGroupOld @ 0x1000846a3
//
// This function is hookable on this platform (idp: pc, 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:24:35 +0000
//
__int64 __fastcall GJBaseGameLayer::getOptimizedGroup(__int64 a1, int a2)
{
int v2; // eax
__int64 v3; // rbx
__int64 result; // rax
__int64 v5; // r15
v2 = 9999;
if ( a2 < 9999 )
v2 = a2;
v3 = 0;
if ( v2 > 0 )
v3 = (unsigned int)v2;
result = *(_QWORD *)(*(_QWORD *)(a1 + 3664) + 8 * v3);
if ( !result )
{
v5 = sub_1007FE900(a1);
cocos2d::CCDictionary::setObject_1(*(_QWORD *)(a1 + 3608), v5, v3);
*(_QWORD *)(*(_QWORD *)(a1 + 3664) + 8 * v3) = v5;
return v5;
}
return result;
}