//
// EC_POINTs_make_affine from 0xa00338 to 0xa003f0 (184 bytes)
//
// 3 xrefs:
// > ec_wNAF_mul @ 0xa014c8
// > ec_wNAF_precompute_mult @ 0xa01b80
// > ??> @ 0x7b58c
//
// 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:07:37 +0000
//
int __fastcall EC_POINTs_make_affine(int *a1, int a2, _DWORD **a3)
{
int v3; // r5
_DWORD **v4; // lr
int v5; // r12
_DWORD *v6; // t1
v3 = *a1;
if ( *(_DWORD *)(*a1 + 120) )
{
if ( !a2 )
return (*(int (__fastcall **)(int *))(*a1 + 120))(a1);
if ( v3 == **a3 )
{
v4 = a3;
v5 = 0;
while ( ++v5 != a2 )
{
v6 = v4[1];
++v4;
if ( v3 != *v6 )
goto LABEL_9;
}
return (*(int (__fastcall **)(int *))(*a1 + 120))(a1);
}
LABEL_9:
ERR_put_error(16, 136, 101, "crypto/ec/ec_lib.c", 891);
}
else
{
ERR_put_error(16, 136, 66, "crypto/ec/ec_lib.c", 886);
}
return 0;
}