//
// tinyxml2::XMLNode::InsertFirstChild from 0x5ede72 to 0x5ede9c (42 bytes)
//
// 0 xrefs:
//
// 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
//
tinyxml2::XMLNode *__fastcall tinyxml2::XMLNode::InsertFirstChild(tinyxml2::XMLNode *this, tinyxml2::XMLNode *a2)
{
int v2; // r3
v2 = *((_DWORD *)this + 6);
if ( v2 )
{
*(_DWORD *)(v2 + 32) = a2;
*((_DWORD *)a2 + 9) = v2;
*((_DWORD *)this + 6) = a2;
*((_DWORD *)a2 + 8) = 0;
}
else
{
*((_DWORD *)this + 7) = a2;
*((_DWORD *)this + 6) = a2;
*((_DWORD *)a2 + 8) = 0;
*((_DWORD *)a2 + 9) = 0;
}
*((_DWORD *)a2 + 2) = this;
(*(void (__fastcall **)(_DWORD))(**((_DWORD **)a2 + 10) + 20))(*((_DWORD *)a2 + 10));
return a2;
}