//
// cocos2d::CCTMXTiledMap::objectGroupNamed from 0xb3abac to 0xb3acdc (304 bytes)
//
// 1 xrefs:
// > ??> @ 0x85740
//
// 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
//
cocos2d::CCTMXObjectGroup *cocos2d::CCTMXTiledMap::objectGroupNamed(cocos2d::CCTMXTiledMap *a1, const char *a2)
{
cocos2d::CCArray *v3; // x0
__int64 v4; // x20
void *v5; // x0
__int64 v7; // x0
unsigned int *v8; // x1
char *v9; // x19
__int64 v10; // x0
char *i; // x21
unsigned int *v12; // x2
int v13; // w1
__int64 v14; // [xsp+50h] [xbp+50h] BYREF
sub_D153B8((int)&v14, (char *)a2);
v3 = *(cocos2d::CCArray **)&a1[1].m_nTag;
if ( v3 )
{
if ( (unsigned int)cocos2d::CCArray::count(v3) )
{
v7 = *(_QWORD *)&a1[1].m_nTag;
if ( v7 )
{
v8 = *(unsigned int **)(v7 + 56);
if ( *v8 )
{
v9 = *((char **)v8 + 2);
v10 = 8LL * *v8 - 8;
for ( i = &v9[v10]; i >= v9; v9 += 8 )
{
v4 = *(_QWORD *)v9;
if ( !*(_QWORD *)v9 )
break;
if ( !(unsigned int)sub_D171E0((int)&v14, *(char **)(v4 + 80)) )
goto LABEL_4;
}
}
}
}
}
v4 = 0;
LABEL_4:
v5 = (void *)(v14 - 24);
if ( (__int64 *)(v14 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v12 = (unsigned int *)(v14 - 8);
do
v13 = __ldaxr(v12);
while ( __stlxr(v13 - 1, v12) );
}
else
{
v13 = *(_DWORD *)(v14 - 8);
*(_DWORD *)(v14 - 8) = v13 - 1;
}
if ( v13 <= 0 )
operator delete(v5);
}
return (cocos2d::CCTMXObjectGroup *)v4;
}