//
// CRYPTO_THREAD_lock_new from 0x838df4 to 0x838e44 (80 bytes)
//
// 30 xrefs:
// > ssl_cert_new @ 0x790c8c
// > ssl_cert_dup @ 0x790ee0
// > SSL_CTX_new @ 0x798934
// > SSL_new @ 0x79a9d0
// > SSL_SESSION_new @ 0x79d590
// > ssl_session_dup @ 0x79d838
// > asn1_do_lock @ 0x7ca3d8
// > BIO_new @ 0x7d05c8
// > sub_7D12E0 @ 0x7d12e4
// > DH_new_method @ 0x7e05f8
// > DSA_new_method @ 0x7e1f58
// > DSO_new @ 0x7e3198
// > DSO_load @ 0x7e3714
// > EC_KEY_new_method @ 0x7e9bc4
// > ec_wNAF_precompute_mult @ 0x7ecbac
// > sub_7F1BA0 @ 0x7f1c10
// > do_engine_lock_init_ossl_ @ 0x7f7350
// > sub_7F9708 @ 0x7f971c
// > EVP_PKEY_new @ 0x805084
// > sub_8079D4 @ 0x8079e8
// > sub_80AB64 @ 0x80ab8c
// > CRYPTO_secure_malloc_init @ 0x80ecd8
// > RSA_new_method @ 0x82d91c
// > UI_new_method @ 0x83b308
// > sub_83C6C4 @ 0x83c708
// > X509_STORE_new @ 0x83f770
// > BN_BLINDING_new @ 0x86ba08
// > sub_8BC440 @ 0x8bc454
// > sub_8BC440 @ 0x8bc464
// > ??> @ 0x5b16c
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
pthread_rwlock_t *CRYPTO_THREAD_lock_new()
{
pthread_rwlock_t *v0; // r0
pthread_rwlock_t *v1; // r4
bool v2; // zf
pthread_rwlock_t *result; // r0
v0 = (pthread_rwlock_t *)CRYPTO_zalloc(&word_28, (int)"crypto/threads_pthread.c", 16);
v1 = v0;
if ( !v0 )
return nullptr;
v2 = pthread_rwlock_init(v0, nullptr) == 0;
result = v1;
if ( !v2 )
{
CRYPTO_free(v1, (int)"crypto/threads_pthread.c", 21);
return nullptr;
}
return result;
}