//
// ec_GFp_simple_invert from 0xd9aae8 to 0xd9ab38 (80 bytes)
//
// 4 xrefs:
// > ??> @ 0x7b048
// > ??> @ 0x12221b8
// > ??> @ 0x1222338
// > ??> @ 0x12224b8
//
// 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 ec_GFp_simple_invert(__int64 a1, _QWORD *a2)
{
if ( (unsigned int)EC_POINT_is_at_infinity(a1, a2) || BN_is_zero(a2[2]) )
return 1;
else
return BN_usub(a2[2], *(_QWORD *)(a1 + 64), a2[2]);
}