//
// sub_B4ABF0 from 0xb4abf0 to 0xb4acf4 (260 bytes)
//
// 16 xrefs:
// > sub_B604E0 @ 0xb61208
// > sub_B604E0 @ 0xb61300
// > sub_B6147C @ 0xb61790
// > sub_B6147C @ 0xb618a8
// > sub_B6147C @ 0xb6197c
// > sub_B6147C @ 0xb619f0
// > sub_B62C08 @ 0xb62d40
// > sub_B62C08 @ 0xb62d68
// > sub_B62C08 @ 0xb62f4c
// > sub_B62C08 @ 0xb6302c
// > sub_B63120 @ 0xb63258
// > sub_B63120 @ 0xb63280
// > sub_B63120 @ 0xb63464
// > sub_B63120 @ 0xb63544
// > sub_B63D0C @ 0xb63fbc
// > sub_B63D0C @ 0xb64388
//
// 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
//
double __fastcall sub_B4ABF0(const char *a1)
{
int v1; // w2
const char *v2; // x1
int v3; // t1
unsigned __int8 i; // w5
const char *v5; // x2
unsigned int v6; // w3
__int64 v7; // x5
unsigned int v8; // t1
unsigned int v10; // t1
v1 = *(unsigned __int8 *)a1;
if ( (byte_F1EC70[*(unsigned __int8 *)a1] & 8) != 0 )
{
v2 = a1;
do
{
v3 = *(unsigned __int8 *)++v2;
v1 = v3;
}
while ( (byte_F1EC70[v3] & 8) != 0 );
}
else
{
v2 = a1;
}
if ( v1 == 45 )
++v2;
if ( !*v2 )
return NAN;
if ( (byte_F1EC70[*(unsigned __int8 *)v2 + 256] & 8) == 0 )
{
if ( *v2 != 46 || (byte_F1EC70[*((unsigned __int8 *)v2 + 1) + 256] & 8) == 0 )
return NAN;
v5 = v2 + 1;
do
{
LABEL_21:
v10 = *(unsigned __int8 *)++v5;
v7 = v10;
v6 = v10;
}
while ( (byte_F1EC70[v10 + 256] & 8) != 0 );
goto LABEL_13;
}
for ( i = byte_F1EC70[*((unsigned __int8 *)v2 + 1) + 256]; ; i = byte_F1EC70[*((unsigned __int8 *)v5 + 1) + 256] )
{
v5 = v2 + 1;
v6 = *((unsigned __int8 *)v2 + 1);
if ( (i & 8) == 0 )
break;
++v2;
}
if ( v6 != 46 )
{
v7 = *((unsigned __int8 *)v2 + 1);
goto LABEL_13;
}
v7 = *((unsigned __int8 *)v2 + 2);
v5 = v2 + 2;
v6 = *((unsigned __int8 *)v2 + 2);
if ( (byte_F1EC70[v7 + 256] & 8) != 0 )
goto LABEL_21;
LABEL_13:
if ( (byte_F1EC70[v7] & 8) != 0 )
{
do
{
v8 = *(unsigned __int8 *)++v5;
v6 = v8;
}
while ( (byte_F1EC70[v8] & 8) != 0 );
}
if ( !v6 )
return atof(a1);
return NAN;
}