; LLVM IR from OpenMathLib/OpenBLAS :: lapack-netlib/SRC (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 i32, align 4
@c__1 = external hidden global i32, align 4

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

46:                                               ; preds = %8
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %60

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

51:                                               ; preds = %47
  store i32 1, ptr %23, align 4, !tbaa !9
  br label %59

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

56:                                               ; preds = %52
  store i32 2, ptr %23, align 4, !tbaa !9
  br label %58

57:                                               ; preds = %52
  store i32 -1, ptr %23, align 4, !tbaa !9
  br label %58

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

59:                                               ; preds = %58, %51
  br label %60

60:                                               ; preds = %59, %46
  %61 = load i32, ptr %23, align 4, !tbaa !9
  %62 = icmp slt i32 %61, 0
  br i1 %62, label %63, label %65

63:                                               ; preds = %60
  %64 = load ptr, ptr %16, align 8, !tbaa !5
  store i32 -1, ptr %64, align 4, !tbaa !9
  br label %95

65:                                               ; preds = %60
  %66 = load ptr, ptr %10, align 8, !tbaa !5
  %67 = load i32, ptr %66, align 4, !tbaa !9
  %68 = icmp slt i32 %67, 0
  br i1 %68, label %69, label %71

69:                                               ; preds = %65
  %70 = load ptr, ptr %16, align 8, !tbaa !5
  store i32 -2, ptr %70, align 4, !tbaa !9
  br label %94

71:                                               ; preds = %65
  %72 = load ptr, ptr %14, align 8, !tbaa !5
  %73 = load i32, ptr %72, align 4, !tbaa !9
  %74 = icmp slt i32 %73, 1
  br i1 %74, label %91, label %75

75:                                               ; preds = %71
  %76 = load i32, ptr %23, align 4, !tbaa !9
  %77 = icmp sgt i32 %76, 0
  br i1 %77, label %78, label %93

78:                                               ; preds = %75
  %79 = load ptr, ptr %14, align 8, !tbaa !5
  %80 = load i32, ptr %79, align 4, !tbaa !9
  %81 = load ptr, ptr %10, align 8, !tbaa !5
  %82 = load i32, ptr %81, align 4, !tbaa !9
  %83 = icmp sge i32 1, %82
  br i1 %83, label %84, label %85

84:                                               ; preds = %78
  br label %88

85:                                               ; preds = %78
  %86 = load ptr, ptr %10, align 8, !tbaa !5
  %87 = load i32, ptr %86, align 4, !tbaa !9
  br label %88

88:                                               ; preds = %85, %84
  %89 = phi i32 [ 1, %84 ], [ %87, %85 ]
  %90 = icmp slt i32 %80, %89
  br i1 %90, label %91, label %93

91:                                               ; preds = %88, %71
  %92 = load ptr, ptr %16, align 8, !tbaa !5
  store i32 -6, ptr %92, align 4, !tbaa !9
  br label %93

93:                                               ; preds = %91, %88, %75
  br label %94

94:                                               ; preds = %93, %69
  br label %95

95:                                               ; preds = %94, %63
  %96 = load ptr, ptr %16, align 8, !tbaa !5
  %97 = load i32, ptr %96, align 4, !tbaa !9
  %98 = icmp ne i32 %97, 0
  br i1 %98, label %99, label %104

99:                                               ; preds = %95
  %100 = load ptr, ptr %16, align 8, !tbaa !5
  %101 = load i32, ptr %100, align 4, !tbaa !9
  %102 = sub nsw i32 0, %101
  store i32 %102, ptr %19, align 4, !tbaa !9
  %103 = call i32 @xerbla_(ptr noundef @.str.3, ptr noundef %19, i32 noundef 6)
  store i32 1, ptr %25, align 4
  br label %246

104:                                              ; preds = %95
  %105 = load ptr, ptr %10, align 8, !tbaa !5
  %106 = load i32, ptr %105, align 4, !tbaa !9
  %107 = icmp eq i32 %106, 0
  br i1 %107, label %108, label %109

108:                                              ; preds = %104
  store i32 1, ptr %25, align 4
  br label %246

109:                                              ; preds = %104
  %110 = load ptr, ptr %10, align 8, !tbaa !5
  %111 = load i32, ptr %110, align 4, !tbaa !9
  %112 = icmp eq i32 %111, 1
  br i1 %112, label %113, label %123

113:                                              ; preds = %109
  %114 = load i32, ptr %23, align 4, !tbaa !9
  %115 = icmp sgt i32 %114, 0
  br i1 %115, label %116, label %122

116:                                              ; preds = %113
  %117 = load ptr, ptr %13, align 8, !tbaa !5
  %118 = load i32, ptr %17, align 4, !tbaa !9
  %119 = add nsw i32 %118, 1
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds double, ptr %117, i64 %120
  store double 1.000000e+00, ptr %121, align 8, !tbaa !11
  br label %122

122:                                              ; preds = %116, %113
  store i32 1, ptr %25, align 4
  br label %246

123:                                              ; preds = %109
  %124 = load i32, ptr %23, align 4, !tbaa !9
  %125 = icmp eq i32 %124, 2
  br i1 %125, label %126, label %134

126:                                              ; preds = %123
  %127 = load ptr, ptr %10, align 8, !tbaa !5
  %128 = load ptr, ptr %10, align 8, !tbaa !5
  %129 = load ptr, ptr %13, align 8, !tbaa !5
  %130 = load i32, ptr %18, align 4, !tbaa !9
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds double, ptr %129, i64 %131
  %133 = load ptr, ptr %14, align 8, !tbaa !5
  call void @dlaset_(ptr noundef @.str.4, ptr noundef %127, ptr noundef %128, ptr noundef @c_b7, ptr noundef @c_b8, ptr noundef %132, ptr noundef %133)
  br label %134

134:                                              ; preds = %126, %123
  %135 = load ptr, ptr %10, align 8, !tbaa !5
  %136 = load ptr, ptr %11, align 8, !tbaa !5
  %137 = getelementptr inbounds double, ptr %136, i64 1
  %138 = load ptr, ptr %12, align 8, !tbaa !5
  %139 = getelementptr inbounds double, ptr %138, i64 1
  %140 = load ptr, ptr %16, align 8, !tbaa !5
  call void @dpttrf_(ptr noundef %135, ptr noundef %137, ptr noundef %139, ptr noundef %140)
  %141 = load ptr, ptr %16, align 8, !tbaa !5
  %142 = load i32, ptr %141, align 4, !tbaa !9
  %143 = icmp ne i32 %142, 0
  br i1 %143, label %144, label %145

144:                                              ; preds = %134
  store i32 1, ptr %25, align 4
  br label %246

145:                                              ; preds = %134
  %146 = load ptr, ptr %10, align 8, !tbaa !5
  %147 = load i32, ptr %146, align 4, !tbaa !9
  store i32 %147, ptr %19, align 4, !tbaa !9
  store i32 1, ptr %21, align 4, !tbaa !9
  br label %148

148:                                              ; preds = %163, %145
  %149 = load i32, ptr %21, align 4, !tbaa !9
  %150 = load i32, ptr %19, align 4, !tbaa !9
  %151 = icmp sle i32 %149, %150
  br i1 %151, label %152, label %166

152:                                              ; preds = %148
  %153 = load ptr, ptr %11, align 8, !tbaa !5
  %154 = load i32, ptr %21, align 4, !tbaa !9
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds double, ptr %153, i64 %155
  %157 = load double, ptr %156, align 8, !tbaa !11
  %158 = call double @sqrt(double noundef %157) #4
  %159 = load ptr, ptr %11, align 8, !tbaa !5
  %160 = load i32, ptr %21, align 4, !tbaa !9
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds double, ptr %159, i64 %161
  store double %158, ptr %162, align 8, !tbaa !11
  br label %163

163:                                              ; preds = %152
  %164 = load i32, ptr %21, align 4, !tbaa !9
  %165 = add nsw i32 %164, 1
  store i32 %165, ptr %21, align 4, !tbaa !9
  br label %148, !llvm.loop !13

166:                                              ; preds = %148
  %167 = load ptr, ptr %10, align 8, !tbaa !5
  %168 = load i32, ptr %167, align 4, !tbaa !9
  %169 = sub nsw i32 %168, 1
  store i32 %169, ptr %19, align 4, !tbaa !9
  store i32 1, ptr %21, align 4, !tbaa !9
  br label %170

170:                                              ; preds = %186, %166
  %171 = load i32, ptr %21, align 4, !tbaa !9
  %172 = load i32, ptr %19, align 4, !tbaa !9
  %173 = icmp sle i32 %171, %172
  br i1 %173, label %174, label %189

174:                                              ; preds = %170
  %175 = load ptr, ptr %11, align 8, !tbaa !5
  %176 = load i32, ptr %21, align 4, !tbaa !9
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds double, ptr %175, i64 %177
  %179 = load double, ptr %178, align 8, !tbaa !11
  %180 = load ptr, ptr %12, align 8, !tbaa !5
  %181 = load i32, ptr %21, align 4, !tbaa !9
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds double, ptr %180, i64 %182
  %184 = load double, ptr %183, align 8, !tbaa !11
  %185 = fmul double %184, %179
  store double %185, ptr %183, align 8, !tbaa !11
  br label %186

186:                                              ; preds = %174
  %187 = load i32, ptr %21, align 4, !tbaa !9
  %188 = add nsw i32 %187, 1
  store i32 %188, ptr %21, align 4, !tbaa !9
  br label %170, !llvm.loop !15

189:                                              ; preds = %170
  %190 = load i32, ptr %23, align 4, !tbaa !9
  %191 = icmp sgt i32 %190, 0
  br i1 %191, label %192, label %195

192:                                              ; preds = %189
  %193 = load ptr, ptr %10, align 8, !tbaa !5
  %194 = load i32, ptr %193, align 4, !tbaa !9
  store i32 %194, ptr %24, align 4, !tbaa !9
  br label %196

195:                                              ; preds = %189
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %196

196:                                              ; preds = %195, %192
  %197 = load ptr, ptr %10, align 8, !tbaa !5
  %198 = load ptr, ptr %11, align 8, !tbaa !5
  %199 = getelementptr inbounds double, ptr %198, i64 1
  %200 = load ptr, ptr %12, align 8, !tbaa !5
  %201 = getelementptr inbounds double, ptr %200, i64 1
  %202 = getelementptr inbounds [1 x double], ptr %22, i64 0, i64 0
  %203 = load ptr, ptr %13, align 8, !tbaa !5
  %204 = load i32, ptr %18, align 4, !tbaa !9
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds double, ptr %203, i64 %205
  %207 = load ptr, ptr %14, align 8, !tbaa !5
  %208 = getelementptr inbounds [1 x double], ptr %20, i64 0, i64 0
  %209 = load ptr, ptr %15, align 8, !tbaa !5
  %210 = getelementptr inbounds double, ptr %209, i64 1
  %211 = load ptr, ptr %16, align 8, !tbaa !5
  call void @dbdsqr_(ptr noundef @.str.5, ptr noundef %197, ptr noundef @c__0, ptr noundef %24, ptr noundef @c__0, ptr noundef %199, ptr noundef %201, ptr noundef %202, ptr noundef @c__1, ptr noundef %206, ptr noundef %207, ptr noundef %208, ptr noundef @c__1, ptr noundef %210, ptr noundef %211)
  %212 = load ptr, ptr %16, align 8, !tbaa !5
  %213 = load i32, ptr %212, align 4, !tbaa !9
  %214 = icmp eq i32 %213, 0
  br i1 %214, label %215, label %238

215:                                              ; preds = %196
  %216 = load ptr, ptr %10, align 8, !tbaa !5
  %217 = load i32, ptr %216, align 4, !tbaa !9
  store i32 %217, ptr %19, align 4, !tbaa !9
  store i32 1, ptr %21, align 4, !tbaa !9
  br label %218

218:                                              ; preds = %234, %215
  %219 = load i32, ptr %21, align 4, !tbaa !9
  %220 = load i32, ptr %19, align 4, !tbaa !9
  %221 = icmp sle i32 %219, %220
  br i1 %221, label %222, label %237

222:                                              ; preds = %218
  %223 = load ptr, ptr %11, align 8, !tbaa !5
  %224 = load i32, ptr %21, align 4, !tbaa !9
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds double, ptr %223, i64 %225
  %227 = load double, ptr %226, align 8, !tbaa !11
  %228 = load ptr, ptr %11, align 8, !tbaa !5
  %229 = load i32, ptr %21, align 4, !tbaa !9
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds double, ptr %228, i64 %230
  %232 = load double, ptr %231, align 8, !tbaa !11
  %233 = fmul double %232, %227
  store double %233, ptr %231, align 8, !tbaa !11
  br label %234

234:                                              ; preds = %222
  %235 = load i32, ptr %21, align 4, !tbaa !9
  %236 = add nsw i32 %235, 1
  store i32 %236, ptr %21, align 4, !tbaa !9
  br label %218, !llvm.loop !16

237:                                              ; preds = %218
  br label %245

238:                                              ; preds = %196
  %239 = load ptr, ptr %10, align 8, !tbaa !5
  %240 = load i32, ptr %239, align 4, !tbaa !9
  %241 = load ptr, ptr %16, align 8, !tbaa !5
  %242 = load i32, ptr %241, align 4, !tbaa !9
  %243 = add nsw i32 %240, %242
  %244 = load ptr, ptr %16, align 8, !tbaa !5
  store i32 %243, ptr %244, align 4, !tbaa !9
  br label %245

245:                                              ; preds = %238, %237
  store i32 1, ptr %25, align 4
  br label %246

246:                                              ; preds = %245, %144, %122, %108, %99
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #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 @dlaset_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

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

declare void @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 = !{!"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}
!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 i32, align 4
@c__1 = external hidden global i32, align 4

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

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

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

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

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

27:                                               ; preds = %23
  %.pr = load i32, ptr %7, align 4, !tbaa !5
  %.not81 = icmp eq i32 %.pr, 0
  br i1 %.not81, label %31, label %.thread91

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

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

31:                                               ; preds = %27
  switch i32 %21, label %34 [
    i32 0, label %.loopexit
    i32 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 %36

35:                                               ; preds = %34
  tail call void @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 %36

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

38:                                               ; preds = %36
  %39 = load i32, ptr %1, align 4, !tbaa !5
  %.not8394 = icmp slt i32 %39, 1
  br i1 %.not8394, label %._crit_edge100, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %38
  %40 = zext nneg i32 %39 to i64
  %xtraiter = and i64 %40, 3
  %41 = icmp ult i32 %39, 4
  br i1 %41, label %._crit_edge.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %40, 2147483644
  %invariant.gep = getelementptr inbounds i8, ptr %13, i64 16
  %invariant.gep141 = getelementptr inbounds i8, ptr %13, i64 24
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader.new ], [ %indvars.iv.next.3, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %42 = getelementptr inbounds double, ptr %13, i64 %indvars.iv
  %43 = load double, ptr %42, align 8, !tbaa !9
  %44 = tail call double @sqrt(double noundef %43) #4
  store double %44, ptr %42, align 8, !tbaa !9
  %45 = getelementptr double, ptr %2, i64 %indvars.iv
  %46 = load double, ptr %45, align 8, !tbaa !9
  %47 = tail call double @sqrt(double noundef %46) #4
  store double %47, ptr %45, align 8, !tbaa !9
  %gep = getelementptr inbounds double, ptr %invariant.gep, i64 %indvars.iv
  %48 = load double, ptr %gep, align 8, !tbaa !9
  %49 = tail call double @sqrt(double noundef %48) #4
  store double %49, ptr %gep, align 8, !tbaa !9
  %gep142 = getelementptr inbounds double, ptr %invariant.gep141, i64 %indvars.iv
  %50 = load double, ptr %gep142, align 8, !tbaa !9
  %51 = tail call double @sqrt(double noundef %50) #4
  store double %51, ptr %gep142, align 8, !tbaa !9
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 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
  %indvars.iv.unr = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next.3, %.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
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph.epil ], [ %indvars.iv.unr, %._crit_edge.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.unr-lcssa ]
  %52 = getelementptr inbounds double, ptr %13, i64 %indvars.iv.epil
  %53 = load double, ptr %52, align 8, !tbaa !9
  %54 = tail call double @sqrt(double noundef %53) #4
  store double %54, ptr %52, align 8, !tbaa !9
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.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 i32, ptr %1, align 4, !tbaa !5
  %.not84.not96 = icmp sgt i32 %.pre, 1
  br i1 %.not84.not96, label %.lr.ph99.preheader, label %._crit_edge100

.lr.ph99.preheader:                               ; preds = %._crit_edge
  %wide.trip.count109 = zext nneg i32 %.pre to i64
  %55 = add nsw i64 %wide.trip.count109, -1
  %min.iters.check = icmp ult i32 %.pre, 9
  br i1 %min.iters.check, label %.lr.ph99.preheader138, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph99.preheader
  %56 = shl nuw nsw i64 %wide.trip.count109, 3
  %57 = add nsw i64 %56, -8
  %scevgep = getelementptr i8, ptr %3, i64 %57
  %scevgep118 = getelementptr i8, ptr %2, i64 %57
  %bound0 = icmp ugt ptr %scevgep118, %3
  %bound1 = icmp ugt ptr %scevgep, %2
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %.lr.ph99.preheader138, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %55, -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 ]
  %58 = getelementptr double, ptr %2, i64 %index
  %59 = getelementptr inbounds i8, ptr %58, i64 16
  %wide.load = load <2 x double>, ptr %58, align 8, !tbaa !9, !alias.scope !15
  %wide.load119 = load <2 x double>, ptr %59, align 8, !tbaa !9, !alias.scope !15
  %60 = getelementptr double, ptr %3, i64 %index
  %61 = getelementptr inbounds i8, ptr %60, i64 16
  %wide.load120 = load <2 x double>, ptr %60, align 8, !tbaa !9, !alias.scope !18, !noalias !15
  %wide.load121 = load <2 x double>, ptr %61, align 8, !tbaa !9, !alias.scope !18, !noalias !15
  %62 = fmul <2 x double> %wide.load, %wide.load120
  %63 = fmul <2 x double> %wide.load119, %wide.load121
  store <2 x double> %62, ptr %60, align 8, !tbaa !9, !alias.scope !18, !noalias !15
  store <2 x double> %63, ptr %61, align 8, !tbaa !9, !alias.scope !18, !noalias !15
  %index.next = add nuw i64 %index, 4
  %64 = icmp eq i64 %index.next, %n.vec
  br i1 %64, label %middle.block, label %vector.body, !llvm.loop !20

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %55, %n.vec
  br i1 %cmp.n, label %._crit_edge100, label %.lr.ph99.preheader138

.lr.ph99.preheader138:                            ; preds = %middle.block, %vector.memcheck, %.lr.ph99.preheader
  %indvars.iv106.ph = phi i64 [ 1, %vector.memcheck ], [ 1, %.lr.ph99.preheader ], [ %ind.end, %middle.block ]
  %65 = sub nsw i64 %wide.trip.count109, %indvars.iv106.ph
  %xtraiter139 = and i64 %65, 3
  %lcmp.mod140.not = icmp eq i64 %xtraiter139, 0
  br i1 %lcmp.mod140.not, label %.lr.ph99.prol.loopexit, label %.lr.ph99.prol

.lr.ph99.prol:                                    ; preds = %.lr.ph99.preheader138, %.lr.ph99.prol
  %indvars.iv106.prol = phi i64 [ %indvars.iv.next107.prol, %.lr.ph99.prol ], [ %indvars.iv106.ph, %.lr.ph99.preheader138 ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph99.prol ], [ 0, %.lr.ph99.preheader138 ]
  %66 = getelementptr inbounds double, ptr %13, i64 %indvars.iv106.prol
  %67 = load double, ptr %66, align 8, !tbaa !9
  %68 = getelementptr inbounds double, ptr %14, i64 %indvars.iv106.prol
  %69 = load double, ptr %68, align 8, !tbaa !9
  %70 = fmul double %67, %69
  store double %70, ptr %68, align 8, !tbaa !9
  %indvars.iv.next107.prol = add nuw nsw i64 %indvars.iv106.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter139
  br i1 %prol.iter.cmp.not, label %.lr.ph99.prol.loopexit, label %.lr.ph99.prol, !llvm.loop !23

.lr.ph99.prol.loopexit:                           ; preds = %.lr.ph99.prol, %.lr.ph99.preheader138
  %indvars.iv106.unr = phi i64 [ %indvars.iv106.ph, %.lr.ph99.preheader138 ], [ %indvars.iv.next107.prol, %.lr.ph99.prol ]
  %71 = sub nsw i64 %indvars.iv106.ph, %wide.trip.count109
  %72 = icmp ugt i64 %71, -4
  br i1 %72, label %._crit_edge100, label %.lr.ph99

.lr.ph99:                                         ; preds = %.lr.ph99.prol.loopexit, %.lr.ph99
  %indvars.iv106 = phi i64 [ %indvars.iv.next107.3, %.lr.ph99 ], [ %indvars.iv106.unr, %.lr.ph99.prol.loopexit ]
  %73 = getelementptr inbounds double, ptr %13, i64 %indvars.iv106
  %74 = load double, ptr %73, align 8, !tbaa !9
  %75 = getelementptr inbounds double, ptr %14, i64 %indvars.iv106
  %76 = load double, ptr %75, align 8, !tbaa !9
  %77 = fmul double %74, %76
  store double %77, ptr %75, align 8, !tbaa !9
  %78 = getelementptr double, ptr %2, i64 %indvars.iv106
  %79 = load double, ptr %78, align 8, !tbaa !9
  %80 = getelementptr double, ptr %3, i64 %indvars.iv106
  %81 = load double, ptr %80, align 8, !tbaa !9
  %82 = fmul double %79, %81
  store double %82, ptr %80, align 8, !tbaa !9
  %indvars.iv.next107.1 = add nuw nsw i64 %indvars.iv106, 2
  %83 = getelementptr inbounds double, ptr %13, i64 %indvars.iv.next107.1
  %84 = load double, ptr %83, align 8, !tbaa !9
  %85 = getelementptr inbounds double, ptr %14, i64 %indvars.iv.next107.1
  %86 = load double, ptr %85, align 8, !tbaa !9
  %87 = fmul double %84, %86
  store double %87, ptr %85, align 8, !tbaa !9
  %indvars.iv.next107.2 = add nuw nsw i64 %indvars.iv106, 3
  %88 = getelementptr inbounds double, ptr %13, i64 %indvars.iv.next107.2
  %89 = load double, ptr %88, align 8, !tbaa !9
  %90 = getelementptr inbounds double, ptr %14, i64 %indvars.iv.next107.2
  %91 = load double, ptr %90, align 8, !tbaa !9
  %92 = fmul double %89, %91
  store double %92, ptr %90, align 8, !tbaa !9
  %indvars.iv.next107.3 = add nuw nsw i64 %indvars.iv106, 4
  %exitcond110.not.3 = icmp eq i64 %indvars.iv.next107.3, %wide.trip.count109
  br i1 %exitcond110.not.3, label %._crit_edge100, label %.lr.ph99, !llvm.loop !24

._crit_edge100:                                   ; preds = %.lr.ph99.prol.loopexit, %.lr.ph99, %middle.block, %38, %._crit_edge
  %93 = phi i32 [ %.pre, %._crit_edge ], [ %39, %38 ], [ %.pre, %middle.block ], [ %.pre, %.lr.ph99 ], [ %.pre, %.lr.ph99.prol.loopexit ]
  %spec.select93 = select i1 %.not, i32 %93, i32 0
  store i32 %spec.select93, ptr %12, align 4, !tbaa !5
  call void @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
  %94 = load i32, ptr %7, align 4, !tbaa !5
  %95 = icmp eq i32 %94, 0
  %96 = load i32, ptr %1, align 4, !tbaa !5
  br i1 %95, label %97, label %108

97:                                               ; preds = %._crit_edge100
  %.not85101 = icmp slt i32 %96, 1
  br i1 %.not85101, label %.loopexit, label %.lr.ph104.preheader

.lr.ph104.preheader:                              ; preds = %97
  %98 = add nuw i32 %96, 1
  %wide.trip.count114 = zext i32 %98 to i64
  %99 = zext nneg i32 %96 to i64
  %min.iters.check124 = icmp ult i32 %96, 4
  br i1 %min.iters.check124, label %.lr.ph104.preheader137, label %vector.ph125

vector.ph125:                                     ; preds = %.lr.ph104.preheader
  %n.vec127 = and i64 %99, 2147483644
  %ind.end128 = or disjoint i64 %n.vec127, 1
  br label %vector.body130

vector.body130:                                   ; preds = %vector.body130, %vector.ph125
  %index131 = phi i64 [ 0, %vector.ph125 ], [ %index.next135, %vector.body130 ]
  %100 = getelementptr double, ptr %2, i64 %index131
  %101 = getelementptr inbounds i8, ptr %100, i64 16
  %wide.load133 = load <2 x double>, ptr %100, align 8, !tbaa !9
  %wide.load134 = load <2 x double>, ptr %101, align 8, !tbaa !9
  %102 = fmul <2 x double> %wide.load133, %wide.load133
  %103 = fmul <2 x double> %wide.load134, %wide.load134
  store <2 x double> %102, ptr %100, align 8, !tbaa !9
  store <2 x double> %103, ptr %101, align 8, !tbaa !9
  %index.next135 = add nuw i64 %index131, 4
  %104 = icmp eq i64 %index.next135, %n.vec127
  br i1 %104, label %middle.block122, label %vector.body130, !llvm.loop !25

middle.block122:                                  ; preds = %vector.body130
  %cmp.n136 = icmp eq i64 %n.vec127, %99
  br i1 %cmp.n136, label %.loopexit, label %.lr.ph104.preheader137

.lr.ph104.preheader137:                           ; preds = %middle.block122, %.lr.ph104.preheader
  %indvars.iv111.ph = phi i64 [ 1, %.lr.ph104.preheader ], [ %ind.end128, %middle.block122 ]
  br label %.lr.ph104

.lr.ph104:                                        ; preds = %.lr.ph104.preheader137, %.lr.ph104
  %indvars.iv111 = phi i64 [ %indvars.iv.next112, %.lr.ph104 ], [ %indvars.iv111.ph, %.lr.ph104.preheader137 ]
  %105 = getelementptr inbounds double, ptr %13, i64 %indvars.iv111
  %106 = load double, ptr %105, align 8, !tbaa !9
  %107 = fmul double %106, %106
  store double %107, ptr %105, align 8, !tbaa !9
  %indvars.iv.next112 = add nuw nsw i64 %indvars.iv111, 1
  %exitcond115.not = icmp eq i64 %indvars.iv.next112, %wide.trip.count114
  br i1 %exitcond115.not, label %.loopexit, label %.lr.ph104, !llvm.loop !26

108:                                              ; preds = %._crit_edge100
  %109 = add nsw i32 %96, %94
  store i32 %109, ptr %7, align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph104, %middle.block122, %97, %108, %36, %32, %33, %31, %.thread91
  call void @llvm.lifetime.end.p0(i64 4, 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 4, ptr nonnull %9) #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 @dlaset_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @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 void @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 = !{!"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}
!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,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass