//
// sub_F312B8 from 0xf312b8 to 0xf31334 (124 bytes)
//
// 2 xrefs:
// > WebPSetWorkerInterface @ 0xf31538
// > ??> @ 0x154d208
//
// 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
//
bool __fastcall sub_F312B8(__int64 a1)
{
pthread_mutex_t *v2; // x0
v2 = *(pthread_mutex_t **)a1;
if ( v2 )
{
pthread_mutex_lock(v2);
if ( *(_DWORD *)(a1 + 8) > 1u )
{
do
{
pthread_cond_wait((pthread_cond_t *)(*(_QWORD *)a1 + 40LL), *(pthread_mutex_t **)a1);
if ( *(_DWORD *)(a1 + 8) == 1 )
break;
pthread_cond_wait((pthread_cond_t *)(*(_QWORD *)a1 + 40LL), *(pthread_mutex_t **)a1);
}
while ( *(_DWORD *)(a1 + 8) != 1 );
}
pthread_mutex_unlock(*(pthread_mutex_t **)a1);
}
return *(_DWORD *)(a1 + 40) == 0;
}