//
// std::__ndk1::stof from 0x97c44c to 0x97c5c0 (372 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:06:03 +0000
//
int __fastcall std::stof(int a1, _DWORD *a2)
{
char *v4; // r5
int v5; // r6
unsigned int v6; // r1
unsigned int v7; // r4
unsigned int *v8; // r0
float v9; // s0
_DWORD *exception; // r5
_DWORD *v12; // r5
int v13[2]; // [sp+0h] [bp-3Ch] BYREF
void *v14; // [sp+8h] [bp-34h]
unsigned int v15; // [sp+Ch] [bp-30h]
char *v16; // [sp+10h] [bp-2Ch]
unsigned int v17[2]; // [sp+14h] [bp-28h] BYREF
unsigned int v18[2]; // [sp+20h] [bp-1Ch] BYREF
v14 = nullptr;
v13[0] = 0;
v13[1] = 0;
std::string::__init(v13, "stof", 4u);
v16 = nullptr;
v4 = *(char **)(a1 + 8);
if ( (*(_BYTE *)a1 & 1) == 0 )
v4 = (char *)(a1 + 1);
v15 = *(_DWORD *)_errno();
*(_DWORD *)_errno() = 0;
v5 = sub_993ED0(v4);
v7 = v6;
v8 = (unsigned int *)_errno();
v18[0] = *v8;
*v8 = v15;
v15 = v18[0];
if ( v18[0] == 34 )
{
std::operator+(v18, (unsigned __int8 *)v13, ": out of range");
exception = _cxa_allocate_exception(8u);
std::logic_error::logic_error(exception, (int)v18);
*exception = &off_D1548C;
_cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::out_of_range,
(void (*)(void *))std::length_error::~length_error);
}
if ( v16 == v4 )
{
std::operator+(v17, (unsigned __int8 *)v13, ": no conversion");
v12 = _cxa_allocate_exception(8u);
std::logic_error::logic_error(v12, (int)v17);
*v12 = &off_D1544C;
_cxa_throw(
v12,
(struct type_info *)&`typeinfo for'std::invalid_argument,
(void (*)(void *))std::length_error::~length_error);
}
if ( a2 )
*a2 = v16 - v4;
if ( (v13[0] & 1) != 0 )
operator delete(v14);
v9 = COERCE_DOUBLE(__PAIR64__(v7, v5));
return LODWORD(v9);
}