//
// sub_A6E94 from 0xa6e94 to 0xa6eec (88 bytes)
//
// 1 xrefs:
// > sub_45664 @ 0x45744
//
// 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 sub_A6E94(_DWORD *a1, int a2, int a3, int a4)
{
int v5; // r0
int v6; // r0
int v8; // r0
_DWORD v9[3]; // [sp+4h] [bp-14h] BYREF
v9[0] = a2;
v9[1] = a3;
v9[2] = a4;
if ( !a2 )
{
v6 = -1;
LABEL_5:
a1[97] = v6;
return 0;
}
if ( !a3 )
{
if ( (unsigned int)(a1[97] + 1) > 1 )
return 0;
v8 = a1[23];
__dmb(0xBu);
if ( (v8 & 0x100) != 0 )
v6 = 0;
else
v6 = *(_DWORD *)(a1[32] + 68872) + 1;
goto LABEL_5;
}
v5 = sub_51A78((int)v9, a1[32], 3, a4 ^ 1);
a1[97] = 0;
sub_448CC(v5);
return 0;
}