//
// CRYPTO_atomic_add from 0x105f1c4 to 0x105f1e0 (28 bytes)
//
// 37 xrefs:
// > ssl_cert_free @ 0xfb82fc
// > SSL_up_ref @ 0xfbcbe4
// > SSL_copy_session_id @ 0xfbe004
// > SSL_CTX_up_ref @ 0xfbf5f8
// > SSL_CTX_free @ 0xfbf64c
// > SSL_free @ 0xfc0d5c
// > SSL_dup @ 0xfc1b7c
// > SSL_SESSION_free @ 0xfc43b8
// > SSL_SESSION_up_ref @ 0xfc4be8
// > asn1_do_lock @ 0xfee6d0
// > BIO_free @ 0xff490c
// > BIO_up_ref @ 0xff4a18
// > BIO_get_new_index @ 0xff55c0
// > DH_free @ 0x10060ac
// > DH_up_ref @ 0x100633c
// > DSA_free @ 0x1007a80
// > DSA_up_ref @ 0x1007cf4
// > DSO_free @ 0x1008b8c
// > DSO_up_ref @ 0x1008e2c
// > EC_KEY_free @ 0x100dd24
// > EC_KEY_up_ref @ 0x100e098
// > EC_ec_pre_comp_dup @ 0x1010c24
// > EC_ec_pre_comp_free @ 0x1010c5c
// > EC_nistz256_pre_comp_dup @ 0x1016338
// > EC_nistz256_pre_comp_free @ 0x1016370
// > engine_free_util @ 0x101b864
// > ENGINE_up_ref @ 0x101c3d0
// > EVP_PKEY_up_ref @ 0x102a3f4
// > EVP_PKEY_free @ 0x102ab4c
// > RSA_free @ 0x10520e4
// > RSA_up_ref @ 0x10523a8
// > CRYPTO_atomic_add @ 0x105f1d0
// > X509_STORE_free @ 0x1065ac4
// > X509_STORE_up_ref @ 0x1065ba0
// > X509_up_ref @ 0x1066e70
// > X509_CRL_up_ref @ 0x106d480
// > ??> @ 0xf0cb8
//
// 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:16:50 +0000
//
__int64 __fastcall CRYPTO_atomic_add(unsigned int *a1, int a2, unsigned int *a3)
{
unsigned int v3; // w3
unsigned int v4; // w3
do
{
v3 = __ldaxr(a1);
v4 = v3 + a2;
}
while ( __stlxr(v4, a1) );
*a3 = v4;
return 1;
}