; LLVM IR from QiaoLiuHit/LSOTB-TIR :: vlfeat-0.9.19/vl/mathop_sse2.ll (vl_distance_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_sub_pd(<2 x double> noundef, <2 x double> noundef) #1

; Function Attrs: nounwind uwtable
define dso_local double @_vl_distance_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 <2 x double>, align 16
  %23 = alloca <2 x double>, align 16
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  %29 = 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
  %30 = load ptr, ptr %5, align 8, !tbaa !9
  %31 = load i64, ptr %4, align 8, !tbaa !5
  %32 = getelementptr inbounds double, ptr %30, i64 %31
  store ptr %32, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %33 = load ptr, ptr %5, align 8, !tbaa !9
  %34 = load i64, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds double, ptr %33, i64 %34
  %36 = getelementptr inbounds double, ptr %35, i64 -2
  store ptr %36, 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
  %37 = call <2 x double> @_mm_setzero_pd()
  store <2 x double> %37, ptr %10, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %38 = load ptr, ptr %5, 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 %6, 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
  store i32 %50, ptr %11, align 4, !tbaa !12
  %51 = load i32, ptr %11, align 4, !tbaa !12
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %53, label %88

53:                                               ; preds = %3
  br label %54

54:                                               ; preds = %58, %53
  %55 = load ptr, ptr %5, align 8, !tbaa !9
  %56 = load ptr, ptr %8, align 8, !tbaa !9
  %57 = icmp ult ptr %55, %56
  br i1 %57, label %58, label %87

58:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #4
  %59 = load ptr, ptr %5, align 8, !tbaa !9
  %60 = load <2 x double>, ptr %59, align 16, !tbaa !11
  store <2 x double> %60, ptr %12, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #4
  %61 = load ptr, ptr %6, align 8, !tbaa !9
  %62 = load <2 x double>, ptr %61, align 16, !tbaa !11
  store <2 x double> %62, ptr %13, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #4
  %63 = load <2 x double>, ptr %12, align 16, !tbaa !11
  %64 = load <2 x double>, ptr %13, align 16, !tbaa !11
  %65 = call <2 x double> @_mm_sub_pd(<2 x double> noundef %63, <2 x double> noundef %64)
  store <2 x double> %65, ptr %14, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #4
  %66 = load <2 x double>, ptr %12, align 16, !tbaa !11
  %67 = load <2 x double>, ptr %13, align 16, !tbaa !11
  %68 = call <2 x double> @_mm_add_pd(<2 x double> noundef %66, <2 x double> noundef %67)
  store <2 x double> %68, ptr %15, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #4
  %69 = load <2 x double>, ptr %14, align 16, !tbaa !11
  %70 = load <2 x double>, ptr %14, align 16, !tbaa !11
  %71 = call <2 x double> @_mm_mul_pd(<2 x double> noundef %69, <2 x double> noundef %70)
  store <2 x double> %71, ptr %16, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #4
  %72 = load <2 x double>, ptr %16, align 16, !tbaa !11
  %73 = load <2 x double>, ptr %15, align 16, !tbaa !11
  %74 = call <2 x double> @_mm_div_pd(<2 x double> noundef %72, <2 x double> noundef %73)
  store <2 x double> %74, ptr %17, align 16, !tbaa !11
  %75 = load <2 x double>, ptr %17, align 16, !tbaa !11
  %76 = load <2 x double>, ptr %15, align 16, !tbaa !11
  %77 = call <2 x double> @_mm_setzero_pd()
  %78 = call <2 x double> @_mm_cmpneq_pd(<2 x double> noundef %76, <2 x double> noundef %77)
  %79 = call <2 x double> @_mm_and_pd(<2 x double> noundef %75, <2 x double> noundef %78)
  store <2 x double> %79, ptr %17, align 16, !tbaa !11
  %80 = load <2 x double>, ptr %10, align 16, !tbaa !11
  %81 = load <2 x double>, ptr %17, align 16, !tbaa !11
  %82 = call <2 x double> @_mm_add_pd(<2 x double> noundef %80, <2 x double> noundef %81)
  store <2 x double> %82, ptr %10, align 16, !tbaa !11
  %83 = load ptr, ptr %5, align 8, !tbaa !9
  %84 = getelementptr inbounds double, ptr %83, i64 2
  store ptr %84, ptr %5, align 8, !tbaa !9
  %85 = load ptr, ptr %6, align 8, !tbaa !9
  %86 = getelementptr inbounds double, ptr %85, i64 2
  store ptr %86, ptr %6, align 8, !tbaa !9
  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
  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 %54, !llvm.loop !14

87:                                               ; preds = %54
  br label %123

88:                                               ; preds = %3
  br label %89

89:                                               ; preds = %93, %88
  %90 = load ptr, ptr %5, align 8, !tbaa !9
  %91 = load ptr, ptr %8, align 8, !tbaa !9
  %92 = icmp ult ptr %90, %91
  br i1 %92, label %93, label %122

93:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #4
  %94 = load ptr, ptr %5, align 8, !tbaa !9
  %95 = call <2 x double> @_mm_loadu_pd(ptr noundef %94)
  store <2 x double> %95, ptr %18, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #4
  %96 = load ptr, ptr %6, align 8, !tbaa !9
  %97 = call <2 x double> @_mm_loadu_pd(ptr noundef %96)
  store <2 x double> %97, ptr %19, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #4
  %98 = load <2 x double>, ptr %18, align 16, !tbaa !11
  %99 = load <2 x double>, ptr %19, align 16, !tbaa !11
  %100 = call <2 x double> @_mm_sub_pd(<2 x double> noundef %98, <2 x double> noundef %99)
  store <2 x double> %100, ptr %20, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #4
  %101 = load <2 x double>, ptr %18, align 16, !tbaa !11
  %102 = load <2 x double>, ptr %19, align 16, !tbaa !11
  %103 = call <2 x double> @_mm_add_pd(<2 x double> noundef %101, <2 x double> noundef %102)
  store <2 x double> %103, ptr %21, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #4
  %104 = load <2 x double>, ptr %20, align 16, !tbaa !11
  %105 = load <2 x double>, ptr %20, align 16, !tbaa !11
  %106 = call <2 x double> @_mm_mul_pd(<2 x double> noundef %104, <2 x double> noundef %105)
  store <2 x double> %106, ptr %22, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #4
  %107 = load <2 x double>, ptr %22, align 16, !tbaa !11
  %108 = load <2 x double>, ptr %21, align 16, !tbaa !11
  %109 = call <2 x double> @_mm_div_pd(<2 x double> noundef %107, <2 x double> noundef %108)
  store <2 x double> %109, ptr %23, align 16, !tbaa !11
  %110 = load <2 x double>, ptr %23, align 16, !tbaa !11
  %111 = load <2 x double>, ptr %21, align 16, !tbaa !11
  %112 = call <2 x double> @_mm_setzero_pd()
  %113 = call <2 x double> @_mm_cmpneq_pd(<2 x double> noundef %111, <2 x double> noundef %112)
  %114 = call <2 x double> @_mm_and_pd(<2 x double> noundef %110, <2 x double> noundef %113)
  store <2 x double> %114, ptr %23, align 16, !tbaa !11
  %115 = load <2 x double>, ptr %10, align 16, !tbaa !11
  %116 = load <2 x double>, ptr %23, align 16, !tbaa !11
  %117 = call <2 x double> @_mm_add_pd(<2 x double> noundef %115, <2 x double> noundef %116)
  store <2 x double> %117, ptr %10, align 16, !tbaa !11
  %118 = load ptr, ptr %5, align 8, !tbaa !9
  %119 = getelementptr inbounds double, ptr %118, i64 2
  store ptr %119, ptr %5, align 8, !tbaa !9
  %120 = load ptr, ptr %6, align 8, !tbaa !9
  %121 = getelementptr inbounds double, ptr %120, i64 2
  store ptr %121, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #4
  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
  br label %89, !llvm.loop !16

122:                                              ; preds = %89
  br label %123

123:                                              ; preds = %122, %87
  %124 = load <2 x double>, ptr %10, align 16, !tbaa !11
  %125 = call double @_vl_vhsum_sse2_d(<2 x double> noundef %124)
  store double %125, ptr %9, align 8, !tbaa !17
  br label %126

126:                                              ; preds = %155, %123
  %127 = load ptr, ptr %5, align 8, !tbaa !9
  %128 = load ptr, ptr %7, align 8, !tbaa !9
  %129 = icmp ult ptr %127, %128
  br i1 %129, label %130, label %156

130:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  %131 = load ptr, ptr %5, align 8, !tbaa !9
  %132 = getelementptr inbounds double, ptr %131, i32 1
  store ptr %132, ptr %5, align 8, !tbaa !9
  %133 = load double, ptr %131, align 8, !tbaa !17
  store double %133, ptr %24, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  %134 = load ptr, ptr %6, align 8, !tbaa !9
  %135 = getelementptr inbounds double, ptr %134, i32 1
  store ptr %135, ptr %6, align 8, !tbaa !9
  %136 = load double, ptr %134, align 8, !tbaa !17
  store double %136, ptr %25, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  %137 = load double, ptr %24, align 8, !tbaa !17
  %138 = load double, ptr %25, align 8, !tbaa !17
  %139 = fsub double %137, %138
  store double %139, ptr %26, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  %140 = load double, ptr %24, align 8, !tbaa !17
  %141 = load double, ptr %25, align 8, !tbaa !17
  %142 = fadd double %140, %141
  store double %142, ptr %27, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #4
  %143 = load double, ptr %26, align 8, !tbaa !17
  %144 = load double, ptr %26, align 8, !tbaa !17
  %145 = fmul double %143, %144
  store double %145, ptr %28, align 8, !tbaa !17
  %146 = load double, ptr %27, align 8, !tbaa !17
  %147 = fcmp une double %146, 0.000000e+00
  br i1 %147, label %148, label %155

148:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #4
  %149 = load double, ptr %28, align 8, !tbaa !17
  %150 = load double, ptr %27, align 8, !tbaa !17
  %151 = fdiv double %149, %150
  store double %151, ptr %29, align 8, !tbaa !17
  %152 = load double, ptr %29, align 8, !tbaa !17
  %153 = load double, ptr %9, align 8, !tbaa !17
  %154 = fadd double %153, %152
  store double %154, ptr %9, align 8, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  br label %155

155:                                              ; preds = %148, %130
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  br label %126, !llvm.loop !19

156:                                              ; preds = %126
  %157 = load double, ptr %9, align 8, !tbaa !17
  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 %157
}

; 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

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_sub_pd(<2 x double> noundef, <2 x double> noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local double @_vl_distance_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 %.preheader70

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

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

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

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

.loopexit:                                        ; preds = %.lr.ph, %.lr.ph80, %.preheader70, %.preheader
  %.267 = phi <2 x double> [ %6, %.preheader ], [ %6, %.preheader70 ], [ %22, %.lr.ph80 ], [ %35, %.lr.ph ]
  %.261 = phi ptr [ %2, %.preheader ], [ %2, %.preheader70 ], [ %24, %.lr.ph80 ], [ %37, %.lr.ph ]
  %.2 = phi ptr [ %1, %.preheader ], [ %1, %.preheader70 ], [ %23, %.lr.ph80 ], [ %36, %.lr.ph ]
  %39 = tail call double @_vl_vhsum_sse2_d(<2 x double> noundef %.267)
  %40 = icmp ult ptr %.2, %4
  br i1 %40, label %.lr.ph87, label %._crit_edge

.lr.ph87:                                         ; preds = %.loopexit, %.lr.ph87
  %.386 = phi ptr [ %41, %.lr.ph87 ], [ %.2, %.loopexit ]
  %.36285 = phi ptr [ %43, %.lr.ph87 ], [ %.261, %.loopexit ]
  %.06384 = phi double [ %.164, %.lr.ph87 ], [ %39, %.loopexit ]
  %41 = getelementptr inbounds i8, ptr %.386, i64 8
  %42 = load double, ptr %.386, align 8, !tbaa !11
  %43 = getelementptr inbounds i8, ptr %.36285, i64 8
  %44 = load double, ptr %.36285, align 8, !tbaa !11
  %45 = fadd double %42, %44
  %46 = fcmp une double %45, 0.000000e+00
  %47 = fsub double %42, %44
  %48 = fmul double %47, %47
  %49 = fdiv double %48, %45
  %50 = fadd double %.06384, %49
  %.164 = select i1 %46, double %50, double %.06384
  %51 = icmp ult ptr %41, %4
  br i1 %51, label %.lr.ph87, label %._crit_edge, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph87, %.loopexit
  %.063.lcssa = phi double [ %39, %.loopexit ], [ %.164, %.lr.ph87 ]
  ret double %.063.lcssa
}

; 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

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