//
// sub_100607F78 from 0x100607f78 to 0x1006082b4 (828 bytes)
//
// 1 xrefs:
// > ??> @ 0x1009e0c48
//
// 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 11:10:04 +0000
//
float32x4_t *__fastcall sub_100607F78(float32x4_t *result, unsigned int a2, __int64 a3, __int64 a4, const float *a5)
{
int32x4_t v5; // q0
float32x4_t v6; // q1
unsigned __int64 v7; // x11
char v8; // w10
float32x4_t v9; // q2
float32x4_t v10; // q3
float32x4_t v11; // q4
__int64 v12; // x8
int16x8_t v13; // q5
float32x4_t v14; // q6
float32x4_t v15; // q5
int16x8_t v16; // q7
unsigned __int64 v17; // x11
int v18; // w8
int v19; // w8
int64x2_t v20; // q0
int64x2_t v21; // q2
int64x2_t v22; // q1
int64x2_t v23; // q1
int64x2_t v24; // q3
int64x2_t v25; // q2
int v26; // w9
float32x4_t v27; // q3
float32x4_t v28; // q4
int32x4_t v29; // q5
unsigned __int32 v30; // w10
unsigned __int32 v31; // w11
unsigned __int32 v32; // w12
__int64 v33; // x13
int16x8_t v34; // q6
float32x4_t v35; // q7
float32x4_t v36; // q16
float32x4_t v37; // q5
__int64 v38; // x10
int16x8_t v39; // q6
float32x4_t v40; // q16
float32x4_t v41; // q5
__int64 v42; // x10
int16x8_t v43; // q6
float32x4_t v44; // q16
float32x4_t v45; // q5
__int64 v46; // x10
int16x8_t v47; // q6
float32x4_t v48; // q16
float32x4_t v49; // q5
int32x4_t v50; // q0
float32x4_t v51; // q1
unsigned __int64 v52; // x10
float32x4_t v53; // q2
float32x4_t v54; // q3
float32x4_t v55; // q4
__int64 v56; // x10
int16x8_t v57; // q5
float32x4_t v58; // q6
float32x4_t v59; // q5
int16x8_t v60; // q7
unsigned __int64 v61; // x10
if ( !a2 )
{
v18 = 0;
goto LABEL_8;
}
if ( ((unsigned __int8)result & 0xF) != 0 )
{
v5 = (int32x4_t)vld1q_dup_f32(a5);
v6 = vld1q_dup_f32((const float *)a4);
LODWORD(v7) = *(_DWORD *)(a4 + 4);
v8 = (_BYTE)result + 32;
v9.i64[0] = 0x3000000030000000LL;
v9.i64[1] = 0x3000000030000000LL;
v10.i64[0] = 0x3800000038000000LL;
v10.i64[1] = 0x3800000038000000LL;
do
{
v11 = vmulq_f32(vcvtq_f32_u32(vshrq_n_u32((uint32x4_t)v6, 1u)), v9);
v12 = 2LL * (unsigned int)(8 * v7);
v13 = *(int16x8_t *)(a3 + v12);
v14 = vcvtq_f32_s32(vmovl_s16(*(int16x4_t *)v13.i8));
v15 = vcvtq_f32_s32(vmovl_high_s16(v13));
v16 = *(int16x8_t *)(a3 + 16 + v12);
*result = vmulq_f32(
vaddq_f32(vmulq_f32(v11, vsubq_f32(vcvtq_f32_s32(vmovl_s16(*(int16x4_t *)v16.i8)), v14)), v14),
v10);
result[1] = vmulq_f32(vaddq_f32(vmulq_f32(v11, vsubq_f32(vcvtq_f32_s32(vmovl_high_s16(v16)), v15)), v15), v10);
result += 2;
v17 = *(_QWORD *)a4 + *(_QWORD *)a5;
*(_QWORD *)a4 = v17;
v18 = a2 - 1;
if ( (v8 & 0xF) == 0 )
break;
v6 = (float32x4_t)vaddq_s32((int32x4_t)v6, v5);
v7 = HIDWORD(v17);
v8 += 32;
--a2;
}
while ( a2 );
LABEL_8:
if ( (unsigned int)v18 < 4 )
goto LABEL_9;
goto LABEL_12;
}
v18 = a2;
if ( a2 < 4 )
{
LABEL_9:
v19 = v18 & 3;
if ( !v19 )
return result;
goto LABEL_15;
}
LABEL_12:
v20 = vdupq_n_s64(4LL * *(_QWORD *)a5);
v21 = (int64x2_t)vld1q_dup_f64((const double *)a4);
v22.i64[0] = 2LL * *(_QWORD *)a5;
v22.i64[1] = 3LL * *(_QWORD *)a5;
v23 = vaddq_s64(v21, v22);
v24.i64[0] = 0;
v24.i64[1] = *(_QWORD *)a5;
v25 = vaddq_s64(v21, v24);
v26 = v18 >> 2;
v27.i64[0] = 0x3000000030000000LL;
v27.i64[1] = 0x3000000030000000LL;
v28.i64[0] = 0x3800000038000000LL;
v28.i64[1] = 0x3800000038000000LL;
do
{
v29 = vshlq_n_s32(vuzp2q_s32((int32x4_t)v25, (int32x4_t)v23), 3u);
v30 = v29.u32[1];
v31 = v29.u32[2];
v32 = v29.u32[3];
v33 = a3 + 2LL * v29.u32[0];
v34 = *(int16x8_t *)(v33 + 16);
v35 = vmulq_f32(vcvtq_f32_u32(vshrq_n_u32((uint32x4_t)vuzp1q_s32((int32x4_t)v25, (int32x4_t)v23), 1u)), v27);
v36 = vcvtq_f32_s32(vmovl_s16(*(int16x4_t *)v33));
v37 = vcvtq_f32_s32(vmovl_high_s16(*(int16x8_t *)v33));
*result = vmulq_f32(
vaddq_f32(vmulq_n_f32(vsubq_f32(vcvtq_f32_s32(vmovl_s16(*(int16x4_t *)v34.i8)), v36), v35.f32[0]), v36),
v28);
result[1] = vmulq_f32(
vaddq_f32(vmulq_n_f32(vsubq_f32(vcvtq_f32_s32(vmovl_high_s16(v34)), v37), v35.f32[0]), v37),
v28);
v38 = a3 + 2LL * v30;
v39 = *(int16x8_t *)(v38 + 16);
v40 = vcvtq_f32_s32(vmovl_s16(*(int16x4_t *)v38));
v41 = vcvtq_f32_s32(vmovl_high_s16(*(int16x8_t *)v38));
result[2] = vmulq_f32(
vaddq_f32(
vmulq_lane_f32(
vsubq_f32(vcvtq_f32_s32(vmovl_s16(*(int16x4_t *)v39.i8)), v40),
*(float32x2_t *)v35.f32,
1),
v40),
v28);
result[3] = vmulq_f32(
vaddq_f32(
vmulq_lane_f32(vsubq_f32(vcvtq_f32_s32(vmovl_high_s16(v39)), v41), *(float32x2_t *)v35.f32, 1),
v41),
v28);
v42 = a3 + 2LL * v31;
v43 = *(int16x8_t *)(v42 + 16);
v44 = vcvtq_f32_s32(vmovl_s16(*(int16x4_t *)v42));
v45 = vcvtq_f32_s32(vmovl_high_s16(*(int16x8_t *)v42));
result[4] = vmulq_f32(
vaddq_f32(
vmulq_laneq_f32(vsubq_f32(vcvtq_f32_s32(vmovl_s16(*(int16x4_t *)v43.i8)), v44), v35, 2),
v44),
v28);
result[5] = vmulq_f32(
vaddq_f32(vmulq_laneq_f32(vsubq_f32(vcvtq_f32_s32(vmovl_high_s16(v43)), v45), v35, 2), v45),
v28);
v46 = a3 + 2LL * v32;
v47 = *(int16x8_t *)(v46 + 16);
v48 = vcvtq_f32_s32(vmovl_s16(*(int16x4_t *)v46));
v49 = vcvtq_f32_s32(vmovl_high_s16(*(int16x8_t *)v46));
result[6] = vmulq_f32(
vaddq_f32(
vmulq_laneq_f32(vsubq_f32(vcvtq_f32_s32(vmovl_s16(*(int16x4_t *)v47.i8)), v48), v35, 3),
v48),
v28);
result[7] = vmulq_f32(
vaddq_f32(vmulq_laneq_f32(vsubq_f32(vcvtq_f32_s32(vmovl_high_s16(v47)), v49), v35, 3), v49),
v28);
v25 = vaddq_s64(v25, v20);
v23 = vaddq_s64(v23, v20);
result += 8;
--v26;
}
while ( v26 );
*(_QWORD *)a4 = v25.i64[0];
v19 = v18 & 3;
if ( v19 )
{
LABEL_15:
v50 = (int32x4_t)vld1q_dup_f32(a5);
v51 = vld1q_dup_f32((const float *)a4);
LODWORD(v52) = *(_DWORD *)(a4 + 4);
v53.i64[0] = 0x3000000030000000LL;
v53.i64[1] = 0x3000000030000000LL;
v54.i64[0] = 0x3800000038000000LL;
v54.i64[1] = 0x3800000038000000LL;
do
{
v55 = vmulq_f32(vcvtq_f32_u32(vshrq_n_u32((uint32x4_t)v51, 1u)), v53);
v56 = 2LL * (unsigned int)(8 * v52);
v57 = *(int16x8_t *)(a3 + v56);
v58 = vcvtq_f32_s32(vmovl_s16(*(int16x4_t *)v57.i8));
v59 = vcvtq_f32_s32(vmovl_high_s16(v57));
v60 = *(int16x8_t *)(a3 + 16 + v56);
*result = vmulq_f32(
vaddq_f32(vmulq_f32(v55, vsubq_f32(vcvtq_f32_s32(vmovl_s16(*(int16x4_t *)v60.i8)), v58)), v58),
v54);
result[1] = vmulq_f32(vaddq_f32(vmulq_f32(v55, vsubq_f32(vcvtq_f32_s32(vmovl_high_s16(v60)), v59)), v59), v54);
result += 2;
v61 = *(_QWORD *)a4 + *(_QWORD *)a5;
*(_QWORD *)a4 = v61;
v51 = (float32x4_t)vaddq_s32((int32x4_t)v51, v50);
v52 = HIDWORD(v61);
--v19;
}
while ( v19 );
}
return result;
}