; LLVM IR from QiaoLiuHit/LSOTB-TIR :: vlfeat-0.9.19/vl/mathop_sse2.ll (vl_kernel_chi2_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_setzero_pd() #1

; 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: inlinehint nounwind uwtable
declare hidden double @_vl_vhsum_sse2_d(<2 x double> noundef) #2

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

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

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

; Function Attrs: nounwind uwtable
define dso_local double @_vl_kernel_chi2_sse2_d(i64 noundef %0, ptr noundef %1, ptr noundef %2) #3 {
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca double, align 8
  %10 = alloca <2 x double>, align 16
  %11 = alloca i32, align 4
  %12 = alloca <2 x double>, align 16
  %13 = alloca <2 x double>, align 16
  %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 double, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  store i64 %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %26 = load ptr, ptr %5, align 8, !tbaa !9
  %27 = load i64, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds double, ptr %26, i64 %27
  store ptr %28, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %29 = load ptr, ptr %5, align 8, !tbaa !9
  %30 = load i64, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds double, ptr %29, i64 %30
  %32 = getelementptr inbounds double, ptr %31, i64 -2
  store ptr %32, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #4
  %33 = call <2 x double> @_mm_setzero_pd()
  store <2 x double> %33, ptr %10, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %34 = load ptr, ptr %5, align 8, !tbaa !9
  %35 = ptrtoint ptr %34 to i64
  %36 = and i64 %35, 15
  %37 = icmp ne i64 %36, 0
  %38 = xor i1 %37, true
  %39 = zext i1 %38 to i32
  %40 = load ptr, ptr %6, align 8, !tbaa !9
  %41 = ptrtoint ptr %40 to i64
  %42 = and i64 %41, 15
  %43 = icmp ne i64 %42, 0
  %44 = xor i1 %43, true
  %45 = zext i1 %44 to i32
  %46 = and i32 %39, %45
  store i32 %46, ptr %11, align 4, !tbaa !12
  %47 = load i32, ptr %11, align 4, !tbaa !12
  %48 = icmp ne i32 %47, 0
  br i1 %48, label %49, label %81

49:                                               ; preds = %3
  br label %50

50:                                               ; preds = %54, %49
  %51 = load ptr, ptr %5, align 8, !tbaa !9
  %52 = load ptr, ptr %8, align 8, !tbaa !9
  %53 = icmp ult ptr %51, %52
  br i1 %53, label %54, label %80

54:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #4
  %55 = load ptr, ptr %5, align 8, !tbaa !9
  %56 = load <2 x double>, ptr %55, align 16, !tbaa !11
  store <2 x double> %56, ptr %12, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #4
  %57 = load ptr, ptr %6, align 8, !tbaa !9
  %58 = load <2 x double>, ptr %57, align 16, !tbaa !11
  store <2 x double> %58, ptr %13, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #4
  %59 = load <2 x double>, ptr %12, align 16, !tbaa !11
  %60 = load <2 x double>, ptr %13, align 16, !tbaa !11
  %61 = call <2 x double> @_mm_add_pd(<2 x double> noundef %59, <2 x double> noundef %60)
  store <2 x double> %61, ptr %14, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #4
  %62 = load <2 x double>, ptr %12, align 16, !tbaa !11
  %63 = load <2 x double>, ptr %13, align 16, !tbaa !11
  %64 = call <2 x double> @_mm_mul_pd(<2 x double> noundef %62, <2 x double> noundef %63)
  store <2 x double> %64, ptr %15, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #4
  %65 = load <2 x double>, ptr %15, align 16, !tbaa !11
  %66 = load <2 x double>, ptr %14, align 16, !tbaa !11
  %67 = call <2 x double> @_mm_div_pd(<2 x double> noundef %65, <2 x double> noundef %66)
  store <2 x double> %67, ptr %16, align 16, !tbaa !11
  %68 = load <2 x double>, ptr %16, align 16, !tbaa !11
  %69 = load <2 x double>, ptr %14, align 16, !tbaa !11
  %70 = call <2 x double> @_mm_setzero_pd()
  %71 = call <2 x double> @_mm_cmpneq_pd(<2 x double> noundef %69, <2 x double> noundef %70)
  %72 = call <2 x double> @_mm_and_pd(<2 x double> noundef %68, <2 x double> noundef %71)
  store <2 x double> %72, ptr %16, align 16, !tbaa !11
  %73 = load <2 x double>, ptr %10, align 16, !tbaa !11
  %74 = load <2 x double>, ptr %16, align 16, !tbaa !11
  %75 = call <2 x double> @_mm_add_pd(<2 x double> noundef %73, <2 x double> noundef %74)
  store <2 x double> %75, ptr %10, align 16, !tbaa !11
  %76 = load ptr, ptr %5, align 8, !tbaa !9
  %77 = getelementptr inbounds double, ptr %76, i64 2
  store ptr %77, ptr %5, align 8, !tbaa !9
  %78 = load ptr, ptr %6, align 8, !tbaa !9
  %79 = getelementptr inbounds double, ptr %78, i64 2
  store ptr %79, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #4
  br label %50, !llvm.loop !14

80:                                               ; preds = %50
  br label %113

81:                                               ; preds = %3
  br label %82

82:                                               ; preds = %86, %81
  %83 = load ptr, ptr %5, align 8, !tbaa !9
  %84 = load ptr, ptr %8, align 8, !tbaa !9
  %85 = icmp ult ptr %83, %84
  br i1 %85, label %86, label %112

86:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #4
  %87 = load ptr, ptr %5, align 8, !tbaa !9
  %88 = call <2 x double> @_mm_loadu_pd(ptr noundef %87)
  store <2 x double> %88, ptr %17, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #4
  %89 = load ptr, ptr %6, align 8, !tbaa !9
  %90 = call <2 x double> @_mm_loadu_pd(ptr noundef %89)
  store <2 x double> %90, ptr %18, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #4
  %91 = load <2 x double>, ptr %17, align 16, !tbaa !11
  %92 = load <2 x double>, ptr %18, align 16, !tbaa !11
  %93 = call <2 x double> @_mm_add_pd(<2 x double> noundef %91, <2 x double> noundef %92)
  store <2 x double> %93, ptr %19, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #4
  %94 = load <2 x double>, ptr %17, align 16, !tbaa !11
  %95 = load <2 x double>, ptr %18, align 16, !tbaa !11
  %96 = call <2 x double> @_mm_mul_pd(<2 x double> noundef %94, <2 x double> noundef %95)
  store <2 x double> %96, ptr %20, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #4
  %97 = load <2 x double>, ptr %20, align 16, !tbaa !11
  %98 = load <2 x double>, ptr %19, align 16, !tbaa !11
  %99 = call <2 x double> @_mm_div_pd(<2 x double> noundef %97, <2 x double> noundef %98)
  store <2 x double> %99, ptr %21, align 16, !tbaa !11
  %100 = load <2 x double>, ptr %21, align 16, !tbaa !11
  %101 = load <2 x double>, ptr %19, align 16, !tbaa !11
  %102 = call <2 x double> @_mm_setzero_pd()
  %103 = call <2 x double> @_mm_cmpneq_pd(<2 x double> noundef %101, <2 x double> noundef %102)
  %104 = call <2 x double> @_mm_and_pd(<2 x double> noundef %100, <2 x double> noundef %103)
  store <2 x double> %104, ptr %21, align 16, !tbaa !11
  %105 = load <2 x double>, ptr %10, align 16, !tbaa !11
  %106 = load <2 x double>, ptr %21, align 16, !tbaa !11
  %107 = call <2 x double> @_mm_add_pd(<2 x double> noundef %105, <2 x double> noundef %106)
  store <2 x double> %107, ptr %10, align 16, !tbaa !11
  %108 = load ptr, ptr %5, align 8, !tbaa !9
  %109 = getelementptr inbounds double, ptr %108, i64 2
  store ptr %109, ptr %5, align 8, !tbaa !9
  %110 = load ptr, ptr %6, align 8, !tbaa !9
  %111 = getelementptr inbounds double, ptr %110, i64 2
  store ptr %111, ptr %6, 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
  br label %82, !llvm.loop !16

112:                                              ; preds = %82
  br label %113

113:                                              ; preds = %112, %80
  %114 = load <2 x double>, ptr %10, align 16, !tbaa !11
  %115 = call double @_vl_vhsum_sse2_d(<2 x double> noundef %114)
  store double %115, ptr %9, align 8, !tbaa !17
  br label %116

116:                                              ; preds = %141, %113
  %117 = load ptr, ptr %5, align 8, !tbaa !9
  %118 = load ptr, ptr %7, align 8, !tbaa !9
  %119 = icmp ult ptr %117, %118
  br i1 %119, label %120, label %142

120:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  %121 = load ptr, ptr %5, align 8, !tbaa !9
  %122 = getelementptr inbounds double, ptr %121, i32 1
  store ptr %122, ptr %5, align 8, !tbaa !9
  %123 = load double, ptr %121, align 8, !tbaa !17
  store double %123, ptr %22, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  %124 = load ptr, ptr %6, align 8, !tbaa !9
  %125 = getelementptr inbounds double, ptr %124, i32 1
  store ptr %125, ptr %6, align 8, !tbaa !9
  %126 = load double, ptr %124, align 8, !tbaa !17
  store double %126, ptr %23, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  %127 = load double, ptr %22, align 8, !tbaa !17
  %128 = load double, ptr %23, align 8, !tbaa !17
  %129 = fadd double %127, %128
  store double %129, ptr %24, align 8, !tbaa !17
  %130 = load double, ptr %24, align 8, !tbaa !17
  %131 = fcmp une double %130, 0.000000e+00
  br i1 %131, label %132, label %141

132:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  %133 = load double, ptr %22, align 8, !tbaa !17
  %134 = load double, ptr %23, align 8, !tbaa !17
  %135 = fmul double %133, %134
  %136 = load double, ptr %24, align 8, !tbaa !17
  %137 = fdiv double %135, %136
  store double %137, ptr %25, align 8, !tbaa !17
  %138 = load double, ptr %25, align 8, !tbaa !17
  %139 = load double, ptr %9, align 8, !tbaa !17
  %140 = fadd double %139, %138
  store double %140, ptr %9, align 8, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  br label %141

141:                                              ; preds = %132, %120
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  br label %116, !llvm.loop !19

142:                                              ; preds = %116
  %143 = load double, ptr %9, align 8, !tbaa !17
  %144 = fmul double 2.000000e+00, %143
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  ret double %144
}

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 = { inlinehint 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 = { 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 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = !{!18, !18, i64 0}
!18 = !{!"double", !7, i64 0}
!19 = distinct !{!19, !15}


; 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_setzero_pd() local_unnamed_addr #0

; 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: inlinehint nounwind uwtable
declare hidden double @_vl_vhsum_sse2_d(<2 x double> noundef) local_unnamed_addr #1

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

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

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

; Function Attrs: nounwind uwtable
define dso_local double @_vl_kernel_chi2_sse2_d(i64 noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #2 {
  %4 = getelementptr inbounds double, ptr %1, i64 %0
  %5 = getelementptr inbounds i8, ptr %4, i64 -16
  %6 = tail call <2 x double> @_mm_setzero_pd()
  %7 = ptrtoint ptr %1 to i64
  %8 = ptrtoint ptr %2 to i64
  %9 = or i64 %8, %7
  %10 = and i64 %9, 15
  %11 = icmp eq i64 %10, 0
  %12 = icmp ugt ptr %5, %1
  br i1 %11, label %.preheader, label %.preheader63

.preheader63:                                     ; preds = %3
  br i1 %12, label %.lr.ph, label %.loopexit

.preheader:                                       ; preds = %3
  br i1 %12, label %.lr.ph73, label %.loopexit

.lr.ph73:                                         ; preds = %.preheader, %.lr.ph73
  %.072 = phi ptr [ %22, %.lr.ph73 ], [ %1, %.preheader ]
  %.05271 = phi ptr [ %23, %.lr.ph73 ], [ %2, %.preheader ]
  %.05870 = phi <2 x double> [ %21, %.lr.ph73 ], [ %6, %.preheader ]
  %13 = load <2 x double>, ptr %.072, align 16, !tbaa !5
  %14 = load <2 x double>, ptr %.05271, align 16, !tbaa !5
  %15 = tail call <2 x double> @_mm_add_pd(<2 x double> noundef %13, <2 x double> noundef %14)
  %16 = tail call <2 x double> @_mm_mul_pd(<2 x double> noundef %13, <2 x double> noundef %14)
  %17 = tail call <2 x double> @_mm_div_pd(<2 x double> noundef %16, <2 x double> noundef %15)
  %18 = tail call <2 x double> @_mm_setzero_pd()
  %19 = tail call <2 x double> @_mm_cmpneq_pd(<2 x double> noundef %15, <2 x double> noundef %18)
  %20 = tail call <2 x double> @_mm_and_pd(<2 x double> noundef %17, <2 x double> noundef %19)
  %21 = tail call <2 x double> @_mm_add_pd(<2 x double> noundef %.05870, <2 x double> noundef %20)
  %22 = getelementptr inbounds i8, ptr %.072, i64 16
  %23 = getelementptr inbounds i8, ptr %.05271, i64 16
  %24 = icmp ult ptr %22, %5
  br i1 %24, label %.lr.ph73, label %.loopexit, !llvm.loop !8

.lr.ph:                                           ; preds = %.preheader63, %.lr.ph
  %.167 = phi ptr [ %34, %.lr.ph ], [ %1, %.preheader63 ]
  %.15366 = phi ptr [ %35, %.lr.ph ], [ %2, %.preheader63 ]
  %.15965 = phi <2 x double> [ %33, %.lr.ph ], [ %6, %.preheader63 ]
  %25 = tail call <2 x double> @_mm_loadu_pd(ptr noundef %.167)
  %26 = tail call <2 x double> @_mm_loadu_pd(ptr noundef %.15366)
  %27 = tail call <2 x double> @_mm_add_pd(<2 x double> noundef %25, <2 x double> noundef %26)
  %28 = tail call <2 x double> @_mm_mul_pd(<2 x double> noundef %25, <2 x double> noundef %26)
  %29 = tail call <2 x double> @_mm_div_pd(<2 x double> noundef %28, <2 x double> noundef %27)
  %30 = tail call <2 x double> @_mm_setzero_pd()
  %31 = tail call <2 x double> @_mm_cmpneq_pd(<2 x double> noundef %27, <2 x double> noundef %30)
  %32 = tail call <2 x double> @_mm_and_pd(<2 x double> noundef %29, <2 x double> noundef %31)
  %33 = tail call <2 x double> @_mm_add_pd(<2 x double> noundef %.15965, <2 x double> noundef %32)
  %34 = getelementptr inbounds i8, ptr %.167, i64 16
  %35 = getelementptr inbounds i8, ptr %.15366, i64 16
  %36 = icmp ult ptr %34, %5
  br i1 %36, label %.lr.ph, label %.loopexit, !llvm.loop !10

.loopexit:                                        ; preds = %.lr.ph, %.lr.ph73, %.preheader63, %.preheader
  %.260 = phi <2 x double> [ %6, %.preheader ], [ %6, %.preheader63 ], [ %21, %.lr.ph73 ], [ %33, %.lr.ph ]
  %.254 = phi ptr [ %2, %.preheader ], [ %2, %.preheader63 ], [ %23, %.lr.ph73 ], [ %35, %.lr.ph ]
  %.2 = phi ptr [ %1, %.preheader ], [ %1, %.preheader63 ], [ %22, %.lr.ph73 ], [ %34, %.lr.ph ]
  %37 = tail call double @_vl_vhsum_sse2_d(<2 x double> noundef %.260)
  %38 = icmp ult ptr %.2, %4
  br i1 %38, label %.lr.ph80, label %._crit_edge

.lr.ph80:                                         ; preds = %.loopexit, %.lr.ph80
  %.379 = phi ptr [ %39, %.lr.ph80 ], [ %.2, %.loopexit ]
  %.35578 = phi ptr [ %41, %.lr.ph80 ], [ %.254, %.loopexit ]
  %.05677 = phi double [ %.157, %.lr.ph80 ], [ %37, %.loopexit ]
  %39 = getelementptr inbounds i8, ptr %.379, i64 8
  %40 = load double, ptr %.379, align 8, !tbaa !11
  %41 = getelementptr inbounds i8, ptr %.35578, i64 8
  %42 = load double, ptr %.35578, align 8, !tbaa !11
  %43 = fadd double %40, %42
  %44 = fcmp une double %43, 0.000000e+00
  %45 = fmul double %40, %42
  %46 = fdiv double %45, %43
  %47 = fadd double %.05677, %46
  %.157 = select i1 %44, double %47, double %.05677
  %48 = icmp ult ptr %39, %4
  br i1 %48, label %.lr.ph80, label %._crit_edge, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph80, %.loopexit
  %.056.lcssa = phi double [ %37, %.loopexit ], [ %.157, %.lr.ph80 ]
  %49 = fmul double %.056.lcssa, 2.000000e+00
  ret double %49
}

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 = { inlinehint 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 = { 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" }

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !6, i64 0}
!13 = distinct !{!13, !9}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass