//
// CRYPTO_THREAD_lock_new from 0xa4d9f4 to 0xa4da44 (80 bytes)
//
// 30 xrefs:
// > ssl_cert_new @ 0x9a5890
// > ssl_cert_dup @ 0x9a5ae4
// > SSL_CTX_new @ 0x9ad538
// > SSL_new @ 0x9af5d4
// > SSL_SESSION_new @ 0x9b2194
// > ssl_session_dup @ 0x9b243c
// > asn1_do_lock @ 0x9defd8
// > BIO_new @ 0x9e51c8
// > sub_9E5EE0 @ 0x9e5ee4
// > DH_new_method @ 0x9f51f8
// > DSA_new_method @ 0x9f6b58
// > DSO_new @ 0x9f7d98
// > DSO_load @ 0x9f8314
// > EC_KEY_new_method @ 0x9fe7c4
// > ec_wNAF_precompute_mult @ 0xa017ac
// > sub_A067A0 @ 0xa06810
// > do_engine_lock_init_ossl_ @ 0xa0bf50
// > sub_A0E308 @ 0xa0e31c
// > EVP_PKEY_new @ 0xa19c84
// > sub_A1C5D4 @ 0xa1c5e8
// > sub_A1F764 @ 0xa1f78c
// > CRYPTO_secure_malloc_init @ 0xa238d8
// > RSA_new_method @ 0xa4251c
// > UI_new_method @ 0xa4ff08
// > sub_A512C4 @ 0xa51308
// > X509_STORE_new @ 0xa54370
// > BN_BLINDING_new @ 0xa80608
// > sub_AD1440 @ 0xad1454
// > sub_AD1440 @ 0xad1464
// > ??> @ 0x74bec
//
// 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:08:21 +0000
//
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;
}