//
// ec_GFp_simple_get_Jprojective_coordinates_GFp from 0x10176c0 to 0x1017824 (356 bytes)
//
// 4 xrefs:
// > ??> @ 0x97c00
// > ??> @ 0x1539f00
// > ??> @ 0x153a080
// > ??> @ 0x153a200
//
// 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:16:06 +0000
//
__int64 __fastcall ec_GFp_simple_get_Jprojective_coordinates_GFp(
__int64 a1,
__int64 *a2,
unsigned __int64 *a3,
unsigned __int64 *a4,
unsigned __int64 *a5,
__int64 a6)
{
__int64 v7; // x2
__int64 v12; // x23
unsigned __int64 *v13; // x1
_BOOL4 v14; // w19
int v15; // w0
__int64 result; // x0
int v17; // w0
__int64 v18; // [xsp+48h] [xbp+48h]
__int64 v19; // [xsp+48h] [xbp+48h]
v7 = *(_QWORD *)(*(_QWORD *)a1 + 296LL);
if ( !v7 )
{
if ( a3 && !BN_copy(a3, a2[1]) || a4 && !BN_copy(a4, a2[2]) )
{
v14 = 0;
v12 = 0;
}
else if ( a5 )
{
v12 = 0;
v14 = BN_copy(a5, a2[3]) != nullptr;
}
else
{
v14 = 1;
v12 = 0;
}
goto LABEL_5;
}
v12 = 0;
if ( a6 )
{
LABEL_3:
if ( !a3
|| (v13 = a3,
v18 = a6,
v14 = 0,
v15 = (*(__int64 (__fastcall **)(__int64, unsigned __int64 *, __int64, __int64))(*(_QWORD *)a1 + 296LL))(
a1,
v13,
a2[1],
a6),
a6 = v18,
v15) )
{
if ( !a4
|| (v19 = a6,
v14 = 0,
v17 = (*(__int64 (__fastcall **)(__int64, unsigned __int64 *, __int64, __int64))(*(_QWORD *)a1 + 296LL))(
a1,
a4,
a2[2],
a6),
a6 = v19,
v17) )
{
v14 = 1;
if ( a5 )
v14 = (*(__int64 (__fastcall **)(__int64, unsigned __int64 *, __int64, __int64))(*(_QWORD *)a1 + 296LL))(
a1,
a5,
a2[3],
a6) != 0;
}
}
LABEL_5:
BN_CTX_free(v12);
return v14;
}
result = BN_CTX_new(a1, a2, v7);
a6 = result;
if ( result )
{
v12 = result;
goto LABEL_3;
}
return result;
}