//
// cocos2d::CCTMXTiledMap::layerNamed from 0xb3aafc to 0xb3abac (176 bytes)
//
// 1 xrefs:
// > ??> @ 0x6f018
//
// 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::CCTMXLayer *cocos2d::CCTMXTiledMap::layerNamed(cocos2d::CCTMXTiledMap *a1, const char *a2)
{
cocos2d::CCArray *m_pChildren; // x0
cocos2d::ccArray *data; // x2
const void **arr; // x19
cocos2d::CCTMXLayer *v5; // x20
const void **v6; // x21
const void *v7; // x0
void *v9; // x0
m_pChildren = a1->m_pChildren;
if ( !m_pChildren )
return nullptr;
data = m_pChildren->data;
if ( !data->num )
return nullptr;
arr = (const void **)data->arr;
v5 = nullptr;
v6 = &arr[data->num - 1];
if ( arr <= v6 )
{
v7 = *arr;
if ( *arr )
{
while ( 1 )
{
v9 = _dynamic_cast(
v7,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCTMXLayer,
0);
v5 = (cocos2d::CCTMXLayer *)v9;
if ( v9 )
{
if ( !strcmp(*((const char **)v9 + 51), a2) )
break;
}
if ( v6 >= ++arr )
{
v7 = *arr;
if ( *arr )
continue;
}
return nullptr;
}
}
}
return v5;
}