//
// std::__convert_to_v from 0xd1f4a8 to 0xd1f5ac (260 bytes)
//
// 3 xrefs:
// > sub_CE5680 @ 0xce5744
// > sub_D07908 @ 0xd079cc
// > ??> @ 0x83610
//
// 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; // x0
char *v7; // x21
size_t v8; // x23
void *v9; // x19
float v10; // s0
char *v11; // x0
int v12; // s1
char *v13; // [xsp+48h] [xbp+48h] 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 = strtof(a1, &v13);
v11 = v13;
*a2 = v10;
if ( v11 == a1 || *v11 )
{
*a2 = 0.0;
*a3 = 4;
}
else
{
v12 = 2139095039;
if ( v10 > 3.4028e38 || v10 < -3.4028e38 )
{
if ( v10 <= 0.0 )
v12 = -8388609;
*(_DWORD *)a2 = v12;
*a3 = 4;
}
}
setlocale(6, (const char *)v9);
if ( v9 )
operator delete[](v9);
}