//
// fmt::internal::PrintfParser::HandleArgIndex from 0x81bb44 to 0x81bb9c (88 bytes)
//
// 3 xrefs:
// > fmt::internal::PrintfParser::Format @ 0x81eeb8
// > fmt::internal::PrintfParser::Format @ 0x81ef56
// > fmt::internal::PrintfParser::Format @ 0x81ef76
//
// 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
//
void *__fastcall fmt::internal::PrintfParser::HandleArgIndex(_DWORD *a1, unsigned int a2, const char **a3)
{
int v3; // r3
const char *v4; // r3
v3 = a1[2];
if ( a2 == -1 )
{
if ( v3 >= 0 )
{
a1[2] = v3 + 1;
a2 = v3;
goto LABEL_11;
}
if ( !*a3 )
{
v4 = "cannot switch from manual to automatic argument indexing";
goto LABEL_10;
}
}
else
{
if ( v3 <= 0 )
{
a1[2] = -1;
--a2;
goto LABEL_11;
}
if ( !*a3 )
{
v4 = "cannot switch from automatic to manual argument indexing";
LABEL_10:
*a3 = v4;
}
}
LABEL_11:
if ( a2 < a1[1] )
return (void *)(*a1 + 16 * a2);
if ( !*a3 )
*a3 = "argument index is out of range in format";
return &unk_BF4D00;
}