//
// sub_EE908C from 0xee908c to 0xee9348 (700 bytes)
//
// 1 xrefs:
// > sub_EE9450 @ 0xee94a4
//
// 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:54 +0000
//
char *__fastcall sub_EE908C(char *result, int a2, int a3, int a4)
{
bool v4; // cc
int v5; // w2
unsigned int v6; // w12
int8x16_t v7; // q17
int16x8_t v8; // q16
int v9; // w15
int8x16_t v10; // q7
char *v11; // x5
unsigned int v12; // w4
uint16x8_t v13; // q2
uint16x8_t v14; // q0
uint8x16_t v15; // q1
int8x16_t v16; // q23
uint8x16_t v17; // q2
int16x8_t v18; // q18
uint16x8_t v19; // q5
int16x8_t v20; // q6
uint16x8_t v21; // q2
uint16x8_t v22; // q4
uint16x8_t v23; // q1
int32x4_t v24; // q27
int32x4_t v25; // q26
int32x4_t v26; // q18
int32x4_t v27; // q6
uint8x16_t v28; // q0
uint16x8_t v29; // q3
uint16x8_t v30; // q0
char *v31; // x10
int v32; // w11
unsigned int v33; // w6
unsigned int v34; // w5
int v35; // w8
int8x16_t v36; // [xsp+30h] [xbp-10h]
int8x16x2_t v37; // 0:q0.16,16:q1.16
int8x16x2_t v38; // 0:q21.16,16:q22.16
v4 = a3 <= 0;
v5 = a3 - 1;
if ( !v4 )
{
v6 = ((unsigned int)(a2 - 16) >> 4) + 1;
v7.n128_u64[0] = 0xF0F0F0F0F0F0F0FLL;
v7.n128_u64[1] = 0xF0F0F0F0F0F0F0FLL;
v8.n128_u64[0] = 0x1111111111111111LL;
v8.n128_u64[1] = 0x1111111111111111LL;
if ( (unsigned int)(a2 - 1) <= 0xE )
v9 = 0;
else
v9 = 16 * v6;
v10.n128_u64[0] = 0xF0F0F0F0F0F0F0F0LL;
v10.n128_u64[1] = 0xF0F0F0F0F0F0F0F0LL;
do
{
if ( a2 > 0 )
{
if ( (unsigned int)(a2 - 1) <= 0xE )
goto LABEL_11;
v11 = result;
v12 = 0;
do
{
v38 = vld2q_s8(v11);
++v12;
v13 = vmovl_u8((uint8x8_t)v38.val[0].n128_u64[0]);
v14 = vmovl_high_u8(v38.val[0]);
v15 = vorrq_s8(vshrq_n_u8(v38.val[0], 4u), vandq_s8(v10, v38.val[0]));
v16 = vandq_s8(v7, v38.val[1]);
v17 = vorrq_s8(
vmovn_hight_s16(
vmovn_s16(
vmovn_hight_s32(
vmovn_s32(vshlq_n_s32(vmovl_u16((uint16x4_t)v13.n128_u64[0]), 4u)),
vshlq_n_s32(vmovl_high_u16(v13), 4u))),
vmovn_hight_s32(
vmovn_s32(vshlq_n_s32(vmovl_u16((uint16x4_t)v14.n128_u64[0]), 4u)),
vshlq_n_s32(vmovl_high_u16(v14), 4u))),
vandq_s8(v7, v38.val[0]));
v18 = vmovl_u8((uint8x8_t)v16.n128_u64[0]);
v19 = vmovl_u8((uint8x8_t)v17.n128_u64[0]);
v20 = vmovl_high_u8(v16);
v21 = vmovl_high_u8(v17);
v22 = vmovl_u8((uint8x8_t)v15.n128_u64[0]);
v23 = vmovl_high_u8(v15);
v24 = vmull_s16((int16x4_t)v18.n128_u64[0], (int16x4_t)v8.n128_u64[0]);
v25 = vmull_s16((int16x4_t)v20.n128_u64[0], (int16x4_t)v8.n128_u64[0]);
v26 = vmull_high_s16(v18, v8);
v27 = vmull_high_s16(v20, v8);
v28 = vorrq_s8(vshrq_n_u8(v38.val[1], 4u), vandq_s8(v10, v38.val[1]));
v29 = vmovl_u8((uint8x8_t)v28.n128_u64[0]);
v30 = vmovl_high_u8(v28);
v36 = vorrq_s8(
vandq_s8(
vmovn_hight_s16(
vmovn_s16(
vmovn_hight_s32(
vmovn_s32(vshrq_n_u32(vmulq_s32(vmovl_u16((uint16x4_t)v29.n128_u64[0]), v24), 0x10u)),
vshrq_n_u32(vmulq_s32(vmovl_high_u16(v29), v26), 0x10u))),
vmovn_hight_s32(
vmovn_s32(vshrq_n_u32(vmulq_s32(vmovl_u16((uint16x4_t)v30.n128_u64[0]), v25), 0x10u)),
vshrq_n_u32(vmulq_s32(vmovl_high_u16(v30), v27), 0x10u))),
v10),
v16);
v37.val[0] = vorrq_s8(
vshrq_n_u8(
vmovn_hight_s16(
vmovn_s16(
vmovn_hight_s32(
vmovn_s32(vshrq_n_u32(vmulq_s32(vmovl_u16((uint16x4_t)v19.n128_u64[0]), v24), 0x10u)),
vshrq_n_u32(vmulq_s32(vmovl_high_u16(v19), v26), 0x10u))),
vmovn_hight_s32(
vmovn_s32(vshrq_n_u32(vmulq_s32(vmovl_u16((uint16x4_t)v21.n128_u64[0]), v25), 0x10u)),
vshrq_n_u32(vmulq_s32(vmovl_high_u16(v21), v27), 0x10u))),
4u),
vandq_s8(
vmovn_hight_s16(
vmovn_s16(
vmovn_hight_s32(
vmovn_s32(vshrq_n_u32(vmulq_s32(vmovl_u16((uint16x4_t)v22.n128_u64[0]), v24), 0x10u)),
vshrq_n_u32(vmulq_s32(vmovl_high_u16(v22), v26), 0x10u))),
vmovn_hight_s32(
vmovn_s32(vshrq_n_u32(vmulq_s32(vmovl_u16((uint16x4_t)v23.n128_u64[0]), v25), 0x10u)),
vshrq_n_u32(vmulq_s32(vmovl_high_u16(v23), v27), 0x10u))),
v10));
v37.val[1] = v36;
vst2q_s8(v11, v37);
v11 += 32;
}
while ( v12 < v6 );
if ( 16 * v6 != a2 )
{
LABEL_11:
v31 = &result[2 * v9];
v32 = v9;
do
{
v33 = (unsigned __int8)*v31;
v31 += 2;
v34 = (unsigned __int8)*(v31 - 1);
++v32;
v35 = 4369 * (v34 & 0xF);
*(v31 - 2) = (((v33 & 0xF | (unsigned __int8)(16 * v33)) * v35) >> 20) & 0xF
| (((v33 & 0xF0 | (unsigned __int8)(v33 >> 4)) * v35) >> 16) & 0xF0;
*(v31 - 1) = (((v34 & 0xFFFFFFF0 | (v34 >> 4)) * v35) >> 16) & 0xF0 | v34 & 0xF;
}
while ( a2 > v32 );
}
}
--v5;
result += a4;
}
while ( v5 != -1 );
}
return result;
}