//
// std::__ndk1::recursive_mutex::recursive_mutex from 0xf79c84 to 0xf79d44 (192 bytes)
//
// 2 xrefs:
// > ??> @ 0x83b78
// > ??> @ 0xbdbf8
//
// 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:44 +0000
//
// Alternative name is '_ZNSt6__ndk115recursive_mutexC1Ev'
__int64 __fastcall std::recursive_mutex::recursive_mutex(pthread_mutex_t *this)
{
int v2; // w20
__int64 result; // x0
int v4; // w21
pthread_mutexattr_t v5; // [xsp+0h] [xbp-30h] BYREF
__int64 v6; // [xsp+8h] [xbp-28h]
v6 = *(_QWORD *)(_ReadStatusReg(TPIDR_EL0) + 40);
v2 = pthread_mutexattr_init(&v5);
if ( v2 )
goto LABEL_7;
v2 = pthread_mutexattr_settype(&v5, 1);
if ( v2 )
{
pthread_mutexattr_destroy(&v5);
LABEL_7:
result = std::__throw_system_error(v2, "recursive_mutex constructor failed");
goto LABEL_8;
}
v2 = pthread_mutex_init(this, &v5);
result = pthread_mutexattr_destroy(&v5);
v4 = result;
if ( v2 )
goto LABEL_7;
if ( (_DWORD)result )
{
pthread_mutex_destroy(this);
v2 = v4;
goto LABEL_7;
}
LABEL_8:
_ReadStatusReg(TPIDR_EL0);
return result;
}