//
// sub_6AEEE from 0x6aeee to 0x6af3e (80 bytes)
//
// 3 xrefs:
// > sub_6ADD0 @ 0x6ae58
// > sub_6AF3E @ 0x6af6a
// > sub_6AFAE @ 0x6afd0
//
// 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 11:40:57 +0000
//
int __fastcall sub_6AEEE(_DWORD *a1)
{
int v2; // r0
int i; // r6
int v4; // r0
int v5; // r5
int v7; // [sp+0h] [bp-18h] BYREF
char v8; // [sp+4h] [bp-14h]
v7 = a1[6];
j_FMOD_OS_CriticalSection_Enter(v7);
v8 = 1;
v2 = a1[10];
if ( v2 < 1 )
{
v5 = 0;
}
else
{
for ( i = 0; ; ++i )
{
if ( i >= v2 )
{
v5 = 0;
a1[10] = 0;
goto LABEL_9;
}
v4 = sub_C0668(a1[8]);
if ( v4 )
break;
v2 = a1[10];
}
v5 = v4;
}
LABEL_9:
sub_44984((int)&v7);
return v5;
}