//
// BN_GF2m_mod_solve_quad from 0x8ca668 to 0x8ca734 (204 bytes)
//
// 1 xrefs:
// > ??> @ 0x6ba5c
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int __fastcall BN_GF2m_mod_solve_quad(int **a1, int **a2, int **a3, int ***a4)
{
int v8; // r5
int *v9; // r10
int 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", 1153);
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, 134, 106, (int)"crypto/bn/bn_gf2m.c", 1157);
else
v10 = BN_GF2m_mod_solve_quad_arr(a1, a2, v9, a4);
}
else
{
v10 = 0;
}
CRYPTO_free(v9, (int)"crypto/bn/bn_gf2m.c", 1163);
return v10;
}