//
// bn_sqr_words from 0xa7f098 to 0xa7f150 (184 bytes)
//
// 2 xrefs:
// > bn_sqr_normal @ 0x9ed008
// > ??> @ 0x79a0c
//
// 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:08:48 +0000
//
_QWORD *__fastcall bn_sqr_words(_QWORD *result, unsigned int *a2, int a3)
{
unsigned int *v3; // r12
_QWORD *v4; // r3
unsigned __int64 v5; // r4
if ( a3 > 0 )
{
if ( (a3 & 0xFFFFFFFC) == 0 )
goto LABEL_6;
v3 = a2 + 4;
v4 = result + 4;
do
{
a3 -= 4;
*(v4 - 4) = *(v3 - 4) * (unsigned __int64)*(v3 - 4);
a2 = v3;
v5 = *(v3 - 3) * (unsigned __int64)*(v3 - 3);
v3 += 4;
*(v4 - 3) = v5;
result = v4;
*(v4 - 2) = *(v3 - 6) * (unsigned __int64)*(v3 - 6);
*(v4 - 1) = *(v3 - 5) * (unsigned __int64)*(v3 - 5);
v4 += 4;
}
while ( (a3 & 0xFFFFFFFC) != 0 );
if ( a3 )
{
LABEL_6:
*result = *a2 * (unsigned __int64)*a2;
if ( a3 != 1 )
{
result[1] = a2[1] * (unsigned __int64)a2[1];
if ( a3 != 2 )
result[2] = a2[2] * (unsigned __int64)a2[2];
}
}
}
return result;
}