//
// ec_GF2m_simple_group_copy from 0xa9e8b8 to 0xa9e98c (212 bytes)
//
// 2 xrefs:
// > ??> @ 0x8443c
// > ??> @ 0xd1965c
//
// 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:11 +0000
//
int __fastcall ec_GF2m_simple_group_copy(int *a1, int *a2)
{
int v4; // r3
int v5; // r1
int v6; // r3
int v7; // r1
if ( !BN_copy(a1[9], a2[9]) || !BN_copy(a1[16], a2[16]) || !BN_copy(a1[17], a2[17]) )
return 0;
v4 = a2[10];
a1[10] = v4;
a1[11] = a2[11];
a1[12] = a2[12];
v5 = v4 + 31;
a1[13] = a2[13];
if ( v4 + 31 < 0 )
v5 = v4 + 62;
a1[14] = a2[14];
a1[15] = a2[15];
if ( !bn_wexpand(a1[16], v5 >> 5) )
return 0;
v6 = a1[10];
v7 = v6 + 31;
if ( v6 + 31 < 0 )
v7 = v6 + 62;
if ( !bn_wexpand(a1[17], v7 >> 5) )
return 0;
bn_set_all_zero((_DWORD *)a1[16]);
bn_set_all_zero((_DWORD *)a1[17]);
return 1;
}