//
// BN_mod_sub_quick from 0x870310 to 0x870350 (64 bytes)
//
// 12 xrefs:
// > ec_GFp_simple_set_compressed_coordinates @ 0x7f2518
// > ec_GFp_simple_dbl @ 0x7f3b1c
// > ec_GFp_simple_dbl @ 0x7f3b70
// > ec_GFp_simple_dbl @ 0x7f3bb0
// > ec_GFp_simple_dbl @ 0x7f3c80
// > ec_GFp_simple_add @ 0x7f4444
// > ec_GFp_simple_add @ 0x7f4460
// > ec_GFp_simple_add @ 0x7f4730
// > ec_GFp_simple_add @ 0x7f4764
// > ec_GFp_simple_add @ 0x7f47ec
// > ec_GFp_simple_is_on_curve @ 0x7f4ae4
// > ??> @ 0x620dc
//
// 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
//
int __fastcall BN_mod_sub_quick(int *a1, int *a2, int *a3, int *a4)
{
int result; // r0
result = BN_sub(a1, a2, a3);
if ( result )
{
if ( a1[3] )
return BN_add(a1, a1, a4);
else
return 1;
}
return result;
}