//
// ec_GF2m_simple_point_get_affine_coordinates from 0x10b1a24 to 0x10b1b54 (304 bytes)
//
// 2 xrefs:
// > ??> @ 0xa7248
// > ??> @ 0x153ef50
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:17:43 +0000
//
__int64 __fastcall ec_GF2m_simple_point_get_affine_coordinates(
__int64 a1,
_QWORD *a2,
unsigned __int64 *a3,
unsigned __int64 *a4)
{
__int64 *v7; // x19
__int64 *v8; // x0
unsigned int v9; // w19
if ( (unsigned int)EC_POINT_is_at_infinity(a1, a2) )
{
ERR_put_error(16, 162, 106, (__int64)"crypto/ec/ec2_smpl.c", 394);
return 0;
}
else
{
v7 = (__int64 *)a2[3];
v8 = (__int64 *)BN_value_one();
v9 = BN_cmp(v7, v8);
if ( v9 )
{
ERR_put_error(16, 162, 66, (__int64)"crypto/ec/ec2_smpl.c", 400);
return 0;
}
else
{
if ( a3 )
{
if ( !BN_copy(a3, a2[1]) )
return v9;
BN_set_negative((__int64)a3, 0);
}
if ( a4 )
{
if ( BN_copy(a4, a2[2]) )
{
v9 = 1;
BN_set_negative((__int64)a4, 0);
}
return v9;
}
return 1;
}
}
}