//
// BN_GF2m_arr2poly from 0xadf748 to 0xadf790 (72 bytes)
//
// 3 xrefs:
// > BN_GF2m_mod_inv_arr @ 0xadf7c4
// > BN_GF2m_mod_div_arr @ 0xadf838
// > ??> @ 0x854ec
//
// 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
//
int __fastcall BN_GF2m_arr2poly(int *a1, int **a2)
{
int v4; // r1
int result; // r0
int v6; // t1
BN_set_word(a2, 0);
v4 = *a1;
if ( *a1 == -1 )
return 1;
while ( 1 )
{
result = BN_set_bit((int *)a2, v4);
if ( !result )
break;
v6 = a1[1];
++a1;
v4 = v6;
if ( v6 == -1 )
return 1;
}
return result;
}