; LLVM IR from attractivechaos/klib :: test (kmin_test)

; 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"

@n_evals = external hidden global i32, align 4

; Function Attrs: nounwind uwtable
define dso_local double @f_Chebyquad(i32 noundef %0, ptr noundef %1, ptr noundef %2) #0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca [20 x [20 x double]], align 16
  %10 = alloca double, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca double, align 8
  store i32 %0, ptr %4, align 4, !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 4, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 3200, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %14

14:                                               ; preds = %33, %3
  %15 = load i32, ptr %8, align 4, !tbaa !5
  %16 = load i32, ptr %4, align 4, !tbaa !5
  %17 = icmp ne i32 %15, %16
  br i1 %17, label %18, label %36

18:                                               ; preds = %14
  %19 = getelementptr inbounds [20 x [20 x double]], ptr %9, i64 0, i64 0
  %20 = load i32, ptr %8, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [20 x double], ptr %19, i64 0, i64 %21
  store double 1.000000e+00, ptr %22, align 8, !tbaa !11
  %23 = load ptr, ptr %5, align 8, !tbaa !9
  %24 = load i32, ptr %8, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds double, ptr %23, i64 %25
  %27 = load double, ptr %26, align 8, !tbaa !11
  %28 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %27, double -1.000000e+00)
  %29 = getelementptr inbounds [20 x [20 x double]], ptr %9, i64 0, i64 1
  %30 = load i32, ptr %8, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [20 x double], ptr %29, i64 0, i64 %31
  store double %28, ptr %32, align 8, !tbaa !11
  br label %33

33:                                               ; preds = %18
  %34 = load i32, ptr %8, align 4, !tbaa !5
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr %8, align 4, !tbaa !5
  br label %14, !llvm.loop !13

36:                                               ; preds = %14
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %81, %36
  %38 = load i32, ptr %7, align 4, !tbaa !5
  %39 = load i32, ptr %4, align 4, !tbaa !5
  %40 = icmp ne i32 %38, %39
  br i1 %40, label %41, label %84

41:                                               ; preds = %37
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %77, %41
  %43 = load i32, ptr %8, align 4, !tbaa !5
  %44 = load i32, ptr %4, align 4, !tbaa !5
  %45 = icmp ne i32 %43, %44
  br i1 %45, label %46, label %80

46:                                               ; preds = %42
  %47 = getelementptr inbounds [20 x [20 x double]], ptr %9, i64 0, i64 1
  %48 = load i32, ptr %8, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [20 x double], ptr %47, i64 0, i64 %49
  %51 = load double, ptr %50, align 8, !tbaa !11
  %52 = fmul double 2.000000e+00, %51
  %53 = load i32, ptr %7, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [20 x [20 x double]], ptr %9, i64 0, i64 %54
  %56 = load i32, ptr %8, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [20 x double], ptr %55, i64 0, i64 %57
  %59 = load double, ptr %58, align 8, !tbaa !11
  %60 = load i32, ptr %7, align 4, !tbaa !5
  %61 = sub nsw i32 %60, 1
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [20 x [20 x double]], ptr %9, i64 0, i64 %62
  %64 = load i32, ptr %8, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [20 x double], ptr %63, i64 0, i64 %65
  %67 = load double, ptr %66, align 8, !tbaa !11
  %68 = fneg double %67
  %69 = call double @llvm.fmuladd.f64(double %52, double %59, double %68)
  %70 = load i32, ptr %7, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [20 x [20 x double]], ptr %9, i64 0, i64 %72
  %74 = load i32, ptr %8, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [20 x double], ptr %73, i64 0, i64 %75
  store double %69, ptr %76, align 8, !tbaa !11
  br label %77

77:                                               ; preds = %46
  %78 = load i32, ptr %8, align 4, !tbaa !5
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %8, align 4, !tbaa !5
  br label %42, !llvm.loop !15

80:                                               ; preds = %42
  br label %81

81:                                               ; preds = %80
  %82 = load i32, ptr %7, align 4, !tbaa !5
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %7, align 4, !tbaa !5
  br label %37, !llvm.loop !16

84:                                               ; preds = %37
  store double 0.000000e+00, ptr %10, align 8, !tbaa !11
  %85 = load i32, ptr %4, align 4, !tbaa !5
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %11, align 4, !tbaa !5
  store i32 1, ptr %12, align 4, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %87

87:                                               ; preds = %133, %84
  %88 = load i32, ptr %7, align 4, !tbaa !5
  %89 = load i32, ptr %11, align 4, !tbaa !5
  %90 = icmp ne i32 %88, %89
  br i1 %90, label %91, label %136

91:                                               ; preds = %87
  store double 0.000000e+00, ptr %13, align 8, !tbaa !11
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %92

92:                                               ; preds = %106, %91
  %93 = load i32, ptr %8, align 4, !tbaa !5
  %94 = load i32, ptr %4, align 4, !tbaa !5
  %95 = icmp ne i32 %93, %94
  br i1 %95, label %96, label %109

96:                                               ; preds = %92
  %97 = load i32, ptr %7, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [20 x [20 x double]], ptr %9, i64 0, i64 %98
  %100 = load i32, ptr %8, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [20 x double], ptr %99, i64 0, i64 %101
  %103 = load double, ptr %102, align 8, !tbaa !11
  %104 = load double, ptr %13, align 8, !tbaa !11
  %105 = fadd double %104, %103
  store double %105, ptr %13, align 8, !tbaa !11
  br label %106

106:                                              ; preds = %96
  %107 = load i32, ptr %8, align 4, !tbaa !5
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %8, align 4, !tbaa !5
  br label %92, !llvm.loop !17

109:                                              ; preds = %92
  %110 = load i32, ptr %4, align 4, !tbaa !5
  %111 = sitofp i32 %110 to double
  %112 = load double, ptr %13, align 8, !tbaa !11
  %113 = fdiv double %112, %111
  store double %113, ptr %13, align 8, !tbaa !11
  %114 = load i32, ptr %12, align 4, !tbaa !5
  %115 = icmp sgt i32 %114, 0
  br i1 %115, label %116, label %126

116:                                              ; preds = %109
  %117 = load i32, ptr %7, align 4, !tbaa !5
  %118 = sub nsw i32 %117, 1
  %119 = load i32, ptr %7, align 4, !tbaa !5
  %120 = add nsw i32 %119, 1
  %121 = mul nsw i32 %118, %120
  %122 = sitofp i32 %121 to double
  %123 = fdiv double 1.000000e+00, %122
  %124 = load double, ptr %13, align 8, !tbaa !11
  %125 = fadd double %124, %123
  store double %125, ptr %13, align 8, !tbaa !11
  br label %126

126:                                              ; preds = %116, %109
  %127 = load i32, ptr %12, align 4, !tbaa !5
  %128 = sub nsw i32 0, %127
  store i32 %128, ptr %12, align 4, !tbaa !5
  %129 = load double, ptr %13, align 8, !tbaa !11
  %130 = load double, ptr %13, align 8, !tbaa !11
  %131 = load double, ptr %10, align 8, !tbaa !11
  %132 = call double @llvm.fmuladd.f64(double %129, double %130, double %131)
  store double %132, ptr %10, align 8, !tbaa !11
  br label %133

133:                                              ; preds = %126
  %134 = load i32, ptr %7, align 4, !tbaa !5
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %7, align 4, !tbaa !5
  br label %87, !llvm.loop !18

136:                                              ; preds = %87
  %137 = load i32, ptr @n_evals, align 4, !tbaa !5
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr @n_evals, align 4, !tbaa !5
  %139 = load double, ptr %10, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 3200, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  ret double %139
}

; 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 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

attributes #0 = { nounwind 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 = { 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 = !{!"int", !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 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}


; 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"

@n_evals = external hidden local_unnamed_addr global i32, align 4

; Function Attrs: nofree norecurse nosync nounwind memory(readwrite, argmem: read, inaccessiblemem: none) uwtable
define dso_local double @f_Chebyquad(i32 noundef %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readnone %2) local_unnamed_addr #0 {
  %4 = alloca [20 x [20 x double]], align 16
  call void @llvm.lifetime.start.p0(i64 3200, ptr nonnull %4) #4
  %.not53 = icmp eq i32 %0, 0
  br i1 %.not53, label %.preheader.lr.ph.thread, label %.lr.ph

.lr.ph:                                           ; preds = %3
  %5 = getelementptr inbounds i8, ptr %4, i64 160
  %6 = zext i32 %0 to i64
  %min.iters.check = icmp eq i32 %0, 1
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

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

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %6, 4294967294
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %7 = getelementptr inbounds [20 x double], ptr %4, i64 0, i64 %index
  store <2 x double> <double 1.000000e+00, double 1.000000e+00>, ptr %7, align 16, !tbaa !5
  %8 = getelementptr inbounds double, ptr %1, i64 %index
  %wide.load = load <2 x double>, ptr %8, align 8, !tbaa !5
  %9 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load, <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double> <double -1.000000e+00, double -1.000000e+00>)
  %10 = getelementptr inbounds [20 x double], ptr %5, i64 0, i64 %index
  store <2 x double> %9, ptr %10, align 16, !tbaa !5
  %index.next = add nuw i64 %index, 2
  %11 = icmp eq i64 %index.next, %n.vec
  br i1 %11, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %6
  br i1 %cmp.n, label %.preheader52, label %scalar.ph.preheader

.preheader52:                                     ; preds = %scalar.ph, %middle.block
  %.not4758 = icmp eq i32 %0, 1
  br i1 %.not4758, label %.preheader.lr.ph.thread91, label %.preheader51.lr.ph

.preheader.lr.ph.thread91:                        ; preds = %.preheader52
  %12 = uitofp nneg i32 %0 to double
  br label %.preheader.preheader

.preheader51.lr.ph:                               ; preds = %.preheader52
  %13 = getelementptr inbounds i8, ptr %4, i64 160
  br i1 %.not53, label %.preheader.lr.ph.thread, label %.preheader51.preheader

.preheader51.preheader:                           ; preds = %.preheader51.lr.ph
  %14 = zext i32 %0 to i64
  %n.vec101 = and i64 %6, 4294967294
  %cmp.n109 = icmp eq i64 %n.vec101, %6
  br label %.preheader51

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %15 = getelementptr inbounds [20 x double], ptr %4, i64 0, i64 %indvars.iv
  store double 1.000000e+00, ptr %15, align 8, !tbaa !5
  %16 = getelementptr inbounds double, ptr %1, i64 %indvars.iv
  %17 = load double, ptr %16, align 8, !tbaa !5
  %18 = tail call double @llvm.fmuladd.f64(double %17, double 2.000000e+00, double -1.000000e+00)
  %19 = getelementptr inbounds [20 x double], ptr %5, i64 0, i64 %indvars.iv
  store double %18, ptr %19, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %.not = icmp eq i64 %indvars.iv.next, %6
  br i1 %.not, label %.preheader52, label %scalar.ph, !llvm.loop !13

.preheader51:                                     ; preds = %.preheader51.preheader, %._crit_edge
  %indvars.iv80 = phi i64 [ 1, %.preheader51.preheader ], [ %indvars.iv.next81, %._crit_edge ]
  %20 = add nsw i64 %indvars.iv80, -1
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  br label %vector.body103

vector.body103:                                   ; preds = %vector.body103, %.preheader51
  %index104 = phi i64 [ 0, %.preheader51 ], [ %index.next108, %vector.body103 ]
  %21 = getelementptr inbounds [20 x double], ptr %13, i64 0, i64 %index104
  %wide.load105 = load <2 x double>, ptr %21, align 16, !tbaa !5
  %22 = fmul <2 x double> %wide.load105, <double 2.000000e+00, double 2.000000e+00>
  %23 = getelementptr inbounds [20 x [20 x double]], ptr %4, i64 0, i64 %indvars.iv80, i64 %index104
  %wide.load106 = load <2 x double>, ptr %23, align 16, !tbaa !5
  %24 = getelementptr inbounds [20 x [20 x double]], ptr %4, i64 0, i64 %20, i64 %index104
  %wide.load107 = load <2 x double>, ptr %24, align 16, !tbaa !5
  %25 = fneg <2 x double> %wide.load107
  %26 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %22, <2 x double> %wide.load106, <2 x double> %25)
  %27 = getelementptr inbounds [20 x [20 x double]], ptr %4, i64 0, i64 %indvars.iv.next81, i64 %index104
  store <2 x double> %26, ptr %27, align 16, !tbaa !5
  %index.next108 = add nuw i64 %index104, 2
  %28 = icmp eq i64 %index.next108, %n.vec101
  br i1 %28, label %middle.block96, label %vector.body103, !llvm.loop !14

middle.block96:                                   ; preds = %vector.body103
  br i1 %cmp.n109, label %._crit_edge, label %scalar.ph97

scalar.ph97:                                      ; preds = %middle.block96, %scalar.ph97
  %indvars.iv77 = phi i64 [ %indvars.iv.next78, %scalar.ph97 ], [ %n.vec101, %middle.block96 ]
  %29 = getelementptr inbounds [20 x double], ptr %13, i64 0, i64 %indvars.iv77
  %30 = load double, ptr %29, align 8, !tbaa !5
  %31 = fmul double %30, 2.000000e+00
  %32 = getelementptr inbounds [20 x [20 x double]], ptr %4, i64 0, i64 %indvars.iv80, i64 %indvars.iv77
  %33 = load double, ptr %32, align 8, !tbaa !5
  %34 = getelementptr inbounds [20 x [20 x double]], ptr %4, i64 0, i64 %20, i64 %indvars.iv77
  %35 = load double, ptr %34, align 8, !tbaa !5
  %36 = fneg double %35
  %37 = tail call double @llvm.fmuladd.f64(double %31, double %33, double %36)
  %38 = getelementptr inbounds [20 x [20 x double]], ptr %4, i64 0, i64 %indvars.iv.next81, i64 %indvars.iv77
  store double %37, ptr %38, align 8, !tbaa !5
  %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1
  %.not50 = icmp eq i64 %indvars.iv.next78, %14
  br i1 %.not50, label %._crit_edge, label %scalar.ph97, !llvm.loop !15

._crit_edge:                                      ; preds = %scalar.ph97, %middle.block96
  %.not47 = icmp eq i64 %indvars.iv.next81, %14
  br i1 %.not47, label %._crit_edge60, label %.preheader51, !llvm.loop !16

._crit_edge60:                                    ; preds = %._crit_edge
  %.not4866 = icmp eq i32 %0, -1
  br i1 %.not4866, label %._crit_edge70, label %.preheader.lr.ph

.preheader.lr.ph.thread:                          ; preds = %3, %.preheader51.lr.ph
  %39 = uitofp nneg i32 %0 to double
  br label %._crit_edge70.loopexit

.preheader.lr.ph:                                 ; preds = %._crit_edge60
  %40 = sitofp i32 %0 to double
  br i1 %.not53, label %._crit_edge70.loopexit, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.preheader.lr.ph.thread91, %.preheader.lr.ph
  %41 = phi double [ %12, %.preheader.lr.ph.thread91 ], [ %40, %.preheader.lr.ph ]
  %42 = zext i32 %0 to i64
  %xtraiter = and i64 %6, 3
  %43 = icmp ult i32 %0, 4
  %unroll_iter = and i64 %6, 4294967292
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader

._crit_edge70.loopexit:                           ; preds = %.preheader.lr.ph.thread, %.preheader.lr.ph
  %44 = phi double [ %39, %.preheader.lr.ph.thread ], [ %40, %.preheader.lr.ph ]
  %45 = fdiv double 0.000000e+00, %44
  %46 = fadd double %45, -1.000000e+00
  %47 = tail call double @llvm.fmuladd.f64(double %46, double %46, double 0.000000e+00)
  br label %._crit_edge70

.preheader:                                       ; preds = %.preheader.preheader, %73
  %indvars.iv86 = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next87, %73 ]
  %.04069 = phi i32 [ 1, %.preheader.preheader ], [ %74, %73 ]
  %.04367 = phi double [ 0.000000e+00, %.preheader.preheader ], [ %75, %73 ]
  %indvars88 = trunc i64 %indvars.iv86 to i32
  br i1 %43, label %._crit_edge65.unr-lcssa, label %.preheader.new

.preheader.new:                                   ; preds = %.preheader, %.preheader.new
  %indvars.iv83 = phi i64 [ %indvars.iv.next84.3, %.preheader.new ], [ 0, %.preheader ]
  %.063 = phi double [ %59, %.preheader.new ], [ 0.000000e+00, %.preheader ]
  %niter = phi i64 [ %niter.next.3, %.preheader.new ], [ 0, %.preheader ]
  %48 = getelementptr inbounds [20 x [20 x double]], ptr %4, i64 0, i64 %indvars.iv86, i64 %indvars.iv83
  %49 = load double, ptr %48, align 16, !tbaa !5
  %50 = fadd double %.063, %49
  %indvars.iv.next84 = or disjoint i64 %indvars.iv83, 1
  %51 = getelementptr inbounds [20 x [20 x double]], ptr %4, i64 0, i64 %indvars.iv86, i64 %indvars.iv.next84
  %52 = load double, ptr %51, align 8, !tbaa !5
  %53 = fadd double %50, %52
  %indvars.iv.next84.1 = or disjoint i64 %indvars.iv83, 2
  %54 = getelementptr inbounds [20 x [20 x double]], ptr %4, i64 0, i64 %indvars.iv86, i64 %indvars.iv.next84.1
  %55 = load double, ptr %54, align 16, !tbaa !5
  %56 = fadd double %53, %55
  %indvars.iv.next84.2 = or disjoint i64 %indvars.iv83, 3
  %57 = getelementptr inbounds [20 x [20 x double]], ptr %4, i64 0, i64 %indvars.iv86, i64 %indvars.iv.next84.2
  %58 = load double, ptr %57, align 8, !tbaa !5
  %59 = fadd double %56, %58
  %indvars.iv.next84.3 = add nuw nsw i64 %indvars.iv83, 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 %._crit_edge65.unr-lcssa, label %.preheader.new, !llvm.loop !17

._crit_edge65.unr-lcssa:                          ; preds = %.preheader.new, %.preheader
  %.lcssa.ph = phi double [ poison, %.preheader ], [ %59, %.preheader.new ]
  %indvars.iv83.unr = phi i64 [ 0, %.preheader ], [ %indvars.iv.next84.3, %.preheader.new ]
  %.063.unr = phi double [ 0.000000e+00, %.preheader ], [ %59, %.preheader.new ]
  br i1 %lcmp.mod.not, label %._crit_edge65, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge65.unr-lcssa, %.epil.preheader
  %indvars.iv83.epil = phi i64 [ %indvars.iv.next84.epil, %.epil.preheader ], [ %indvars.iv83.unr, %._crit_edge65.unr-lcssa ]
  %.063.epil = phi double [ %62, %.epil.preheader ], [ %.063.unr, %._crit_edge65.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge65.unr-lcssa ]
  %60 = getelementptr inbounds [20 x [20 x double]], ptr %4, i64 0, i64 %indvars.iv86, i64 %indvars.iv83.epil
  %61 = load double, ptr %60, align 8, !tbaa !5
  %62 = fadd double %.063.epil, %61
  %indvars.iv.next84.epil = add nuw nsw i64 %indvars.iv83.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 %._crit_edge65, label %.epil.preheader, !llvm.loop !18

._crit_edge65:                                    ; preds = %.epil.preheader, %._crit_edge65.unr-lcssa
  %.lcssa = phi double [ %.lcssa.ph, %._crit_edge65.unr-lcssa ], [ %62, %.epil.preheader ]
  %63 = fdiv double %.lcssa, %41
  %64 = icmp sgt i32 %.04069, 0
  br i1 %64, label %65, label %73

65:                                               ; preds = %._crit_edge65
  %66 = add nuw nsw i32 %indvars88, 1
  %67 = trunc i64 %indvars.iv86 to i32
  %68 = add i32 %67, -1
  %69 = mul nsw i32 %68, %66
  %70 = sitofp i32 %69 to double
  %71 = fdiv double 1.000000e+00, %70
  %72 = fadd double %71, %63
  br label %73

73:                                               ; preds = %65, %._crit_edge65
  %.1 = phi double [ %72, %65 ], [ %63, %._crit_edge65 ]
  %74 = sub nsw i32 0, %.04069
  %75 = tail call double @llvm.fmuladd.f64(double %.1, double %.1, double %.04367)
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  %.not48 = icmp eq i64 %indvars.iv86, %42
  br i1 %.not48, label %._crit_edge70, label %.preheader, !llvm.loop !20

._crit_edge70:                                    ; preds = %73, %._crit_edge70.loopexit, %._crit_edge60
  %.043.lcssa = phi double [ 0.000000e+00, %._crit_edge60 ], [ %47, %._crit_edge70.loopexit ], [ %75, %73 ]
  %76 = load i32, ptr @n_evals, align 4, !tbaa !21
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr @n_evals, align 4, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 3200, ptr nonnull %4) #4
  ret double %.043.lcssa
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; 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 = { nofree norecurse nosync nounwind memory(readwrite, argmem: read, inaccessiblemem: none) 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10, !12, !11}
!14 = distinct !{!14, !10, !11, !12}
!15 = distinct !{!15, !10, !12, !11}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.unroll.disable"}
!20 = distinct !{!20, !10}
!21 = !{!22, !22, i64 0}
!22 = !{!"int", !7, i64 0}


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