//
// 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!
//
// 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 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;
}