; LLVM IR from niuyishuai/PDCABB :: LAPACK_BLAS/LAPACK (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 i64, align 8
@.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 i32 @dpptrf_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #0 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca double, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca double, align 8
  %17 = alloca i64, align 8
  %18 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %19 = load ptr, ptr %8, align 8, !tbaa !5
  %20 = getelementptr inbounds double, ptr %19, i32 -1
  store ptr %20, ptr %8, align 8, !tbaa !5
  %21 = load ptr, ptr %9, align 8, !tbaa !5
  store i64 0, ptr %21, align 8, !tbaa !9
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = call i64 @lsame_(ptr noundef %22, ptr noundef @.str)
  store i64 %23, ptr %17, align 8, !tbaa !9
  %24 = load i64, ptr %17, align 8, !tbaa !9
  %25 = icmp ne i64 %24, 0
  br i1 %25, label %32, label %26

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

30:                                               ; preds = %26
  %31 = load ptr, ptr %9, align 8, !tbaa !5
  store i64 -1, ptr %31, align 8, !tbaa !9
  br label %39

32:                                               ; preds = %26, %4
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = load i64, ptr %33, align 8, !tbaa !9
  %35 = icmp slt i64 %34, 0
  br i1 %35, label %36, label %38

36:                                               ; preds = %32
  %37 = load ptr, ptr %9, align 8, !tbaa !5
  store i64 -2, ptr %37, align 8, !tbaa !9
  br label %38

38:                                               ; preds = %36, %32
  br label %39

39:                                               ; preds = %38, %30
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  %41 = load i64, ptr %40, align 8, !tbaa !9
  %42 = icmp ne i64 %41, 0
  br i1 %42, label %43, label %48

43:                                               ; preds = %39
  %44 = load ptr, ptr %9, align 8, !tbaa !5
  %45 = load i64, ptr %44, align 8, !tbaa !9
  %46 = sub nsw i64 0, %45
  store i64 %46, ptr %10, align 8, !tbaa !9
  %47 = call i32 @xerbla_(ptr noundef @.str.2, ptr noundef %10)
  store i32 0, ptr %5, align 4
  store i32 1, ptr %18, align 4
  br label %189

48:                                               ; preds = %39
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = load i64, ptr %49, align 8, !tbaa !9
  %51 = icmp eq i64 %50, 0
  br i1 %51, label %52, label %53

52:                                               ; preds = %48
  store i32 0, ptr %5, align 4
  store i32 1, ptr %18, align 4
  br label %189

53:                                               ; preds = %48
  %54 = load i64, ptr %17, align 8, !tbaa !9
  %55 = icmp ne i64 %54, 0
  br i1 %55, label %56, label %112

56:                                               ; preds = %53
  store i64 0, ptr %15, align 8, !tbaa !9
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = load i64, ptr %57, align 8, !tbaa !9
  store i64 %58, ptr %10, align 8, !tbaa !9
  store i64 1, ptr %13, align 8, !tbaa !9
  br label %59

59:                                               ; preds = %108, %56
  %60 = load i64, ptr %13, align 8, !tbaa !9
  %61 = load i64, ptr %10, align 8, !tbaa !9
  %62 = icmp sle i64 %60, %61
  br i1 %62, label %63, label %111

63:                                               ; preds = %59
  %64 = load i64, ptr %15, align 8, !tbaa !9
  %65 = add nsw i64 %64, 1
  store i64 %65, ptr %14, align 8, !tbaa !9
  %66 = load i64, ptr %13, align 8, !tbaa !9
  %67 = load i64, ptr %15, align 8, !tbaa !9
  %68 = add nsw i64 %67, %66
  store i64 %68, ptr %15, align 8, !tbaa !9
  %69 = load i64, ptr %13, align 8, !tbaa !9
  %70 = icmp sgt i64 %69, 1
  br i1 %70, label %71, label %80

71:                                               ; preds = %63
  %72 = load i64, ptr %13, align 8, !tbaa !9
  %73 = sub nsw i64 %72, 1
  store i64 %73, ptr %11, align 8, !tbaa !9
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = getelementptr inbounds double, ptr %74, i64 1
  %76 = load ptr, ptr %8, align 8, !tbaa !5
  %77 = load i64, ptr %14, align 8, !tbaa !9
  %78 = getelementptr inbounds double, ptr %76, i64 %77
  %79 = call i32 @f2c_dtpsv(ptr noundef @.str.3, ptr noundef @.str.4, ptr noundef @.str.5, ptr noundef %11, ptr noundef %75, ptr noundef %78, ptr noundef @c__1)
  br label %80

80:                                               ; preds = %71, %63
  %81 = load i64, ptr %13, align 8, !tbaa !9
  %82 = sub nsw i64 %81, 1
  store i64 %82, ptr %11, align 8, !tbaa !9
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  %84 = load i64, ptr %15, align 8, !tbaa !9
  %85 = getelementptr inbounds double, ptr %83, i64 %84
  %86 = load double, ptr %85, align 8, !tbaa !11
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = load i64, ptr %14, align 8, !tbaa !9
  %89 = getelementptr inbounds double, ptr %87, i64 %88
  %90 = load ptr, ptr %8, align 8, !tbaa !5
  %91 = load i64, ptr %14, align 8, !tbaa !9
  %92 = getelementptr inbounds double, ptr %90, i64 %91
  %93 = call double @f2c_ddot(ptr noundef %11, ptr noundef %89, ptr noundef @c__1, ptr noundef %92, ptr noundef @c__1)
  %94 = fsub double %86, %93
  store double %94, ptr %16, align 8, !tbaa !11
  %95 = load double, ptr %16, align 8, !tbaa !11
  %96 = fcmp ole double %95, 0.000000e+00
  br i1 %96, label %97, label %102

97:                                               ; preds = %80
  %98 = load double, ptr %16, align 8, !tbaa !11
  %99 = load ptr, ptr %8, align 8, !tbaa !5
  %100 = load i64, ptr %15, align 8, !tbaa !9
  %101 = getelementptr inbounds double, ptr %99, i64 %100
  store double %98, ptr %101, align 8, !tbaa !11
  br label %185

102:                                              ; preds = %80
  %103 = load double, ptr %16, align 8, !tbaa !11
  %104 = call double @sqrt(double noundef %103) #4
  %105 = load ptr, ptr %8, align 8, !tbaa !5
  %106 = load i64, ptr %15, align 8, !tbaa !9
  %107 = getelementptr inbounds double, ptr %105, i64 %106
  store double %104, ptr %107, align 8, !tbaa !11
  br label %108

108:                                              ; preds = %102
  %109 = load i64, ptr %13, align 8, !tbaa !9
  %110 = add nsw i64 %109, 1
  store i64 %110, ptr %13, align 8, !tbaa !9
  br label %59, !llvm.loop !13

111:                                              ; preds = %59
  br label %184

112:                                              ; preds = %53
  store i64 1, ptr %15, align 8, !tbaa !9
  %113 = load ptr, ptr %7, align 8, !tbaa !5
  %114 = load i64, ptr %113, align 8, !tbaa !9
  store i64 %114, ptr %10, align 8, !tbaa !9
  store i64 1, ptr %13, align 8, !tbaa !9
  br label %115

115:                                              ; preds = %180, %112
  %116 = load i64, ptr %13, align 8, !tbaa !9
  %117 = load i64, ptr %10, align 8, !tbaa !9
  %118 = icmp sle i64 %116, %117
  br i1 %118, label %119, label %183

119:                                              ; preds = %115
  %120 = load ptr, ptr %8, align 8, !tbaa !5
  %121 = load i64, ptr %15, align 8, !tbaa !9
  %122 = getelementptr inbounds double, ptr %120, i64 %121
  %123 = load double, ptr %122, align 8, !tbaa !11
  store double %123, ptr %16, align 8, !tbaa !11
  %124 = load double, ptr %16, align 8, !tbaa !11
  %125 = fcmp ole double %124, 0.000000e+00
  br i1 %125, label %126, label %131

126:                                              ; preds = %119
  %127 = load double, ptr %16, align 8, !tbaa !11
  %128 = load ptr, ptr %8, align 8, !tbaa !5
  %129 = load i64, ptr %15, align 8, !tbaa !9
  %130 = getelementptr inbounds double, ptr %128, i64 %129
  store double %127, ptr %130, align 8, !tbaa !11
  br label %185

131:                                              ; preds = %119
  %132 = load double, ptr %16, align 8, !tbaa !11
  %133 = call double @sqrt(double noundef %132) #4
  store double %133, ptr %16, align 8, !tbaa !11
  %134 = load double, ptr %16, align 8, !tbaa !11
  %135 = load ptr, ptr %8, align 8, !tbaa !5
  %136 = load i64, ptr %15, align 8, !tbaa !9
  %137 = getelementptr inbounds double, ptr %135, i64 %136
  store double %134, ptr %137, align 8, !tbaa !11
  %138 = load i64, ptr %13, align 8, !tbaa !9
  %139 = load ptr, ptr %7, align 8, !tbaa !5
  %140 = load i64, ptr %139, align 8, !tbaa !9
  %141 = icmp slt i64 %138, %140
  br i1 %141, label %142, label %179

142:                                              ; preds = %131
  %143 = load ptr, ptr %7, align 8, !tbaa !5
  %144 = load i64, ptr %143, align 8, !tbaa !9
  %145 = load i64, ptr %13, align 8, !tbaa !9
  %146 = sub nsw i64 %144, %145
  store i64 %146, ptr %11, align 8, !tbaa !9
  %147 = load double, ptr %16, align 8, !tbaa !11
  %148 = fdiv double 1.000000e+00, %147
  store double %148, ptr %12, align 8, !tbaa !11
  %149 = load ptr, ptr %8, align 8, !tbaa !5
  %150 = load i64, ptr %15, align 8, !tbaa !9
  %151 = add nsw i64 %150, 1
  %152 = getelementptr inbounds double, ptr %149, i64 %151
  %153 = call i32 @f2c_dscal(ptr noundef %11, ptr noundef %12, ptr noundef %152, ptr noundef @c__1)
  %154 = load ptr, ptr %7, align 8, !tbaa !5
  %155 = load i64, ptr %154, align 8, !tbaa !9
  %156 = load i64, ptr %13, align 8, !tbaa !9
  %157 = sub nsw i64 %155, %156
  store i64 %157, ptr %11, align 8, !tbaa !9
  %158 = load ptr, ptr %8, align 8, !tbaa !5
  %159 = load i64, ptr %15, align 8, !tbaa !9
  %160 = add nsw i64 %159, 1
  %161 = getelementptr inbounds double, ptr %158, i64 %160
  %162 = load ptr, ptr %8, align 8, !tbaa !5
  %163 = load i64, ptr %15, align 8, !tbaa !9
  %164 = load ptr, ptr %7, align 8, !tbaa !5
  %165 = load i64, ptr %164, align 8, !tbaa !9
  %166 = add nsw i64 %163, %165
  %167 = load i64, ptr %13, align 8, !tbaa !9
  %168 = sub nsw i64 %166, %167
  %169 = add nsw i64 %168, 1
  %170 = getelementptr inbounds double, ptr %162, i64 %169
  %171 = call i32 @f2c_dspr(ptr noundef @.str.6, ptr noundef %11, ptr noundef @c_b16, ptr noundef %161, ptr noundef @c__1, ptr noundef %170)
  %172 = load i64, ptr %15, align 8, !tbaa !9
  %173 = load ptr, ptr %7, align 8, !tbaa !5
  %174 = load i64, ptr %173, align 8, !tbaa !9
  %175 = add nsw i64 %172, %174
  %176 = load i64, ptr %13, align 8, !tbaa !9
  %177 = sub nsw i64 %175, %176
  %178 = add nsw i64 %177, 1
  store i64 %178, ptr %15, align 8, !tbaa !9
  br label %179

179:                                              ; preds = %142, %131
  br label %180

180:                                              ; preds = %179
  %181 = load i64, ptr %13, align 8, !tbaa !9
  %182 = add nsw i64 %181, 1
  store i64 %182, ptr %13, align 8, !tbaa !9
  br label %115, !llvm.loop !15

183:                                              ; preds = %115
  br label %184

184:                                              ; preds = %183, %111
  br label %188

185:                                              ; preds = %126, %97
  %186 = load i64, ptr %13, align 8, !tbaa !9
  %187 = load ptr, ptr %9, align 8, !tbaa !5
  store i64 %186, ptr %187, align 8, !tbaa !9
  br label %188

188:                                              ; preds = %185, %184
  store i32 0, ptr %5, align 4
  store i32 1, ptr %18, align 4
  br label %189

189:                                              ; preds = %188, %52, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  %190 = load i32, ptr %5, align 4
  ret i32 %190
}

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

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

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

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

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

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

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

declare i32 @f2c_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 = !{!"long", !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 i64, align 8
@.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 noundef i32 @dpptrf_(ptr noundef %0, ptr nocapture noundef readonly %1, ptr noundef %2, ptr nocapture noundef %3) local_unnamed_addr #0 {
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 8, 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 i64 0, ptr %3, align 8, !tbaa !5
  %9 = tail call i64 @lsame_(ptr noundef %0, ptr noundef nonnull @.str) #4
  %.not = icmp eq i64 %9, 0
  br i1 %.not, label %10, label %12

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

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

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

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

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

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

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

22:                                               ; preds = %21
  %.pre = load double, ptr %2, align 8, !tbaa !9
  store i64 0, ptr %6, align 8, !tbaa !5
  %23 = call double @f2c_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 %.loopexit104

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

.lr.ph.peel.next:                                 ; preds = %26, %38
  %.07091 = phi i64 [ %28, %38 ], [ 1, %26 ]
  %.07190 = phi i64 [ %40, %38 ], [ 2, %26 ]
  %28 = add nuw nsw i64 %.07091, %.07190
  %29 = add nsw i64 %.07190, -1
  store i64 %29, ptr %6, align 8, !tbaa !5
  %30 = getelementptr double, ptr %2, i64 %.07091
  %31 = call i32 @f2c_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 %30, ptr noundef nonnull @c__1) #4
  store i64 %29, ptr %6, align 8, !tbaa !5
  %32 = getelementptr inbounds double, ptr %8, i64 %28
  %33 = load double, ptr %32, align 8, !tbaa !9
  %34 = getelementptr double, ptr %2, i64 %.07091
  %35 = call double @f2c_ddot(ptr noundef nonnull %6, ptr noundef %34, ptr noundef nonnull @c__1, ptr noundef %34, ptr noundef nonnull @c__1) #4
  %36 = fsub double %33, %35
  %37 = fcmp ugt double %36, 0.000000e+00
  br i1 %37, label %38, label %.loopexit104

.loopexit104:                                     ; preds = %.lr.ph.peel.next, %22
  %.lcssa101 = phi ptr [ %2, %22 ], [ %32, %.lr.ph.peel.next ]
  %.lcssa = phi double [ %24, %22 ], [ %36, %.lr.ph.peel.next ]
  %.07190.lcssa = phi i64 [ 1, %22 ], [ %.07190, %.lr.ph.peel.next ]
  store double %.lcssa, ptr %.lcssa101, align 8, !tbaa !9
  br label %.loopexit84

38:                                               ; preds = %.lr.ph.peel.next
  %39 = call double @sqrt(double noundef %36) #4
  store double %39, ptr %32, align 8, !tbaa !9
  %40 = add nuw nsw i64 %.07190, 1
  %.not82.not = icmp slt i64 %.07190, %13
  br i1 %.not82.not, label %.lr.ph.peel.next, label %.loopexit, !llvm.loop !11

.lr.ph96:                                         ; preds = %21, %62
  %.172.neg95 = phi i64 [ %.172.neg, %62 ], [ -1, %21 ]
  %.194 = phi i64 [ %.2, %62 ], [ 1, %21 ]
  %.17293 = phi i64 [ %63, %62 ], [ 1, %21 ]
  %41 = getelementptr inbounds double, ptr %8, i64 %.194
  %42 = load double, ptr %41, align 8, !tbaa !9
  %43 = fcmp ugt double %42, 0.000000e+00
  br i1 %43, label %44, label %.loopexit84

44:                                               ; preds = %.lr.ph96
  %45 = call double @sqrt(double noundef %42) #4
  store double %45, ptr %41, align 8, !tbaa !9
  %46 = load i64, ptr %1, align 8, !tbaa !5
  %47 = icmp slt i64 %.17293, %46
  br i1 %47, label %48, label %62

48:                                               ; preds = %44
  %49 = sub nsw i64 %46, %.17293
  store i64 %49, ptr %6, align 8, !tbaa !5
  %50 = fdiv double 1.000000e+00, %45
  store double %50, ptr %7, align 8, !tbaa !9
  %51 = getelementptr double, ptr %2, i64 %.194
  %52 = call i32 @f2c_dscal(ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef %51, ptr noundef nonnull @c__1) #4
  %53 = load i64, ptr %1, align 8, !tbaa !5
  %54 = sub nsw i64 %53, %.17293
  store i64 %54, ptr %6, align 8, !tbaa !5
  %55 = getelementptr double, ptr %51, i64 %.172.neg95
  %56 = getelementptr double, ptr %55, i64 %53
  %57 = call i32 @f2c_dspr(ptr noundef nonnull @.str.6, ptr noundef nonnull %6, ptr noundef nonnull @c_b16, ptr noundef %51, ptr noundef nonnull @c__1, ptr noundef %56) #4
  %58 = load i64, ptr %1, align 8, !tbaa !5
  %59 = add nsw i64 %.172.neg95, 1
  %60 = add i64 %59, %.194
  %61 = add i64 %60, %58
  br label %62

62:                                               ; preds = %44, %48
  %.2 = phi i64 [ %61, %48 ], [ %.194, %44 ]
  %63 = add nuw nsw i64 %.17293, 1
  %.172.neg = xor i64 %.17293, -1
  %.not81.not = icmp slt i64 %.17293, %13
  br i1 %.not81.not, label %.lr.ph96, label %.loopexit, !llvm.loop !14

.loopexit84:                                      ; preds = %.lr.ph96, %.loopexit104
  %.273 = phi i64 [ %.07190.lcssa, %.loopexit104 ], [ %.17293, %.lr.ph96 ]
  store i64 %.273, ptr %3, align 8, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %38, %62, %26, %.loopexit84, %19, %.thread
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  ret i32 0
}

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

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

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

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

declare double @f2c_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 i32 @f2c_dscal(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @f2c_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 = !{!"long", !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: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass