//
// sub_EF7CFC from 0xef7cfc to 0xef81cc (1232 bytes)
//
// 1 xrefs:
// > sub_EF9454 @ 0xef9488
//
// 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:12:14 +0000
//
__int64 __fastcall sub_EF7CFC(__int64 result, __int64 a2, int a3, int a4, int a5, __int64 a6)
{
int v6; // w4
__int64 v7; // x10
_BYTE *v8; // x1
unsigned __int64 v9; // x10
__int64 v10; // x6
_BYTE *v11; // x11
int v12; // w12
char v13; // w7
__int64 v14; // x5
char v15; // w9
char v16; // w9
char v17; // w9
char v18; // w8
char v19; // w8
char v20; // w7
char v21; // w9
char v22; // w9
char v23; // w9
char v24; // w8
char v25; // w8
char v26; // w8
char v27; // w8
char v28; // w8
int v29; // w7
int v30; // w15
unsigned int v31; // w8
int v32; // w16
unsigned int v33; // w17
int8x16_t *v34; // x9
int8x16_t *v35; // x5
int8x16_t *v36; // x18
int8x16_t v37; // t1
int8x16_t v38; // q0
int8x16_t v39; // t1
int v40; // w5
int v41; // w7
__int64 v42; // x5
_BYTE *v43; // x8
char v44; // w7
char v45; // w8
_BYTE *v46; // x7
v6 = a4 + a5;
v7 = a3 * a4;
v8 = (_BYTE *)(a6 + v7);
if ( !a4 )
{
if ( (int)result > 1 )
{
v45 = *(_BYTE *)(a6 + v7);
v46 = v8 + 1;
do
{
v45 += *v46;
*v46++ = v45;
}
while ( v46 != &v8[(unsigned int)(result - 2) + 2] );
}
v8 += a3;
a4 = 1;
}
if ( v6 > a4 )
{
v9 = (unsigned __int64)(v8 + 1);
v10 = (unsigned int)(result - 1);
v11 = v8 + 17;
v12 = -((_DWORD)v8 + 1);
result = (unsigned int)(result - 2);
do
{
v13 = v8[-a3] + *v8;
*v8 = v13;
if ( (int)v10 > 0 )
{
if ( v9 >= (unsigned __int64)v11 && (v9 >= (unsigned __int64)(v8 + 16) || v8 >= v11) && (unsigned int)v10 > 0x13 )
{
v14 = v12 & 0xF;
if ( (unsigned int)v14 > (unsigned int)v10 )
v14 = v10;
if ( (_DWORD)v14 )
{
v15 = v13 + v8[1];
v8[1] = v15;
if ( (_DWORD)v14 == 1 )
goto LABEL_46;
v16 = v15 + v8[2];
v8[2] = v16;
if ( (_DWORD)v14 == 2 )
goto LABEL_46;
v17 = v16 + v8[3];
v8[3] = v17;
if ( (_DWORD)v14 == 3 )
goto LABEL_46;
v18 = v17 + v8[4];
v8[4] = v18;
if ( (_DWORD)v14 == 4 )
goto LABEL_46;
v19 = v18 + v8[5];
v8[5] = v19;
if ( (_DWORD)v14 == 5 )
goto LABEL_46;
v20 = v19 + v8[6];
v8[6] = v20;
if ( (_DWORD)v14 == 6 )
{
v29 = 6;
goto LABEL_25;
}
v21 = v20 + v8[7];
v8[7] = v21;
if ( (_DWORD)v14 == 7 )
goto LABEL_46;
v22 = v21 + v8[8];
v8[8] = v22;
if ( (_DWORD)v14 == 8 )
goto LABEL_46;
v23 = v22 + v8[9];
v8[9] = v23;
if ( (_DWORD)v14 == 9 )
goto LABEL_46;
v24 = v23 + v8[10];
v8[10] = v24;
if ( (_DWORD)v14 == 10
|| (v25 = v24 + v8[11], v8[11] = v25, (_DWORD)v14 == 11)
|| (v26 = v25 + v8[12], v8[12] = v26, (_DWORD)v14 == 12)
|| (v27 = v26 + v8[13], v8[13] = v27, (_DWORD)v14 == 13) )
{
LABEL_46:
v29 = v14;
}
else
{
v28 = v27 + v8[14];
v8[14] = v28;
if ( (_DWORD)v14 == 15 )
{
v29 = 15;
v8[15] += v28;
}
else
{
v29 = 14;
}
}
}
else
{
v29 = 0;
}
LABEL_25:
v30 = v10 - v14;
v31 = ((unsigned int)(v10 - v14 - 16) >> 4) + 1;
v32 = 16 * v31;
if ( (unsigned int)(result - v14) <= 0xE )
goto LABEL_29;
v33 = 0;
v34 = (int8x16_t *)&v8[v14 + 1];
v35 = (int8x16_t *)&v8[v14];
v36 = v34;
do
{
v37 = *v35++;
v38 = v37;
++v33;
v39 = *v34++;
*v36++ = vaddq_s8(v38, v39);
}
while ( v33 < v31 );
v29 += v32;
if ( v30 != v32 )
{
LABEL_29:
v8[v29 + 1] += v8[v29];
if ( (int)v10 > v29 + 1 )
{
v8[v29 + 2] += v8[v29 + 1];
if ( (int)v10 > v29 + 2 )
{
v8[v29 + 3] += v8[v29 + 2];
if ( (int)v10 > v29 + 3 )
{
v8[v29 + 4] += v8[v29 + 3];
if ( (int)v10 > v29 + 4 )
{
v8[v29 + 5] += v8[v29 + 4];
if ( (int)v10 > v29 + 5 )
{
v8[v29 + 6] += v8[v29 + 5];
if ( (int)v10 > v29 + 6 )
{
v8[v29 + 7] += v8[v29 + 6];
if ( (int)v10 > v29 + 7 )
{
v8[v29 + 8] += v8[v29 + 7];
if ( (int)v10 > v29 + 8 )
{
v8[v29 + 9] += v8[v29 + 8];
if ( (int)v10 > v29 + 9 )
{
v8[v29 + 10] += v8[v29 + 9];
if ( (int)v10 > v29 + 10 )
{
v8[v29 + 11] += v8[v29 + 10];
if ( (int)v10 > v29 + 11 )
{
v8[v29 + 12] += v8[v29 + 11];
if ( (int)v10 > v29 + 12 )
{
v40 = v29 + 13;
v8[v29 + 13] += v8[v29 + 12];
if ( (int)v10 > v29 + 13 )
{
v41 = v29 + 14;
v8[v40 + 1] += v8[v40];
if ( (int)v10 > v41 )
v8[v41 + 1] += v8[v41];
}
}
}
}
}
}
}
}
}
}
}
}
}
}
goto LABEL_44;
}
v42 = 0;
do
{
v43 = &v8[v42];
v44 = v8[v42++];
v43[1] += v44;
}
while ( (int)v10 > (int)v42 );
}
LABEL_44:
++a4;
v8 += a3;
v9 += a3;
v11 += a3;
LOBYTE(v12) = v12 - a3;
}
while ( a4 != v6 );
}
return result;
}