//
// ec_GFp_mont_field_encode from 0xd965a4 to 0xd965fc (88 bytes)
//
// 3 xrefs:
// > ??> @ 0x6a410
// > ??> @ 0x1222218
// > ??> @ 0x1222398
//
// 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_mont_field_encode(__int64 a1, __int64 a2, __int64 a3, __int64 a4)
{
__int64 v4; // x19
v4 = *(_QWORD *)(a1 + 120);
if ( v4 )
return BN_to_montgomery(a2, a3, v4, a4);
ERR_put_error(16, 134, 111, "crypto/ec/ecp_mont.c", 213);
return 0;
}