//
// pugi::xml_text::as_llong from 0xb57144 to 0xb571e8 (164 bytes)
//
// 1 xrefs:
// > ??> @ 0x41538
//
// 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
//
__int64 __fastcall pugi::xml_text::as_llong(pugi::xml_text *this, __int64 a2)
{
_QWORD *v2; // x0
const char *v3; // x0
int v4; // w2
const char *v5; // x1
int v6; // t1
bool v7; // zf
int v8; // w2
v2 = pugi::xml_text::_data(this);
if ( !v2 )
return a2;
v3 = (const char *)v2[3];
if ( !v3 )
return a2;
v4 = *(unsigned __int8 *)v3;
if ( (byte_F1EC70[*(unsigned __int8 *)v3] & 8) != 0 )
{
v5 = v3;
do
{
v6 = *(unsigned __int8 *)++v5;
v4 = v6;
}
while ( (byte_F1EC70[v6] & 8) != 0 );
}
else
{
v5 = v3;
}
v7 = v4 == 45;
v8 = 10;
if ( v7 )
++v5;
if ( *v5 == 48 )
{
if ( (v5[1] & 0xDF) == 0x58 )
v8 = 16;
else
v8 = 10;
}
return strtoll(v3, nullptr, v8);
}