//
// cocos2d::CCTMXMapInfo::parseXMLFile from 0x1800af9e0 to 0x1800afaea (266 bytes)
//
// 6 xrefs:
// > cocos2d::CCTMXMapInfo::formatWithTMXFile @ 0x1800af5b2
// > cocos2d::CCTMXMapInfo::initWithTMXFile @ 0x1800af79a
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b0a85
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b84cc
// > ??> @ 0x1801b84d8
//
// 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
//
// Hidden C++ exception states: #wind=2
_BOOL8 __fastcall cocos2d::CCTMXMapInfo::parseXMLFile(cocos2d::CCTMXMapInfo *this, const char *a2)
{
float v2; // xmm1_4
bool v5; // bl
struct cocos2d::CCSAXDelegator *v6; // rdx
struct cocos2d::CCFileUtils *v7; // rax
__int64 v8; // rax
_BYTE *v9; // rcx
cocos2d::CCThread v11; // [rsp+20h] [rbp-38h] BYREF
void *Block; // [rsp+28h] [rbp-30h] BYREF
__m128i si128; // [rsp+38h] [rbp-20h]
pugi::xml_node::xml_node(&v11);
if ( cocos2d::CCComponent::serialize((cocos2d::CCComponent *)&v11, "UTF-8") )
{
v6 = &this->cocos2d::CCSAXDelegator;
if ( !this )
v6 = nullptr;
cocos2d::CCSAXParser::setDelegator((cocos2d::CCSAXParser *)&v11, v6);
v7 = cocos2d::CCFileUtils::sharedFileUtils();
v8 = ((__int64 (__fastcall *)(struct cocos2d::CCFileUtils *, void **, const char *, _QWORD))v7->createCCArrayWithContentsOfFile)(
v7,
&Block,
a2,
0);
if ( *(_QWORD *)(v8 + 24) > 0xFu )
v8 = *(_QWORD *)v8;
v5 = cocos2d::CCSAXParser::parse((cocos2d::CCSAXParser *)&v11, (const char *)v8);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v9 = Block;
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v9 = *((_BYTE **)Block - 1);
if ( (unsigned __int64)((_BYTE *)Block - v9 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free_0(v9);
}
si128 = _mm_load_si128((const __m128i *)&xmmword_1800E7160);
LOBYTE(Block) = 0;
}
else
{
v5 = 0;
}
cocos2d::CCNode::updateTweenActionInt((cocos2d::CCNode *)&v11, v2);
return v5;
}