//
// pugi::xml_node::offset_debug from 0xdca8dc to 0xdca998 (188 bytes)
//
// 1 xrefs:
// > ??> @ 0xe8618
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:08:54 +0000
//
__int64 __fastcall pugi::xml_node::offset_debug(pugi::xml_node *this)
{
__int64 v2; // x0
__int64 v3; // x20
int v4; // w1
__int64 result; // x0
v2 = pugi::xml_node::root(this);
if ( !v2 )
return -1;
v3 = *(_QWORD *)(v2 + 80);
if ( !v3 )
return -1;
v4 = pugi::xml_node::type(this) - 1;
result = -1;
switch ( v4 )
{
case 0:
result = 0;
break;
case 1:
case 5:
case 6:
if ( (**(_QWORD **)this & 0x10) != 0 )
return -1;
result = *(_QWORD *)(*(_QWORD *)this + 16LL) - v3;
break;
case 2:
case 3:
case 4:
case 7:
if ( (**(_QWORD **)this & 8) != 0 )
return -1;
result = *(_QWORD *)(*(_QWORD *)this + 24LL) - v3;
break;
default:
return result;
}
return result;
}