//
// sub_F31224 from 0xf31224 to 0xf312b8 (148 bytes)
//
// 2 xrefs:
// > WebPSetWorkerInterface @ 0xf31540
// > ??> @ 0x154d220
//
// 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
//
void __fastcall sub_F31224(_DWORD *a1)
{
pthread_mutex_t *v2; // x0
int v3; // w0
pthread_mutex_t *v4; // x0
v2 = *(pthread_mutex_t **)a1;
if ( v2 )
{
pthread_mutex_lock(v2);
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] = 0;
pthread_cond_signal((pthread_cond_t *)&v4[1]);
}
pthread_mutex_unlock(*(pthread_mutex_t **)a1);
pthread_join(*(_QWORD *)(*(_QWORD *)a1 + 88LL), nullptr);
pthread_mutex_destroy(*(pthread_mutex_t **)a1);
pthread_cond_destroy((pthread_cond_t *)(*(_QWORD *)a1 + 40LL));
WebPSafeFree(*(void **)a1);
*(_QWORD *)a1 = 0;
}
}