//
// tinyxml2::XMLNode::Unlink from 0x5edc36 to 0x5edc5a (36 bytes)
//
// 2 xrefs:
// > tinyxml2::XMLNode::DeleteChildren @ 0x5edc66
// > tinyxml2::XMLNode::~XMLNode @ 0x5edc9c
//
// 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
//
int __fastcall tinyxml2::XMLNode::Unlink(int this, tinyxml2::XMLNode *a2)
{
int v2; // r2
tinyxml2::XMLNode *v3; // r3
bool v4; // zf
int v5; // r3
int v6; // r2
v2 = *((_DWORD *)a2 + 9);
v3 = *(tinyxml2::XMLNode **)(this + 28);
if ( a2 == *(tinyxml2::XMLNode **)(this + 24) )
*(_DWORD *)(this + 24) = v2;
v4 = a2 == v3;
v5 = *((_DWORD *)a2 + 8);
if ( v4 )
*(_DWORD *)(this + 28) = v5;
if ( v5 )
*(_DWORD *)(v5 + 36) = v2;
v6 = *((_DWORD *)a2 + 9);
if ( v6 )
*(_DWORD *)(v6 + 32) = v5;
*((_DWORD *)a2 + 2) = 0;
return this;
}