//
// std::__ndk1::stof from 0xf82c50 to 0xf82e38 (488 bytes)
//
// 1 xrefs:
// > ??> @ 0xd0498
//
// 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:13:51 +0000
//
void __fastcall std::stof(__int64 a1, _QWORD *a2)
{
char *v3; // x20
int *v4; // x21
_QWORD *exception; // x20
_QWORD *v6; // x20
_QWORD v7[3]; // [xsp+0h] [xbp-80h] BYREF
int v8; // [xsp+1Ch] [xbp-64h]
char *v9; // [xsp+20h] [xbp-60h] BYREF
unsigned __int64 v10[2]; // [xsp+28h] [xbp-58h] BYREF
unsigned __int64 v11[4]; // [xsp+40h] [xbp-40h] BYREF
v11[3] = *(_QWORD *)(_ReadStatusReg(TPIDR_EL0) + 40);
v7[1] = 0;
v7[2] = 0;
v7[0] = 0x666F747308LL;
v9 = nullptr;
if ( (*(_BYTE *)a1 & 1) != 0 )
v3 = *(char **)(a1 + 16);
else
v3 = (char *)(a1 + 1);
v4 = (int *)__errno();
v8 = *v4;
*v4 = 0;
strtof(v3, &v9);
LODWORD(v11[0]) = *v4;
*v4 = v8;
v8 = v11[0];
if ( LODWORD(v11[0]) == 34 )
{
std::operator+(": out of range", (__int64)v7, v11);
exception = _cxa_allocate_exception(0x10u);
std::logic_error::logic_error(exception, (__int64)v11);
*exception = off_1536D68;
_cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::out_of_range,
(void (*)(void *))std::logic_error::~logic_error);
}
if ( v9 == v3 )
{
std::operator+(": no conversion", (__int64)v7, v10);
v6 = _cxa_allocate_exception(0x10u);
std::logic_error::logic_error(v6, (__int64)v10);
*v6 = off_1536CE8;
_cxa_throw(
v6,
(struct type_info *)&`typeinfo for'std::invalid_argument,
(void (*)(void *))std::logic_error::~logic_error);
}
if ( a2 )
*a2 = v9 - v3;
_ReadStatusReg(TPIDR_EL0);
}