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

; 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 float, align 4
@c_b8 = external hidden global float, align 4
@.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 @spteqr_(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 float], align 4
  %21 = alloca i32, align 4
  %22 = alloca [1 x float], align 4
  %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 4, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 4, 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 float, 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 float, 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 float, 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 float, 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 %248

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 %248

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 float, ptr %117, i64 %120
  store float 1.000000e+00, ptr %121, align 4, !tbaa !11
  br label %122

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

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 float, ptr %129, i64 %131
  %133 = load ptr, ptr %14, align 8, !tbaa !5
  call void @slaset_(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 float, ptr %136, i64 1
  %138 = load ptr, ptr %12, align 8, !tbaa !5
  %139 = getelementptr inbounds float, ptr %138, i64 1
  %140 = load ptr, ptr %16, align 8, !tbaa !5
  call void @spttrf_(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 %248

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 = %165, %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 %168

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 float, ptr %153, i64 %155
  %157 = load float, ptr %156, align 4, !tbaa !11
  %158 = fpext float %157 to double
  %159 = call double @sqrt(double noundef %158) #4
  %160 = fptrunc double %159 to float
  %161 = load ptr, ptr %11, align 8, !tbaa !5
  %162 = load i32, ptr %21, align 4, !tbaa !9
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds float, ptr %161, i64 %163
  store float %160, ptr %164, align 4, !tbaa !11
  br label %165

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

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

172:                                              ; preds = %188, %168
  %173 = load i32, ptr %21, align 4, !tbaa !9
  %174 = load i32, ptr %19, align 4, !tbaa !9
  %175 = icmp sle i32 %173, %174
  br i1 %175, label %176, label %191

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

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

191:                                              ; preds = %172
  %192 = load i32, ptr %23, align 4, !tbaa !9
  %193 = icmp sgt i32 %192, 0
  br i1 %193, label %194, label %197

194:                                              ; preds = %191
  %195 = load ptr, ptr %10, align 8, !tbaa !5
  %196 = load i32, ptr %195, align 4, !tbaa !9
  store i32 %196, ptr %24, align 4, !tbaa !9
  br label %198

197:                                              ; preds = %191
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %198

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

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

220:                                              ; preds = %236, %217
  %221 = load i32, ptr %21, align 4, !tbaa !9
  %222 = load i32, ptr %19, align 4, !tbaa !9
  %223 = icmp sle i32 %221, %222
  br i1 %223, label %224, label %239

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

236:                                              ; preds = %224
  %237 = load i32, ptr %21, align 4, !tbaa !9
  %238 = add nsw i32 %237, 1
  store i32 %238, ptr %21, align 4, !tbaa !9
  br label %220, !llvm.loop !16

239:                                              ; preds = %220
  br label %247

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

247:                                              ; preds = %240, %239
  store i32 1, ptr %25, align 4
  br label %248

248:                                              ; preds = %247, %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 4, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, 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 @slaset_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

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

declare void @sbdsqr_(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 = !{!"float", !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 float, align 4
@c_b8 = external hidden global float, align 4
@.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 @spteqr_(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 float], align 4
  %11 = alloca [1 x float], align 4
  %12 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #3
  %13 = getelementptr inbounds i8, ptr %2, i64 -4
  %14 = getelementptr inbounds i8, ptr %3, i64 -4
  store i32 0, ptr %7, align 4, !tbaa !5
  %15 = tail call i32 @lsame_(ptr noundef %0, ptr noundef nonnull @.str) #3
  %.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) #3
  %.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) #3
  %.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) #3
  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 float 1.000000e+00, ptr %4, align 4, !tbaa !9
  br label %.loopexit

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

35:                                               ; preds = %34
  tail call void @slaset_(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) #3
  br label %36

36:                                               ; preds = %35, %34
  tail call void @spttrf_(ptr noundef nonnull %1, ptr noundef %2, ptr noundef %3, ptr noundef nonnull %7) #3
  %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 8
  %invariant.gep141 = getelementptr inbounds i8, ptr %13, i64 12
  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 float, ptr %13, i64 %indvars.iv
  %43 = load float, ptr %42, align 4, !tbaa !9
  %sqrtf = tail call float @sqrtf(float noundef %43) #4
  store float %sqrtf, ptr %42, align 4, !tbaa !9
  %44 = getelementptr float, ptr %2, i64 %indvars.iv
  %45 = load float, ptr %44, align 4, !tbaa !9
  %sqrtf.1 = tail call float @sqrtf(float noundef %45) #4
  store float %sqrtf.1, ptr %44, align 4, !tbaa !9
  %gep = getelementptr inbounds float, ptr %invariant.gep, i64 %indvars.iv
  %46 = load float, ptr %gep, align 4, !tbaa !9
  %sqrtf.2 = tail call float @sqrtf(float noundef %46) #4
  store float %sqrtf.2, ptr %gep, align 4, !tbaa !9
  %gep142 = getelementptr inbounds float, ptr %invariant.gep141, i64 %indvars.iv
  %47 = load float, ptr %gep142, align 4, !tbaa !9
  %sqrtf.3 = tail call float @sqrtf(float noundef %47) #4
  store float %sqrtf.3, ptr %gep142, align 4, !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 ]
  %48 = getelementptr inbounds float, ptr %13, i64 %indvars.iv.epil
  %49 = load float, ptr %48, align 4, !tbaa !9
  %sqrtf.epil = tail call float @sqrtf(float noundef %49) #4
  store float %sqrtf.epil, ptr %48, align 4, !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
  %50 = 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
  %51 = shl nuw nsw i64 %wide.trip.count109, 2
  %52 = add nsw i64 %51, -4
  %scevgep = getelementptr i8, ptr %3, i64 %52
  %scevgep118 = getelementptr i8, ptr %2, i64 %52
  %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 %50, -8
  %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 ]
  %53 = getelementptr float, ptr %2, i64 %index
  %54 = getelementptr inbounds i8, ptr %53, i64 16
  %wide.load = load <4 x float>, ptr %53, align 4, !tbaa !9, !alias.scope !15
  %wide.load119 = load <4 x float>, ptr %54, align 4, !tbaa !9, !alias.scope !15
  %55 = getelementptr float, ptr %3, i64 %index
  %56 = getelementptr inbounds i8, ptr %55, i64 16
  %wide.load120 = load <4 x float>, ptr %55, align 4, !tbaa !9, !alias.scope !18, !noalias !15
  %wide.load121 = load <4 x float>, ptr %56, align 4, !tbaa !9, !alias.scope !18, !noalias !15
  %57 = fmul <4 x float> %wide.load, %wide.load120
  %58 = fmul <4 x float> %wide.load119, %wide.load121
  store <4 x float> %57, ptr %55, align 4, !tbaa !9, !alias.scope !18, !noalias !15
  store <4 x float> %58, ptr %56, align 4, !tbaa !9, !alias.scope !18, !noalias !15
  %index.next = add nuw i64 %index, 8
  %59 = icmp eq i64 %index.next, %n.vec
  br i1 %59, label %middle.block, label %vector.body, !llvm.loop !20

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %50, %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 ]
  %60 = sub nsw i64 %wide.trip.count109, %indvars.iv106.ph
  %xtraiter139 = and i64 %60, 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 ]
  %61 = getelementptr inbounds float, ptr %13, i64 %indvars.iv106.prol
  %62 = load float, ptr %61, align 4, !tbaa !9
  %63 = getelementptr inbounds float, ptr %14, i64 %indvars.iv106.prol
  %64 = load float, ptr %63, align 4, !tbaa !9
  %65 = fmul float %62, %64
  store float %65, ptr %63, align 4, !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 ]
  %66 = sub nsw i64 %indvars.iv106.ph, %wide.trip.count109
  %67 = icmp ugt i64 %66, -4
  br i1 %67, 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 ]
  %68 = getelementptr inbounds float, ptr %13, i64 %indvars.iv106
  %69 = load float, ptr %68, align 4, !tbaa !9
  %70 = getelementptr inbounds float, ptr %14, i64 %indvars.iv106
  %71 = load float, ptr %70, align 4, !tbaa !9
  %72 = fmul float %69, %71
  store float %72, ptr %70, align 4, !tbaa !9
  %73 = getelementptr float, ptr %2, i64 %indvars.iv106
  %74 = load float, ptr %73, align 4, !tbaa !9
  %75 = getelementptr float, ptr %3, i64 %indvars.iv106
  %76 = load float, ptr %75, align 4, !tbaa !9
  %77 = fmul float %74, %76
  store float %77, ptr %75, align 4, !tbaa !9
  %indvars.iv.next107.1 = add nuw nsw i64 %indvars.iv106, 2
  %78 = getelementptr inbounds float, ptr %13, i64 %indvars.iv.next107.1
  %79 = load float, ptr %78, align 4, !tbaa !9
  %80 = getelementptr inbounds float, ptr %14, i64 %indvars.iv.next107.1
  %81 = load float, ptr %80, align 4, !tbaa !9
  %82 = fmul float %79, %81
  store float %82, ptr %80, align 4, !tbaa !9
  %indvars.iv.next107.2 = add nuw nsw i64 %indvars.iv106, 3
  %83 = getelementptr inbounds float, ptr %13, i64 %indvars.iv.next107.2
  %84 = load float, ptr %83, align 4, !tbaa !9
  %85 = getelementptr inbounds float, ptr %14, i64 %indvars.iv.next107.2
  %86 = load float, ptr %85, align 4, !tbaa !9
  %87 = fmul float %84, %86
  store float %87, ptr %85, align 4, !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
  %88 = phi i32 [ %.pre, %._crit_edge ], [ %39, %38 ], [ %.pre, %middle.block ], [ %.pre, %.lr.ph99 ], [ %.pre, %.lr.ph99.prol.loopexit ]
  %spec.select93 = select i1 %.not, i32 %88, i32 0
  store i32 %spec.select93, ptr %12, align 4, !tbaa !5
  call void @sbdsqr_(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) #3
  %89 = load i32, ptr %7, align 4, !tbaa !5
  %90 = icmp eq i32 %89, 0
  %91 = load i32, ptr %1, align 4, !tbaa !5
  br i1 %90, label %92, label %103

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

.lr.ph104.preheader:                              ; preds = %92
  %93 = add nuw i32 %91, 1
  %wide.trip.count114 = zext i32 %93 to i64
  %94 = zext nneg i32 %91 to i64
  %min.iters.check124 = icmp ult i32 %91, 8
  br i1 %min.iters.check124, label %.lr.ph104.preheader137, label %vector.ph125

vector.ph125:                                     ; preds = %.lr.ph104.preheader
  %n.vec127 = and i64 %94, 2147483640
  %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 ]
  %95 = getelementptr float, ptr %2, i64 %index131
  %96 = getelementptr inbounds i8, ptr %95, i64 16
  %wide.load133 = load <4 x float>, ptr %95, align 4, !tbaa !9
  %wide.load134 = load <4 x float>, ptr %96, align 4, !tbaa !9
  %97 = fmul <4 x float> %wide.load133, %wide.load133
  %98 = fmul <4 x float> %wide.load134, %wide.load134
  store <4 x float> %97, ptr %95, align 4, !tbaa !9
  store <4 x float> %98, ptr %96, align 4, !tbaa !9
  %index.next135 = add nuw i64 %index131, 8
  %99 = icmp eq i64 %index.next135, %n.vec127
  br i1 %99, label %middle.block122, label %vector.body130, !llvm.loop !25

middle.block122:                                  ; preds = %vector.body130
  %cmp.n136 = icmp eq i64 %n.vec127, %94
  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 ]
  %100 = getelementptr inbounds float, ptr %13, i64 %indvars.iv111
  %101 = load float, ptr %100, align 4, !tbaa !9
  %102 = fmul float %101, %101
  store float %102, ptr %100, align 4, !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

103:                                              ; preds = %._crit_edge100
  %104 = add nsw i32 %91, %89
  store i32 %104, ptr %7, align 4, !tbaa !5
  br label %.loopexit

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

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

declare void @sbdsqr_(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

declare float @sqrtf(float) local_unnamed_addr

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 = { nounwind }
attributes #4 = { 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" }

!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 = !{!"float", !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