; LLVM IR from QiaoLiuHit/LSOTB-TIR :: vlfeat-0.9.19/vl/mathop_sse2.ll (vl_weighted_sigma_sse2_d)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: alwaysinline nounwind uwtable
declare hidden <2 x double> @_mm_mul_pd(<2 x double> noundef, <2 x double> noundef) #1

; Function Attrs: alwaysinline nounwind uwtable
declare hidden <2 x double> @_mm_add_pd(<2 x double> noundef, <2 x double> noundef) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: alwaysinline nounwind uwtable
declare hidden <2 x double> @_mm_loadu_pd(ptr noundef) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #2

; Function Attrs: alwaysinline nounwind uwtable
declare hidden <2 x double> @_mm_sub_pd(<2 x double> noundef, <2 x double> noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @_vl_weighted_sigma_sse2_d(i64 noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, double noundef %4) #3 {
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca double, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca <2 x double>, align 16
  %15 = alloca <2 x double>, align 16
  %16 = alloca <2 x double>, align 16
  %17 = alloca <2 x double>, align 16
  %18 = alloca <2 x double>, align 16
  %19 = alloca <2 x double>, align 16
  %20 = alloca <2 x double>, align 16
  %21 = alloca <2 x double>, align 16
  %22 = alloca <2 x double>, align 16
  %23 = alloca <2 x double>, align 16
  %24 = alloca <2 x double>, align 16
  %25 = alloca <2 x double>, align 16
  %26 = alloca <2 x double>, align 16
  %27 = alloca <2 x double>, align 16
  %28 = alloca <2 x double>, align 16
  %29 = alloca double, align 8
  %30 = alloca double, align 8
  %31 = alloca double, align 8
  store i64 %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !9
  store double %4, ptr %10, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %32 = load ptr, ptr %8, align 8, !tbaa !9
  %33 = load i64, ptr %6, align 8, !tbaa !5
  %34 = getelementptr inbounds double, ptr %32, i64 %33
  store ptr %34, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %35 = load ptr, ptr %11, align 8, !tbaa !9
  %36 = getelementptr inbounds double, ptr %35, i64 -2
  %37 = getelementptr inbounds double, ptr %36, i64 1
  store ptr %37, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %38 = load ptr, ptr %8, align 8, !tbaa !9
  %39 = ptrtoint ptr %38 to i64
  %40 = and i64 %39, 15
  %41 = icmp ne i64 %40, 0
  %42 = xor i1 %41, true
  %43 = zext i1 %42 to i32
  %44 = load ptr, ptr %9, align 8, !tbaa !9
  %45 = ptrtoint ptr %44 to i64
  %46 = and i64 %45, 15
  %47 = icmp ne i64 %46, 0
  %48 = xor i1 %47, true
  %49 = zext i1 %48 to i32
  %50 = and i32 %43, %49
  %51 = load ptr, ptr %7, align 8, !tbaa !9
  %52 = ptrtoint ptr %51 to i64
  %53 = and i64 %52, 15
  %54 = icmp ne i64 %53, 0
  %55 = xor i1 %54, true
  %56 = zext i1 %55 to i32
  %57 = and i32 %50, %56
  store i32 %57, ptr %13, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #4
  %58 = call <2 x double> @_mm_load1_pd(ptr noundef %10)
  store <2 x double> %58, ptr %14, align 16, !tbaa !15
  %59 = load i32, ptr %13, align 4, !tbaa !13
  %60 = icmp ne i32 %59, 0
  br i1 %60, label %61, label %94

61:                                               ; preds = %5
  br label %62

62:                                               ; preds = %66, %61
  %63 = load ptr, ptr %8, align 8, !tbaa !9
  %64 = load ptr, ptr %12, align 8, !tbaa !9
  %65 = icmp ult ptr %63, %64
  br i1 %65, label %66, label %93

66:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #4
  %67 = load ptr, ptr %8, align 8, !tbaa !9
  %68 = load <2 x double>, ptr %67, align 16, !tbaa !15
  store <2 x double> %68, ptr %15, align 16, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #4
  %69 = load ptr, ptr %9, align 8, !tbaa !9
  %70 = load <2 x double>, ptr %69, align 16, !tbaa !15
  store <2 x double> %70, ptr %16, align 16, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #4
  %71 = load ptr, ptr %7, align 8, !tbaa !9
  %72 = load <2 x double>, ptr %71, align 16, !tbaa !15
  store <2 x double> %72, ptr %17, align 16, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #4
  %73 = load <2 x double>, ptr %15, align 16, !tbaa !15
  %74 = load <2 x double>, ptr %16, align 16, !tbaa !15
  %75 = call <2 x double> @_mm_sub_pd(<2 x double> noundef %73, <2 x double> noundef %74)
  store <2 x double> %75, ptr %18, align 16, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #4
  %76 = load <2 x double>, ptr %18, align 16, !tbaa !15
  %77 = load <2 x double>, ptr %18, align 16, !tbaa !15
  %78 = call <2 x double> @_mm_mul_pd(<2 x double> noundef %76, <2 x double> noundef %77)
  store <2 x double> %78, ptr %19, align 16, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #4
  %79 = load <2 x double>, ptr %19, align 16, !tbaa !15
  %80 = load <2 x double>, ptr %14, align 16, !tbaa !15
  %81 = call <2 x double> @_mm_mul_pd(<2 x double> noundef %79, <2 x double> noundef %80)
  store <2 x double> %81, ptr %20, align 16, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #4
  %82 = load <2 x double>, ptr %17, align 16, !tbaa !15
  %83 = load <2 x double>, ptr %20, align 16, !tbaa !15
  %84 = call <2 x double> @_mm_add_pd(<2 x double> noundef %82, <2 x double> noundef %83)
  store <2 x double> %84, ptr %21, align 16, !tbaa !15
  %85 = load <2 x double>, ptr %21, align 16, !tbaa !15
  %86 = load ptr, ptr %7, align 8, !tbaa !9
  store <2 x double> %85, ptr %86, align 16, !tbaa !15
  %87 = load ptr, ptr %8, align 8, !tbaa !9
  %88 = getelementptr inbounds double, ptr %87, i64 2
  store ptr %88, ptr %8, align 8, !tbaa !9
  %89 = load ptr, ptr %9, align 8, !tbaa !9
  %90 = getelementptr inbounds double, ptr %89, i64 2
  store ptr %90, ptr %9, align 8, !tbaa !9
  %91 = load ptr, ptr %7, align 8, !tbaa !9
  %92 = getelementptr inbounds double, ptr %91, i64 2
  store ptr %92, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #4
  br label %62, !llvm.loop !16

93:                                               ; preds = %62
  br label %127

94:                                               ; preds = %5
  br label %95

95:                                               ; preds = %99, %94
  %96 = load ptr, ptr %8, align 8, !tbaa !9
  %97 = load ptr, ptr %12, align 8, !tbaa !9
  %98 = icmp ult ptr %96, %97
  br i1 %98, label %99, label %126

99:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #4
  %100 = load ptr, ptr %8, align 8, !tbaa !9
  %101 = call <2 x double> @_mm_loadu_pd(ptr noundef %100)
  store <2 x double> %101, ptr %22, align 16, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #4
  %102 = load ptr, ptr %9, align 8, !tbaa !9
  %103 = call <2 x double> @_mm_loadu_pd(ptr noundef %102)
  store <2 x double> %103, ptr %23, align 16, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #4
  %104 = load ptr, ptr %7, align 8, !tbaa !9
  %105 = call <2 x double> @_mm_loadu_pd(ptr noundef %104)
  store <2 x double> %105, ptr %24, align 16, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #4
  %106 = load <2 x double>, ptr %22, align 16, !tbaa !15
  %107 = load <2 x double>, ptr %23, align 16, !tbaa !15
  %108 = call <2 x double> @_mm_sub_pd(<2 x double> noundef %106, <2 x double> noundef %107)
  store <2 x double> %108, ptr %25, align 16, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #4
  %109 = load <2 x double>, ptr %25, align 16, !tbaa !15
  %110 = load <2 x double>, ptr %25, align 16, !tbaa !15
  %111 = call <2 x double> @_mm_mul_pd(<2 x double> noundef %109, <2 x double> noundef %110)
  store <2 x double> %111, ptr %26, align 16, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #4
  %112 = load <2 x double>, ptr %26, align 16, !tbaa !15
  %113 = load <2 x double>, ptr %14, align 16, !tbaa !15
  %114 = call <2 x double> @_mm_mul_pd(<2 x double> noundef %112, <2 x double> noundef %113)
  store <2 x double> %114, ptr %27, align 16, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #4
  %115 = load <2 x double>, ptr %24, align 16, !tbaa !15
  %116 = load <2 x double>, ptr %27, align 16, !tbaa !15
  %117 = call <2 x double> @_mm_add_pd(<2 x double> noundef %115, <2 x double> noundef %116)
  store <2 x double> %117, ptr %28, align 16, !tbaa !15
  %118 = load ptr, ptr %7, align 8, !tbaa !9
  %119 = load <2 x double>, ptr %28, align 16, !tbaa !15
  call void @_mm_storeu_pd(ptr noundef %118, <2 x double> noundef %119)
  %120 = load ptr, ptr %8, align 8, !tbaa !9
  %121 = getelementptr inbounds double, ptr %120, i64 2
  store ptr %121, ptr %8, align 8, !tbaa !9
  %122 = load ptr, ptr %9, align 8, !tbaa !9
  %123 = getelementptr inbounds double, ptr %122, i64 2
  store ptr %123, ptr %9, align 8, !tbaa !9
  %124 = load ptr, ptr %7, align 8, !tbaa !9
  %125 = getelementptr inbounds double, ptr %124, i64 2
  store ptr %125, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #4
  br label %95, !llvm.loop !18

126:                                              ; preds = %95
  br label %127

127:                                              ; preds = %126, %93
  br label %128

128:                                              ; preds = %132, %127
  %129 = load ptr, ptr %8, align 8, !tbaa !9
  %130 = load ptr, ptr %11, align 8, !tbaa !9
  %131 = icmp ult ptr %129, %130
  br i1 %131, label %132, label %151

132:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #4
  %133 = load ptr, ptr %8, align 8, !tbaa !9
  %134 = getelementptr inbounds double, ptr %133, i32 1
  store ptr %134, ptr %8, align 8, !tbaa !9
  %135 = load double, ptr %133, align 8, !tbaa !11
  store double %135, ptr %29, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #4
  %136 = load ptr, ptr %9, align 8, !tbaa !9
  %137 = getelementptr inbounds double, ptr %136, i32 1
  store ptr %137, ptr %9, align 8, !tbaa !9
  %138 = load double, ptr %136, align 8, !tbaa !11
  store double %138, ptr %30, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #4
  %139 = load double, ptr %29, align 8, !tbaa !11
  %140 = load double, ptr %30, align 8, !tbaa !11
  %141 = fsub double %139, %140
  store double %141, ptr %31, align 8, !tbaa !11
  %142 = load double, ptr %31, align 8, !tbaa !11
  %143 = load double, ptr %31, align 8, !tbaa !11
  %144 = fmul double %142, %143
  %145 = load double, ptr %10, align 8, !tbaa !11
  %146 = load ptr, ptr %7, align 8, !tbaa !9
  %147 = load double, ptr %146, align 8, !tbaa !11
  %148 = call double @llvm.fmuladd.f64(double %144, double %145, double %147)
  store double %148, ptr %146, align 8, !tbaa !11
  %149 = load ptr, ptr %7, align 8, !tbaa !9
  %150 = getelementptr inbounds double, ptr %149, i32 1
  store ptr %150, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  br label %128, !llvm.loop !19

151:                                              ; preds = %128
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  ret void
}

; Function Attrs: alwaysinline nounwind uwtable
declare hidden <2 x double> @_mm_load1_pd(ptr noundef) #1

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @_mm_storeu_pd(ptr noundef, <2 x double> noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { alwaysinline nounwind uwtable "min-legal-vector-width"="128" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="128" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: alwaysinline nounwind uwtable
declare hidden <2 x double> @_mm_mul_pd(<2 x double> noundef, <2 x double> noundef) local_unnamed_addr #0

; Function Attrs: alwaysinline nounwind uwtable
declare hidden <2 x double> @_mm_add_pd(<2 x double> noundef, <2 x double> noundef) local_unnamed_addr #0

; Function Attrs: alwaysinline nounwind uwtable
declare hidden <2 x double> @_mm_loadu_pd(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

; Function Attrs: alwaysinline nounwind uwtable
declare hidden <2 x double> @_mm_sub_pd(<2 x double> noundef, <2 x double> noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @_vl_weighted_sigma_sse2_d(i64 noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, double noundef %4) local_unnamed_addr #2 {
  %6 = ptrtoint ptr %2 to i64
  %7 = alloca double, align 8
  store double %4, ptr %7, align 8, !tbaa !5
  %8 = getelementptr inbounds double, ptr %2, i64 %0
  %9 = getelementptr inbounds i8, ptr %8, i64 -8
  %10 = ptrtoint ptr %2 to i64
  %11 = ptrtoint ptr %3 to i64
  %12 = ptrtoint ptr %1 to i64
  %13 = or i64 %10, %12
  %14 = or i64 %13, %11
  %15 = and i64 %14, 15
  %16 = icmp eq i64 %15, 0
  %17 = call <2 x double> @_mm_load1_pd(ptr noundef nonnull %7)
  %18 = icmp ugt ptr %9, %2
  br i1 %16, label %.preheader, label %.preheader61

.preheader61:                                     ; preds = %5
  br i1 %18, label %.lr.ph, label %.loopexit

.preheader:                                       ; preds = %5
  br i1 %18, label %.lr.ph71, label %.loopexit

.lr.ph71:                                         ; preds = %.preheader, %.lr.ph71
  %.070 = phi ptr [ %28, %.lr.ph71 ], [ %1, %.preheader ]
  %.05269 = phi ptr [ %26, %.lr.ph71 ], [ %2, %.preheader ]
  %.05668 = phi ptr [ %27, %.lr.ph71 ], [ %3, %.preheader ]
  %19 = load <2 x double>, ptr %.05269, align 16, !tbaa !9
  %20 = load <2 x double>, ptr %.05668, align 16, !tbaa !9
  %21 = load <2 x double>, ptr %.070, align 16, !tbaa !9
  %22 = call <2 x double> @_mm_sub_pd(<2 x double> noundef %19, <2 x double> noundef %20)
  %23 = call <2 x double> @_mm_mul_pd(<2 x double> noundef %22, <2 x double> noundef %22)
  %24 = call <2 x double> @_mm_mul_pd(<2 x double> noundef %23, <2 x double> noundef %17)
  %25 = call <2 x double> @_mm_add_pd(<2 x double> noundef %21, <2 x double> noundef %24)
  store <2 x double> %25, ptr %.070, align 16, !tbaa !9
  %26 = getelementptr inbounds i8, ptr %.05269, i64 16
  %27 = getelementptr inbounds i8, ptr %.05668, i64 16
  %28 = getelementptr inbounds i8, ptr %.070, i64 16
  %29 = icmp ult ptr %26, %9
  br i1 %29, label %.lr.ph71, label %.loopexit, !llvm.loop !10

.lr.ph:                                           ; preds = %.preheader61, %.lr.ph
  %.165 = phi ptr [ %39, %.lr.ph ], [ %1, %.preheader61 ]
  %.15364 = phi ptr [ %37, %.lr.ph ], [ %2, %.preheader61 ]
  %.15763 = phi ptr [ %38, %.lr.ph ], [ %3, %.preheader61 ]
  %30 = call <2 x double> @_mm_loadu_pd(ptr noundef %.15364)
  %31 = call <2 x double> @_mm_loadu_pd(ptr noundef %.15763)
  %32 = call <2 x double> @_mm_loadu_pd(ptr noundef %.165)
  %33 = call <2 x double> @_mm_sub_pd(<2 x double> noundef %30, <2 x double> noundef %31)
  %34 = call <2 x double> @_mm_mul_pd(<2 x double> noundef %33, <2 x double> noundef %33)
  %35 = call <2 x double> @_mm_mul_pd(<2 x double> noundef %34, <2 x double> noundef %17)
  %36 = call <2 x double> @_mm_add_pd(<2 x double> noundef %32, <2 x double> noundef %35)
  call void @_mm_storeu_pd(ptr noundef %.165, <2 x double> noundef %36)
  %37 = getelementptr inbounds i8, ptr %.15364, i64 16
  %38 = getelementptr inbounds i8, ptr %.15763, i64 16
  %39 = getelementptr inbounds i8, ptr %.165, i64 16
  %40 = icmp ult ptr %37, %9
  br i1 %40, label %.lr.ph, label %.loopexit, !llvm.loop !12

.loopexit:                                        ; preds = %.lr.ph, %.lr.ph71, %.preheader61, %.preheader
  %.258 = phi ptr [ %3, %.preheader ], [ %3, %.preheader61 ], [ %27, %.lr.ph71 ], [ %38, %.lr.ph ]
  %.254 = phi ptr [ %2, %.preheader ], [ %2, %.preheader61 ], [ %26, %.lr.ph71 ], [ %37, %.lr.ph ]
  %.2 = phi ptr [ %1, %.preheader ], [ %1, %.preheader61 ], [ %28, %.lr.ph71 ], [ %39, %.lr.ph ]
  %.25497 = ptrtoint ptr %.254 to i64
  %41 = icmp ult ptr %.254, %8
  br i1 %41, label %.lr.ph78.preheader, label %._crit_edge

.lr.ph78.preheader:                               ; preds = %.loopexit
  %42 = shl i64 %0, 3
  %43 = add i64 %42, %6
  %44 = add i64 %.25497, 8
  %umax108 = call i64 @llvm.umax.i64(i64 %43, i64 %44)
  %45 = xor i64 %.25497, -1
  %46 = add i64 %umax108, %45
  %47 = lshr i64 %46, 3
  %48 = add nuw nsw i64 %47, 1
  %min.iters.check = icmp ult i64 %46, 120
  br i1 %min.iters.check, label %.lr.ph78.preheader127, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph78.preheader
  %49 = shl i64 %0, 3
  %50 = add i64 %49, %6
  %51 = add i64 %.25497, 8
  %umax = call i64 @llvm.umax.i64(i64 %50, i64 %51)
  %52 = xor i64 %.25497, -1
  %53 = add i64 %umax, %52
  %54 = and i64 %53, -8
  %55 = add i64 %54, 8
  %scevgep = getelementptr i8, ptr %.2, i64 %55
  %scevgep98 = getelementptr i8, ptr %.254, i64 %55
  %scevgep99 = getelementptr i8, ptr %.258, i64 %55
  %scevgep100 = getelementptr inbounds i8, ptr %7, i64 8
  %bound0 = icmp ult ptr %.2, %scevgep98
  %bound1 = icmp ult ptr %.254, %scevgep
  %found.conflict = and i1 %bound0, %bound1
  %bound0101 = icmp ult ptr %.2, %scevgep99
  %bound1102 = icmp ult ptr %.258, %scevgep
  %found.conflict103 = and i1 %bound0101, %bound1102
  %conflict.rdx = or i1 %found.conflict, %found.conflict103
  %bound0104 = icmp ult ptr %.2, %scevgep100
  %bound1105 = icmp ult ptr %7, %scevgep
  %found.conflict106 = and i1 %bound0104, %bound1105
  %conflict.rdx107 = or i1 %conflict.rdx, %found.conflict106
  br i1 %conflict.rdx107, label %.lr.ph78.preheader127, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %48, 4611686018427387900
  %56 = shl i64 %n.vec, 3
  %ind.end = getelementptr i8, ptr %.2, i64 %56
  %57 = shl i64 %n.vec, 3
  %ind.end109 = getelementptr i8, ptr %.254, i64 %57
  %58 = shl i64 %n.vec, 3
  %ind.end111 = getelementptr i8, ptr %.258, i64 %58
  %59 = load double, ptr %7, align 8, !tbaa !5, !alias.scope !13
  %broadcast.splatinsert125 = insertelement <2 x double> poison, double %59, i64 0
  %broadcast.splat126 = shufflevector <2 x double> %broadcast.splatinsert125, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = shl i64 %index, 3
  %next.gep = getelementptr i8, ptr %.2, i64 %offset.idx
  %offset.idx114 = shl i64 %index, 3
  %next.gep115 = getelementptr i8, ptr %.254, i64 %offset.idx114
  %offset.idx117 = shl i64 %index, 3
  %next.gep118 = getelementptr i8, ptr %.258, i64 %offset.idx117
  %60 = getelementptr i8, ptr %next.gep115, i64 16
  %wide.load = load <2 x double>, ptr %next.gep115, align 8, !tbaa !5, !alias.scope !16
  %wide.load120 = load <2 x double>, ptr %60, align 8, !tbaa !5, !alias.scope !16
  %61 = getelementptr i8, ptr %next.gep118, i64 16
  %wide.load121 = load <2 x double>, ptr %next.gep118, align 8, !tbaa !5, !alias.scope !18
  %wide.load122 = load <2 x double>, ptr %61, align 8, !tbaa !5, !alias.scope !18
  %62 = fsub <2 x double> %wide.load, %wide.load121
  %63 = fsub <2 x double> %wide.load120, %wide.load122
  %64 = fmul <2 x double> %62, %62
  %65 = fmul <2 x double> %63, %63
  %66 = getelementptr i8, ptr %next.gep, i64 16
  %wide.load123 = load <2 x double>, ptr %next.gep, align 8, !tbaa !5, !alias.scope !20, !noalias !22
  %wide.load124 = load <2 x double>, ptr %66, align 8, !tbaa !5, !alias.scope !20, !noalias !22
  %67 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %64, <2 x double> %broadcast.splat126, <2 x double> %wide.load123)
  %68 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %65, <2 x double> %broadcast.splat126, <2 x double> %wide.load124)
  store <2 x double> %67, ptr %next.gep, align 8, !tbaa !5, !alias.scope !20, !noalias !22
  store <2 x double> %68, ptr %66, align 8, !tbaa !5, !alias.scope !20, !noalias !22
  %index.next = add nuw i64 %index, 4
  %69 = icmp eq i64 %index.next, %n.vec
  br i1 %69, label %middle.block, label %vector.body, !llvm.loop !23

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %48, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph78.preheader127

.lr.ph78.preheader127:                            ; preds = %middle.block, %vector.memcheck, %.lr.ph78.preheader
  %.377.ph = phi ptr [ %.2, %vector.memcheck ], [ %.2, %.lr.ph78.preheader ], [ %ind.end, %middle.block ]
  %.35576.ph = phi ptr [ %.254, %vector.memcheck ], [ %.254, %.lr.ph78.preheader ], [ %ind.end109, %middle.block ]
  %.35975.ph = phi ptr [ %.258, %vector.memcheck ], [ %.258, %.lr.ph78.preheader ], [ %ind.end111, %middle.block ]
  br label %.lr.ph78

.lr.ph78:                                         ; preds = %.lr.ph78.preheader127, %.lr.ph78
  %.377 = phi ptr [ %79, %.lr.ph78 ], [ %.377.ph, %.lr.ph78.preheader127 ]
  %.35576 = phi ptr [ %70, %.lr.ph78 ], [ %.35576.ph, %.lr.ph78.preheader127 ]
  %.35975 = phi ptr [ %72, %.lr.ph78 ], [ %.35975.ph, %.lr.ph78.preheader127 ]
  %70 = getelementptr inbounds i8, ptr %.35576, i64 8
  %71 = load double, ptr %.35576, align 8, !tbaa !5
  %72 = getelementptr inbounds i8, ptr %.35975, i64 8
  %73 = load double, ptr %.35975, align 8, !tbaa !5
  %74 = fsub double %71, %73
  %75 = fmul double %74, %74
  %76 = load double, ptr %7, align 8, !tbaa !5
  %77 = load double, ptr %.377, align 8, !tbaa !5
  %78 = call double @llvm.fmuladd.f64(double %75, double %76, double %77)
  store double %78, ptr %.377, align 8, !tbaa !5
  %79 = getelementptr inbounds i8, ptr %.377, i64 8
  %80 = icmp ult ptr %70, %8
  br i1 %80, label %.lr.ph78, label %._crit_edge, !llvm.loop !26

._crit_edge:                                      ; preds = %.lr.ph78, %middle.block, %.loopexit
  ret void
}

; Function Attrs: alwaysinline nounwind uwtable
declare hidden <2 x double> @_mm_load1_pd(ptr noundef) local_unnamed_addr #0

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @_mm_storeu_pd(ptr noundef, <2 x double> noundef) local_unnamed_addr #0

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umax.i64(i64, i64) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #3

attributes #0 = { alwaysinline nounwind uwtable "min-legal-vector-width"="128" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="128" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = !{!14}
!14 = distinct !{!14, !15}
!15 = distinct !{!15, !"LVerDomain"}
!16 = !{!17}
!17 = distinct !{!17, !15}
!18 = !{!19}
!19 = distinct !{!19, !15}
!20 = !{!21}
!21 = distinct !{!21, !15}
!22 = !{!17, !19, !14}
!23 = distinct !{!23, !11, !24, !25}
!24 = !{!"llvm.loop.isvectorized", i32 1}
!25 = !{!"llvm.loop.unroll.runtime.disable"}
!26 = distinct !{!26, !11, !24}


; Effective O3 passes: GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass