//
// pugi::xml_document::destroy from 0x8150e0 to 0x81512a (74 bytes)
//
// 2 xrefs:
// > pugi::xml_document::~xml_document @ 0x81513c
// > pugi::xml_document::reset @ 0x815148
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:01:41 +0000
//
void __fastcall pugi::xml_document::destroy(pugi::xml_document *this)
{
int v2; // r0
_DWORD *i; // r5
int j; // r3
int v5; // r6
v2 = *((_DWORD *)this + 1);
if ( v2 )
{
off_D20070(v2);
*((_DWORD *)this + 1) = 0;
}
for ( i = *(_DWORD **)(*(_DWORD *)this + 44); i; i = (_DWORD *)i[1] )
{
if ( *i )
off_D20070(*i);
}
for ( j = *(_DWORD *)&byte_9[(**(_DWORD **)this & 0xFFFFFFE0) + 3]; j; j = v5 )
{
v5 = *(_DWORD *)(j + 12);
off_D20070(*(_DWORD *)(j + 4));
}
*(_DWORD *)this = 0;
}