//
// std::__ndk1::condition_variable::wait from 0x9540f4 to 0x954128 (52 bytes)
//
// 4 xrefs:
// > sub_7B21A8 @ 0x7b2218
// > std::__ndk1::timed_mutex::lock @ 0x977258
// > std::__ndk1::recursive_timed_mutex::lock @ 0x977376
// > std::__ndk1::__assoc_sub_state::__sub_wait @ 0x97f448
//
// 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:26 +0000
//
int __fastcall std::condition_variable::wait(pthread_cond_t *cond, int a2)
{
int result; // r0
if ( !*(_BYTE *)(a2 + 4) )
std::__throw_system_error(1, "condition_variable::wait: mutex not locked");
result = pthread_cond_wait(cond, *(pthread_mutex_t **)a2);
if ( result )
std::__throw_system_error(result, "condition_variable wait failed");
return result;
}