// // sub_100607978 from 0x100607978 to 0x100607f78 (1536 bytes) // // 1 xrefs: // > @ 0x1009e0c40 // // 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 // double __fastcall sub_100607978( __int64 a1, int a2, __int64 a3, __int64 a4, __int64 *a5, float32x4_t a6, double a7, int32x4_t a8, float32x4_t a9, float32x4_t a10, float32x4_t a11, int16x4_t a12) { unsigned __int64 v12; // x10 unsigned __int64 v13; // x11 char v14; // w9 float32x4_t v15; // q1 int v16; // w8 unsigned __int16 *v17; // x10 unsigned __int16 *v18; // x11 __int16 *v19; // x12 unsigned __int16 *v20; // x13 __int16 *v21; // x14 __int16 *v22; // x8 float32x4_t v23; // q4 int32x2_t v24; // d3 float32x2_t v25; // d3 int v26; // w8 int64x2_t v27; // q1 int64x2_t v28; // q2 int64x2_t v29; // q3 int64x2_t v30; // q1 int v31; // w9 int32x4_t v32; // q7 unsigned __int32 v33; // w11 unsigned __int32 v34; // w12 int16x4_t *v35; // x13 float32x4_t v36; // q6 int16x4_t *v37; // x10 float32x4_t v38; // q21 float32x4_t v39; // q7 int64x2_t v40; // q16 int8x16_t v41; // q22 int64x2_t v42; // q18 float32x4_t v43; // q23 float32x4_t v44; // q22 float32x4_t v45; // q17 int16x4_t *v46; // x10 float32x4_t v47; // q17 float32x4_t v48; // q7 int32x4_t v49; // q16 int16x4_t *v50; // x10 int64x2_t v51; // q16 int8x16_t v52; // q20 int64x2_t v53; // q18 float32x4_t v54; // q21 float32x4_t v55; // q20 float32x4_t v56; // q17 float32x4_t v57; // q7 float32x4_t v58; // q6 int v59; // w8 int32x2_t v60; // d1 unsigned int v61; // w9 unsigned __int16 *v62; // x10 unsigned __int16 *v63; // x11 __int16 *v64; // x12 unsigned __int16 *v65; // x13 unsigned __int16 *v66; // x14 __int16 *v67; // x9 float32x4_t v68; // q2 float32x4_t v69; // q2 float32x4_t v70; // q3 int16x4_t v71; // d4 int32x2_t v72; // d2 __int64 v73; // x9 int16x4_t v74; // d3 __int16 *v75; // x10 __int16 *v76; // x11 __int16 *v77; // x12 __int16 *v78; // x13 unsigned __int16 *v79; // x14 __int16 *v80; // x9 float32x4_t v81; // q3 int16x4_t v82; // d4 float32x4_t v83; // q3 int32x2_t v84; // d2 float32x2_t v85; // d2 __int64 v86; // x9 int16x4_t v87; // d1 int v88; // w8 __int16 *v89; // x9 __int16 *v90; // x10 __int16 *v91; // x11 __int16 *v92; // x12 __int16 *v93; // x13 __int16 *v94; // x8 float32x4_t v95; // q1 float32x4_t v96; // q2 float32x4_t v97; // q1 float32x4_t v98; // q2 float32x2_t v99; // d3 float32x4_t v100; // q1 int32x2_t v101; // d0 float32x2_t v102; // d0 if ( (a1 & 0xF) != 0 ) { if ( !a2 ) { LOBYTE(v26) = 0; goto LABEL_12; } LODWORD(v12) = *(_DWORD *)a4; LODWORD(v13) = *(_DWORD *)(a4 + 4); v14 = a1 + 24; a6.i64[0] = 0x3000000030000000LL; v15.i64[0] = 0x3800000038000000LL; v15.i64[1] = 0x3800000038000000LL; a8.i64[0] = 0x3800000038000000LL; do { a9.f32[0] = (float)((unsigned int)v12 >> 1) * 4.6566e-10; v16 = 6 * v13; v17 = (unsigned __int16 *)(a3 + 2LL * (unsigned int)(6 * v13)); v18 = (unsigned __int16 *)(a3 + 2LL * (unsigned int)(6 * v13 + 2)); v19 = (__int16 *)(a3 + 2LL * (unsigned int)(v16 + 4)); v20 = (unsigned __int16 *)(a3 + 2LL * (unsigned int)(v16 + 6)); v21 = (__int16 *)(a3 + 2LL * (unsigned int)(v16 + 8)); a10.i16[0] = *v17; a10.i16[2] = v17[1]; a11.i16[0] = *v18; a11.i16[2] = v18[1]; v22 = (__int16 *)(a3 + 2LL * (unsigned int)(v16 + 10)); v23 = vcvtq_f32_s32(vmovl_s16(vuzp1_s16(*(int16x4_t *)a10.f32, *(int16x4_t *)a11.f32))); a11.i16[0] = *v20; a10 = vmulq_f32(v23, v15); a11.i16[2] = v20[1]; a12.i16[0] = *v21; a12.i16[2] = v21[1]; a11 = vsubq_f32(vmulq_f32(vcvtq_f32_s32(vmovl_s16(vuzp1_s16(*(int16x4_t *)a11.f32, a12))), v15), a10); a12 = (int16x4_t)vdupq_lane_s32(*(int32x2_t *)a9.f32, 0).u64[0]; *(float32x4_t *)a1 = vmlaq_n_f32(a10, a11, a9.f32[0]); v24.i32[0] = *v19; v24.i32[1] = v19[1]; v25 = vmul_f32(vcvt_f32_s32(v24), (float32x2_t)0x3800000038000000LL); a10.i32[0] = *v22; a10.i32[1] = v22[1]; *(float32x2_t *)a10.f32 = vsub_f32( vmul_f32(vcvt_f32_s32(*(int32x2_t *)a10.f32), (float32x2_t)0x3800000038000000LL), v25); *(float32x2_t *)a9.f32 = vmla_f32(v25, (float32x2_t)a12, *(float32x2_t *)a10.f32); *(_QWORD *)(a1 + 16) = a9.i64[0]; v12 = *(_QWORD *)a4 + *a5; *(_QWORD *)a4 = v12; v26 = a2 - 1; a1 += 24; if ( (v14 & 0xF) == 0 ) break; v13 = HIDWORD(v12); v14 += 24; --a2; } while ( a2 ); } else { v26 = a2; } if ( (unsigned int)v26 >= 4 ) { a6 = (float32x4_t)vdupq_n_s64(4 * *a5); v27 = (int64x2_t)vld1q_dup_f64((const double *)a4); v28.i64[0] = 2 * *a5; v28.i64[1] = 3 * *a5; v29.i64[0] = 0; v29.i64[1] = *a5; a8 = (int32x4_t)vaddq_s64(v27, v28); v30 = vaddq_s64(v27, v29); v31 = v26 >> 2; a9.i64[0] = 0x3000000030000000LL; a9.i64[1] = 0x3000000030000000LL; a10.i64[0] = 0x600000006LL; a10.i64[1] = 0x600000006LL; a11.i64[0] = 0x3800000038000000LL; a11.i64[1] = 0x3800000038000000LL; do { v32 = vmulq_s32(vuzp2q_s32((int32x4_t)v30, a8), (int32x4_t)a10); v33 = v32.u32[2]; v34 = v32.u32[3]; v35 = (int16x4_t *)(a3 + 2LL * v32.u32[0]); v36 = vmulq_f32(vcvtq_f32_u32(vshrq_n_u32((uint32x4_t)vuzp1q_s32((int32x4_t)v30, a8), 1u)), a9); v37 = (int16x4_t *)(a3 + 2LL * v32.u32[1]); v38 = vcvtq_f32_s32(vmovl_s16(*v35)); v39 = vcvtq_f32_s32(vmovl_high_s16(*(int16x8_t *)v35->i8)); v40 = (int64x2_t)vcvtq_f32_s32(vmovl_s16(v35[2])); v41 = (int8x16_t)vcvtq_f32_s32(vmovl_s16(*v37)); v42 = (int64x2_t)vcvtq_f32_s32(vmovl_high_s16(*(int16x8_t *)v37->i8)); v43 = (float32x4_t)vextq_s8((int8x16_t)v39, (int8x16_t)v40, 8u); v39.i64[1] = v41.i64[0]; v44 = (float32x4_t)vextq_s8(v41, (int8x16_t)v42, 8u); v45 = vmulq_f32( vaddq_f32( v44, vmulq_lane_f32(vsubq_f32(vcvtq_f32_s32(vmovl_s16(v37[2])), v44), *(float32x2_t *)v36.f32, 1)), a11); *(float32x4_t *)(a1 + 16) = vmulq_f32( vaddq_f32( v39, vmulq_f32( (float32x4_t)vuzp1q_s32( vdupq_lane_s32(*(int32x2_t *)v36.f32, 0), vdupq_lane_s32(*(int32x2_t *)v36.f32, 1)), vsubq_f32((float32x4_t)vzip2q_s64(v40, v42), v39))), a11); *(float32x4_t *)(a1 + 32) = v45; *(float32x4_t *)a1 = vmulq_f32(vaddq_f32(vmulq_n_f32(vsubq_f32(v43, v38), v36.f32[0]), v38), a11); v46 = (int16x4_t *)(a3 + 2LL * v33); v47 = vcvtq_f32_s32(vmovl_s16(*v46)); v48 = vcvtq_f32_s32(vmovl_high_s16(*(int16x8_t *)v46->i8)); v49 = vmovl_s16(v46[2]); v50 = (int16x4_t *)(a3 + 2LL * v34); v51 = (int64x2_t)vcvtq_f32_s32(v49); v52 = (int8x16_t)vcvtq_f32_s32(vmovl_s16(*v50)); v53 = (int64x2_t)vcvtq_f32_s32(vmovl_high_s16(*(int16x8_t *)v50->i8)); v54 = (float32x4_t)vextq_s8((int8x16_t)v48, (int8x16_t)v51, 8u); v48.i64[1] = v52.i64[0]; v55 = (float32x4_t)vextq_s8(v52, (int8x16_t)v53, 8u); v56 = vaddq_f32(vmulq_laneq_f32(vsubq_f32(v54, v47), v36, 2), v47); v57 = vaddq_f32( v48, vmulq_f32( (float32x4_t)vuzp1q_s32(vdupq_laneq_s32((int32x4_t)v36, 2), vdupq_laneq_s32((int32x4_t)v36, 3)), vsubq_f32((float32x4_t)vzip2q_s64(v51, v53), v48))); v58 = vmulq_f32(vaddq_f32(v55, vmulq_laneq_f32(vsubq_f32(vcvtq_f32_s32(vmovl_s16(v50[2])), v55), v36, 3)), a11); *(float32x4_t *)(a1 + 48) = vmulq_f32(v56, a11); *(float32x4_t *)(a1 + 64) = vmulq_f32(v57, a11); *(float32x4_t *)(a1 + 80) = v58; v30 = vaddq_s64(v30, (int64x2_t)a6); a8 = (int32x4_t)vaddq_s64((int64x2_t)a8, (int64x2_t)a6); a1 += 96; --v31; } while ( v31 ); *(_QWORD *)a4 = v30.i64[0]; } LABEL_12: v59 = v26 & 3; if ( v59 ) { a6.f32[0] = (float)(*(_DWORD *)a4 >> 1); v60.i32[1] = 805306368; *(float *)v60.i32 = a6.f32[0] * 4.6566e-10; v61 = 6 * *(_DWORD *)(a4 + 4); v62 = (unsigned __int16 *)(a3 + 2LL * v61); v63 = (unsigned __int16 *)(a3 + 2LL * (v61 + 2)); v64 = (__int16 *)(a3 + 2LL * (v61 + 4)); v65 = (unsigned __int16 *)(a3 + 2LL * (v61 + 6)); v66 = (unsigned __int16 *)(a3 + 2LL * (v61 + 8)); a6.i16[0] = *v62; a6.i16[2] = v62[1]; a8.i16[0] = *v63; a8.i16[2] = v63[1]; v67 = (__int16 *)(a3 + 2LL * (v61 + 10)); v68 = vcvtq_f32_s32(vmovl_s16(vuzp1_s16(*(int16x4_t *)a6.f32, *(int16x4_t *)a8.i8))); a9.i16[0] = *v65; a6.i64[0] = 0x3800000038000000LL; a6.i64[1] = 0x3800000038000000LL; a9.i16[2] = v65[1]; a10.i16[0] = *v66; v69 = vmulq_f32(v68, a6); a10.i16[2] = v66[1]; v70 = vsubq_f32( vmulq_f32(vcvtq_f32_s32(vmovl_s16(vuzp1_s16(*(int16x4_t *)a9.f32, *(int16x4_t *)a10.f32))), a6), v69); v71 = (int16x4_t)vdupq_lane_s32(v60, 0).u64[0]; *(float32x4_t *)a1 = vmlaq_n_f32(v69, v70, *(float *)v60.i32); v60.i32[0] = *v64; v60.i32[1] = v64[1]; *(float32x2_t *)v69.f32 = vmul_f32(vcvt_f32_s32(v60), (float32x2_t)0x3800000038000000LL); v70.i32[0] = *v67; v70.i32[1] = v67[1]; v72 = (int32x2_t)vmla_f32( *(float32x2_t *)v69.f32, (float32x2_t)v71, vsub_f32( vmul_f32(vcvt_f32_s32(*(int32x2_t *)v70.f32), (float32x2_t)0x3800000038000000LL), *(float32x2_t *)v69.f32)); *(int32x2_t *)(a1 + 16) = v72; v73 = *(_QWORD *)a4 + *a5; *(_QWORD *)a4 = v73; if ( v59 != 1 ) { v74.i16[1] = 12288; v74.i16[3] = 12288; *(float *)v72.i32 = (float)((unsigned int)v73 >> 1) * 4.6566e-10; v75 = (__int16 *)(a3 + 2LL * (unsigned int)(6 * HIDWORD(v73))); v76 = (__int16 *)(a3 + 2LL * (unsigned int)(6 * HIDWORD(v73) + 2)); v77 = (__int16 *)(a3 + 2LL * (unsigned int)(6 * HIDWORD(v73) + 4)); v78 = (__int16 *)(a3 + 2LL * (unsigned int)(6 * HIDWORD(v73) + 6)); v79 = (unsigned __int16 *)(a3 + 2LL * (unsigned int)(6 * HIDWORD(v73) + 8)); v74.i16[0] = *v75; v80 = (__int16 *)(a3 + 2LL * (unsigned int)(6 * HIDWORD(v73) + 10)); v74.i16[2] = v75[1]; v71.i16[0] = *v76; v71.i16[2] = v76[1]; v81 = vmulq_f32(vcvtq_f32_s32(vmovl_s16(vuzp1_s16(v74, v71))), a6); v71.i16[0] = *v78; v71.i16[2] = v78[1]; a11.i16[0] = *v79; a11.i16[2] = v79[1]; a6 = vsubq_f32(vmulq_f32(vcvtq_f32_s32(vmovl_s16(vuzp1_s16(v71, *(int16x4_t *)a11.f32))), a6), v81); v82 = (int16x4_t)vdupq_lane_s32(v72, 0).u64[0]; v83 = vmlaq_n_f32(v81, a6, *(float *)v72.i32); a6.i32[0] = *v77; a6.i32[1] = v77[1]; *(float32x4_t *)(a1 + 24) = v83; *(float32x2_t *)a6.f32 = vmul_f32(vcvt_f32_s32(*(int32x2_t *)a6.f32), (float32x2_t)0x3800000038000000LL); v84.i32[0] = *v80; v84.i32[1] = v80[1]; v85 = vcvt_f32_s32(v84); *(float32x2_t *)a6.f32 = vmla_f32( *(float32x2_t *)a6.f32, (float32x2_t)v82, vsub_f32(vmul_f32(v85, (float32x2_t)0x3800000038000000LL), *(float32x2_t *)a6.f32)); *(_QWORD *)(a1 + 40) = a6.i64[0]; v86 = *(_QWORD *)a4 + *a5; *(_QWORD *)a4 = v86; if ( v59 != 2 ) { v87.i16[1] = 12288; v87.i16[3] = 12288; a6.f32[0] = (float)((unsigned int)v86 >> 1) * 4.6566e-10; v88 = 6 * HIDWORD(v86); v89 = (__int16 *)(a3 + 2LL * (unsigned int)(6 * HIDWORD(v86))); v90 = (__int16 *)(a3 + 2LL * (unsigned int)(v88 + 2)); v91 = (__int16 *)(a3 + 2LL * (unsigned int)(v88 + 4)); v92 = (__int16 *)(a3 + 2LL * (unsigned int)(v88 + 6)); v93 = (__int16 *)(a3 + 2LL * (unsigned int)(v88 + 8)); v94 = (__int16 *)(a3 + 2LL * (unsigned int)(v88 + 10)); v87.i16[0] = *v89; v87.i16[2] = v89[1]; v85.i16[0] = *v90; v85.i16[2] = v90[1]; v95 = vcvtq_f32_s32(vmovl_s16(vuzp1_s16(v87, (int16x4_t)v85))); v96.i64[0] = 0x3800000038000000LL; v96.i64[1] = 0x3800000038000000LL; v97 = vmulq_f32(v95, v96); v83.i16[0] = *v92; v83.i16[2] = v92[1]; v82.i16[0] = *v93; v82.i16[2] = v93[1]; v98 = vsubq_f32(vmulq_f32(vcvtq_f32_s32(vmovl_s16(vuzp1_s16(*(int16x4_t *)v83.f32, v82))), v96), v97); v99 = (float32x2_t)vdupq_lane_s32(*(int32x2_t *)a6.f32, 0).u64[0]; v100 = vmlaq_n_f32(v97, v98, a6.f32[0]); v101.i32[0] = *v91; v101.i32[1] = v91[1]; *(float32x4_t *)(a1 + 48) = v100; v102 = vmul_f32(vcvt_f32_s32(v101), (float32x2_t)0x3800000038000000LL); v98.i32[0] = *v94; v98.i32[1] = v94[1]; *(float32x2_t *)a6.f32 = vmla_f32( v102, v99, vsub_f32( vmul_f32(vcvt_f32_s32(*(int32x2_t *)v98.f32), (float32x2_t)0x3800000038000000LL), v102)); *(_QWORD *)(a1 + 64) = a6.i64[0]; *(_QWORD *)a4 += *a5; } } } return *(double *)a6.i64; }
GD Web Decomp Icon

GD Web Decomp

Raw Source