//
// BN_GF2m_arr2poly from 0x10f4bd4 to 0x10f4c20 (76 bytes)
//
// 3 xrefs:
// > BN_GF2m_mod_inv_arr @ 0x10f4c64
// > BN_GF2m_mod_div_arr @ 0x10f4d0c
// > ??> @ 0x42ef8
//
// 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_arr2poly(int *a1, __int64 a2)
{
__int64 result; // x0
int v5; // w1
int v6; // t1
BN_set_word(a2, 0);
while ( 1 )
{
v6 = *a1++;
v5 = v6;
if ( v6 == -1 )
break;
result = BN_set_bit(a2, v5);
if ( !(_DWORD)result )
return result;
}
return 1;
}