//
// std::__ndk1::condition_variable::wait from 0xf41d3c to 0xf41d98 (92 bytes)
//
// 7 xrefs:
// > sub_D1D888 @ 0xd1d94c
// > std::__ndk1::timed_mutex::lock @ 0xf79eb4
// > std::__ndk1::recursive_timed_mutex::lock @ 0xf7a0fc
// > std::__ndk1::__assoc_sub_state::copy @ 0xf8773c
// > std::__ndk1::__assoc_sub_state::__sub_wait @ 0xf8782c
// > std::__ndk1::__assoc_sub_state::wait @ 0xf878e0
// > ??> @ 0xf2ce0
//
// 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:13:07 +0000
//
__int64 __fastcall std::condition_variable::wait(pthread_cond_t *cond, __int64 a2)
{
__int64 result; // x0
if ( !*(_BYTE *)(a2 + 8) )
std::__throw_system_error(1, "condition_variable::wait: mutex not locked");
result = pthread_cond_wait(cond, *(pthread_mutex_t **)a2);
if ( (_DWORD)result )
return std::__throw_system_error(result, "condition_variable wait failed");
return result;
}