//
// sub_100451B54 from 0x100451b54 to 0x100451d30 (476 bytes)
//
// 1 xrefs:
// > ??> @ 0x100858968
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int32x2_t __fastcall sub_100451B54(
__int64 a1,
const float *a2,
int a3,
int a4,
int a5,
__int64 a6,
__int64 a7,
__int64 a8,
float32_t a9,
float32_t a10,
float32_t a11,
__int64 a12)
{
__int64 v12; // x9
__int64 v13; // x10
__int64 v14; // x11
__int64 v15; // x12
float32x4_t v16; // q3
float32x4_t v17; // q4
float32x4_t v18; // q5
float32x4_t v19; // q1
float32x4_t v20; // q0
__int64 v21; // x12
_QWORD *v22; // x9
__int128 v23; // q17
_QWORD *v24; // x10
__int128 v25; // q18
_QWORD *v26; // x11
__int128 v27; // q21
int32x2_t *v28; // x8
float32x4_t v29; // q2
int32x4_t v30; // q19
int32x4_t v31; // q20
float32x4_t v32; // q22
float32x4_t v33; // q20
float32x4_t v34; // q17
int32x4_t v35; // q19
int32x4_t v36; // q18
__int64 v37; // x12
__int64 v38; // x13
__int64 v39; // x15
int32x4_t v40; // q21
int32x4_t v41; // q22
float32x4_t v42; // q23
float32x4_t v43; // q24
float32x4_t v44; // q21
float32x4_t v45; // q22
float32x4_t v46; // q21
float32x4_t v47; // q1
int32x2_t result; // d0
float32x4_t v49; // [xsp+0h] [xbp-30h]
float32x4_t v50; // [xsp+10h] [xbp-20h]
float32x4_t v51; // [xsp+20h] [xbp-10h]
v51.f32[0] = a9;
v50.f32[0] = a10;
v49.f32[0] = a11;
v12 = *(_QWORD *)(a6 + 8);
v13 = *(_QWORD *)(a8 + 8);
v14 = *(_QWORD *)(a12 + 8);
v15 = *(_QWORD *)(a7 + 8);
v16 = *(float32x4_t *)v12;
v17 = *(float32x4_t *)v13;
v18 = *(float32x4_t *)v14;
v19 = *(float32x4_t *)v15;
v20.i64[0] = vzip1q_s32(*(int32x4_t *)(v15 + 16), *(int32x4_t *)(v12 + 16)).u64[0];
v20.i64[1] = vzip1q_s32(*(int32x4_t *)(v13 + 16), *(int32x4_t *)(v14 + 16)).u64[0];
v21 = 16LL * a5;
v22 = (_QWORD *)(a6 + v21);
v23 = *(_OWORD *)(a6 + v21);
v24 = (_QWORD *)(a8 + v21);
v25 = *(_OWORD *)(a8 + v21);
v26 = (_QWORD *)(a12 + v21);
v27 = *(_OWORD *)(a12 + v21);
v28 = (int32x2_t *)(a7 + v21);
v29 = (float32x4_t)vdupq_lane_s64(*(_QWORD *)(a7 + v21), 0);
v30 = (int32x4_t)vpaddq_f32((float32x4_t)0, vmulq_f32(v16, (float32x4_t)vdupq_lane_s64(v23, 0)));
v31 = (int32x4_t)vpaddq_f32(
vmulq_f32(v17, (float32x4_t)vdupq_lane_s64(v25, 0)),
vmulq_f32(v18, (float32x4_t)vdupq_lane_s64(v27, 0)));
v32 = vaddq_f32(vld1q_dup_f32(a2), (float32x4_t)vuzp1q_s32(v30, v31));
v33 = vaddq_f32((float32x4_t)vuzp2q_s32(v30, v31), vmulq_f32(v32, v20));
v34 = (float32x4_t)vzip1q_s32(vdupq_lane_s32(*(int32x2_t *)v32.f32, 1), vdupq_lane_s32(*(int32x2_t *)&v23, 0));
v35 = vzip1q_s32(vdupq_laneq_s32((int32x4_t)v32, 2), vdupq_lane_s32(*(int32x2_t *)&v25, 0));
v36 = vzip1q_s32(vdupq_laneq_s32((int32x4_t)v32, 3), vdupq_lane_s32(*(int32x2_t *)&v27, 0));
if ( a3 < 2 )
{
v46 = v33;
}
else
{
v37 = 0;
v38 = a4;
v39 = (unsigned int)a3 - 1LL;
do
{
v40 = (int32x4_t)vpaddq_f32(vmulq_f32(v19, v29), vmulq_f32(v16, v34));
v41 = (int32x4_t)vpaddq_f32(vmulq_f32(v17, (float32x4_t)v35), vmulq_f32(v18, (float32x4_t)v36));
v42 = (float32x4_t)vuzp1q_s32(v40, v41);
v43 = vld1q_dup_f32((const float *)((char *)&a2[v38] + v37));
v44 = (float32x4_t)vuzp2q_s32(v40, v41);
v43.i32[0] = v33.i32[2];
v45 = vaddq_f32(v42, v43);
v46 = vaddq_f32(v44, vmulq_f32(v45, v20));
v29 = (float32x4_t)vzip1q_s32(vdupq_lane_s32(*(int32x2_t *)v45.f32, 0), vdupq_lane_s32(*(int32x2_t *)v29.f32, 0));
v34 = (float32x4_t)vzip1q_s32(vdupq_lane_s32(*(int32x2_t *)v45.f32, 1), vdupq_lane_s32(*(int32x2_t *)v34.f32, 0));
v35 = vzip1q_s32(vdupq_laneq_s32((int32x4_t)v45, 2), vdupq_laneq_s32(v35, 2));
v36 = vzip1q_s32(vdupq_laneq_s32((int32x4_t)v45, 3), vdupq_laneq_s32(v36, 2));
*(float *)(a1 + v37) = vaddq_f32(
vmulq_laneq_f32(v49, v33, 3),
vsubq_f32(vmulq_lane_f32(v51, *(float32x2_t *)v33.f32, 1), vmulq_f32(v50, v46))).f32[0];
v37 += v38 * 4;
v33 = v46;
--v39;
}
while ( v39 );
}
v47 = vmulq_f32(v19, v29);
v47.i64[0] = vpaddq_f32(v47, v47).u64[0];
*(_DWORD *)(a1 + 4LL * (a3 - 1) * a4) = vaddq_f32(
vmulq_laneq_f32(v49, v46, 3),
vsubq_f32(
vmulq_lane_f32(v51, *(float32x2_t *)v46.f32, 1),
vmulq_f32(
v50,
vaddq_f32(
vmulq_f32(v29, v20),
(float32x4_t)vdupq_lane_s32(*(int32x2_t *)v47.f32, 1))))).u32[0];
*v22 = v34.i64[0];
*v24 = v35.i64[0];
*v26 = v36.i64[0];
result = vzip1_s32(
(int32x2_t)vadd_f32((float32x2_t)*(_OWORD *)&vdupq_laneq_s32((int32x4_t)v46, 2), *(float32x2_t *)v47.f32),
*(int32x2_t *)v29.f32);
*v28 = result;
return result;
}