//
// sub_F31334 from 0xf31334 to 0xf313b0 (124 bytes)
//
// 2 xrefs:
// > WebPSetWorkerInterface @ 0xf31538
// > ??> @ 0x154d210
//
// 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 13:12:53 +0000
//
pthread_mutex_t *__fastcall sub_F31334(_DWORD *a1)
{
pthread_mutex_t *result; // x0
int v3; // w0
pthread_mutex_t *v4; // x0
result = *(pthread_mutex_t **)a1;
if ( result )
{
pthread_mutex_lock(result);
v3 = a1[2];
if ( v3 )
{
while ( v3 != 1 )
{
pthread_cond_wait((pthread_cond_t *)(*(_QWORD *)a1 + 40LL), *(pthread_mutex_t **)a1);
v3 = a1[2];
}
v4 = *(pthread_mutex_t **)a1;
a1[2] = 2;
pthread_cond_signal((pthread_cond_t *)&v4[1]);
return (pthread_mutex_t *)pthread_mutex_unlock(*(pthread_mutex_t **)a1);
}
else
{
return (pthread_mutex_t *)pthread_mutex_unlock(*(pthread_mutex_t **)a1);
}
}
return result;
}