//
// ec_GF2m_simple_point_get_affine_coordinates from 0xa9ea6c to 0xa9eb6c (256 bytes)
//
// 2 xrefs:
// > ??> @ 0x8445c
// > ??> @ 0xd19694
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:09:11 +0000
//
int __fastcall ec_GF2m_simple_point_get_affine_coordinates(int a1, _DWORD *a2, int a3, int a4)
{
int *v7; // r4
int *v8; // r0
int v9; // r4
if ( EC_POINT_is_at_infinity(a1, a2) )
{
ERR_put_error(16, 162, 106, (int)"crypto/ec/ec2_smpl.c", 394);
return 0;
}
else
{
v7 = (int *)a2[3];
v8 = (int *)BN_value_one();
v9 = BN_cmp(v7, v8);
if ( !v9 )
{
if ( a3 )
{
if ( !BN_copy(a3, a2[1]) )
return v9;
BN_set_negative(a3, 0);
}
if ( !a4 )
return 1;
if ( BN_copy(a4, a2[2]) )
{
BN_set_negative(a4, 0);
return 1;
}
return v9;
}
ERR_put_error(16, 162, 66, (int)"crypto/ec/ec2_smpl.c", 400);
return 0;
}
}