//
// GJBaseGameLayer::setGroupParent from 0x10028e36c to 0x10028e47c (272 bytes)
//
// 3 xrefs:
// > GJBaseGameLayer::promoteGroupParent @ 0x10028e548
// > GJBaseGameLayer::addToGroupParents @ 0x10028e908
// > GJBaseGameLayer::loadGroupParentsFromString @ 0x10028ec78
//
// 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:02 +0000
//
void __fastcall GJBaseGameLayer::setGroupParent(__int64 a1, __int64 a2, int a3)
{
__int64 v6; // x0
__int64 v7; // x22
__int64 v8; // x0
__int64 v9; // x22
__int64 v10; // x21
_DWORD *v11; // x0
if ( a2 && a3 >= 1 )
{
cocos2d::CCDictionary::objectForKey_1(*(_QWORD *)(a1 + 3688), (unsigned int)a3);
if ( v6 )
{
v7 = v6;
if ( (sub_1002E7638(v6) & 1) != 0 )
return;
}
else
{
v7 = sub_1002E736C(0);
cocos2d::CCDictionary::setObject_1(*(_QWORD *)(a1 + 3688), v7, (unsigned int)a3);
}
sub_1002E74E0(v7, a2);
cocos2d::CCDictionary::objectForKey_1(*(_QWORD *)(a1 + 3696), *(unsigned int *)(a2 + 916));
v9 = v8;
if ( !v8 )
{
v9 = sub_1002E736C(0);
cocos2d::CCDictionary::setObject_1(*(_QWORD *)(a1 + 3696), v9, *(unsigned int *)(a2 + 916));
}
if ( (unsigned int)sub_1002E757C(v9) )
{
v10 = 0;
while ( *(_DWORD *)(sub_1002E75A0(v9, v10) + 56) != a3 )
{
v10 = (unsigned int)(v10 + 1);
if ( (unsigned int)v10 >= (unsigned int)sub_1002E757C(v9) )
goto LABEL_13;
}
}
else
{
LABEL_13:
v11 = sub_100145068(a3);
sub_1002E74E0(v9, v11);
}
*(_BYTE *)(a2 + 1170) = 1;
}
}