//
// tinyxml2::XMLNode::InsertAfterChild from 0x18009d520 to 0x18009d5a0 (128 bytes)
//
// 2 xrefs:
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c10d4
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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 11:22:12 +0000
//
struct tinyxml2::XMLNode *__fastcall tinyxml2::XMLNode::InsertAfterChild(
tinyxml2::XMLNode *this,
tinyxml2::XMLNode **a2,
struct tinyxml2::XMLNode *a3)
{
__int64 v5; // rax
if ( a2[2] != this )
return nullptr;
if ( a2[9] )
{
*((_QWORD *)a3 + 8) = a2;
*((_QWORD *)a3 + 9) = a2[9];
*((_QWORD *)a2[9] + 8) = a3;
a2[9] = a3;
}
else
{
v5 = *((_QWORD *)this + 7);
a2 = nullptr;
if ( v5 )
{
*(_QWORD *)(v5 + 72) = a3;
*((_QWORD *)a3 + 8) = *((_QWORD *)this + 7);
*((_QWORD *)this + 7) = a3;
}
else
{
*((_QWORD *)this + 7) = a3;
*((_QWORD *)this + 6) = a3;
*((_QWORD *)a3 + 8) = 0;
}
*((_QWORD *)a3 + 9) = 0;
}
*((_QWORD *)a3 + 2) = this;
(*(void (__fastcall **)(_QWORD, tinyxml2::XMLNode **))(**((_QWORD **)a3 + 10) + 32LL))(*((_QWORD *)a3 + 10), a2);
return a3;
}