//
// std::__convert_to_v from 0x77a248 to 0x77a312 (202 bytes)
//
// 2 xrefs:
// > sub_753100 @ 0x753172
// > sub_76AA84 @ 0x76aaf6
//
// 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
//
void __fastcall std::__convert_to_v(const char *a1, float *a2, _DWORD *a3)
{
char *v6; // r0
char *v7; // r8
size_t v8; // r7
void *v9; // r4
double v10; // r0
char *v11; // r3
bool v12; // zf
float v13; // s15
bool v14; // fzf
bool v15; // fnf
int v16; // s15
char *v17; // [sp+4h] [bp-8h] BYREF
v6 = setlocale(6, nullptr);
v7 = v6;
if ( v6 )
{
v8 = strlen(v6) + 1;
v9 = operator new[](v8);
memcpy(v9, v7, v8);
setlocale(6, "C");
}
else
{
v9 = nullptr;
}
v10 = strtod(a1, &v17);
v11 = v17;
v12 = v17 == a1;
v13 = v10;
*a2 = v13;
if ( v12 || *v11 )
{
*a2 = 0.0;
*a3 = 4;
}
else if ( fabsf(v13) > 3.4028e38 || v13 > 3.4028e38 || v13 < -3.4028e38 )
{
v14 = v13 == 0.0;
v15 = v13 < 0.0;
v16 = 2139095039;
if ( v15 || v14 )
v16 = -8388609;
*(_DWORD *)a2 = v16;
*a3 = 4;
}
setlocale(6, (const char *)v9);
if ( v9 )
operator delete[](v9);
}