//
// sub_EEC1D0 from 0xeec1d0 to 0xeec408 (568 bytes)
//
// 1 xrefs:
// > sub_EECF00 @ 0xeecfa8
//
// 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:11:56 +0000
//
_BYTE *__fastcall sub_EEC1D0(_BYTE *result, int a2, int a3, int a4, int a5)
{
int v5; // w2
__int64 v6; // x16
__int64 v7; // x15
__int64 v8; // x13
__int64 v9; // x14
_BYTE *v10; // x19
int v11; // w10
int v12; // w23
int v13; // w7
int v14; // w8
__int64 v15; // x5
int v16; // w25
int v17; // w22
int v18; // w6
int v19; // w11
int v20; // w5
int v21; // w24
int v22; // w26
int v23; // w6
int v24; // w6
int v25; // w8
v5 = 2 * a3 + 1;
v6 = -3 * a2;
v7 = -2 * a2;
v8 = -a2;
v9 = 2 * a2;
v10 = result + 16;
do
{
while ( 1 )
{
v11 = (unsigned __int8)result[v7];
v12 = (unsigned __int8)result[a2];
v13 = (unsigned __int8)result[v8];
v14 = (unsigned __int8)*result;
v15 = v11 - v12;
v16 = (unsigned __int8)result[v6];
v17 = (unsigned __int8)result[v9];
if ( v5 < byte_11E4BAF[v15] + 4 * byte_11E4BAF[v13 - v14] )
goto LABEL_12;
if ( a4 < byte_11E4BAF[(unsigned __int8)result[-4 * a2] - v16] )
goto LABEL_12;
if ( a4 < byte_11E4BAF[v16 - v11] )
goto LABEL_12;
v18 = byte_11E4BAF[v11 - v13];
if ( a4 < v18 )
goto LABEL_12;
if ( a4 < byte_11E4BAF[(unsigned __int8)result[3 * a2] - v17] )
goto LABEL_12;
if ( a4 < byte_11E4BAF[v17 - v12] )
goto LABEL_12;
v19 = byte_11E4BAF[v12 - v14];
if ( a4 < v19 )
goto LABEL_12;
if ( a5 < v18 || a5 < v19 )
break;
v20 = byte_11E46AC[3 * (v14 - v13) + byte_11E46AC[v15]];
v21 = (9 * v20 + 63) >> 7;
v22 = (18 * v20 + 63) >> 7;
v23 = (27 * v20 + 63) >> 7;
result[v6] = byte_11E3FBF[v16 + v21];
result[v7] = byte_11E3FBF[v11 + v22];
result[v8] = byte_11E3FBF[v13 + v23];
*result = byte_11E3FBF[v14 - v23];
result[a2] = byte_11E3FBF[v12 - v22];
result[v9] = byte_11E3FBF[v17 - v21];
LABEL_12:
if ( ++result == v10 )
return result;
}
v24 = 3 * (v14 - v13) + byte_11E46AC[v15];
v25 = v14 - byte_11E4230[(v24 + 4) >> 3];
result[v8] = byte_11E3FBF[v13 + byte_11E4230[(v24 + 3) >> 3]];
*result++ = byte_11E3FBF[v25];
}
while ( result != v10 );
return result;
}