//
// BN_GF2m_mod_exp from 0x10f4940 to 0x10f4a24 (228 bytes)
//
// 1 xrefs:
// > ??> @ 0x800e0
//
// 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:18:09 +0000
//
__int64 __fastcall BN_GF2m_mod_exp(unsigned __int64 *a1, __int64 *a2, __int64 a3, __int64 a4, int32x2_t *a5)
{
int v9; // w21
int *v10; // x0
int *v11; // x19
signed int v12; // w0
unsigned int v13; // w20
v9 = BN_num_bits(a4) + 1;
v10 = (int *)CRYPTO_malloc((void *)(4LL * v9), (__int64)"crypto/bn/bn_gf2m.c", 964);
v11 = v10;
if ( v10 )
{
v12 = BN_GF2m_poly2arr(a4, (__int64)v10, v9);
v13 = v12;
if ( v12 <= v9 && v12 )
v13 = (unsigned int)BN_GF2m_mod_exp_arr(a1, a2, a3, v11, a5);
else
ERR_put_error(3, 132, 106, (__int64)"crypto/bn/bn_gf2m.c", 968);
}
else
{
v13 = 0;
}
CRYPTO_free(v11, (__int64)"crypto/bn/bn_gf2m.c", 974);
return v13;
}