//
// fmt::BasicFormatter::ParseArgIndex from 0x1800433a0 to 0x180043458 (184 bytes)
//
// 5 xrefs:
// > fmt::BasicFormatter::format @ 0x1800441c7
// > ??> @ 0x18013fe28
// > ??> @ 0x18013fe38
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bb62c
//
// 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:40 +0000
//
__int64 __fastcall fmt::BasicFormatter::ParseArgIndex(__int64 a1, _QWORD *a2)
{
unsigned int v3; // eax
int v4; // ecx
_WORD *v5; // r8
unsigned int v6; // r9d
unsigned int v7; // ecx
unsigned int v9; // eax
if ( (unsigned __int16)(*(_WORD *)*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 = *(unsigned __int16 *)*a2;
v5 = (_WORD *)(*a2 + 2LL);
*a2 = v5;
v6 = v4 + 2 * (v3 + 4 * (v3 - 6));
v7 = -1;
if ( v6 >= v3 )
v7 = v6;
v3 = v7;
}
while ( *v5 >= 0x30u && *v5 <= 0x39u );
if ( v7 > 0x7FFFFFFF )
v3 = 0;
return *(_QWORD *)(a1 + 8) + 24LL * v3;
}
}