//
// bn_mul_low_recursive from 0xffbb4c to 0xffbc84 (312 bytes)
//
// 3 xrefs:
// > bn_mul_low_recursive @ 0xffbc2c
// > bn_mul_low_recursive @ 0xffbc58
// > ??> @ 0x92cf8
//
// 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:15:51 +0000
//
__int64 __fastcall bn_mul_low_recursive(__int64 a1, _QWORD *a2, _QWORD *a3, int a4, __int64 a5)
{
unsigned int v7; // w19
__int64 v11; // x22
__int64 v12; // x20
__int64 v13; // x25
__int64 v14; // x22
__int64 v15; // x20
v7 = a4 / 2;
bn_mul_recursive(a1, a2, a3, (unsigned int)(a4 / 2), 0, 0, a5);
if ( (int)v7 > 31 )
{
v13 = (int)v7;
v14 = a5 + 8LL * a4;
v15 = a1 + v13 * 8;
bn_mul_low_recursive(a5, a2, &a3[v13], v7, v14);
bn_add_words(v15, v15, a5, v7);
bn_mul_low_recursive(a5, &a2[v13], a3, v7, v14);
return bn_add_words(v15, v15, a5, v7);
}
else
{
v11 = 8LL * (int)v7;
v12 = a1 + v11;
bn_mul_low_normal(a5, (__int64)a2, &a3[(unsigned __int64)v11 / 8], v7);
bn_mul_low_normal(a5 + v11, (__int64)&a2[(unsigned __int64)v11 / 8], a3, v7);
bn_add_words(v12, v12, a5, v7);
return bn_add_words(v12, v12, a5 + v11, v7);
}
}