; LLVM IR from OpenMathLib/OpenBLAS :: lapack-netlib/SRC (dpptrf)

; 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 [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@c__1 = external hidden global i32, align 4
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1
@c_b16 = external hidden global double, align 8

; Function Attrs: nounwind uwtable
define dso_local void @dpptrf_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca double, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca double, align 8
  %17 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  %19 = getelementptr inbounds double, ptr %18, i32 -1
  store ptr %19, ptr %7, align 8, !tbaa !5
  %20 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 0, ptr %20, align 4, !tbaa !9
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = call i32 @lsame_(ptr noundef %21, ptr noundef @.str)
  store i32 %22, ptr %13, align 4, !tbaa !9
  %23 = load i32, ptr %13, align 4, !tbaa !9
  %24 = icmp ne i32 %23, 0
  br i1 %24, label %31, label %25

25:                                               ; preds = %4
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = call i32 @lsame_(ptr noundef %26, ptr noundef @.str.1)
  %28 = icmp ne i32 %27, 0
  br i1 %28, label %31, label %29

29:                                               ; preds = %25
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 -1, ptr %30, align 4, !tbaa !9
  br label %38

31:                                               ; preds = %25, %4
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = load i32, ptr %32, align 4, !tbaa !9
  %34 = icmp slt i32 %33, 0
  br i1 %34, label %35, label %37

35:                                               ; preds = %31
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 -2, ptr %36, align 4, !tbaa !9
  br label %37

37:                                               ; preds = %35, %31
  br label %38

38:                                               ; preds = %37, %29
  %39 = load ptr, ptr %8, align 8, !tbaa !5
  %40 = load i32, ptr %39, align 4, !tbaa !9
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %42, label %47

42:                                               ; preds = %38
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = load i32, ptr %43, align 4, !tbaa !9
  %45 = sub nsw i32 0, %44
  store i32 %45, ptr %9, align 4, !tbaa !9
  %46 = call i32 @xerbla_(ptr noundef @.str.2, ptr noundef %9, i32 noundef 6)
  store i32 1, ptr %17, align 4
  br label %197

47:                                               ; preds = %38
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = load i32, ptr %48, align 4, !tbaa !9
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %51, label %52

51:                                               ; preds = %47
  store i32 1, ptr %17, align 4
  br label %197

52:                                               ; preds = %47
  %53 = load i32, ptr %13, align 4, !tbaa !9
  %54 = icmp ne i32 %53, 0
  br i1 %54, label %55, label %116

55:                                               ; preds = %52
  store i32 0, ptr %15, align 4, !tbaa !9
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = load i32, ptr %56, align 4, !tbaa !9
  store i32 %57, ptr %9, align 4, !tbaa !9
  store i32 1, ptr %12, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %112, %55
  %59 = load i32, ptr %12, align 4, !tbaa !9
  %60 = load i32, ptr %9, align 4, !tbaa !9
  %61 = icmp sle i32 %59, %60
  br i1 %61, label %62, label %115

62:                                               ; preds = %58
  %63 = load i32, ptr %15, align 4, !tbaa !9
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %14, align 4, !tbaa !9
  %65 = load i32, ptr %12, align 4, !tbaa !9
  %66 = load i32, ptr %15, align 4, !tbaa !9
  %67 = add nsw i32 %66, %65
  store i32 %67, ptr %15, align 4, !tbaa !9
  %68 = load i32, ptr %12, align 4, !tbaa !9
  %69 = icmp sgt i32 %68, 1
  br i1 %69, label %70, label %79

70:                                               ; preds = %62
  %71 = load i32, ptr %12, align 4, !tbaa !9
  %72 = sub nsw i32 %71, 1
  store i32 %72, ptr %10, align 4, !tbaa !9
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  %74 = getelementptr inbounds double, ptr %73, i64 1
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  %76 = load i32, ptr %14, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds double, ptr %75, i64 %77
  call void @dtpsv_(ptr noundef @.str.3, ptr noundef @.str.4, ptr noundef @.str.5, ptr noundef %10, ptr noundef %74, ptr noundef %78, ptr noundef @c__1)
  br label %79

79:                                               ; preds = %70, %62
  %80 = load i32, ptr %12, align 4, !tbaa !9
  %81 = sub nsw i32 %80, 1
  store i32 %81, ptr %10, align 4, !tbaa !9
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = load i32, ptr %15, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds double, ptr %82, i64 %84
  %86 = load double, ptr %85, align 8, !tbaa !11
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = load i32, ptr %14, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds double, ptr %87, i64 %89
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = load i32, ptr %14, align 4, !tbaa !9
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds double, ptr %91, i64 %93
  %95 = call double @ddot_(ptr noundef %10, ptr noundef %90, ptr noundef @c__1, ptr noundef %94, ptr noundef @c__1)
  %96 = fsub double %86, %95
  store double %96, ptr %16, align 8, !tbaa !11
  %97 = load double, ptr %16, align 8, !tbaa !11
  %98 = fcmp ole double %97, 0.000000e+00
  br i1 %98, label %99, label %105

99:                                               ; preds = %79
  %100 = load double, ptr %16, align 8, !tbaa !11
  %101 = load ptr, ptr %7, align 8, !tbaa !5
  %102 = load i32, ptr %15, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds double, ptr %101, i64 %103
  store double %100, ptr %104, align 8, !tbaa !11
  br label %193

105:                                              ; preds = %79
  %106 = load double, ptr %16, align 8, !tbaa !11
  %107 = call double @sqrt(double noundef %106) #4
  %108 = load ptr, ptr %7, align 8, !tbaa !5
  %109 = load i32, ptr %15, align 4, !tbaa !9
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds double, ptr %108, i64 %110
  store double %107, ptr %111, align 8, !tbaa !11
  br label %112

112:                                              ; preds = %105
  %113 = load i32, ptr %12, align 4, !tbaa !9
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %12, align 4, !tbaa !9
  br label %58, !llvm.loop !13

115:                                              ; preds = %58
  br label %192

116:                                              ; preds = %52
  store i32 1, ptr %15, align 4, !tbaa !9
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = load i32, ptr %117, align 4, !tbaa !9
  store i32 %118, ptr %9, align 4, !tbaa !9
  store i32 1, ptr %12, align 4, !tbaa !9
  br label %119

119:                                              ; preds = %188, %116
  %120 = load i32, ptr %12, align 4, !tbaa !9
  %121 = load i32, ptr %9, align 4, !tbaa !9
  %122 = icmp sle i32 %120, %121
  br i1 %122, label %123, label %191

123:                                              ; preds = %119
  %124 = load ptr, ptr %7, align 8, !tbaa !5
  %125 = load i32, ptr %15, align 4, !tbaa !9
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds double, ptr %124, i64 %126
  %128 = load double, ptr %127, align 8, !tbaa !11
  store double %128, ptr %16, align 8, !tbaa !11
  %129 = load double, ptr %16, align 8, !tbaa !11
  %130 = fcmp ole double %129, 0.000000e+00
  br i1 %130, label %131, label %137

131:                                              ; preds = %123
  %132 = load double, ptr %16, align 8, !tbaa !11
  %133 = load ptr, ptr %7, align 8, !tbaa !5
  %134 = load i32, ptr %15, align 4, !tbaa !9
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds double, ptr %133, i64 %135
  store double %132, ptr %136, align 8, !tbaa !11
  br label %193

137:                                              ; preds = %123
  %138 = load double, ptr %16, align 8, !tbaa !11
  %139 = call double @sqrt(double noundef %138) #4
  store double %139, ptr %16, align 8, !tbaa !11
  %140 = load double, ptr %16, align 8, !tbaa !11
  %141 = load ptr, ptr %7, align 8, !tbaa !5
  %142 = load i32, ptr %15, align 4, !tbaa !9
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds double, ptr %141, i64 %143
  store double %140, ptr %144, align 8, !tbaa !11
  %145 = load i32, ptr %12, align 4, !tbaa !9
  %146 = load ptr, ptr %6, align 8, !tbaa !5
  %147 = load i32, ptr %146, align 4, !tbaa !9
  %148 = icmp slt i32 %145, %147
  br i1 %148, label %149, label %187

149:                                              ; preds = %137
  %150 = load ptr, ptr %6, align 8, !tbaa !5
  %151 = load i32, ptr %150, align 4, !tbaa !9
  %152 = load i32, ptr %12, align 4, !tbaa !9
  %153 = sub nsw i32 %151, %152
  store i32 %153, ptr %10, align 4, !tbaa !9
  %154 = load double, ptr %16, align 8, !tbaa !11
  %155 = fdiv double 1.000000e+00, %154
  store double %155, ptr %11, align 8, !tbaa !11
  %156 = load ptr, ptr %7, align 8, !tbaa !5
  %157 = load i32, ptr %15, align 4, !tbaa !9
  %158 = add nsw i32 %157, 1
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds double, ptr %156, i64 %159
  call void @dscal_(ptr noundef %10, ptr noundef %11, ptr noundef %160, ptr noundef @c__1)
  %161 = load ptr, ptr %6, align 8, !tbaa !5
  %162 = load i32, ptr %161, align 4, !tbaa !9
  %163 = load i32, ptr %12, align 4, !tbaa !9
  %164 = sub nsw i32 %162, %163
  store i32 %164, ptr %10, align 4, !tbaa !9
  %165 = load ptr, ptr %7, align 8, !tbaa !5
  %166 = load i32, ptr %15, align 4, !tbaa !9
  %167 = add nsw i32 %166, 1
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds double, ptr %165, i64 %168
  %170 = load ptr, ptr %7, align 8, !tbaa !5
  %171 = load i32, ptr %15, align 4, !tbaa !9
  %172 = load ptr, ptr %6, align 8, !tbaa !5
  %173 = load i32, ptr %172, align 4, !tbaa !9
  %174 = add nsw i32 %171, %173
  %175 = load i32, ptr %12, align 4, !tbaa !9
  %176 = sub nsw i32 %174, %175
  %177 = add nsw i32 %176, 1
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds double, ptr %170, i64 %178
  call void @dspr_(ptr noundef @.str.6, ptr noundef %10, ptr noundef @c_b16, ptr noundef %169, ptr noundef @c__1, ptr noundef %179)
  %180 = load i32, ptr %15, align 4, !tbaa !9
  %181 = load ptr, ptr %6, align 8, !tbaa !5
  %182 = load i32, ptr %181, align 4, !tbaa !9
  %183 = add nsw i32 %180, %182
  %184 = load i32, ptr %12, align 4, !tbaa !9
  %185 = sub nsw i32 %183, %184
  %186 = add nsw i32 %185, 1
  store i32 %186, ptr %15, align 4, !tbaa !9
  br label %187

187:                                              ; preds = %149, %137
  br label %188

188:                                              ; preds = %187
  %189 = load i32, ptr %12, align 4, !tbaa !9
  %190 = add nsw i32 %189, 1
  store i32 %190, ptr %12, align 4, !tbaa !9
  br label %119, !llvm.loop !15

191:                                              ; preds = %119
  br label %192

192:                                              ; preds = %191, %115
  br label %196

193:                                              ; preds = %131, %99
  %194 = load i32, ptr %12, align 4, !tbaa !9
  %195 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %194, ptr %195, align 4, !tbaa !9
  br label %196

196:                                              ; preds = %193, %192
  store i32 1, ptr %17, align 4
  br label %197

197:                                              ; preds = %196, %51, %42
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  ret void
}

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

declare i32 @lsame_(ptr noundef, ptr noundef) #2

declare i32 @xerbla_(ptr noundef, ptr noundef, i32 noundef) #2

declare void @dtpsv_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare double @ddot_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

declare void @dscal_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare void @dspr_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #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 = { "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 "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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !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}


; 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 [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@c__1 = external hidden global i32, align 4
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1
@c_b16 = external hidden global double, align 8

; Function Attrs: nounwind uwtable
define dso_local void @dpptrf_(ptr noundef %0, ptr nocapture noundef readonly %1, ptr noundef %2, ptr nocapture noundef %3) local_unnamed_addr #0 {
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %8 = getelementptr inbounds i8, ptr %2, i64 -8
  store i32 0, ptr %3, align 4, !tbaa !5
  %9 = tail call i32 @lsame_(ptr noundef %0, ptr noundef nonnull @.str) #4
  %.not = icmp eq i32 %9, 0
  br i1 %.not, label %10, label %12

10:                                               ; preds = %4
  %11 = tail call i32 @lsame_(ptr noundef %0, ptr noundef nonnull @.str.1) #4
  %.not78 = icmp eq i32 %11, 0
  br i1 %.not78, label %.thread.sink.split, label %12

12:                                               ; preds = %10, %4
  %13 = load i32, ptr %1, align 4, !tbaa !5
  %14 = icmp slt i32 %13, 0
  br i1 %14, label %.thread.sink.split, label %15

15:                                               ; preds = %12
  %.pr = load i32, ptr %3, align 4, !tbaa !5
  %.not79 = icmp eq i32 %.pr, 0
  br i1 %.not79, label %19, label %.thread

.thread.sink.split:                               ; preds = %12, %10
  %.sink = phi i32 [ -1, %10 ], [ -2, %12 ]
  store i32 %.sink, ptr %3, align 4, !tbaa !5
  br label %.thread

.thread:                                          ; preds = %.thread.sink.split, %15
  %16 = phi i32 [ %.pr, %15 ], [ %.sink, %.thread.sink.split ]
  %17 = sub nsw i32 0, %16
  store i32 %17, ptr %5, align 4, !tbaa !5
  %18 = call i32 @xerbla_(ptr noundef nonnull @.str.2, ptr noundef nonnull %5, i32 noundef 6) #4
  br label %.loopexit

19:                                               ; preds = %15
  %20 = icmp eq i32 %13, 0
  br i1 %20, label %.loopexit, label %21

21:                                               ; preds = %19
  br i1 %.not, label %.lr.ph95, label %22

22:                                               ; preds = %21
  %.pre = load double, ptr %2, align 8, !tbaa !9
  store i32 0, ptr %6, align 4, !tbaa !5
  %23 = call double @ddot_(ptr noundef nonnull %6, ptr noundef nonnull %2, ptr noundef nonnull @c__1, ptr noundef nonnull %2, ptr noundef nonnull @c__1) #4
  %24 = fsub double %.pre, %23
  %25 = fcmp ugt double %24, 0.000000e+00
  br i1 %25, label %26, label %._crit_edge

26:                                               ; preds = %22
  %27 = call double @sqrt(double noundef %24) #4
  store double %27, ptr %2, align 8, !tbaa !9
  %28 = zext nneg i32 %13 to i64
  %.not81.not.peel.not = icmp eq i32 %13, 1
  br i1 %.not81.not.peel.not, label %.loopexit, label %.lr.ph.peel.next

.lr.ph.peel.next:                                 ; preds = %26, %44
  %indvars.iv = phi i64 [ %indvars.iv.next, %44 ], [ 2, %26 ]
  %.090 = phi i32 [ %30, %44 ], [ 1, %26 ]
  %29 = trunc nuw nsw i64 %indvars.iv to i32
  %30 = add nuw nsw i32 %.090, %29
  %31 = add nuw nsw i32 %.090, 1
  %32 = trunc i64 %indvars.iv to i32
  %33 = add i32 %32, -1
  store i32 %33, ptr %6, align 4, !tbaa !5
  %34 = zext nneg i32 %31 to i64
  %35 = getelementptr inbounds double, ptr %8, i64 %34
  call void @dtpsv_(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.5, ptr noundef nonnull %6, ptr noundef nonnull %2, ptr noundef nonnull %35, ptr noundef nonnull @c__1) #4
  store i32 %33, ptr %6, align 4, !tbaa !5
  %36 = zext nneg i32 %30 to i64
  %37 = getelementptr inbounds double, ptr %8, i64 %36
  %38 = load double, ptr %37, align 8, !tbaa !9
  %39 = getelementptr inbounds double, ptr %8, i64 %34
  %40 = call double @ddot_(ptr noundef nonnull %6, ptr noundef nonnull %39, ptr noundef nonnull @c__1, ptr noundef nonnull %39, ptr noundef nonnull @c__1) #4
  %41 = fsub double %38, %40
  %42 = fcmp ugt double %41, 0.000000e+00
  br i1 %42, label %44, label %.loopexit104

.loopexit104:                                     ; preds = %.lr.ph.peel.next
  %43 = trunc nuw nsw i64 %indvars.iv to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %22, %.loopexit104
  %.lcssa100 = phi ptr [ %37, %.loopexit104 ], [ %2, %22 ]
  %.lcssa = phi double [ %41, %.loopexit104 ], [ %24, %22 ]
  %.06989.lcssa.wide = phi i32 [ %43, %.loopexit104 ], [ 1, %22 ]
  store double %.lcssa, ptr %.lcssa100, align 8, !tbaa !9
  br label %.loopexit83

44:                                               ; preds = %.lr.ph.peel.next
  %45 = call double @sqrt(double noundef %41) #4
  store double %45, ptr %37, align 8, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %.not81.not = icmp ult i64 %indvars.iv, %28
  br i1 %.not81.not, label %.lr.ph.peel.next, label %.loopexit, !llvm.loop !11

.lr.ph95:                                         ; preds = %21, %67
  %.170.neg94 = phi i32 [ %.170.neg, %67 ], [ -1, %21 ]
  %.193 = phi i32 [ %.2, %67 ], [ 1, %21 ]
  %.17092 = phi i32 [ %68, %67 ], [ 1, %21 ]
  %46 = sext i32 %.193 to i64
  %47 = getelementptr inbounds double, ptr %8, i64 %46
  %48 = load double, ptr %47, align 8, !tbaa !9
  %49 = fcmp ugt double %48, 0.000000e+00
  br i1 %49, label %50, label %.loopexit83

50:                                               ; preds = %.lr.ph95
  %51 = call double @sqrt(double noundef %48) #4
  store double %51, ptr %47, align 8, !tbaa !9
  %52 = load i32, ptr %1, align 4, !tbaa !5
  %53 = icmp slt i32 %.17092, %52
  br i1 %53, label %54, label %67

54:                                               ; preds = %50
  %55 = sub nsw i32 %52, %.17092
  store i32 %55, ptr %6, align 4, !tbaa !5
  %56 = fdiv double 1.000000e+00, %51
  store double %56, ptr %7, align 8, !tbaa !9
  %57 = getelementptr i8, ptr %47, i64 8
  call void @dscal_(ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef %57, ptr noundef nonnull @c__1) #4
  %58 = load i32, ptr %1, align 4, !tbaa !5
  %59 = sub nsw i32 %58, %.17092
  store i32 %59, ptr %6, align 4, !tbaa !5
  %60 = add i32 %.193, %.170.neg94
  %61 = add i32 %60, %58
  %62 = sext i32 %61 to i64
  %gep = getelementptr double, ptr %2, i64 %62
  call void @dspr_(ptr noundef nonnull @.str.6, ptr noundef nonnull %6, ptr noundef nonnull @c_b16, ptr noundef %57, ptr noundef nonnull @c__1, ptr noundef %gep) #4
  %63 = load i32, ptr %1, align 4, !tbaa !5
  %64 = add nsw i32 %.170.neg94, 1
  %65 = add i32 %64, %.193
  %66 = add i32 %65, %63
  br label %67

67:                                               ; preds = %50, %54
  %.2 = phi i32 [ %66, %54 ], [ %.193, %50 ]
  %68 = add nuw nsw i32 %.17092, 1
  %.170.neg = xor i32 %.17092, -1
  %.not80.not = icmp slt i32 %.17092, %13
  br i1 %.not80.not, label %.lr.ph95, label %.loopexit, !llvm.loop !14

.loopexit83:                                      ; preds = %.lr.ph95, %._crit_edge
  %.271 = phi i32 [ %.06989.lcssa.wide, %._crit_edge ], [ %.17092, %.lr.ph95 ]
  store i32 %.271, ptr %3, align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %44, %67, %26, %.loopexit83, %19, %.thread
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  ret void
}

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

declare i32 @lsame_(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @xerbla_(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @dtpsv_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare double @ddot_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare void @dscal_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @dspr_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12, !13}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!"llvm.loop.peeled.count", i32 1}
!14 = distinct !{!14, !12}


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