//
// sub_101D30 from 0x101d30 to 0x101ef4 (452 bytes)
//
// 1 xrefs:
// > ??> @ 0x11a0f0
//
// 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 12:15:13 +0000
//
float32x4_t *__fastcall sub_101D30(float32x4_t *result, __int64 a2, __int64 a3, __int64 a4, _QWORD *a5)
{
__int64 v5; // x30
float v6; // w8
long double v7; // q0
__int64 v8; // x5
int v9; // w8
float32x4_t v10; // q0
int8x16_t v11; // q1
int64x2_t v12; // q2
int8x16_t v13; // q3
float32x4_t v14; // q4
unsigned __int64 v15; // d5
__int64 v16; // x9
int16x8_t v17; // q5
float32x4_t v18; // q16
float32x4_t v19; // q6
int16x8_t v20; // q5
unsigned __int64 v21; // d7
float32x4_t v22; // q16
int16x8_t v23; // q5
__int64 v24; // x9
float32x4_t v25; // q7
int16x8_t v26; // q5
float32x4_t v27; // q7
float v28; // w9
long double v29; // q0
__int64 v30; // x0
__int64 v31; // x1
int v32; // w8
v6 = 4.6566e-10;
*(_QWORD *)&v7 = 0x3800000038000000LL;
for ( *((_QWORD *)&v7 + 1) = 0x3800000038000000LL; (_DWORD)a2; *(_QWORD *)a4 += *a5 )
{
if ( ((unsigned __int8)result & 0xF) == 0 )
break;
result = (float32x4_t *)sub_102DB8(
v7,
v6,
(float)(*(_DWORD *)a4 >> 1),
*(double *)(a3 + 2LL * (unsigned int)(4 * *(_DWORD *)(a4 + 4))),
*(double *)(a3 + 2LL * (unsigned int)(4 * *(_DWORD *)(a4 + 4) + 4)));
v5 = v8;
}
if ( (int)a2 >> 2 )
{
for ( result = (float32x4_t *)sub_102CA4(result, a2, a3, a4, a5, v5); v9; result += 4 )
{
v15 = vshl_n_s32(vzip2_s32((int32x2_t)v11.n128_u64[0], (int32x2_t)vextq_s8(v11, v11, 8u).n128_u64[0]), 2u).n64_u64[0];
v16 = HIDWORD(v15);
v17 = *(int16x8_t *)(a3 + 2LL * (unsigned int)v15);
v18 = vcvtq_f32_s32(vmovl_s16((int16x4_t)v17.n128_u64[0]));
v19 = vmulq_f32(vcvtq_f32_u32(vshrq_n_u32(vuzp1q_s32(v11, v13), 1u)), v10);
*result = vmulq_f32(vmlaq_n_f32(v18, vsubq_f32(vcvtq_f32_s32(vmovl_high_s16(v17)), v18), v19.n128_f32[0]), v14);
v20 = *(int16x8_t *)(a3 + 2 * v16);
v21 = vshl_n_s32(vzip2_s32((int32x2_t)v13.n128_u64[0], (int32x2_t)vextq_s8(v13, v13, 8u).n128_u64[0]), 2u).n64_u64[0];
v22 = vcvtq_f32_s32(vmovl_s16((int16x4_t)v20.n128_u64[0]));
result[1] = vmulq_f32(
vmlaq_lane_f32(
v22,
vsubq_f32(vcvtq_f32_s32(vmovl_high_s16(v20)), v22),
(float32x2_t)v19.n128_u64[0],
1),
v14);
v23 = *(int16x8_t *)(a3 + 2LL * (unsigned int)v21);
v24 = 2LL * HIDWORD(v21);
--v9;
v25 = vcvtq_f32_s32(vmovl_s16((int16x4_t)v23.n128_u64[0]));
result[2] = vmulq_f32(vmlaq_laneq_f32(v25, vsubq_f32(vcvtq_f32_s32(vmovl_high_s16(v23)), v25), v19, 2), v14);
v26 = *(int16x8_t *)(a3 + v24);
v11 = vaddq_s64(v11, v12);
v13 = vaddq_s64(v13, v12);
v27 = vcvtq_f32_s32(vmovl_s16((int16x4_t)v26.n128_u64[0]));
result[3] = vmulq_f32(vmlaq_laneq_f32(v27, vsubq_f32(vcvtq_f32_s32(vmovl_high_s16(v26)), v27), v19, 3), v14);
}
*(_QWORD *)a4 = v11.n128_u64[0];
}
v28 = 4.6566e-10;
*(_QWORD *)&v29 = 0x3800000038000000LL;
*((_QWORD *)&v29 + 1) = 0x3800000038000000LL;
if ( (a2 & 3) != 0 )
{
do
{
v30 = sub_102DB8(
v29,
v28,
(float)(*(_DWORD *)a4 >> 1),
*(double *)(a3 + 2LL * (unsigned int)(4 * *(_DWORD *)(a4 + 4))),
*(double *)(a3 + 2LL * (unsigned int)(4 * *(_DWORD *)(a4 + 4) + 4)));
result = (float32x4_t *)sub_102E10(v30, v31);
}
while ( v32 );
}
return result;
}