//
// GJBaseGameLayer::removeGroupParent from 0x10013d350 to 0x10013d423 (211 bytes)
//
// 3 xrefs:
// > GJBaseGameLayer::removeFromGroup @ 0x10013d32b
// > GJBaseGameLayer::setGroupParent @ 0x10013d6ec
// > SetGroupIDLayer::callRemoveFromGroup @ 0x1003179c8
//
// 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
//
void __fastcall GJBaseGameLayer::removeGroupParent(GJBaseGameLayer *a1, int a2)
{
intptr_t v2; // rbx
cocos2d::CCObject *v3; // rax
cocos2d::CCObject *v4; // r15
cocos2d::CCObject *v5; // rax
cocos2d::CCObject *v6; // r13
unsigned int v7; // ebx
v2 = a2;
v3 = cocos2d::CCDictionary::objectForKey(a1->m_parentGroupsDict, a2);
if ( v3 )
{
v4 = v3;
v5 = cocos2d::CCDictionary::objectForKey(a1->m_parentGroupIDs, v3[16].m_uReference);
if ( !v5 )
goto LABEL_11;
v6 = v5;
if ( (unsigned int)sub_100720070(v5) )
{
v7 = 0;
while ( *(_DWORD *)(sub_1007200C0(v6, v7) + 56) != a2 )
{
if ( ++v7 >= (unsigned int)sub_100720070(v6) )
goto LABEL_10;
}
sub_100720230(v6, v7, 1);
}
LABEL_10:
v2 = a2;
if ( !(unsigned int)sub_100720070(v6) )
LABEL_11:
BYTE2(v4[20].m_uOrderOfArrival) = 0;
cocos2d::CCDictionary::removeObjectForKey(a1->m_parentGroupsDict, v2);
}
}