//
// GJBaseGameLayer::addToGroupParents from 0x5a1d9c to 0x5a1e82 (230 bytes)
//
// 1 xrefs:
// > LevelEditorLayer::addSpecial @ 0x46e65a
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:53:17 +0000
//
cocos2d::CCDictionary **__fastcall GJBaseGameLayer::addToGroupParents(cocos2d::CCDictionary **this, GameObject *a2)
{
int v2; // r6
cocos2d::CCArray *v4; // r9
int v5; // r3
unsigned int v6; // r5
_DWORD *v7; // r8
_DWORD *i; // r5
int v9; // [sp+8h] [bp-Ch] BYREF
v2 = (int)this;
if ( *((_BYTE *)a2 + 1022) )
{
this = (cocos2d::CCDictionary **)cocos2d::CCDictionary::objectForKey(*(this + 582), *((_DWORD *)a2 + 195));
v4 = (cocos2d::CCArray *)this;
if ( this )
{
v5 = *((_DWORD *)a2 + 195);
v6 = 0;
*((_BYTE *)a2 + 1022) = 0;
v9 = v5;
v7 = std::__hash_table>,std::__unordered_map_hasher>,std::hash,true>,std::__unordered_map_equal>,std::equal_to,true>,std::allocator>>>::find(
(_DWORD *)(v2 + 2352),
(unsigned int *)&v9);
while ( v6 < cocos2d::CCArray::count(v4) )
{
v9 = *(_DWORD *)(cocos2d::CCArray::objectAtIndex(v4, v6) + 52);
GJBaseGameLayer::setGroupParent(v2, a2, (cocos2d::CCInteger *)v9);
if ( v7 )
{
if ( std::__hash_table,std::equal_to,std::allocator>::find(
v7 + 3,
(unsigned int *)&v9) )
{
GJBaseGameLayer::promoteGroupParent(
(cocos2d::CCDictionary **)v2,
(cocos2d::CCDictionary **)a2,
(cocos2d::CCInteger *)v9);
}
}
++v6;
}
if ( v7 )
{
for ( i = (_DWORD *)v7[5]; i; i = (_DWORD *)*i )
{
v9 = i[2];
std::__hash_table,std::equal_to,std::allocator>::__erase_unique(
(int *)(v2 + 2372),
(unsigned int *)&v9);
}
std::__hash_table>,std::__unordered_map_hasher>,std::hash,true>,std::__unordered_map_equal>,std::equal_to,true>,std::allocator>>>::erase(
(_DWORD *)(v2 + 2352),
v7);
}
return (cocos2d::CCDictionary **)cocos2d::CCDictionary::removeObjectForKey(
*(cocos2d::CCDictionary **)(v2 + 2328),
*((_DWORD *)a2 + 195));
}
}
return this;
}