//
// pugi::xml_document::destroy from 0xdcdc88 to 0xdcdd24 (156 bytes)
//
// 3 xrefs:
// > pugi::xml_document::~xml_document @ 0xdcdd24
// > pugi::xml_document::reset @ 0xdcdd38
// > ??> @ 0x4b9e8
//
// 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:57 +0000
//
void __fastcall pugi::xml_document::destroy(pugi::xml_document *this)
{
void *v2; // x0
_QWORD *v3; // x0
__int64 v4; // x19
__int64 v5; // x1
__int64 v6; // x19
v2 = *((void **)this + 1);
if ( v2 )
{
off_154A340(v2);
*((_QWORD *)this + 1) = 0;
}
v3 = *(_QWORD **)this;
v4 = *(_QWORD *)(*(_QWORD *)this + 88LL);
if ( v4 )
{
do
{
if ( *(_QWORD *)v4 )
off_154A340(*(void **)v4);
v4 = *(_QWORD *)(v4 + 8);
}
while ( v4 );
v3 = *(_QWORD **)this;
}
v5 = *(__int64 *)((char *)&off_18 + (*v3 & 0xFFFFFFFFFFFFFFE0LL));
if ( v5 )
{
do
{
v6 = *(_QWORD *)(v5 + 24);
off_154A340(*(void **)(v5 + 8));
v5 = v6;
}
while ( v6 );
}
*(_QWORD *)this = 0;
}