//
// pugi::xml_document::destroy from 0x180083a80 to 0x180083b08 (136 bytes)
//
// 12 xrefs:
// > pugi::xml_document::~xml_document @ 0x180082364
// > pugi::xml_document::load @ 0x180084210
// > pugi::xml_document::load @ 0x180084270
// > pugi::xml_document::load_buffer @ 0x180084330
// > pugi::xml_document::load_buffer_inplace @ 0x180084610
// > pugi::xml_document::load_buffer_inplace_own @ 0x1800846a0
// > pugi::xml_document::load_file @ 0x180084730
// > pugi::xml_document::load_file @ 0x1800847a0
// > pugi::xml_document::reset @ 0x18008778f
// > pugi::xml_document::reset @ 0x180087cc9
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bf448
//
// 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:03 +0000
//
void __fastcall pugi::xml_document::destroy(pugi::xml_document *this)
{
void *v2; // rcx
__int64 i; // rbx
__int64 v4; // rcx
__int64 v5; // rbx
v2 = *((void **)this + 1);
if ( v2 )
{
off_1801ACF78(v2);
*((_QWORD *)this + 1) = 0;
}
for ( i = *(_QWORD *)(*(_QWORD *)this + 88LL); i; i = *(_QWORD *)(i + 8) )
{
if ( *(_QWORD *)i )
off_1801ACF78(*(void **)i);
}
v4 = *(_QWORD *)((**(_QWORD **)this & 0xFFFFFFFFFFFFFFE0uLL) + 0x18);
if ( v4 )
{
do
{
v5 = *(_QWORD *)(v4 + 24);
off_1801ACF78(*(void **)(v4 + 8));
v4 = v5;
}
while ( v5 );
}
*(_QWORD *)this = 0;
}