//
// fmt::internal::FormatDecimal
from 0x60bd4c to 0x60bdc4 (120 bytes)
//
// 2 xrefs:
// > fmt::BasicWriter::FormatInt @ 0x60df26
// > fmt::BasicWriter::FormatInt @ 0x60e106
//
// 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
//
int __fastcall fmt::internal::FormatDecimal(
unsigned __int64 a1,
unsigned __int64 a2,
int a3)
{
_DWORD *v3; // r7
int v5; // r6
int v6; // r8
int v7; // r3
int v8; // r4
char *v9; // r2
v3 = (_DWORD *)a1;
v5 = a1 + 4 * a3;
while ( a2 >= 0x64 )
{
v6 = 2 * (a2 % 0x64);
a1 = a2 / 0x64;
v7 = (unsigned __int8)fmt::internal::DIGITS[v6];
*(_DWORD *)(v5 - 4) = (unsigned __int8)fmt::internal::DIGITS[v6 + 1];
*(_DWORD *)(v5 - 8) = v7;
v5 -= 8;
a2 /= 0x64u;
}
if ( a2 >= 0xA )
{
v9 = &fmt::internal::DIGITS[2 * a2];
v8 = (unsigned __int8)*v9;
v3[1] = (unsigned __int8)v9[1];
}
else
{
v8 = (unsigned __int8)(a2 + 48);
}
*v3 = v8;
return a1;
}