//
// LevelEditorLayer::addTriggersWithTargetGroupID from 0x46aea4 to 0x46af9a (246 bytes)
//
// 0 xrefs:
//
// 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:49:00 +0000
//
_DWORD *__fastcall LevelEditorLayer::addTriggersWithTargetGroupID(
LevelEditorLayer *a1,
_DWORD *a2,
int a3,
cocos2d::CCArray *a4,
_DWORD *a5,
int a6)
{
_DWORD *result; // r0
_DWORD *v9; // r3
unsigned int **v10; // r5
unsigned int *v11; // r4
unsigned int *v12; // t1
int v13; // r9
_DWORD *i; // r3
unsigned int **v15; // [sp+0h] [bp-1Ch]
_DWORD *v17; // [sp+Ch] [bp-10h]
unsigned int v18; // [sp+10h] [bp-Ch] BYREF
result = (_DWORD *)LevelEditorLayer::getAllObjects(a1);
if ( result )
{
v9 = (_DWORD *)result[13];
if ( *v9 )
{
v10 = (unsigned int **)v9[3];
v15 = &(&v10[*v9])[-1];
while ( 1 )
{
while ( 1 )
{
while ( 1 )
{
LABEL_4:
if ( v10 <= v15 )
{
v12 = *v10++;
v11 = v12;
if ( v12 )
continue;
}
return result;
if ( v11[271] == 1 && (a6 <= 0 || a6 == v11[223]) )
{
v18 = v11[195];
result = std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::find(
a5,
&v18);
if ( !result )
break;
}
}
result = std::__hash_table,std::equal_to,std::allocator>::find(
a2,
v11 + 321);
if ( !result )
break;
v13 = v11[321];
LABEL_14:
if ( v13 > 0 )
{
if ( v11[223] == 1268 )
{
for ( i = *(_DWORD **)(a3 + 8); i; i = (_DWORD *)*v17 )
{
v17 = i;
result = (_DWORD *)SpawnTriggerGameObject::getRemapWithSource((SpawnTriggerGameObject *)v11, i[2]);
if ( result )
goto LABEL_4;
}
}
cocos2d::CCArray::addObject(a4, (cocos2d::CCObject *)v11);
v18 = v11[195];
result = std::unordered_map::operator[]((int)a5, &v18);
*result = v13;
}
}
result = std::__hash_table,std::equal_to,std::allocator>::find(a2, v11 + 322);
if ( result )
{
v13 = v11[322];
goto LABEL_14;
}
}
}
}
return result;
}