//
// fmt::internal::FormatDecimal
from 0x81bc14 to 0x81bc8a (118 bytes)
//
// 2 xrefs:
// > fmt::BasicWriter::FormatInt @ 0x81cf2a
// > fmt::BasicWriter::FormatInt @ 0x81d106
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:01:46 +0000
//
int __fastcall fmt::internal::FormatDecimal(unsigned __int64 a1, unsigned __int64 a2, int a3)
{
char *v3; // r7
int v5; // r6
int v6; // r8
char v7; // r3
char v8; // r4
char *v9; // r2
v3 = (char *)a1;
v5 = a3 + a1;
while ( a2 >= 0x64 )
{
v6 = 2 * (a2 % 0x64);
a1 = a2 / 0x64;
v7 = fmt::internal::DIGITS[v6];
*(_BYTE *)(v5 - 1) = fmt::internal::DIGITS[v6 + 1];
*(_BYTE *)(v5 - 2) = v7;
v5 -= 2;
a2 /= 0x64u;
}
if ( a2 >= 0xA )
{
v9 = &fmt::internal::DIGITS[2 * a2];
v8 = *v9;
v3[1] = v9[1];
}
else
{
v8 = a2 + 48;
}
*v3 = v8;
return a1;
}