//
// tinyxml2::XMLNode::InsertFirstChild from 0x180099990 to 0x1800999dd (77 bytes)
//
// 2 xrefs:
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b6e94
//
// 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
//
struct tinyxml2::XMLNode *__fastcall tinyxml2::XMLNode::InsertFirstChild(
tinyxml2::XMLNode *this,
struct tinyxml2::XMLNode *a2)
{
__int64 v2; // rax
v2 = *((_QWORD *)this + 6);
if ( v2 )
{
*(_QWORD *)(v2 + 64) = a2;
*((_QWORD *)a2 + 9) = *((_QWORD *)this + 6);
*((_QWORD *)this + 6) = a2;
}
else
{
*((_QWORD *)this + 7) = a2;
*((_QWORD *)this + 6) = a2;
*((_QWORD *)a2 + 9) = 0;
}
*((_QWORD *)a2 + 8) = 0;
*((_QWORD *)a2 + 2) = this;
(*(void (__fastcall **)(_QWORD))(**((_QWORD **)a2 + 10) + 32LL))(*((_QWORD *)a2 + 10));
return a2;
}