//
// FMOD_OS_CriticalSection_Free from 0xe7038 to 0xe7080 (72 bytes)
//
// 4 xrefs:
// > .FMOD_OS_CriticalSection_Free @ 0x107f5c
// > ??> @ 0x22c0
// > .FMOD_OS_CriticalSection_Free @ 0x107f54
// > ??> @ 0x110870
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 12:14:59 +0000
//
__int64 __fastcall FMOD_OS_CriticalSection_Free(pthread_mutex_t *a1, char a2)
{
int v3; // w8
__int64 result; // x0
__int64 v5; // x0
v3 = pthread_mutex_destroy(a1);
if ( v3 )
result = 28;
else
result = 0;
if ( !v3 && (a2 & 1) == 0 )
{
v5 = sub_E7334(result);
sub_E73A4(v5);
return 0;
}
return result;
}