; LLVM IR from softmin/ReHLine-SVM :: liblinear/newton.ll (ZN8function21linesearch_and_updateEPdS0_S0_S0_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: mustprogress uwtable
define dso_local noundef double @_ZN8function21linesearch_and_updateEPdS0_S0_S0_d(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, double noundef %5) unnamed_addr #0 align 2 {
  %7 = alloca double, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca double, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store double %5, ptr %13, align 8, !tbaa !9
  %24 = load ptr, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  store double 0.000000e+00, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  store double 1.000000e-02, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %25 = load ptr, ptr %24, align 8, !tbaa !11
  %26 = getelementptr inbounds ptr, ptr %25, i64 3
  %27 = load ptr, ptr %26, align 8
  %28 = call noundef i32 %27(ptr noundef nonnull align 8 dereferenceable(8) %24)
  store i32 %28, ptr %16, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 20, ptr %17, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %29 = load i32, ptr %16, align 4, !tbaa !13
  %30 = sext i32 %29 to i64
  %31 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %30, i64 8)
  %32 = extractvalue { i64, i1 } %31, 1
  %33 = extractvalue { i64, i1 } %31, 0
  %34 = select i1 %32, i64 -1, i64 %33
  %35 = call noalias noundef nonnull ptr @_Znam(i64 noundef %34) #7
  store ptr %35, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %36 = load ptr, ptr %11, align 8, !tbaa !5
  %37 = load double, ptr %36, align 8, !tbaa !9
  store double %37, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 0, ptr %20, align 4, !tbaa !13
  br label %38

38:                                               ; preds = %56, %6
  %39 = load i32, ptr %20, align 4, !tbaa !13
  %40 = load i32, ptr %16, align 4, !tbaa !13
  %41 = icmp slt i32 %39, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %59

43:                                               ; preds = %38
  %44 = load ptr, ptr %10, align 8, !tbaa !5
  %45 = load i32, ptr %20, align 4, !tbaa !13
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds double, ptr %44, i64 %46
  %48 = load double, ptr %47, align 8, !tbaa !9
  %49 = load ptr, ptr %12, align 8, !tbaa !5
  %50 = load i32, ptr %20, align 4, !tbaa !13
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds double, ptr %49, i64 %51
  %53 = load double, ptr %52, align 8, !tbaa !9
  %54 = load double, ptr %14, align 8, !tbaa !9
  %55 = call double @llvm.fmuladd.f64(double %48, double %53, double %54)
  store double %55, ptr %14, align 8, !tbaa !9
  br label %56

56:                                               ; preds = %43
  %57 = load i32, ptr %20, align 4, !tbaa !13
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %20, align 4, !tbaa !13
  br label %38, !llvm.loop !15

59:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 0, ptr %21, align 4, !tbaa !13
  store i32 0, ptr %21, align 4, !tbaa !13
  br label %60

60:                                               ; preds = %112, %59
  %61 = load i32, ptr %21, align 4, !tbaa !13
  %62 = load i32, ptr %17, align 4, !tbaa !13
  %63 = icmp slt i32 %61, %62
  br i1 %63, label %64, label %115

64:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  store i32 0, ptr %22, align 4, !tbaa !13
  br label %65

65:                                               ; preds = %87, %64
  %66 = load i32, ptr %22, align 4, !tbaa !13
  %67 = load i32, ptr %16, align 4, !tbaa !13
  %68 = icmp slt i32 %66, %67
  br i1 %68, label %70, label %69

69:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %90

70:                                               ; preds = %65
  %71 = load ptr, ptr %9, align 8, !tbaa !5
  %72 = load i32, ptr %22, align 4, !tbaa !13
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds double, ptr %71, i64 %73
  %75 = load double, ptr %74, align 8, !tbaa !9
  %76 = load double, ptr %13, align 8, !tbaa !9
  %77 = load ptr, ptr %10, align 8, !tbaa !5
  %78 = load i32, ptr %22, align 4, !tbaa !13
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds double, ptr %77, i64 %79
  %81 = load double, ptr %80, align 8, !tbaa !9
  %82 = call double @llvm.fmuladd.f64(double %76, double %81, double %75)
  %83 = load ptr, ptr %18, align 8, !tbaa !5
  %84 = load i32, ptr %22, align 4, !tbaa !13
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds double, ptr %83, i64 %85
  store double %82, ptr %86, align 8, !tbaa !9
  br label %87

87:                                               ; preds = %70
  %88 = load i32, ptr %22, align 4, !tbaa !13
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %22, align 4, !tbaa !13
  br label %65, !llvm.loop !17

90:                                               ; preds = %69
  %91 = load ptr, ptr %18, align 8, !tbaa !5
  %92 = load ptr, ptr %24, align 8, !tbaa !11
  %93 = getelementptr inbounds ptr, ptr %92, i64 0
  %94 = load ptr, ptr %93, align 8
  %95 = call noundef double %94(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef %91)
  %96 = load ptr, ptr %11, align 8, !tbaa !5
  store double %95, ptr %96, align 8, !tbaa !9
  %97 = load ptr, ptr %11, align 8, !tbaa !5
  %98 = load double, ptr %97, align 8, !tbaa !9
  %99 = load double, ptr %19, align 8, !tbaa !9
  %100 = fsub double %98, %99
  %101 = load double, ptr %15, align 8, !tbaa !9
  %102 = load double, ptr %13, align 8, !tbaa !9
  %103 = fmul double %101, %102
  %104 = load double, ptr %14, align 8, !tbaa !9
  %105 = fmul double %103, %104
  %106 = fcmp ole double %100, %105
  br i1 %106, label %107, label %108

107:                                              ; preds = %90
  br label %115

108:                                              ; preds = %90
  %109 = load double, ptr %13, align 8, !tbaa !9
  %110 = fmul double %109, 5.000000e-01
  store double %110, ptr %13, align 8, !tbaa !9
  br label %111

111:                                              ; preds = %108
  br label %112

112:                                              ; preds = %111
  %113 = load i32, ptr %21, align 4, !tbaa !13
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %21, align 4, !tbaa !13
  br label %60, !llvm.loop !18

115:                                              ; preds = %107, %60
  %116 = load i32, ptr %21, align 4, !tbaa !13
  %117 = load i32, ptr %17, align 4, !tbaa !13
  %118 = icmp sge i32 %116, %117
  br i1 %118, label %119, label %122

119:                                              ; preds = %115
  %120 = load double, ptr %19, align 8, !tbaa !9
  %121 = load ptr, ptr %11, align 8, !tbaa !5
  store double %120, ptr %121, align 8, !tbaa !9
  store double 0.000000e+00, ptr %7, align 8
  store i32 1, ptr %23, align 4
  br label %134

122:                                              ; preds = %115
  %123 = load ptr, ptr %9, align 8, !tbaa !5
  %124 = load ptr, ptr %18, align 8, !tbaa !5
  %125 = load i32, ptr %16, align 4, !tbaa !13
  %126 = sext i32 %125 to i64
  %127 = mul i64 8, %126
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %123, ptr align 8 %124, i64 %127, i1 false)
  br label %128

128:                                              ; preds = %122
  %129 = load ptr, ptr %18, align 8, !tbaa !5
  %130 = icmp eq ptr %129, null
  br i1 %130, label %132, label %131

131:                                              ; preds = %128
  call void @_ZdaPv(ptr noundef %129) #8
  br label %132

132:                                              ; preds = %131, %128
  %133 = load double, ptr %13, align 8, !tbaa !9
  store double %133, ptr %7, align 8
  store i32 1, ptr %23, align 4
  br label %134

134:                                              ; preds = %132, %119
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  %135 = load double, ptr %7, align 8
  ret double %135
}

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #3

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #5

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nobuiltin allocsize(0) "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nobuiltin nounwind "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 #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }
attributes #8 = { builtin 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}


; 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: mustprogress uwtable
define dso_local noundef double @_ZN8function21linesearch_and_updateEPdS0_S0_S0_d(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr nocapture noundef %1, ptr nocapture noundef readonly %2, ptr nocapture noundef %3, ptr nocapture noundef readonly %4, double noundef %5) unnamed_addr #0 align 2 {
  %7 = load ptr, ptr %0, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %7, i64 24
  %9 = load ptr, ptr %8, align 8
  %10 = tail call noundef i32 %9(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %11 = sext i32 %10 to i64
  %12 = icmp slt i32 %10, 0
  %13 = shl nsw i64 %11, 3
  %14 = select i1 %12, i64 -1, i64 %13
  %15 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %14) #6
  %16 = load double, ptr %3, align 8, !tbaa !8
  %17 = icmp sgt i32 %10, 0
  br i1 %17, label %.lr.ph.preheader, label %.preheader.preheader

.lr.ph.preheader:                                 ; preds = %6
  %wide.trip.count = zext nneg i32 %10 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %18 = icmp ult i32 %10, 4
  br i1 %18, label %.preheader47.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  br label %.lr.ph

.preheader47.unr-lcssa:                           ; preds = %.lr.ph, %.lr.ph.preheader
  %.lcssa.ph = phi double [ poison, %.lr.ph.preheader ], [ %75, %.lr.ph ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.3, %.lr.ph ]
  %.04549.unr = phi double [ 0.000000e+00, %.lr.ph.preheader ], [ %75, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader47, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %.preheader47.unr-lcssa, %.lr.ph.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph.epil ], [ %indvars.iv.unr, %.preheader47.unr-lcssa ]
  %.04549.epil = phi double [ %23, %.lr.ph.epil ], [ %.04549.unr, %.preheader47.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %.preheader47.unr-lcssa ]
  %19 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.epil
  %20 = load double, ptr %19, align 8, !tbaa !8
  %21 = getelementptr inbounds double, ptr %4, i64 %indvars.iv.epil
  %22 = load double, ptr %21, align 8, !tbaa !8
  %23 = tail call double @llvm.fmuladd.f64(double %20, double %22, double %.04549.epil)
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader47, label %.lr.ph.epil, !llvm.loop !11

.preheader47:                                     ; preds = %.lr.ph.epil, %.preheader47.unr-lcssa
  %.lcssa = phi double [ %.lcssa.ph, %.preheader47.unr-lcssa ], [ %23, %.lr.ph.epil ]
  br i1 %17, label %.preheader.us.preheader, label %.preheader.preheader

.preheader.preheader:                             ; preds = %6, %.preheader47
  %.045.lcssa68 = phi double [ %.lcssa, %.preheader47 ], [ 0.000000e+00, %6 ]
  %24 = load ptr, ptr %0, align 8, !tbaa !5
  %25 = load ptr, ptr %24, align 8
  %26 = tail call noundef double %25(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %15)
  store double %26, ptr %3, align 8, !tbaa !8
  %27 = fsub double %26, %16
  %28 = fmul double %5, 1.000000e-02
  %29 = fmul double %.045.lcssa68, %28
  %30 = fcmp ugt double %27, %29
  br i1 %30, label %.preheader.1, label %.split.us

.preheader.us.preheader:                          ; preds = %.preheader47
  %wide.trip.count64 = zext nneg i32 %10 to i64
  %min.iters.check = icmp ult i32 %10, 4
  %n.vec = and i64 %wide.trip.count, 2147483644
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %40
  %.04154.us = phi i32 [ %42, %40 ], [ 0, %.preheader.us.preheader ]
  %.04453.us = phi double [ %41, %40 ], [ %5, %.preheader.us.preheader ]
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.preheader.us
  %indvars.iv61.ph = phi i64 [ 0, %.preheader.us ], [ %n.vec, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.preheader.us
  %broadcast.splatinsert = insertelement <2 x double> poison, double %.04453.us, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <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 ]
  %31 = getelementptr inbounds double, ptr %1, i64 %index
  %32 = getelementptr inbounds i8, ptr %31, i64 16
  %wide.load = load <2 x double>, ptr %31, align 8, !tbaa !8
  %wide.load71 = load <2 x double>, ptr %32, align 8, !tbaa !8
  %33 = getelementptr inbounds double, ptr %2, i64 %index
  %34 = getelementptr inbounds i8, ptr %33, i64 16
  %wide.load72 = load <2 x double>, ptr %33, align 8, !tbaa !8
  %wide.load73 = load <2 x double>, ptr %34, align 8, !tbaa !8
  %35 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat, <2 x double> %wide.load72, <2 x double> %wide.load)
  %36 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat, <2 x double> %wide.load73, <2 x double> %wide.load71)
  %37 = getelementptr inbounds double, ptr %15, i64 %index
  %38 = getelementptr inbounds i8, ptr %37, i64 16
  store <2 x double> %35, ptr %37, align 8, !tbaa !8
  store <2 x double> %36, ptr %38, align 8, !tbaa !8
  %index.next = add nuw i64 %index, 4
  %39 = icmp eq i64 %index.next, %n.vec
  br i1 %39, label %middle.block, label %vector.body, !llvm.loop !13

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us, label %scalar.ph.preheader

40:                                               ; preds = %._crit_edge.us
  %41 = fmul double %.04453.us, 5.000000e-01
  %42 = add nuw nsw i32 %.04154.us, 1
  %exitcond66.not = icmp eq i32 %42, 20
  br i1 %exitcond66.not, label %.thread, label %.preheader.us, !llvm.loop !17

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv61 = phi i64 [ %indvars.iv.next62, %scalar.ph ], [ %indvars.iv61.ph, %scalar.ph.preheader ]
  %43 = getelementptr inbounds double, ptr %1, i64 %indvars.iv61
  %44 = load double, ptr %43, align 8, !tbaa !8
  %45 = getelementptr inbounds double, ptr %2, i64 %indvars.iv61
  %46 = load double, ptr %45, align 8, !tbaa !8
  %47 = tail call double @llvm.fmuladd.f64(double %.04453.us, double %46, double %44)
  %48 = getelementptr inbounds double, ptr %15, i64 %indvars.iv61
  store double %47, ptr %48, align 8, !tbaa !8
  %indvars.iv.next62 = add nuw nsw i64 %indvars.iv61, 1
  %exitcond65.not = icmp eq i64 %indvars.iv.next62, %wide.trip.count64
  br i1 %exitcond65.not, label %._crit_edge.us, label %scalar.ph, !llvm.loop !18

._crit_edge.us:                                   ; preds = %scalar.ph, %middle.block
  %49 = load ptr, ptr %0, align 8, !tbaa !5
  %50 = load ptr, ptr %49, align 8
  %51 = tail call noundef double %50(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %15)
  store double %51, ptr %3, align 8, !tbaa !8
  %52 = fsub double %51, %16
  %53 = fmul double %.04453.us, 1.000000e-02
  %54 = fmul double %.lcssa, %53
  %55 = fcmp ugt double %52, %54
  br i1 %55, label %40, label %.split.us

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.3, %.lr.ph ]
  %.04549 = phi double [ 0.000000e+00, %.lr.ph.preheader.new ], [ %75, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %56 = getelementptr inbounds double, ptr %2, i64 %indvars.iv
  %57 = load double, ptr %56, align 8, !tbaa !8
  %58 = getelementptr inbounds double, ptr %4, i64 %indvars.iv
  %59 = load double, ptr %58, align 8, !tbaa !8
  %60 = tail call double @llvm.fmuladd.f64(double %57, double %59, double %.04549)
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %61 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next
  %62 = load double, ptr %61, align 8, !tbaa !8
  %63 = getelementptr inbounds double, ptr %4, i64 %indvars.iv.next
  %64 = load double, ptr %63, align 8, !tbaa !8
  %65 = tail call double @llvm.fmuladd.f64(double %62, double %64, double %60)
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %66 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next.1
  %67 = load double, ptr %66, align 8, !tbaa !8
  %68 = getelementptr inbounds double, ptr %4, i64 %indvars.iv.next.1
  %69 = load double, ptr %68, align 8, !tbaa !8
  %70 = tail call double @llvm.fmuladd.f64(double %67, double %69, double %65)
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %71 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next.2
  %72 = load double, ptr %71, align 8, !tbaa !8
  %73 = getelementptr inbounds double, ptr %4, i64 %indvars.iv.next.2
  %74 = load double, ptr %73, align 8, !tbaa !8
  %75 = tail call double @llvm.fmuladd.f64(double %72, double %74, double %70)
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader47.unr-lcssa, label %.lr.ph, !llvm.loop !19

.preheader.1:                                     ; preds = %.preheader.preheader
  %76 = fmul double %5, 5.000000e-01
  %77 = load ptr, ptr %0, align 8, !tbaa !5
  %78 = load ptr, ptr %77, align 8
  %79 = tail call noundef double %78(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %15)
  store double %79, ptr %3, align 8, !tbaa !8
  %80 = fsub double %79, %16
  %81 = fmul double %76, 1.000000e-02
  %82 = fmul double %.045.lcssa68, %81
  %83 = fcmp ugt double %80, %82
  br i1 %83, label %.preheader.2, label %.split.us

.preheader.2:                                     ; preds = %.preheader.1
  %84 = fmul double %76, 5.000000e-01
  %85 = load ptr, ptr %0, align 8, !tbaa !5
  %86 = load ptr, ptr %85, align 8
  %87 = tail call noundef double %86(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %15)
  store double %87, ptr %3, align 8, !tbaa !8
  %88 = fsub double %87, %16
  %89 = fmul double %84, 1.000000e-02
  %90 = fmul double %.045.lcssa68, %89
  %91 = fcmp ugt double %88, %90
  br i1 %91, label %.preheader.3, label %.split.us

.preheader.3:                                     ; preds = %.preheader.2
  %92 = fmul double %84, 5.000000e-01
  %93 = load ptr, ptr %0, align 8, !tbaa !5
  %94 = load ptr, ptr %93, align 8
  %95 = tail call noundef double %94(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %15)
  store double %95, ptr %3, align 8, !tbaa !8
  %96 = fsub double %95, %16
  %97 = fmul double %92, 1.000000e-02
  %98 = fmul double %.045.lcssa68, %97
  %99 = fcmp ugt double %96, %98
  br i1 %99, label %.preheader.4, label %.split.us

.preheader.4:                                     ; preds = %.preheader.3
  %100 = fmul double %92, 5.000000e-01
  %101 = load ptr, ptr %0, align 8, !tbaa !5
  %102 = load ptr, ptr %101, align 8
  %103 = tail call noundef double %102(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %15)
  store double %103, ptr %3, align 8, !tbaa !8
  %104 = fsub double %103, %16
  %105 = fmul double %100, 1.000000e-02
  %106 = fmul double %.045.lcssa68, %105
  %107 = fcmp ugt double %104, %106
  br i1 %107, label %.preheader.5, label %.split.us

.preheader.5:                                     ; preds = %.preheader.4
  %108 = fmul double %100, 5.000000e-01
  %109 = load ptr, ptr %0, align 8, !tbaa !5
  %110 = load ptr, ptr %109, align 8
  %111 = tail call noundef double %110(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %15)
  store double %111, ptr %3, align 8, !tbaa !8
  %112 = fsub double %111, %16
  %113 = fmul double %108, 1.000000e-02
  %114 = fmul double %.045.lcssa68, %113
  %115 = fcmp ugt double %112, %114
  br i1 %115, label %.preheader.6, label %.split.us

.preheader.6:                                     ; preds = %.preheader.5
  %116 = fmul double %108, 5.000000e-01
  %117 = load ptr, ptr %0, align 8, !tbaa !5
  %118 = load ptr, ptr %117, align 8
  %119 = tail call noundef double %118(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %15)
  store double %119, ptr %3, align 8, !tbaa !8
  %120 = fsub double %119, %16
  %121 = fmul double %116, 1.000000e-02
  %122 = fmul double %.045.lcssa68, %121
  %123 = fcmp ugt double %120, %122
  br i1 %123, label %.preheader.7, label %.split.us

.preheader.7:                                     ; preds = %.preheader.6
  %124 = fmul double %116, 5.000000e-01
  %125 = load ptr, ptr %0, align 8, !tbaa !5
  %126 = load ptr, ptr %125, align 8
  %127 = tail call noundef double %126(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %15)
  store double %127, ptr %3, align 8, !tbaa !8
  %128 = fsub double %127, %16
  %129 = fmul double %124, 1.000000e-02
  %130 = fmul double %.045.lcssa68, %129
  %131 = fcmp ugt double %128, %130
  br i1 %131, label %.preheader.8, label %.split.us

.preheader.8:                                     ; preds = %.preheader.7
  %132 = fmul double %124, 5.000000e-01
  %133 = load ptr, ptr %0, align 8, !tbaa !5
  %134 = load ptr, ptr %133, align 8
  %135 = tail call noundef double %134(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %15)
  store double %135, ptr %3, align 8, !tbaa !8
  %136 = fsub double %135, %16
  %137 = fmul double %132, 1.000000e-02
  %138 = fmul double %.045.lcssa68, %137
  %139 = fcmp ugt double %136, %138
  br i1 %139, label %.preheader.9, label %.split.us

.preheader.9:                                     ; preds = %.preheader.8
  %140 = fmul double %132, 5.000000e-01
  %141 = load ptr, ptr %0, align 8, !tbaa !5
  %142 = load ptr, ptr %141, align 8
  %143 = tail call noundef double %142(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %15)
  store double %143, ptr %3, align 8, !tbaa !8
  %144 = fsub double %143, %16
  %145 = fmul double %140, 1.000000e-02
  %146 = fmul double %.045.lcssa68, %145
  %147 = fcmp ugt double %144, %146
  br i1 %147, label %.preheader.10, label %.split.us

.preheader.10:                                    ; preds = %.preheader.9
  %148 = fmul double %140, 5.000000e-01
  %149 = load ptr, ptr %0, align 8, !tbaa !5
  %150 = load ptr, ptr %149, align 8
  %151 = tail call noundef double %150(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %15)
  store double %151, ptr %3, align 8, !tbaa !8
  %152 = fsub double %151, %16
  %153 = fmul double %148, 1.000000e-02
  %154 = fmul double %.045.lcssa68, %153
  %155 = fcmp ugt double %152, %154
  br i1 %155, label %.preheader.11, label %.split.us

.preheader.11:                                    ; preds = %.preheader.10
  %156 = fmul double %148, 5.000000e-01
  %157 = load ptr, ptr %0, align 8, !tbaa !5
  %158 = load ptr, ptr %157, align 8
  %159 = tail call noundef double %158(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %15)
  store double %159, ptr %3, align 8, !tbaa !8
  %160 = fsub double %159, %16
  %161 = fmul double %156, 1.000000e-02
  %162 = fmul double %.045.lcssa68, %161
  %163 = fcmp ugt double %160, %162
  br i1 %163, label %.preheader.12, label %.split.us

.preheader.12:                                    ; preds = %.preheader.11
  %164 = fmul double %156, 5.000000e-01
  %165 = load ptr, ptr %0, align 8, !tbaa !5
  %166 = load ptr, ptr %165, align 8
  %167 = tail call noundef double %166(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %15)
  store double %167, ptr %3, align 8, !tbaa !8
  %168 = fsub double %167, %16
  %169 = fmul double %164, 1.000000e-02
  %170 = fmul double %.045.lcssa68, %169
  %171 = fcmp ugt double %168, %170
  br i1 %171, label %.preheader.13, label %.split.us

.preheader.13:                                    ; preds = %.preheader.12
  %172 = fmul double %164, 5.000000e-01
  %173 = load ptr, ptr %0, align 8, !tbaa !5
  %174 = load ptr, ptr %173, align 8
  %175 = tail call noundef double %174(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %15)
  store double %175, ptr %3, align 8, !tbaa !8
  %176 = fsub double %175, %16
  %177 = fmul double %172, 1.000000e-02
  %178 = fmul double %.045.lcssa68, %177
  %179 = fcmp ugt double %176, %178
  br i1 %179, label %.preheader.14, label %.split.us

.preheader.14:                                    ; preds = %.preheader.13
  %180 = fmul double %172, 5.000000e-01
  %181 = load ptr, ptr %0, align 8, !tbaa !5
  %182 = load ptr, ptr %181, align 8
  %183 = tail call noundef double %182(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %15)
  store double %183, ptr %3, align 8, !tbaa !8
  %184 = fsub double %183, %16
  %185 = fmul double %180, 1.000000e-02
  %186 = fmul double %.045.lcssa68, %185
  %187 = fcmp ugt double %184, %186
  br i1 %187, label %.preheader.15, label %.split.us

.preheader.15:                                    ; preds = %.preheader.14
  %188 = fmul double %180, 5.000000e-01
  %189 = load ptr, ptr %0, align 8, !tbaa !5
  %190 = load ptr, ptr %189, align 8
  %191 = tail call noundef double %190(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %15)
  store double %191, ptr %3, align 8, !tbaa !8
  %192 = fsub double %191, %16
  %193 = fmul double %188, 1.000000e-02
  %194 = fmul double %.045.lcssa68, %193
  %195 = fcmp ugt double %192, %194
  br i1 %195, label %.preheader.16, label %.split.us

.preheader.16:                                    ; preds = %.preheader.15
  %196 = fmul double %188, 5.000000e-01
  %197 = load ptr, ptr %0, align 8, !tbaa !5
  %198 = load ptr, ptr %197, align 8
  %199 = tail call noundef double %198(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %15)
  store double %199, ptr %3, align 8, !tbaa !8
  %200 = fsub double %199, %16
  %201 = fmul double %196, 1.000000e-02
  %202 = fmul double %.045.lcssa68, %201
  %203 = fcmp ugt double %200, %202
  br i1 %203, label %.preheader.17, label %.split.us

.preheader.17:                                    ; preds = %.preheader.16
  %204 = fmul double %196, 5.000000e-01
  %205 = load ptr, ptr %0, align 8, !tbaa !5
  %206 = load ptr, ptr %205, align 8
  %207 = tail call noundef double %206(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %15)
  store double %207, ptr %3, align 8, !tbaa !8
  %208 = fsub double %207, %16
  %209 = fmul double %204, 1.000000e-02
  %210 = fmul double %.045.lcssa68, %209
  %211 = fcmp ugt double %208, %210
  br i1 %211, label %.preheader.18, label %.split.us

.preheader.18:                                    ; preds = %.preheader.17
  %212 = fmul double %204, 5.000000e-01
  %213 = load ptr, ptr %0, align 8, !tbaa !5
  %214 = load ptr, ptr %213, align 8
  %215 = tail call noundef double %214(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %15)
  store double %215, ptr %3, align 8, !tbaa !8
  %216 = fsub double %215, %16
  %217 = fmul double %212, 1.000000e-02
  %218 = fmul double %.045.lcssa68, %217
  %219 = fcmp ugt double %216, %218
  br i1 %219, label %.preheader.19, label %.split.us

.preheader.19:                                    ; preds = %.preheader.18
  %220 = fmul double %212, 5.000000e-01
  %221 = load ptr, ptr %0, align 8, !tbaa !5
  %222 = load ptr, ptr %221, align 8
  %223 = tail call noundef double %222(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %15)
  store double %223, ptr %3, align 8, !tbaa !8
  %224 = fsub double %223, %16
  %225 = fmul double %220, 1.000000e-02
  %226 = fmul double %.045.lcssa68, %225
  %227 = fcmp ugt double %224, %226
  br i1 %227, label %.thread, label %.split.us

.thread:                                          ; preds = %40, %.preheader.19
  store double %16, ptr %3, align 8, !tbaa !8
  br label %228

.split.us:                                        ; preds = %._crit_edge.us, %.preheader.preheader, %.preheader.1, %.preheader.2, %.preheader.3, %.preheader.4, %.preheader.5, %.preheader.6, %.preheader.7, %.preheader.8, %.preheader.9, %.preheader.10, %.preheader.11, %.preheader.12, %.preheader.13, %.preheader.14, %.preheader.15, %.preheader.16, %.preheader.17, %.preheader.18, %.preheader.19
  %.us-phi = phi double [ %5, %.preheader.preheader ], [ %76, %.preheader.1 ], [ %84, %.preheader.2 ], [ %92, %.preheader.3 ], [ %100, %.preheader.4 ], [ %108, %.preheader.5 ], [ %116, %.preheader.6 ], [ %124, %.preheader.7 ], [ %132, %.preheader.8 ], [ %140, %.preheader.9 ], [ %148, %.preheader.10 ], [ %156, %.preheader.11 ], [ %164, %.preheader.12 ], [ %172, %.preheader.13 ], [ %180, %.preheader.14 ], [ %188, %.preheader.15 ], [ %196, %.preheader.16 ], [ %204, %.preheader.17 ], [ %212, %.preheader.18 ], [ %220, %.preheader.19 ], [ %.04453.us, %._crit_edge.us ]
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 8 %1, ptr nonnull align 8 %15, i64 %13, i1 false)
  tail call void @_ZdaPv(ptr noundef nonnull %15) #7
  br label %228

228:                                              ; preds = %.split.us, %.thread
  %.043 = phi double [ 0.000000e+00, %.thread ], [ %.us-phi, %.split.us ]
  ret double %.043
}

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #4

; 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>) #5

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "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 = { nobuiltin allocsize(0) "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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nobuiltin nounwind "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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { builtin allocsize(0) }
attributes #7 = { builtin 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"double", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.unroll.disable"}
!13 = distinct !{!13, !14, !15, !16}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14, !16, !15}
!19 = distinct !{!19, !14}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass