//
// fmt::internal::FormatDecimal
from 0xb68838 to 0xb688f4 (188 bytes)
//
// 4 xrefs:
// > fmt::BasicWriter::FormatInt @ 0xb6e788
// > fmt::BasicWriter::FormatInt @ 0xb6e9d0
// > fmt::BasicWriter::FormatInt @ 0xb6ec3c
// > ??> @ 0x42480
//
// 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
//
_DWORD *__fastcall fmt::internal::FormatDecimal(_DWORD *result, unsigned __int64 a2, int a3)
{
int i; // w2
int v4; // w7
int v5; // w3
__int64 v6; // x3
__int64 v7; // x4
__int64 v8; // x1
int v9; // w3
for ( i = a3 - 1; a2 > 0x63; result[v4] = v6 )
{
v4 = i - 1;
v5 = a2 % 0x64;
a2 /= 0x64u;
v6 = (unsigned int)(2 * v5);
v7 = (unsigned int)(v6 + 1);
LODWORD(v6) = (unsigned __int8)fmt::internal::DIGITS[v6];
result[i] = (unsigned __int8)fmt::internal::DIGITS[v7];
i -= 2;
}
if ( a2 <= 9 )
{
*result = (unsigned __int8)(a2 + 48);
}
else
{
v8 = (unsigned int)(2 * a2);
v9 = (unsigned __int8)fmt::internal::DIGITS[(unsigned int)(v8 + 1)];
LODWORD(v8) = (unsigned __int8)fmt::internal::DIGITS[v8];
result[1] = v9;
*result = v8;
}
return result;
}