//
// pugi::xml_node::offset_debug from 0x604150 to 0x6041a8 (88 bytes)
//
// 0 xrefs:
//
// 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
//
int __fastcall pugi::xml_node::offset_debug(pugi::xml_node *this, pugi::xml_node_struct *a2)
{
pugi::xml_node_struct *v3; // r0
int v5; // r4
pugi::xml_node_struct *v6; // r0
char v7; // r3
int v8; // r0
int v9; // r0
v3 = pugi::xml_node::root(this, a2);
if ( !v3 )
return -1;
v5 = *((_DWORD *)v3 + 10);
if ( !v5 )
return -1;
v6 = pugi::xml_node::type(this);
v7 = (_BYTE)v6 - 1;
if ( (unsigned int)v6 - 1 > 7 )
return -1;
v8 = 1 << v7;
if ( ((1 << v7) & 0x9C) != 0 )
{
if ( (*(_DWORD *)this->_root & 8) == 0 )
{
v9 = *((_DWORD *)this->_root + 3);
return v9 - v5;
}
return -1;
}
if ( (v8 & 0x62) == 0 )
return -!(v8 & 1);
if ( (*(_DWORD *)this->_root & 0x10) != 0 )
return -1;
v9 = *((_DWORD *)this->_root + 2);
return v9 - v5;
}