//
// sub_946AD4 from 0x946ad4 to 0x946b06 (50 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:05:11 +0000
//
bool __fastcall sub_946AD4(int a1)
{
pthread_mutex_t *v2; // r0
v2 = *(pthread_mutex_t **)a1;
if ( v2 )
{
pthread_mutex_lock(v2);
if ( *(_DWORD *)(a1 + 4) > 1u )
{
do
pthread_cond_wait((pthread_cond_t *)(*(_DWORD *)a1 + 4), *(pthread_mutex_t **)a1);
while ( *(_DWORD *)(a1 + 4) != 1 );
}
pthread_mutex_unlock(*(pthread_mutex_t **)a1);
}
return *(_DWORD *)(a1 + 20) == 0;
}