//
// std::__ndk1::timed_mutex::lock from 0xf79e60 to 0xf79f10 (176 bytes)
//
// 1 xrefs:
// > ??> @ 0xf9d18
//
// 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:45 +0000
//
__int64 __fastcall std::timed_mutex::lock(std::timed_mutex *this)
{
int v2; // w0
__int64 result; // x0
int v4; // w8
pthread_mutex_t *mutex; // [xsp+8h] [xbp-28h] BYREF
unsigned __int8 v6; // [xsp+10h] [xbp-20h]
__int64 v7; // [xsp+18h] [xbp-18h]
v7 = *(_QWORD *)(_ReadStatusReg(TPIDR_EL0) + 40);
mutex = (pthread_mutex_t *)this;
v6 = 1;
v2 = pthread_mutex_lock((pthread_mutex_t *)this);
if ( v2 )
std::__throw_system_error(v2, "mutex lock failed");
if ( !*((_BYTE *)this + 88) )
{
*((_BYTE *)this + 88) = 1;
LABEL_8:
result = pthread_mutex_unlock(mutex);
goto LABEL_9;
}
do
result = std::condition_variable::wait((pthread_cond_t *)((char *)this + 40), (__int64)&mutex);
while ( *((_BYTE *)this + 88) );
v4 = v6;
*((_BYTE *)this + 88) = 1;
if ( v4 )
goto LABEL_8;
LABEL_9:
_ReadStatusReg(TPIDR_EL0);
return result;
}