//
// pugi::xml_node::offset_debug from 0x8137c8 to 0x813820 (88 bytes)
//
// 0 xrefs:
//
// 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:39 +0000
//
int __fastcall pugi::xml_node::offset_debug(pugi::xml_node *this, int a2)
{
int v3; // r0
int v5; // r4
_DWORD *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 + 40);
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 & 8) == 0 )
{
v9 = *(_DWORD *)(*(_DWORD *)this + 12);
return v9 - v5;
}
return -1;
}
if ( (v8 & 0x62) == 0 )
return -!(v8 & 1);
if ( (**(_DWORD **)this & 0x10) != 0 )
return -1;
v9 = *(_DWORD *)(*(_DWORD *)this + 8);
return v9 - v5;
}