//
// pugi::xml_node::root from 0x602ba4 to 0x602be0 (60 bytes)
//
// 4 xrefs:
// > pugi::xml_node::first_element_by_path @ 0x603eac
// > pugi::xml_node::offset_debug @ 0x604154
// > pugi::xml_node::append_buffer @ 0x605894
// > sub_607BBC @ 0x6087f2
//
// 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
//
pugi::xml_node_struct *__fastcall pugi::xml_node::root(pugi::xml_node *this, pugi::xml_node_struct *a2)
{
int v2; // r1
pugi::xml_node v4[2]; // [sp+0h] [bp-8h] BYREF
v4[0]._root = (pugi::xml_node_struct *)this;
v4[1]._root = a2;
if ( this->_root )
{
v2 = *(_DWORD *)(*(_DWORD *)this->_root & 0xFFFFFFE0);
if ( v2 )
v2 -= 32;
pugi::xml_node::xml_node(v4, v2);
}
else
{
pugi::xml_node::xml_node(v4);
}
return v4[0]._root;
}