//
// BN_mod_add_quick from 0xa84e94 to 0xa84edc (72 bytes)
//
// 19 xrefs:
// > ossl_ecdsa_sign_sig @ 0xa02f30
// > ec_GFp_simple_set_compressed_coordinates @ 0xa06f88
// > ec_GFp_simple_set_compressed_coordinates @ 0xa06fd0
// > ec_GFp_simple_set_compressed_coordinates @ 0xa070fc
// > ec_GFp_simple_set_compressed_coordinates @ 0xa07160
// > ec_GFp_simple_dbl @ 0xa085b8
// > ec_GFp_simple_dbl @ 0xa08630
// > ec_GFp_simple_dbl @ 0xa08828
// > ec_GFp_simple_dbl @ 0xa08844
// > ec_GFp_simple_dbl @ 0xa08864
// > ec_GFp_simple_dbl @ 0xa088d8
// > ec_GFp_simple_add @ 0xa0923c
// > ec_GFp_simple_add @ 0xa09258
// > ec_GFp_simple_is_on_curve @ 0xa095f0
// > ec_GFp_simple_is_on_curve @ 0xa09630
// > ec_GFp_simple_is_on_curve @ 0xa096c8
// > ec_GFp_simple_is_on_curve @ 0xa09748
// > ec_GFp_simple_is_on_curve @ 0xa097bc
// > ??> @ 0x7b70c
//
// 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:51 +0000
//
int __fastcall BN_mod_add_quick(int *a1, int *a2, int *a3, int *a4)
{
int result; // r0
result = BN_uadd(a1, a2, a3, a4);
if ( result )
{
if ( BN_ucmp(a1, a4) < 0 )
return 1;
else
return BN_usub(a1, a1, a4);
}
return result;
}