//
// BN_GF2m_mod_sqr from 0xadf3d0 to 0xadf49c (204 bytes)
//
// 1 xrefs:
// > ??> @ 0x854ac
//
// 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:33 +0000
//
bool __fastcall BN_GF2m_mod_sqr(int **a1, _DWORD *a2, int **a3, int ***a4)
{
int v8; // r5
int *v9; // r10
_BOOL4 v10; // r4
int v11; // r0
_BOOL4 v12; // r12
v8 = BN_num_bits(a3) + 1;
v9 = (int *)CRYPTO_malloc((void *)(4 * v8), (int)"crypto/bn/bn_gf2m.c", 540);
if ( v9 )
{
v11 = BN_GF2m_poly2arr(a3, (int)v9, v8);
v12 = v11 == 0;
if ( v11 > v8 )
v12 = 1;
v10 = v11;
if ( v12 )
ERR_put_error(3, 136, 106, (int)"crypto/bn/bn_gf2m.c", 544);
else
v10 = BN_GF2m_mod_sqr_arr(a1, a2, v9, a4);
}
else
{
v10 = 0;
}
CRYPTO_free(v9, (int)"crypto/bn/bn_gf2m.c", 550);
return v10;
}