//
// sub_736EBC from 0x736ebc to 0x736f12 (86 bytes)
//
// 0 xrefs:
//
// 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
//
void __fastcall sub_736EBC(pthread_mutex_t **a1)
{
pthread_mutex_t *v2; // r0
pthread_mutex_t *v3; // r3
pthread_mutex_t *v4; // r0
v2 = *a1;
if ( v2 )
{
pthread_mutex_lock(v2);
v3 = a1[1];
if ( v3 )
{
while ( v3 != (pthread_mutex_t *)((char *)&dword_0 + 1) )
{
pthread_cond_wait((pthread_cond_t *)(&(*a1)->__align + 1), *a1);
v3 = a1[1];
}
v4 = *a1;
a1[1] = nullptr;
pthread_cond_signal((pthread_cond_t *)(&v4->__align + 1));
}
pthread_mutex_unlock(*a1);
pthread_join((*a1)->__owner, nullptr);
pthread_mutex_destroy(*a1);
pthread_cond_destroy((pthread_cond_t *)(&(*a1)->__align + 1));
WebPSafeFree(*a1);
*a1 = nullptr;
}
}