//
// fmt::BasicFormatter::ParseArgIndex from 0x1800432f0 to 0x180043391 (161 bytes)
//
// 5 xrefs:
// > fmt::BasicFormatter::format @ 0x180043bf3
// > ??> @ 0x18013fd48
// > ??> @ 0x18013fd58
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bb608
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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 11:21:39 +0000
//
__int64 __fastcall fmt::BasicFormatter::ParseArgIndex(__int64 a1, char **a2)
{
unsigned int v3; // eax
int v4; // ecx
char *v5; // r8
unsigned int v6; // r9d
unsigned int v7; // ecx
unsigned int v9; // eax
if ( (unsigned __int8)(**a2 - 48) > 9u )
{
v9 = *(_DWORD *)(a1 + 24);
*(_DWORD *)(a1 + 24) = v9 + 1;
return *(_QWORD *)(a1 + 8) + 24LL * v9;
}
else
{
v3 = 0;
*(_DWORD *)(a1 + 24) = -1;
do
{
v4 = **a2;
v5 = *a2 + 1;
*a2 = v5;
v6 = v4 + 2 * (v3 + 4 * (v3 - 6));
v7 = -1;
if ( v6 >= v3 )
v7 = v6;
v3 = v7;
}
while ( *v5 >= 48 && *v5 <= 57 );
if ( v7 > 0x7FFFFFFF )
v3 = 0;
return *(_QWORD *)(a1 + 8) + 24LL * v3;
}
}