//
// sub_AB054 from 0xab054 to 0xab0d8 (132 bytes)
//
// 5 xrefs:
// > sub_45664 @ 0x456e0
// > sub_45664 @ 0x45758
// > sub_45664 @ 0x4576e
// > sub_4A9A4 @ 0x4aa82
// > FMOD::DSP::disconnectAll @ 0xb0e1c
//
// 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_AB054(int a1, int a2, int a3)
{
char v3; // r4
char v4; // r6
int result; // r0
int v7; // r0
unsigned int *v8; // r0
unsigned int v9; // r1
int v10; // r1
_BYTE *v11; // [sp+4h] [bp-14h] BYREF
v3 = a3;
v4 = a2;
if ( !a2 && !a3 )
return 0;
v7 = *(_DWORD *)(a1 + 92);
__dmb(0xBu);
if ( (v7 & 0x100) != 0 )
return sub_AAF6A(a1, a2, a3, 0, 0);
result = sub_61E9C(*(_DWORD *)(a1 + 128), &v11, 12, 1);
if ( !result )
{
v8 = (unsigned int *)(a1 + 92);
__dmb(0xBu);
do
v9 = __ldrex(v8);
while ( __strex(v9 | 0x1000, v8) );
__dmb(0xBu);
*v11 = 5;
v10 = (int)v11;
v11[10] = 0;
*(_BYTE *)(v10 + 9) = v3;
*(_BYTE *)(v10 + 8) = v4;
*(_DWORD *)(v10 + 4) = a1;
return sub_61F04(*(_DWORD *)(a1 + 128), v10, 1);
}
return result;
}