//
// tinyxml2::XMLDocument::Parse from 0x7f9ae4 to 0x7f9b50 (108 bytes)
//
// 2 xrefs:
// > cocos2d::CCSAXParser::parse @ 0x7e6cb8
// > sub_7F69E0 @ 0x7f6a48
//
// 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 12:01:13 +0000
//
int __fastcall tinyxml2::XMLDocument::Parse(tinyxml2::XMLDocument *this, char *a2, size_t a3)
{
void *v6; // r0
const char *v7; // r1
unsigned __int8 *v8; // r0
bool *v9; // r2
unsigned __int8 *BOM; // r0
tinyxml2::XMLNode::DeleteChildren((int)this);
tinyxml2::XMLDocument::InitDocument(this);
if ( !a2 || !*a2 )
goto LABEL_7;
if ( a3 == -1 )
a3 = strlen(a2);
v6 = (void *)operator new[](a3 + 1);
*((_DWORD *)this + 16) = v6;
memcpy(v6, a2, a3);
*(_BYTE *)(*((_DWORD *)this + 16) + a3) = 0;
v8 = (unsigned __int8 *)tinyxml2::XMLUtil::SkipWhiteSpace((tinyxml2::XMLUtil *)a2, v7);
BOM = tinyxml2::XMLUtil::ReadBOM(v8, (char *)this + 44, v9);
if ( BOM && *BOM )
(*(void (__fastcall **)(tinyxml2::XMLDocument *, _DWORD, _DWORD))(*(_DWORD *)this + 60))(
this,
*((_DWORD *)this + 16),
0);
else
LABEL_7:
tinyxml2::XMLDocument::SetError(this, 15, 0, 0);
return *((_DWORD *)this + 12);
}