//
// sub_6AD9E from 0x6ad9e to 0x6add0 (50 bytes)
//
// 2 xrefs:
// > sub_6B376 @ 0x6b434
// > sub_6B444 @ 0x6b59e
//
// 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_6AD9E(_DWORD *a1, int a2, int a3, int a4)
{
int v6; // r4
int v8; // [sp+0h] [bp-10h] BYREF
int v9; // [sp+4h] [bp-Ch]
v8 = a3;
v9 = a4;
v8 = a1[6];
j_FMOD_OS_CriticalSection_Enter(v8);
LOBYTE(v9) = 1;
if ( a2 )
a1[2] += a2;
v6 = sub_6AD56(a1);
sub_44984((int)&v8);
return v6;
}