//
// sub_CBB064 from 0xcbb064 to 0xcbb0f8 (148 bytes)
//
// 2 xrefs:
// > WebPSetWorkerInterface @ 0xcbb380
// > ??> @ 0x1233e60
//
// 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_CBB064(_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;
}
}