//
// pugi::xml_node::root from 0x81226c to 0x8122a8 (60 bytes)
//
// 4 xrefs:
// > pugi::xml_node::first_element_by_path @ 0x813524
// > pugi::xml_node::offset_debug @ 0x8137cc
// > pugi::xml_node::append_buffer @ 0x814f0c
// > sub_816CF0 @ 0x817926
//
// 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:38 +0000
//
int __fastcall pugi::xml_node::root(pugi::xml_node *this, int a2)
{
int v2; // r1
_DWORD v4[2]; // [sp+0h] [bp-8h] BYREF
v4[0] = this;
v4[1] = a2;
if ( *(_DWORD *)this )
{
v2 = *(_DWORD *)(**(_DWORD **)this & 0xFFFFFFE0);
if ( v2 )
v2 -= 32;
pugi::xml_node::xml_node(v4, v2);
}
else
{
pugi::xml_node::xml_node(v4);
}
return v4[0];
}