; LLVM IR from dartsim/dart :: dart/external/odelcpsolver/matrix.ll (ZN4dart8external3ode16_dFactorCholeskyEPdiPv)

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

@.str = external hidden unnamed_addr constant [24 x i8], align 1
@__FUNCTION__._ZN4dart8external3ode16_dFactorCholeskyEPdiPv = external hidden unnamed_addr constant [17 x i8], align 1

declare void @_ZN4dart8external3ode6dDebugEiPKcz(i32 noundef, ptr noundef, ...) #0

; 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 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 double @llvm.fmuladd.f64(double, double, double) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN4dart8external3ode16_dFactorCholeskyEPdiPv(ptr noundef %0, i32 noundef %1, ptr noundef %2) #3 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i8, align 1
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca double, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca double, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca double, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !5
  %24 = load i32, ptr %5, align 4, !tbaa !9
  %25 = icmp sgt i32 %24, 0
  br i1 %25, label %26, label %29

26:                                               ; preds = %3
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = icmp ne ptr %27, null
  br i1 %28, label %30, label %29

29:                                               ; preds = %26, %3
  call void (i32, ptr, ...) @_ZN4dart8external3ode6dDebugEiPKcz(i32 noundef 2, ptr noundef @.str, ptr noundef @__FUNCTION__._ZN4dart8external3ode16_dFactorCholeskyEPdiPv)
  br label %30

30:                                               ; preds = %29, %26
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #5
  store i8 0, ptr %7, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %31 = load i32, ptr %5, align 4, !tbaa !9
  %32 = icmp sgt i32 %31, 1
  br i1 %32, label %33, label %38

33:                                               ; preds = %30
  %34 = load i32, ptr %5, align 4, !tbaa !9
  %35 = sub nsw i32 %34, 1
  %36 = or i32 %35, 3
  %37 = add nsw i32 %36, 1
  br label %40

38:                                               ; preds = %30
  %39 = load i32, ptr %5, align 4, !tbaa !9
  br label %40

40:                                               ; preds = %38, %33
  %41 = phi i32 [ %37, %33 ], [ %39, %38 ]
  store i32 %41, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = icmp ne ptr %42, null
  br i1 %43, label %44, label %46

44:                                               ; preds = %40
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  br label %56

46:                                               ; preds = %40
  %47 = load i32, ptr %5, align 4, !tbaa !9
  %48 = sext i32 %47 to i64
  %49 = mul i64 %48, 8
  %50 = add i64 %49, 15
  %51 = alloca i8, i64 %50, align 16
  %52 = ptrtoint ptr %51 to i64
  %53 = add i64 %52, 15
  %54 = and i64 %53, -16
  %55 = inttoptr i64 %54 to ptr
  br label %56

56:                                               ; preds = %46, %44
  %57 = phi ptr [ %45, %44 ], [ %55, %46 ]
  store ptr %57, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %58, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %59

59:                                               ; preds = %160, %56
  %60 = load i32, ptr %11, align 4, !tbaa !9
  %61 = load i32, ptr %5, align 4, !tbaa !9
  %62 = icmp slt i32 %60, %61
  br i1 %62, label %64, label %63

63:                                               ; preds = %59
  store i32 2, ptr %12, align 4
  br label %167

64:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %65 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %65, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %66, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %67

67:                                               ; preds = %107, %64
  %68 = load i32, ptr %15, align 4, !tbaa !9
  %69 = load i32, ptr %11, align 4, !tbaa !9
  %70 = icmp slt i32 %68, %69
  br i1 %70, label %72, label %71

71:                                               ; preds = %67
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %116

72:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %73 = load ptr, ptr %13, align 8, !tbaa !5
  %74 = load double, ptr %73, align 8, !tbaa !13
  store double %74, ptr %16, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %75 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %75, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %76 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %76, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %77 = load ptr, ptr %14, align 8, !tbaa !5
  %78 = load i32, ptr %15, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds double, ptr %77, i64 %79
  store ptr %80, ptr %19, align 8, !tbaa !5
  br label %81

81:                                               ; preds = %93, %72
  %82 = load ptr, ptr %18, align 8, !tbaa !5
  %83 = load ptr, ptr %19, align 8, !tbaa !5
  %84 = icmp ne ptr %82, %83
  br i1 %84, label %85, label %98

85:                                               ; preds = %81
  %86 = load ptr, ptr %17, align 8, !tbaa !5
  %87 = load double, ptr %86, align 8, !tbaa !13
  %88 = load ptr, ptr %18, align 8, !tbaa !5
  %89 = load double, ptr %88, align 8, !tbaa !13
  %90 = load double, ptr %16, align 8, !tbaa !13
  %91 = fneg double %87
  %92 = call double @llvm.fmuladd.f64(double %91, double %89, double %90)
  store double %92, ptr %16, align 8, !tbaa !13
  br label %93

93:                                               ; preds = %85
  %94 = load ptr, ptr %17, align 8, !tbaa !5
  %95 = getelementptr inbounds double, ptr %94, i32 1
  store ptr %95, ptr %17, align 8, !tbaa !5
  %96 = load ptr, ptr %18, align 8, !tbaa !5
  %97 = getelementptr inbounds double, ptr %96, i32 1
  store ptr %97, ptr %18, align 8, !tbaa !5
  br label %81, !llvm.loop !15

98:                                               ; preds = %81
  %99 = load double, ptr %16, align 8, !tbaa !13
  %100 = load ptr, ptr %9, align 8, !tbaa !5
  %101 = load i32, ptr %15, align 4, !tbaa !9
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds double, ptr %100, i64 %102
  %104 = load double, ptr %103, align 8, !tbaa !13
  %105 = fmul double %99, %104
  %106 = load ptr, ptr %13, align 8, !tbaa !5
  store double %105, ptr %106, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %107

107:                                              ; preds = %98
  %108 = load i32, ptr %8, align 4, !tbaa !9
  %109 = load ptr, ptr %14, align 8, !tbaa !5
  %110 = sext i32 %108 to i64
  %111 = getelementptr inbounds double, ptr %109, i64 %110
  store ptr %111, ptr %14, align 8, !tbaa !5
  %112 = load ptr, ptr %13, align 8, !tbaa !5
  %113 = getelementptr inbounds double, ptr %112, i32 1
  store ptr %113, ptr %13, align 8, !tbaa !5
  %114 = load i32, ptr %15, align 4, !tbaa !9
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %15, align 4, !tbaa !9
  br label %67, !llvm.loop !17

116:                                              ; preds = %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %117 = load ptr, ptr %13, align 8, !tbaa !5
  %118 = load double, ptr %117, align 8, !tbaa !13
  store double %118, ptr %20, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %119 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %119, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %120 = load ptr, ptr %10, align 8, !tbaa !5
  %121 = load i32, ptr %11, align 4, !tbaa !9
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds double, ptr %120, i64 %122
  store ptr %123, ptr %22, align 8, !tbaa !5
  br label %124

124:                                              ; preds = %136, %116
  %125 = load ptr, ptr %21, align 8, !tbaa !5
  %126 = load ptr, ptr %22, align 8, !tbaa !5
  %127 = icmp ne ptr %125, %126
  br i1 %127, label %128, label %139

128:                                              ; preds = %124
  %129 = load ptr, ptr %21, align 8, !tbaa !5
  %130 = load double, ptr %129, align 8, !tbaa !13
  %131 = load ptr, ptr %21, align 8, !tbaa !5
  %132 = load double, ptr %131, align 8, !tbaa !13
  %133 = load double, ptr %20, align 8, !tbaa !13
  %134 = fneg double %130
  %135 = call double @llvm.fmuladd.f64(double %134, double %132, double %133)
  store double %135, ptr %20, align 8, !tbaa !13
  br label %136

136:                                              ; preds = %128
  %137 = load ptr, ptr %21, align 8, !tbaa !5
  %138 = getelementptr inbounds double, ptr %137, i32 1
  store ptr %138, ptr %21, align 8, !tbaa !5
  br label %124, !llvm.loop !18

139:                                              ; preds = %124
  %140 = load double, ptr %20, align 8, !tbaa !13
  %141 = fcmp ole double %140, 0.000000e+00
  br i1 %141, label %142, label %143

142:                                              ; preds = %139
  store i8 1, ptr %7, align 1, !tbaa !11
  store i32 2, ptr %12, align 4
  br label %154

143:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %144 = load double, ptr %20, align 8, !tbaa !13
  %145 = call double @sqrt(double noundef %144) #5
  store double %145, ptr %23, align 8, !tbaa !13
  %146 = load double, ptr %23, align 8, !tbaa !13
  %147 = load ptr, ptr %13, align 8, !tbaa !5
  store double %146, ptr %147, align 8, !tbaa !13
  %148 = load double, ptr %23, align 8, !tbaa !13
  %149 = fdiv double 1.000000e+00, %148
  %150 = load ptr, ptr %9, align 8, !tbaa !5
  %151 = load i32, ptr %11, align 4, !tbaa !9
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds double, ptr %150, i64 %152
  store double %149, ptr %153, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  store i32 0, ptr %12, align 4
  br label %154

154:                                              ; preds = %143, %142
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  %155 = load i32, ptr %12, align 4
  switch i32 %155, label %157 [
    i32 0, label %156
  ]

156:                                              ; preds = %154
  store i32 0, ptr %12, align 4
  br label %157

157:                                              ; preds = %156, %154
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  %158 = load i32, ptr %12, align 4
  switch i32 %158, label %167 [
    i32 0, label %159
  ]

159:                                              ; preds = %157
  br label %160

160:                                              ; preds = %159
  %161 = load i32, ptr %8, align 4, !tbaa !9
  %162 = load ptr, ptr %10, align 8, !tbaa !5
  %163 = sext i32 %161 to i64
  %164 = getelementptr inbounds double, ptr %162, i64 %163
  store ptr %164, ptr %10, align 8, !tbaa !5
  %165 = load i32, ptr %11, align 4, !tbaa !9
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %11, align 4, !tbaa !9
  br label %59, !llvm.loop !19

167:                                              ; preds = %157, %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %168

168:                                              ; preds = %167
  %169 = load i8, ptr %7, align 1, !tbaa !11, !range !20, !noundef !21
  %170 = trunc i8 %169 to i1
  %171 = zext i1 %170 to i64
  %172 = select i1 %170, i32 0, i32 1
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #5
  ret i32 %172
}

; Function Attrs: nounwind
declare double @sqrt(double noundef) #4

attributes #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 = { 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 #4 = { 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 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !16}
!20 = !{i8 0, i8 2}
!21 = !{}


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

@.str = external hidden unnamed_addr constant [24 x i8], align 1
@__FUNCTION__._ZN4dart8external3ode16_dFactorCholeskyEPdiPv = external hidden unnamed_addr constant [17 x i8], align 1

declare void @_ZN4dart8external3ode6dDebugEiPKcz(i32 noundef, ptr noundef, ...) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_ZN4dart8external3ode16_dFactorCholeskyEPdiPv(ptr noundef %0, i32 noundef %1, ptr noundef %2) local_unnamed_addr #2 {
  %4 = icmp sgt i32 %1, 0
  %5 = icmp ne ptr %0, null
  %or.cond = and i1 %5, %4
  br i1 %or.cond, label %7, label %6

6:                                                ; preds = %3
  tail call void (i32, ptr, ...) @_ZN4dart8external3ode6dDebugEiPKcz(i32 noundef 2, ptr noundef nonnull @.str, ptr noundef nonnull @__FUNCTION__._ZN4dart8external3ode16_dFactorCholeskyEPdiPv)
  br label %7

7:                                                ; preds = %3, %6
  %8 = icmp sgt i32 %1, 1
  %9 = add nsw i32 %1, -1
  %10 = or i32 %9, 3
  %11 = add nuw nsw i32 %10, 1
  %12 = select i1 %8, i32 %11, i32 %1
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %13, label %18

13:                                               ; preds = %7
  %14 = sext i32 %1 to i64
  %15 = shl nsw i64 %14, 3
  %16 = add nsw i64 %15, 15
  %17 = alloca i8, i64 %16, align 16
  br label %18

18:                                               ; preds = %7, %13
  %19 = phi ptr [ %17, %13 ], [ %2, %7 ]
  br i1 %4, label %.preheader.lr.ph, label %._crit_edge96

.preheader.lr.ph:                                 ; preds = %18
  %20 = sext i32 %12 to i64
  %wide.trip.count107 = zext nneg i32 %1 to i64
  br label %.preheader

.preheader:                                       ; preds = %.preheader.lr.ph, %42
  %indvars.iv104 = phi i64 [ 0, %.preheader.lr.ph ], [ %indvars.iv.next105, %42 ]
  %.05995 = phi ptr [ %0, %.preheader.lr.ph ], [ %46, %42 ]
  %.not100 = icmp eq i64 %indvars.iv104, 0
  br i1 %.not100, label %._crit_edge85.thread, label %.lr.ph84

._crit_edge85.thread:                             ; preds = %.preheader
  %21 = load double, ptr %.05995, align 8, !tbaa !5
  br label %._crit_edge92

.lr.ph91.preheader:                               ; preds = %._crit_edge
  %22 = load double, ptr %36, align 8, !tbaa !5
  %23 = getelementptr inbounds double, ptr %.05995, i64 %indvars.iv104
  br label %.lr.ph91

.lr.ph84:                                         ; preds = %.preheader, %._crit_edge
  %indvars.iv = phi i64 [ %indvars.iv.next, %._crit_edge ], [ 0, %.preheader ]
  %.06782 = phi ptr [ %35, %._crit_edge ], [ %0, %.preheader ]
  %.06881 = phi ptr [ %36, %._crit_edge ], [ %.05995, %.preheader ]
  %24 = load double, ptr %.06881, align 8, !tbaa !5
  %25 = getelementptr inbounds double, ptr %.06782, i64 %indvars.iv
  %.not7477 = icmp eq i64 %indvars.iv, 0
  br i1 %.not7477, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph84, %.lr.ph
  %.06380 = phi ptr [ %31, %.lr.ph ], [ %.06782, %.lr.ph84 ]
  %.06479 = phi ptr [ %30, %.lr.ph ], [ %.05995, %.lr.ph84 ]
  %.06578 = phi double [ %29, %.lr.ph ], [ %24, %.lr.ph84 ]
  %26 = load double, ptr %.06479, align 8, !tbaa !5
  %27 = load double, ptr %.06380, align 8, !tbaa !5
  %28 = fneg double %26
  %29 = tail call double @llvm.fmuladd.f64(double %28, double %27, double %.06578)
  %30 = getelementptr inbounds i8, ptr %.06479, i64 8
  %31 = getelementptr inbounds i8, ptr %.06380, i64 8
  %.not74 = icmp eq ptr %31, %25
  br i1 %.not74, label %._crit_edge, label %.lr.ph, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph84
  %.065.lcssa = phi double [ %24, %.lr.ph84 ], [ %29, %.lr.ph ]
  %32 = getelementptr inbounds double, ptr %19, i64 %indvars.iv
  %33 = load double, ptr %32, align 8, !tbaa !5
  %34 = fmul double %.065.lcssa, %33
  store double %34, ptr %.06881, align 8, !tbaa !5
  %35 = getelementptr inbounds double, ptr %.06782, i64 %20
  %36 = getelementptr inbounds i8, ptr %.06881, i64 8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %indvars.iv104
  br i1 %exitcond.not, label %.lr.ph91.preheader, label %.lr.ph84, !llvm.loop !11

.lr.ph91:                                         ; preds = %.lr.ph91.preheader, %.lr.ph91
  %.06089 = phi ptr [ %40, %.lr.ph91 ], [ %.05995, %.lr.ph91.preheader ]
  %.06188 = phi double [ %39, %.lr.ph91 ], [ %22, %.lr.ph91.preheader ]
  %37 = load double, ptr %.06089, align 8, !tbaa !5
  %38 = fneg double %37
  %39 = tail call double @llvm.fmuladd.f64(double %38, double %37, double %.06188)
  %40 = getelementptr inbounds i8, ptr %.06089, i64 8
  %.not73 = icmp eq ptr %40, %23
  br i1 %.not73, label %._crit_edge92, label %.lr.ph91, !llvm.loop !12

._crit_edge92:                                    ; preds = %.lr.ph91, %._crit_edge85.thread
  %.068.lcssa110 = phi ptr [ %.05995, %._crit_edge85.thread ], [ %36, %.lr.ph91 ]
  %.061.lcssa = phi double [ %21, %._crit_edge85.thread ], [ %39, %.lr.ph91 ]
  %41 = fcmp ugt double %.061.lcssa, 0.000000e+00
  br i1 %41, label %42, label %._crit_edge96

42:                                               ; preds = %._crit_edge92
  %43 = tail call double @sqrt(double noundef %.061.lcssa) #4
  store double %43, ptr %.068.lcssa110, align 8, !tbaa !5
  %44 = fdiv double 1.000000e+00, %43
  %45 = getelementptr inbounds double, ptr %19, i64 %indvars.iv104
  store double %44, ptr %45, align 8, !tbaa !5
  %46 = getelementptr inbounds double, ptr %.05995, i64 %20
  %indvars.iv.next105 = add nuw nsw i64 %indvars.iv104, 1
  %exitcond108.not = icmp eq i64 %indvars.iv.next105, %wide.trip.count107
  br i1 %exitcond108.not, label %._crit_edge96, label %.preheader, !llvm.loop !13

._crit_edge96:                                    ; preds = %42, %._crit_edge92, %18
  %.2 = phi i32 [ 1, %18 ], [ 0, %._crit_edge92 ], [ 1, %42 ]
  ret i32 %.2
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #3

attributes #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 speculatable willreturn memory(none) }
attributes #2 = { 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 #3 = { mustprogress nofree nounwind willreturn memory(write) "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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}


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