//
// BN_mod_add_quick from 0xe197b0 to 0xe19810 (96 bytes)
//
// 19 xrefs:
// > ossl_ecdsa_sign_sig @ 0xd94e40
// > ec_GFp_simple_set_compressed_coordinates @ 0xd98704
// > ec_GFp_simple_set_compressed_coordinates @ 0xd98740
// > ec_GFp_simple_set_compressed_coordinates @ 0xd9884c
// > ec_GFp_simple_set_compressed_coordinates @ 0xd988a4
// > ec_GFp_simple_dbl @ 0xd99ccc
// > ec_GFp_simple_dbl @ 0xd99d34
// > ec_GFp_simple_dbl @ 0xd99edc
// > ec_GFp_simple_dbl @ 0xd99ef4
// > ec_GFp_simple_dbl @ 0xd99f10
// > ec_GFp_simple_dbl @ 0xd99f74
// > ec_GFp_simple_add @ 0xd9a8d0
// > ec_GFp_simple_add @ 0xd9a8e8
// > ec_GFp_simple_is_on_curve @ 0xd9ac40
// > ec_GFp_simple_is_on_curve @ 0xd9ac74
// > ec_GFp_simple_is_on_curve @ 0xd9acf4
// > ec_GFp_simple_is_on_curve @ 0xd9ad5c
// > ec_GFp_simple_is_on_curve @ 0xd9adc0
// > ??> @ 0x47478
//
// 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
//
unsigned __int64 *__fastcall BN_mod_add_quick(unsigned __int64 *a1, __int64 a2, __int64 a3, __int64 *a4)
{
unsigned __int64 *result; // x0
result = BN_uadd((__int64)a1, a2, a3);
if ( (_DWORD)result )
{
if ( (BN_ucmp((__int64 *)a1, a4) & 0x80000000) != 0 )
return (_QWORD *)(dword_0 + 1);
else
return BN_usub(a1, (__int64 *)a1, (__int64)a4);
}
return result;
}