//
// BN_reciprocal from 0xe1a978 to 0xe1aa20 (168 bytes)
//
// 2 xrefs:
// > BN_div_recp @ 0xe1aac8
// > ??> @ 0x2dd20
//
// 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
//
__int64 __fastcall BN_reciprocal(__int64 a1, __int64 a2, unsigned int a3, int32x2_t *a4)
{
__int64 v8; // x0
__int64 v9; // x21
BN_CTX_start((unsigned __int64)a4);
v8 = BN_CTX_get(a4);
v9 = v8;
if ( v8 && (unsigned int)BN_set_bit(v8, a3) && BN_div(a1, 0, v9, a2, a4) )
{
BN_CTX_end((__int64)a4);
return a3;
}
else
{
BN_CTX_end((__int64)a4);
return 0xFFFFFFFFLL;
}
}