; LLVM IR from niuyishuai/PDCABB :: LAPACK_BLAS/LAPACK (dpteqr)

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

; Function Attrs: nounwind uwtable
define dso_local i32 @dpteqr_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) #0 {
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca [1 x double], align 8
  %22 = alloca i64, align 8
  %23 = alloca [1 x double], align 8
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca i32, align 4
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store ptr %2, ptr %12, align 8, !tbaa !5
  store ptr %3, ptr %13, align 8, !tbaa !5
  store ptr %4, ptr %14, align 8, !tbaa !5
  store ptr %5, ptr %15, align 8, !tbaa !5
  store ptr %6, ptr %16, align 8, !tbaa !5
  store ptr %7, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  %27 = load ptr, ptr %12, align 8, !tbaa !5
  %28 = getelementptr inbounds double, ptr %27, i32 -1
  store ptr %28, ptr %12, align 8, !tbaa !5
  %29 = load ptr, ptr %13, align 8, !tbaa !5
  %30 = getelementptr inbounds double, ptr %29, i32 -1
  store ptr %30, ptr %13, align 8, !tbaa !5
  %31 = load ptr, ptr %15, align 8, !tbaa !5
  %32 = load i64, ptr %31, align 8, !tbaa !9
  store i64 %32, ptr %18, align 8, !tbaa !9
  %33 = load i64, ptr %18, align 8, !tbaa !9
  %34 = add nsw i64 1, %33
  store i64 %34, ptr %19, align 8, !tbaa !9
  %35 = load i64, ptr %19, align 8, !tbaa !9
  %36 = load ptr, ptr %14, align 8, !tbaa !5
  %37 = sub i64 0, %35
  %38 = getelementptr inbounds double, ptr %36, i64 %37
  store ptr %38, ptr %14, align 8, !tbaa !5
  %39 = load ptr, ptr %16, align 8, !tbaa !5
  %40 = getelementptr inbounds double, ptr %39, i32 -1
  store ptr %40, ptr %16, align 8, !tbaa !5
  %41 = load ptr, ptr %17, align 8, !tbaa !5
  store i64 0, ptr %41, align 8, !tbaa !9
  %42 = load ptr, ptr %10, align 8, !tbaa !5
  %43 = call i64 @lsame_(ptr noundef %42, ptr noundef @.str)
  %44 = icmp ne i64 %43, 0
  br i1 %44, label %45, label %46

45:                                               ; preds = %8
  store i64 0, ptr %25, align 8, !tbaa !9
  br label %59

46:                                               ; preds = %8
  %47 = load ptr, ptr %10, align 8, !tbaa !5
  %48 = call i64 @lsame_(ptr noundef %47, ptr noundef @.str.1)
  %49 = icmp ne i64 %48, 0
  br i1 %49, label %50, label %51

50:                                               ; preds = %46
  store i64 1, ptr %25, align 8, !tbaa !9
  br label %58

51:                                               ; preds = %46
  %52 = load ptr, ptr %10, align 8, !tbaa !5
  %53 = call i64 @lsame_(ptr noundef %52, ptr noundef @.str.2)
  %54 = icmp ne i64 %53, 0
  br i1 %54, label %55, label %56

55:                                               ; preds = %51
  store i64 2, ptr %25, align 8, !tbaa !9
  br label %57

56:                                               ; preds = %51
  store i64 -1, ptr %25, align 8, !tbaa !9
  br label %57

57:                                               ; preds = %56, %55
  br label %58

58:                                               ; preds = %57, %50
  br label %59

59:                                               ; preds = %58, %45
  %60 = load i64, ptr %25, align 8, !tbaa !9
  %61 = icmp slt i64 %60, 0
  br i1 %61, label %62, label %64

62:                                               ; preds = %59
  %63 = load ptr, ptr %17, align 8, !tbaa !5
  store i64 -1, ptr %63, align 8, !tbaa !9
  br label %94

64:                                               ; preds = %59
  %65 = load ptr, ptr %11, align 8, !tbaa !5
  %66 = load i64, ptr %65, align 8, !tbaa !9
  %67 = icmp slt i64 %66, 0
  br i1 %67, label %68, label %70

68:                                               ; preds = %64
  %69 = load ptr, ptr %17, align 8, !tbaa !5
  store i64 -2, ptr %69, align 8, !tbaa !9
  br label %93

70:                                               ; preds = %64
  %71 = load ptr, ptr %15, align 8, !tbaa !5
  %72 = load i64, ptr %71, align 8, !tbaa !9
  %73 = icmp slt i64 %72, 1
  br i1 %73, label %90, label %74

74:                                               ; preds = %70
  %75 = load i64, ptr %25, align 8, !tbaa !9
  %76 = icmp sgt i64 %75, 0
  br i1 %76, label %77, label %92

77:                                               ; preds = %74
  %78 = load ptr, ptr %15, align 8, !tbaa !5
  %79 = load i64, ptr %78, align 8, !tbaa !9
  %80 = load ptr, ptr %11, align 8, !tbaa !5
  %81 = load i64, ptr %80, align 8, !tbaa !9
  %82 = icmp sge i64 1, %81
  br i1 %82, label %83, label %84

83:                                               ; preds = %77
  br label %87

84:                                               ; preds = %77
  %85 = load ptr, ptr %11, align 8, !tbaa !5
  %86 = load i64, ptr %85, align 8, !tbaa !9
  br label %87

87:                                               ; preds = %84, %83
  %88 = phi i64 [ 1, %83 ], [ %86, %84 ]
  %89 = icmp slt i64 %79, %88
  br i1 %89, label %90, label %92

90:                                               ; preds = %87, %70
  %91 = load ptr, ptr %17, align 8, !tbaa !5
  store i64 -6, ptr %91, align 8, !tbaa !9
  br label %92

92:                                               ; preds = %90, %87, %74
  br label %93

93:                                               ; preds = %92, %68
  br label %94

94:                                               ; preds = %93, %62
  %95 = load ptr, ptr %17, align 8, !tbaa !5
  %96 = load i64, ptr %95, align 8, !tbaa !9
  %97 = icmp ne i64 %96, 0
  br i1 %97, label %98, label %103

98:                                               ; preds = %94
  %99 = load ptr, ptr %17, align 8, !tbaa !5
  %100 = load i64, ptr %99, align 8, !tbaa !9
  %101 = sub nsw i64 0, %100
  store i64 %101, ptr %20, align 8, !tbaa !9
  %102 = call i32 @xerbla_(ptr noundef @.str.3, ptr noundef %20)
  store i32 0, ptr %9, align 4
  store i32 1, ptr %26, align 4
  br label %239

103:                                              ; preds = %94
  %104 = load ptr, ptr %11, align 8, !tbaa !5
  %105 = load i64, ptr %104, align 8, !tbaa !9
  %106 = icmp eq i64 %105, 0
  br i1 %106, label %107, label %108

107:                                              ; preds = %103
  store i32 0, ptr %9, align 4
  store i32 1, ptr %26, align 4
  br label %239

108:                                              ; preds = %103
  %109 = load ptr, ptr %11, align 8, !tbaa !5
  %110 = load i64, ptr %109, align 8, !tbaa !9
  %111 = icmp eq i64 %110, 1
  br i1 %111, label %112, label %121

112:                                              ; preds = %108
  %113 = load i64, ptr %25, align 8, !tbaa !9
  %114 = icmp sgt i64 %113, 0
  br i1 %114, label %115, label %120

115:                                              ; preds = %112
  %116 = load ptr, ptr %14, align 8, !tbaa !5
  %117 = load i64, ptr %18, align 8, !tbaa !9
  %118 = add nsw i64 %117, 1
  %119 = getelementptr inbounds double, ptr %116, i64 %118
  store double 1.000000e+00, ptr %119, align 8, !tbaa !11
  br label %120

120:                                              ; preds = %115, %112
  store i32 0, ptr %9, align 4
  store i32 1, ptr %26, align 4
  br label %239

121:                                              ; preds = %108
  %122 = load i64, ptr %25, align 8, !tbaa !9
  %123 = icmp eq i64 %122, 2
  br i1 %123, label %124, label %132

124:                                              ; preds = %121
  %125 = load ptr, ptr %11, align 8, !tbaa !5
  %126 = load ptr, ptr %11, align 8, !tbaa !5
  %127 = load ptr, ptr %14, align 8, !tbaa !5
  %128 = load i64, ptr %19, align 8, !tbaa !9
  %129 = getelementptr inbounds double, ptr %127, i64 %128
  %130 = load ptr, ptr %15, align 8, !tbaa !5
  %131 = call i32 @dlaset_(ptr noundef @.str.4, ptr noundef %125, ptr noundef %126, ptr noundef @c_b7, ptr noundef @c_b8, ptr noundef %129, ptr noundef %130)
  br label %132

132:                                              ; preds = %124, %121
  %133 = load ptr, ptr %11, align 8, !tbaa !5
  %134 = load ptr, ptr %12, align 8, !tbaa !5
  %135 = getelementptr inbounds double, ptr %134, i64 1
  %136 = load ptr, ptr %13, align 8, !tbaa !5
  %137 = getelementptr inbounds double, ptr %136, i64 1
  %138 = load ptr, ptr %17, align 8, !tbaa !5
  %139 = call i32 @dpttrf_(ptr noundef %133, ptr noundef %135, ptr noundef %137, ptr noundef %138)
  %140 = load ptr, ptr %17, align 8, !tbaa !5
  %141 = load i64, ptr %140, align 8, !tbaa !9
  %142 = icmp ne i64 %141, 0
  br i1 %142, label %143, label %144

143:                                              ; preds = %132
  store i32 0, ptr %9, align 4
  store i32 1, ptr %26, align 4
  br label %239

144:                                              ; preds = %132
  %145 = load ptr, ptr %11, align 8, !tbaa !5
  %146 = load i64, ptr %145, align 8, !tbaa !9
  store i64 %146, ptr %20, align 8, !tbaa !9
  store i64 1, ptr %22, align 8, !tbaa !9
  br label %147

147:                                              ; preds = %160, %144
  %148 = load i64, ptr %22, align 8, !tbaa !9
  %149 = load i64, ptr %20, align 8, !tbaa !9
  %150 = icmp sle i64 %148, %149
  br i1 %150, label %151, label %163

151:                                              ; preds = %147
  %152 = load ptr, ptr %12, align 8, !tbaa !5
  %153 = load i64, ptr %22, align 8, !tbaa !9
  %154 = getelementptr inbounds double, ptr %152, i64 %153
  %155 = load double, ptr %154, align 8, !tbaa !11
  %156 = call double @sqrt(double noundef %155) #4
  %157 = load ptr, ptr %12, align 8, !tbaa !5
  %158 = load i64, ptr %22, align 8, !tbaa !9
  %159 = getelementptr inbounds double, ptr %157, i64 %158
  store double %156, ptr %159, align 8, !tbaa !11
  br label %160

160:                                              ; preds = %151
  %161 = load i64, ptr %22, align 8, !tbaa !9
  %162 = add nsw i64 %161, 1
  store i64 %162, ptr %22, align 8, !tbaa !9
  br label %147, !llvm.loop !13

163:                                              ; preds = %147
  %164 = load ptr, ptr %11, align 8, !tbaa !5
  %165 = load i64, ptr %164, align 8, !tbaa !9
  %166 = sub nsw i64 %165, 1
  store i64 %166, ptr %20, align 8, !tbaa !9
  store i64 1, ptr %22, align 8, !tbaa !9
  br label %167

167:                                              ; preds = %181, %163
  %168 = load i64, ptr %22, align 8, !tbaa !9
  %169 = load i64, ptr %20, align 8, !tbaa !9
  %170 = icmp sle i64 %168, %169
  br i1 %170, label %171, label %184

171:                                              ; preds = %167
  %172 = load ptr, ptr %12, align 8, !tbaa !5
  %173 = load i64, ptr %22, align 8, !tbaa !9
  %174 = getelementptr inbounds double, ptr %172, i64 %173
  %175 = load double, ptr %174, align 8, !tbaa !11
  %176 = load ptr, ptr %13, align 8, !tbaa !5
  %177 = load i64, ptr %22, align 8, !tbaa !9
  %178 = getelementptr inbounds double, ptr %176, i64 %177
  %179 = load double, ptr %178, align 8, !tbaa !11
  %180 = fmul double %179, %175
  store double %180, ptr %178, align 8, !tbaa !11
  br label %181

181:                                              ; preds = %171
  %182 = load i64, ptr %22, align 8, !tbaa !9
  %183 = add nsw i64 %182, 1
  store i64 %183, ptr %22, align 8, !tbaa !9
  br label %167, !llvm.loop !15

184:                                              ; preds = %167
  %185 = load i64, ptr %25, align 8, !tbaa !9
  %186 = icmp sgt i64 %185, 0
  br i1 %186, label %187, label %190

187:                                              ; preds = %184
  %188 = load ptr, ptr %11, align 8, !tbaa !5
  %189 = load i64, ptr %188, align 8, !tbaa !9
  store i64 %189, ptr %24, align 8, !tbaa !9
  br label %191

190:                                              ; preds = %184
  store i64 0, ptr %24, align 8, !tbaa !9
  br label %191

191:                                              ; preds = %190, %187
  %192 = load ptr, ptr %11, align 8, !tbaa !5
  %193 = load ptr, ptr %12, align 8, !tbaa !5
  %194 = getelementptr inbounds double, ptr %193, i64 1
  %195 = load ptr, ptr %13, align 8, !tbaa !5
  %196 = getelementptr inbounds double, ptr %195, i64 1
  %197 = getelementptr inbounds [1 x double], ptr %23, i64 0, i64 0
  %198 = load ptr, ptr %14, align 8, !tbaa !5
  %199 = load i64, ptr %19, align 8, !tbaa !9
  %200 = getelementptr inbounds double, ptr %198, i64 %199
  %201 = load ptr, ptr %15, align 8, !tbaa !5
  %202 = getelementptr inbounds [1 x double], ptr %21, i64 0, i64 0
  %203 = load ptr, ptr %16, align 8, !tbaa !5
  %204 = getelementptr inbounds double, ptr %203, i64 1
  %205 = load ptr, ptr %17, align 8, !tbaa !5
  %206 = call i32 @dbdsqr_(ptr noundef @.str.5, ptr noundef %192, ptr noundef @c__0, ptr noundef %24, ptr noundef @c__0, ptr noundef %194, ptr noundef %196, ptr noundef %197, ptr noundef @c__1, ptr noundef %200, ptr noundef %201, ptr noundef %202, ptr noundef @c__1, ptr noundef %204, ptr noundef %205)
  %207 = load ptr, ptr %17, align 8, !tbaa !5
  %208 = load i64, ptr %207, align 8, !tbaa !9
  %209 = icmp eq i64 %208, 0
  br i1 %209, label %210, label %231

210:                                              ; preds = %191
  %211 = load ptr, ptr %11, align 8, !tbaa !5
  %212 = load i64, ptr %211, align 8, !tbaa !9
  store i64 %212, ptr %20, align 8, !tbaa !9
  store i64 1, ptr %22, align 8, !tbaa !9
  br label %213

213:                                              ; preds = %227, %210
  %214 = load i64, ptr %22, align 8, !tbaa !9
  %215 = load i64, ptr %20, align 8, !tbaa !9
  %216 = icmp sle i64 %214, %215
  br i1 %216, label %217, label %230

217:                                              ; preds = %213
  %218 = load ptr, ptr %12, align 8, !tbaa !5
  %219 = load i64, ptr %22, align 8, !tbaa !9
  %220 = getelementptr inbounds double, ptr %218, i64 %219
  %221 = load double, ptr %220, align 8, !tbaa !11
  %222 = load ptr, ptr %12, align 8, !tbaa !5
  %223 = load i64, ptr %22, align 8, !tbaa !9
  %224 = getelementptr inbounds double, ptr %222, i64 %223
  %225 = load double, ptr %224, align 8, !tbaa !11
  %226 = fmul double %225, %221
  store double %226, ptr %224, align 8, !tbaa !11
  br label %227

227:                                              ; preds = %217
  %228 = load i64, ptr %22, align 8, !tbaa !9
  %229 = add nsw i64 %228, 1
  store i64 %229, ptr %22, align 8, !tbaa !9
  br label %213, !llvm.loop !16

230:                                              ; preds = %213
  br label %238

231:                                              ; preds = %191
  %232 = load ptr, ptr %11, align 8, !tbaa !5
  %233 = load i64, ptr %232, align 8, !tbaa !9
  %234 = load ptr, ptr %17, align 8, !tbaa !5
  %235 = load i64, ptr %234, align 8, !tbaa !9
  %236 = add nsw i64 %233, %235
  %237 = load ptr, ptr %17, align 8, !tbaa !5
  store i64 %236, ptr %237, align 8, !tbaa !9
  br label %238

238:                                              ; preds = %231, %230
  store i32 0, ptr %9, align 4
  store i32 1, ptr %26, align 4
  br label %239

239:                                              ; preds = %238, %143, %120, %107, %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  %240 = load i32, ptr %9, align 4
  ret i32 %240
}

; 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 @dlaset_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

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

declare i32 @dbdsqr_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, 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}
!16 = distinct !{!16, !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 [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@c_b7 = external hidden global double, align 8
@c_b8 = external hidden global double, align 8
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@c__0 = external hidden global i64, align 8
@c__1 = external hidden global i64, align 8

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

16:                                               ; preds = %8
  %17 = tail call i64 @lsame_(ptr noundef %0, ptr noundef nonnull @.str.1) #4
  %.not81 = icmp eq i64 %17, 0
  br i1 %.not81, label %18, label %.thread

18:                                               ; preds = %16
  %19 = tail call i64 @lsame_(ptr noundef %0, ptr noundef nonnull @.str.2) #4
  %.not82 = icmp eq i64 %19, 0
  br i1 %.not82, label %.thread93.sink.split, label %.thread

.thread:                                          ; preds = %16, %8, %18
  %20 = phi i1 [ true, %18 ], [ false, %8 ], [ false, %16 ]
  %21 = load i64, ptr %1, align 8, !tbaa !5
  %22 = icmp slt i64 %21, 0
  br i1 %22, label %.thread93.sink.split, label %23

23:                                               ; preds = %.thread
  %24 = load i64, ptr %5, align 8, !tbaa !5
  %25 = icmp slt i64 %24, 1
  %26 = icmp ugt i64 %21, %24
  %or.cond = and i1 %.not, %26
  %or.cond110 = or i1 %25, %or.cond
  br i1 %or.cond110, label %.thread93.sink.split, label %27

27:                                               ; preds = %23
  %.pr = load i64, ptr %7, align 8, !tbaa !5
  %.not83 = icmp eq i64 %.pr, 0
  br i1 %.not83, label %31, label %.thread93

.thread93.sink.split:                             ; preds = %23, %.thread, %18
  %.sink = phi i64 [ -1, %18 ], [ -2, %.thread ], [ -6, %23 ]
  store i64 %.sink, ptr %7, align 8, !tbaa !5
  br label %.thread93

.thread93:                                        ; preds = %.thread93.sink.split, %27
  %28 = phi i64 [ %.pr, %27 ], [ %.sink, %.thread93.sink.split ]
  %29 = sub nsw i64 0, %28
  store i64 %29, ptr %9, align 8, !tbaa !5
  %30 = call i32 @xerbla_(ptr noundef nonnull @.str.3, ptr noundef nonnull %9) #4
  br label %.loopexit

31:                                               ; preds = %27
  switch i64 %21, label %34 [
    i64 0, label %.loopexit
    i64 1, label %32
  ]

32:                                               ; preds = %31
  br i1 %.not, label %33, label %.loopexit

33:                                               ; preds = %32
  store double 1.000000e+00, ptr %4, align 8, !tbaa !9
  br label %.loopexit

34:                                               ; preds = %31
  br i1 %20, label %35, label %37

35:                                               ; preds = %34
  %36 = tail call i32 @dlaset_(ptr noundef nonnull @.str.4, ptr noundef nonnull %1, ptr noundef nonnull %1, ptr noundef nonnull @c_b7, ptr noundef nonnull @c_b8, ptr noundef %4, ptr noundef nonnull %5) #4
  br label %37

37:                                               ; preds = %35, %34
  %38 = tail call i32 @dpttrf_(ptr noundef nonnull %1, ptr noundef %2, ptr noundef %3, ptr noundef nonnull %7) #4
  %39 = load i64, ptr %7, align 8, !tbaa !5
  %.not84 = icmp eq i64 %39, 0
  br i1 %.not84, label %40, label %.loopexit

40:                                               ; preds = %37
  %41 = load i64, ptr %1, align 8, !tbaa !5
  %.not8596 = icmp slt i64 %41, 1
  br i1 %.not8596, label %._crit_edge102, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %40
  %xtraiter = and i64 %41, 3
  %42 = icmp ult i64 %41, 4
  br i1 %42, label %._crit_edge.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %41, 9223372036854775804
  %invariant.gep = getelementptr i8, ptr %13, i64 16
  %invariant.gep135 = getelementptr i8, ptr %13, i64 24
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %.07497 = phi i64 [ 1, %.lr.ph.preheader.new ], [ %53, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %43 = getelementptr inbounds double, ptr %13, i64 %.07497
  %44 = load double, ptr %43, align 8, !tbaa !9
  %45 = tail call double @sqrt(double noundef %44) #4
  store double %45, ptr %43, align 8, !tbaa !9
  %46 = getelementptr double, ptr %2, i64 %.07497
  %47 = load double, ptr %46, align 8, !tbaa !9
  %48 = tail call double @sqrt(double noundef %47) #4
  store double %48, ptr %46, align 8, !tbaa !9
  %gep = getelementptr double, ptr %invariant.gep, i64 %.07497
  %49 = load double, ptr %gep, align 8, !tbaa !9
  %50 = tail call double @sqrt(double noundef %49) #4
  store double %50, ptr %gep, align 8, !tbaa !9
  %gep136 = getelementptr double, ptr %invariant.gep135, i64 %.07497
  %51 = load double, ptr %gep136, align 8, !tbaa !9
  %52 = tail call double @sqrt(double noundef %51) #4
  store double %52, ptr %gep136, align 8, !tbaa !9
  %53 = add nuw i64 %.07497, 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_edge.unr-lcssa, label %.lr.ph, !llvm.loop !11

._crit_edge.unr-lcssa:                            ; preds = %.lr.ph, %.lr.ph.preheader
  %.07497.unr = phi i64 [ 1, %.lr.ph.preheader ], [ %53, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.unr-lcssa, %.lr.ph.epil
  %.07497.epil = phi i64 [ %57, %.lr.ph.epil ], [ %.07497.unr, %._crit_edge.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.unr-lcssa ]
  %54 = getelementptr inbounds double, ptr %13, i64 %.07497.epil
  %55 = load double, ptr %54, align 8, !tbaa !9
  %56 = tail call double @sqrt(double noundef %55) #4
  store double %56, ptr %54, align 8, !tbaa !9
  %57 = add nuw i64 %.07497.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_edge, label %.lr.ph.epil, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph.epil, %._crit_edge.unr-lcssa
  %.pre = load i64, ptr %1, align 8, !tbaa !5
  %.not86.not98 = icmp sgt i64 %.pre, 1
  br i1 %.not86.not98, label %.lr.ph101.preheader, label %._crit_edge102

.lr.ph101.preheader:                              ; preds = %._crit_edge
  %58 = add nsw i64 %.pre, -1
  %min.iters.check = icmp ult i64 %.pre, 9
  br i1 %min.iters.check, label %.lr.ph101.preheader131, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph101.preheader
  %59 = shl i64 %.pre, 3
  %60 = add i64 %59, -8
  %scevgep = getelementptr i8, ptr %3, i64 %60
  %scevgep111 = getelementptr i8, ptr %2, i64 %60
  %bound0 = icmp ugt ptr %scevgep111, %3
  %bound1 = icmp ugt ptr %scevgep, %2
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %.lr.ph101.preheader131, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %58, -4
  %ind.end = or disjoint i64 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %61 = getelementptr double, ptr %2, i64 %index
  %62 = getelementptr inbounds i8, ptr %61, i64 16
  %wide.load = load <2 x double>, ptr %61, align 8, !tbaa !9, !alias.scope !15
  %wide.load112 = load <2 x double>, ptr %62, align 8, !tbaa !9, !alias.scope !15
  %63 = getelementptr double, ptr %3, i64 %index
  %64 = getelementptr inbounds i8, ptr %63, i64 16
  %wide.load113 = load <2 x double>, ptr %63, align 8, !tbaa !9, !alias.scope !18, !noalias !15
  %wide.load114 = load <2 x double>, ptr %64, align 8, !tbaa !9, !alias.scope !18, !noalias !15
  %65 = fmul <2 x double> %wide.load, %wide.load113
  %66 = fmul <2 x double> %wide.load112, %wide.load114
  store <2 x double> %65, ptr %63, align 8, !tbaa !9, !alias.scope !18, !noalias !15
  store <2 x double> %66, ptr %64, align 8, !tbaa !9, !alias.scope !18, !noalias !15
  %index.next = add nuw i64 %index, 4
  %67 = icmp eq i64 %index.next, %n.vec
  br i1 %67, label %middle.block, label %vector.body, !llvm.loop !20

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %58, %n.vec
  br i1 %cmp.n, label %._crit_edge102, label %.lr.ph101.preheader131

.lr.ph101.preheader131:                           ; preds = %middle.block, %vector.memcheck, %.lr.ph101.preheader
  %.199.ph = phi i64 [ 1, %vector.memcheck ], [ 1, %.lr.ph101.preheader ], [ %ind.end, %middle.block ]
  %68 = sub i64 %.pre, %.199.ph
  %xtraiter132 = and i64 %68, 3
  %lcmp.mod133.not = icmp eq i64 %xtraiter132, 0
  br i1 %lcmp.mod133.not, label %.lr.ph101.prol.loopexit, label %.lr.ph101.prol

.lr.ph101.prol:                                   ; preds = %.lr.ph101.preheader131, %.lr.ph101.prol
  %.199.prol = phi i64 [ %74, %.lr.ph101.prol ], [ %.199.ph, %.lr.ph101.preheader131 ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph101.prol ], [ 0, %.lr.ph101.preheader131 ]
  %69 = getelementptr inbounds double, ptr %13, i64 %.199.prol
  %70 = load double, ptr %69, align 8, !tbaa !9
  %71 = getelementptr inbounds double, ptr %14, i64 %.199.prol
  %72 = load double, ptr %71, align 8, !tbaa !9
  %73 = fmul double %70, %72
  store double %73, ptr %71, align 8, !tbaa !9
  %74 = add nuw nsw i64 %.199.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter132
  br i1 %prol.iter.cmp.not, label %.lr.ph101.prol.loopexit, label %.lr.ph101.prol, !llvm.loop !23

.lr.ph101.prol.loopexit:                          ; preds = %.lr.ph101.prol, %.lr.ph101.preheader131
  %.199.unr = phi i64 [ %.199.ph, %.lr.ph101.preheader131 ], [ %74, %.lr.ph101.prol ]
  %75 = sub i64 %.199.ph, %.pre
  %76 = icmp ugt i64 %75, -4
  br i1 %76, label %._crit_edge102, label %.lr.ph101

.lr.ph101:                                        ; preds = %.lr.ph101.prol.loopexit, %.lr.ph101
  %.199 = phi i64 [ %99, %.lr.ph101 ], [ %.199.unr, %.lr.ph101.prol.loopexit ]
  %77 = getelementptr inbounds double, ptr %13, i64 %.199
  %78 = load double, ptr %77, align 8, !tbaa !9
  %79 = getelementptr inbounds double, ptr %14, i64 %.199
  %80 = load double, ptr %79, align 8, !tbaa !9
  %81 = fmul double %78, %80
  store double %81, ptr %79, align 8, !tbaa !9
  %82 = getelementptr double, ptr %2, i64 %.199
  %83 = load double, ptr %82, align 8, !tbaa !9
  %84 = getelementptr double, ptr %3, i64 %.199
  %85 = load double, ptr %84, align 8, !tbaa !9
  %86 = fmul double %83, %85
  store double %86, ptr %84, align 8, !tbaa !9
  %87 = add nuw nsw i64 %.199, 2
  %88 = getelementptr inbounds double, ptr %13, i64 %87
  %89 = load double, ptr %88, align 8, !tbaa !9
  %90 = getelementptr inbounds double, ptr %14, i64 %87
  %91 = load double, ptr %90, align 8, !tbaa !9
  %92 = fmul double %89, %91
  store double %92, ptr %90, align 8, !tbaa !9
  %93 = add nuw nsw i64 %.199, 3
  %94 = getelementptr inbounds double, ptr %13, i64 %93
  %95 = load double, ptr %94, align 8, !tbaa !9
  %96 = getelementptr inbounds double, ptr %14, i64 %93
  %97 = load double, ptr %96, align 8, !tbaa !9
  %98 = fmul double %95, %97
  store double %98, ptr %96, align 8, !tbaa !9
  %99 = add nuw nsw i64 %.199, 4
  %exitcond107.not.3 = icmp eq i64 %99, %.pre
  br i1 %exitcond107.not.3, label %._crit_edge102, label %.lr.ph101, !llvm.loop !24

._crit_edge102:                                   ; preds = %.lr.ph101.prol.loopexit, %.lr.ph101, %middle.block, %40, %._crit_edge
  %100 = phi i64 [ %.pre, %._crit_edge ], [ %41, %40 ], [ %.pre, %middle.block ], [ %.pre, %.lr.ph101 ], [ %.pre, %.lr.ph101.prol.loopexit ]
  %spec.select95 = select i1 %.not, i64 %100, i64 0
  store i64 %spec.select95, ptr %12, align 8, !tbaa !5
  %101 = call i32 @dbdsqr_(ptr noundef nonnull @.str.5, ptr noundef nonnull %1, ptr noundef nonnull @c__0, ptr noundef nonnull %12, ptr noundef nonnull @c__0, ptr noundef %2, ptr noundef %3, ptr noundef nonnull %11, ptr noundef nonnull @c__1, ptr noundef %4, ptr noundef nonnull %5, ptr noundef nonnull %10, ptr noundef nonnull @c__1, ptr noundef %6, ptr noundef nonnull %7) #4
  %102 = load i64, ptr %7, align 8, !tbaa !5
  %103 = icmp eq i64 %102, 0
  %104 = load i64, ptr %1, align 8, !tbaa !5
  br i1 %103, label %105, label %115

105:                                              ; preds = %._crit_edge102
  %.not87103 = icmp slt i64 %104, 1
  br i1 %.not87103, label %.loopexit, label %.lr.ph106.preheader

.lr.ph106.preheader:                              ; preds = %105
  %min.iters.check117 = icmp ult i64 %104, 4
  br i1 %min.iters.check117, label %.lr.ph106.preheader130, label %vector.ph118

vector.ph118:                                     ; preds = %.lr.ph106.preheader
  %n.vec120 = and i64 %104, 9223372036854775804
  %ind.end121 = or disjoint i64 %n.vec120, 1
  br label %vector.body123

vector.body123:                                   ; preds = %vector.body123, %vector.ph118
  %index124 = phi i64 [ 0, %vector.ph118 ], [ %index.next128, %vector.body123 ]
  %106 = getelementptr double, ptr %2, i64 %index124
  %107 = getelementptr inbounds i8, ptr %106, i64 16
  %wide.load126 = load <2 x double>, ptr %106, align 8, !tbaa !9
  %wide.load127 = load <2 x double>, ptr %107, align 8, !tbaa !9
  %108 = fmul <2 x double> %wide.load126, %wide.load126
  %109 = fmul <2 x double> %wide.load127, %wide.load127
  store <2 x double> %108, ptr %106, align 8, !tbaa !9
  store <2 x double> %109, ptr %107, align 8, !tbaa !9
  %index.next128 = add nuw i64 %index124, 4
  %110 = icmp eq i64 %index.next128, %n.vec120
  br i1 %110, label %middle.block115, label %vector.body123, !llvm.loop !25

middle.block115:                                  ; preds = %vector.body123
  %cmp.n129 = icmp eq i64 %104, %n.vec120
  br i1 %cmp.n129, label %.loopexit, label %.lr.ph106.preheader130

.lr.ph106.preheader130:                           ; preds = %middle.block115, %.lr.ph106.preheader
  %.2104.ph = phi i64 [ 1, %.lr.ph106.preheader ], [ %ind.end121, %middle.block115 ]
  br label %.lr.ph106

.lr.ph106:                                        ; preds = %.lr.ph106.preheader130, %.lr.ph106
  %.2104 = phi i64 [ %114, %.lr.ph106 ], [ %.2104.ph, %.lr.ph106.preheader130 ]
  %111 = getelementptr inbounds double, ptr %13, i64 %.2104
  %112 = load double, ptr %111, align 8, !tbaa !9
  %113 = fmul double %112, %112
  store double %113, ptr %111, align 8, !tbaa !9
  %114 = add nuw i64 %.2104, 1
  %exitcond108.not = icmp eq i64 %.2104, %104
  br i1 %exitcond108.not, label %.loopexit, label %.lr.ph106, !llvm.loop !26

115:                                              ; preds = %._crit_edge102
  %116 = add nsw i64 %104, %102
  store i64 %116, ptr %7, align 8, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph106, %middle.block115, %105, %115, %37, %32, %33, %31, %.thread93
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #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 @dlaset_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @dpttrf_(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 @dbdsqr_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, 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}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.unroll.disable"}
!15 = !{!16}
!16 = distinct !{!16, !17}
!17 = distinct !{!17, !"LVerDomain"}
!18 = !{!19}
!19 = distinct !{!19, !17}
!20 = distinct !{!20, !12, !21, !22}
!21 = !{!"llvm.loop.isvectorized", i32 1}
!22 = !{!"llvm.loop.unroll.runtime.disable"}
!23 = distinct !{!23, !14}
!24 = distinct !{!24, !12, !21}
!25 = distinct !{!25, !12, !21, !22}
!26 = distinct !{!26, !12, !22, !21}


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