//
// FMOD_OS_CriticalSection_Free from 0xc0544 to 0xc057e (58 bytes)
//
// 4 xrefs:
// > sub_57338 @ 0x5747a
// > sub_57338 @ 0x57486
// > sub_57338 @ 0x57492
// > j_FMOD_OS_CriticalSection_Free @ 0xe12a8
//
// 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:41:48 +0000
//
int __fastcall FMOD_OS_CriticalSection_Free(pthread_mutex_t *a1, int a2)
{
int result; // r0
bool v5; // zf
result = pthread_mutex_destroy(a1);
v5 = result == 0;
if ( result )
result = 28;
else
v5 = a2 == 0;
if ( v5 )
{
sub_BD7AC(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), a1);
return 0;
}
return result;
}