//
// tinyxml2::XMLNode::Unlink from 0xd95060 to 0xd950c0 (96 bytes)
//
// 3 xrefs:
// > tinyxml2::XMLNode::DeleteChildren @ 0xd950e4
// > tinyxml2::XMLNode::~XMLNode @ 0xd95160
// > ??> @ 0xb9b30
//
// This function is hookable on this platform (idp: arm, 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 13:08:21 +0000
//
__int64 __fastcall tinyxml2::XMLNode::Unlink(tinyxml2::XMLNode *this, tinyxml2::XMLNode *a2)
{
__int64 v2; // x0
__int64 result; // x0
if ( *((tinyxml2::XMLNode **)this + 6) == a2 )
{
*((_QWORD *)this + 6) = *((_QWORD *)a2 + 9);
if ( *((tinyxml2::XMLNode **)this + 7) != a2 )
goto LABEL_3;
}
else if ( *((tinyxml2::XMLNode **)this + 7) != a2 )
{
goto LABEL_3;
}
*((_QWORD *)this + 7) = *((_QWORD *)a2 + 8);
LABEL_3:
v2 = *((_QWORD *)a2 + 8);
if ( v2 )
*(_QWORD *)(v2 + 72) = *((_QWORD *)a2 + 9);
result = *((_QWORD *)a2 + 9);
if ( result )
*(_QWORD *)(result + 64) = *((_QWORD *)a2 + 8);
*((_QWORD *)a2 + 2) = 0;
return result;
}