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

; 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"

%struct.complex = type { float, float }

@.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_b1 = external hidden global %struct.complex, align 4
@c_b2 = external hidden global %struct.complex, align 4
@.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 @cpteqr_(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 %struct.complex], align 4
  %22 = alloca i64, align 8
  %23 = alloca [1 x %struct.complex], align 4
  %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 float, 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 float, 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 %struct.complex, 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 float, 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 %247

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

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

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

115:                                              ; preds = %112
  %116 = load i64, ptr %18, align 8, !tbaa !9
  %117 = add nsw i64 %116, 1
  store i64 %117, ptr %20, align 8, !tbaa !9
  %118 = load ptr, ptr %14, align 8, !tbaa !5
  %119 = load i64, ptr %20, align 8, !tbaa !9
  %120 = getelementptr inbounds %struct.complex, ptr %118, i64 %119
  %121 = getelementptr inbounds %struct.complex, ptr %120, i32 0, i32 0
  store float 1.000000e+00, ptr %121, align 4, !tbaa !11
  %122 = load ptr, ptr %14, align 8, !tbaa !5
  %123 = load i64, ptr %20, align 8, !tbaa !9
  %124 = getelementptr inbounds %struct.complex, ptr %122, i64 %123
  %125 = getelementptr inbounds %struct.complex, ptr %124, i32 0, i32 1
  store float 0.000000e+00, ptr %125, align 4, !tbaa !14
  br label %126

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

127:                                              ; preds = %108
  %128 = load i64, ptr %25, align 8, !tbaa !9
  %129 = icmp eq i64 %128, 2
  br i1 %129, label %130, label %138

130:                                              ; preds = %127
  %131 = load ptr, ptr %11, align 8, !tbaa !5
  %132 = load ptr, ptr %11, align 8, !tbaa !5
  %133 = load ptr, ptr %14, align 8, !tbaa !5
  %134 = load i64, ptr %19, align 8, !tbaa !9
  %135 = getelementptr inbounds %struct.complex, ptr %133, i64 %134
  %136 = load ptr, ptr %15, align 8, !tbaa !5
  %137 = call i32 @claset_(ptr noundef @.str.4, ptr noundef %131, ptr noundef %132, ptr noundef @c_b1, ptr noundef @c_b2, ptr noundef %135, ptr noundef %136)
  br label %138

138:                                              ; preds = %130, %127
  %139 = load ptr, ptr %11, align 8, !tbaa !5
  %140 = load ptr, ptr %12, align 8, !tbaa !5
  %141 = getelementptr inbounds float, ptr %140, i64 1
  %142 = load ptr, ptr %13, align 8, !tbaa !5
  %143 = getelementptr inbounds float, ptr %142, i64 1
  %144 = load ptr, ptr %17, align 8, !tbaa !5
  %145 = call i32 @spttrf_(ptr noundef %139, ptr noundef %141, ptr noundef %143, ptr noundef %144)
  %146 = load ptr, ptr %17, align 8, !tbaa !5
  %147 = load i64, ptr %146, align 8, !tbaa !9
  %148 = icmp ne i64 %147, 0
  br i1 %148, label %149, label %150

149:                                              ; preds = %138
  store i32 0, ptr %9, align 4
  store i32 1, ptr %26, align 4
  br label %247

150:                                              ; preds = %138
  %151 = load ptr, ptr %11, align 8, !tbaa !5
  %152 = load i64, ptr %151, align 8, !tbaa !9
  store i64 %152, ptr %20, align 8, !tbaa !9
  store i64 1, ptr %22, align 8, !tbaa !9
  br label %153

153:                                              ; preds = %168, %150
  %154 = load i64, ptr %22, align 8, !tbaa !9
  %155 = load i64, ptr %20, align 8, !tbaa !9
  %156 = icmp sle i64 %154, %155
  br i1 %156, label %157, label %171

157:                                              ; preds = %153
  %158 = load ptr, ptr %12, align 8, !tbaa !5
  %159 = load i64, ptr %22, align 8, !tbaa !9
  %160 = getelementptr inbounds float, ptr %158, i64 %159
  %161 = load float, ptr %160, align 4, !tbaa !15
  %162 = fpext float %161 to double
  %163 = call double @sqrt(double noundef %162) #4
  %164 = fptrunc double %163 to float
  %165 = load ptr, ptr %12, align 8, !tbaa !5
  %166 = load i64, ptr %22, align 8, !tbaa !9
  %167 = getelementptr inbounds float, ptr %165, i64 %166
  store float %164, ptr %167, align 4, !tbaa !15
  br label %168

168:                                              ; preds = %157
  %169 = load i64, ptr %22, align 8, !tbaa !9
  %170 = add nsw i64 %169, 1
  store i64 %170, ptr %22, align 8, !tbaa !9
  br label %153, !llvm.loop !16

171:                                              ; preds = %153
  %172 = load ptr, ptr %11, align 8, !tbaa !5
  %173 = load i64, ptr %172, align 8, !tbaa !9
  %174 = sub nsw i64 %173, 1
  store i64 %174, ptr %20, align 8, !tbaa !9
  store i64 1, ptr %22, align 8, !tbaa !9
  br label %175

175:                                              ; preds = %189, %171
  %176 = load i64, ptr %22, align 8, !tbaa !9
  %177 = load i64, ptr %20, align 8, !tbaa !9
  %178 = icmp sle i64 %176, %177
  br i1 %178, label %179, label %192

179:                                              ; preds = %175
  %180 = load ptr, ptr %12, align 8, !tbaa !5
  %181 = load i64, ptr %22, align 8, !tbaa !9
  %182 = getelementptr inbounds float, ptr %180, i64 %181
  %183 = load float, ptr %182, align 4, !tbaa !15
  %184 = load ptr, ptr %13, align 8, !tbaa !5
  %185 = load i64, ptr %22, align 8, !tbaa !9
  %186 = getelementptr inbounds float, ptr %184, i64 %185
  %187 = load float, ptr %186, align 4, !tbaa !15
  %188 = fmul float %187, %183
  store float %188, ptr %186, align 4, !tbaa !15
  br label %189

189:                                              ; preds = %179
  %190 = load i64, ptr %22, align 8, !tbaa !9
  %191 = add nsw i64 %190, 1
  store i64 %191, ptr %22, align 8, !tbaa !9
  br label %175, !llvm.loop !18

192:                                              ; preds = %175
  %193 = load i64, ptr %25, align 8, !tbaa !9
  %194 = icmp sgt i64 %193, 0
  br i1 %194, label %195, label %198

195:                                              ; preds = %192
  %196 = load ptr, ptr %11, align 8, !tbaa !5
  %197 = load i64, ptr %196, align 8, !tbaa !9
  store i64 %197, ptr %24, align 8, !tbaa !9
  br label %199

198:                                              ; preds = %192
  store i64 0, ptr %24, align 8, !tbaa !9
  br label %199

199:                                              ; preds = %198, %195
  %200 = load ptr, ptr %11, align 8, !tbaa !5
  %201 = load ptr, ptr %12, align 8, !tbaa !5
  %202 = getelementptr inbounds float, ptr %201, i64 1
  %203 = load ptr, ptr %13, align 8, !tbaa !5
  %204 = getelementptr inbounds float, ptr %203, i64 1
  %205 = getelementptr inbounds [1 x %struct.complex], ptr %23, i64 0, i64 0
  %206 = load ptr, ptr %14, align 8, !tbaa !5
  %207 = load i64, ptr %19, align 8, !tbaa !9
  %208 = getelementptr inbounds %struct.complex, ptr %206, i64 %207
  %209 = load ptr, ptr %15, align 8, !tbaa !5
  %210 = getelementptr inbounds [1 x %struct.complex], ptr %21, i64 0, i64 0
  %211 = load ptr, ptr %16, align 8, !tbaa !5
  %212 = getelementptr inbounds float, ptr %211, i64 1
  %213 = load ptr, ptr %17, align 8, !tbaa !5
  %214 = call i32 @cbdsqr_(ptr noundef @.str.5, ptr noundef %200, ptr noundef @c__0, ptr noundef %24, ptr noundef @c__0, ptr noundef %202, ptr noundef %204, ptr noundef %205, ptr noundef @c__1, ptr noundef %208, ptr noundef %209, ptr noundef %210, ptr noundef @c__1, ptr noundef %212, ptr noundef %213)
  %215 = load ptr, ptr %17, align 8, !tbaa !5
  %216 = load i64, ptr %215, align 8, !tbaa !9
  %217 = icmp eq i64 %216, 0
  br i1 %217, label %218, label %239

218:                                              ; preds = %199
  %219 = load ptr, ptr %11, align 8, !tbaa !5
  %220 = load i64, ptr %219, align 8, !tbaa !9
  store i64 %220, ptr %20, align 8, !tbaa !9
  store i64 1, ptr %22, align 8, !tbaa !9
  br label %221

221:                                              ; preds = %235, %218
  %222 = load i64, ptr %22, align 8, !tbaa !9
  %223 = load i64, ptr %20, align 8, !tbaa !9
  %224 = icmp sle i64 %222, %223
  br i1 %224, label %225, label %238

225:                                              ; preds = %221
  %226 = load ptr, ptr %12, align 8, !tbaa !5
  %227 = load i64, ptr %22, align 8, !tbaa !9
  %228 = getelementptr inbounds float, ptr %226, i64 %227
  %229 = load float, ptr %228, align 4, !tbaa !15
  %230 = load ptr, ptr %12, align 8, !tbaa !5
  %231 = load i64, ptr %22, align 8, !tbaa !9
  %232 = getelementptr inbounds float, ptr %230, i64 %231
  %233 = load float, ptr %232, align 4, !tbaa !15
  %234 = fmul float %233, %229
  store float %234, ptr %232, align 4, !tbaa !15
  br label %235

235:                                              ; preds = %225
  %236 = load i64, ptr %22, align 8, !tbaa !9
  %237 = add nsw i64 %236, 1
  store i64 %237, ptr %22, align 8, !tbaa !9
  br label %221, !llvm.loop !19

238:                                              ; preds = %221
  br label %246

239:                                              ; preds = %199
  %240 = load ptr, ptr %11, align 8, !tbaa !5
  %241 = load i64, ptr %240, align 8, !tbaa !9
  %242 = load ptr, ptr %17, align 8, !tbaa !5
  %243 = load i64, ptr %242, align 8, !tbaa !9
  %244 = add nsw i64 %241, %243
  %245 = load ptr, ptr %17, align 8, !tbaa !5
  store i64 %244, ptr %245, align 8, !tbaa !9
  br label %246

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

247:                                              ; preds = %246, %149, %126, %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
  %248 = load i32, ptr %9, align 4
  ret i32 %248
}

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

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

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

declare i32 @cbdsqr_(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, !13, i64 0}
!12 = !{!"", !13, i64 0, !13, i64 4}
!13 = !{!"float", !7, i64 0}
!14 = !{!12, !13, i64 4}
!15 = !{!13, !13, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}


; 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"

%struct.complex = type { float, float }

@.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_b1 = external hidden global %struct.complex, align 4
@c_b2 = external hidden global %struct.complex, align 4
@.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 @cpteqr_(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 %struct.complex], align 4
  %11 = alloca [1 x %struct.complex], align 4
  %12 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #3
  %13 = getelementptr inbounds i8, ptr %2, i64 -4
  %14 = getelementptr inbounds i8, ptr %3, i64 -4
  store i64 0, ptr %7, align 8, !tbaa !5
  %15 = tail call i64 @lsame_(ptr noundef %0, ptr noundef nonnull @.str) #3
  %.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) #3
  %.not82 = icmp eq i64 %17, 0
  br i1 %.not82, label %18, label %.thread

18:                                               ; preds = %16
  %19 = tail call i64 @lsame_(ptr noundef %0, ptr noundef nonnull @.str.2) #3
  %.not83 = icmp eq i64 %19, 0
  br i1 %.not83, label %.thread94.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 %.thread94.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.cond111 = or i1 %25, %or.cond
  br i1 %or.cond111, label %.thread94.sink.split, label %27

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

.thread94.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 %.thread94

.thread94:                                        ; preds = %.thread94.sink.split, %27
  %28 = phi i64 [ %.pr, %27 ], [ %.sink, %.thread94.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) #3
  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 <2 x float> <float 1.000000e+00, float 0.000000e+00>, ptr %4, align 4, !tbaa !9
  br label %.loopexit

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

35:                                               ; preds = %34
  %36 = tail call i32 @claset_(ptr noundef nonnull @.str.4, ptr noundef nonnull %1, ptr noundef nonnull %1, ptr noundef nonnull @c_b1, ptr noundef nonnull @c_b2, ptr noundef %4, ptr noundef nonnull %5) #3
  br label %37

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

40:                                               ; preds = %37
  %41 = load i64, ptr %1, align 8, !tbaa !5
  %.not8697 = icmp slt i64 %41, 1
  br i1 %.not8697, label %._crit_edge103, 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 8
  %invariant.gep136 = getelementptr i8, ptr %13, i64 12
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %.07598 = phi i64 [ 1, %.lr.ph.preheader.new ], [ %49, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %43 = getelementptr inbounds float, ptr %13, i64 %.07598
  %44 = load float, ptr %43, align 4, !tbaa !9
  %sqrtf = tail call float @sqrtf(float noundef %44) #4
  store float %sqrtf, ptr %43, align 4, !tbaa !9
  %45 = getelementptr float, ptr %2, i64 %.07598
  %46 = load float, ptr %45, align 4, !tbaa !9
  %sqrtf.1 = tail call float @sqrtf(float noundef %46) #4
  store float %sqrtf.1, ptr %45, align 4, !tbaa !9
  %gep = getelementptr float, ptr %invariant.gep, i64 %.07598
  %47 = load float, ptr %gep, align 4, !tbaa !9
  %sqrtf.2 = tail call float @sqrtf(float noundef %47) #4
  store float %sqrtf.2, ptr %gep, align 4, !tbaa !9
  %gep137 = getelementptr float, ptr %invariant.gep136, i64 %.07598
  %48 = load float, ptr %gep137, align 4, !tbaa !9
  %sqrtf.3 = tail call float @sqrtf(float noundef %48) #4
  store float %sqrtf.3, ptr %gep137, align 4, !tbaa !9
  %49 = add nuw i64 %.07598, 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
  %.07598.unr = phi i64 [ 1, %.lr.ph.preheader ], [ %49, %.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
  %.07598.epil = phi i64 [ %52, %.lr.ph.epil ], [ %.07598.unr, %._crit_edge.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.unr-lcssa ]
  %50 = getelementptr inbounds float, ptr %13, i64 %.07598.epil
  %51 = load float, ptr %50, align 4, !tbaa !9
  %sqrtf.epil = tail call float @sqrtf(float noundef %51) #4
  store float %sqrtf.epil, ptr %50, align 4, !tbaa !9
  %52 = add nuw i64 %.07598.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
  %.not87.not99 = icmp sgt i64 %.pre, 1
  br i1 %.not87.not99, label %.lr.ph102.preheader, label %._crit_edge103

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

vector.memcheck:                                  ; preds = %.lr.ph102.preheader
  %54 = shl i64 %.pre, 2
  %55 = add i64 %54, -4
  %scevgep = getelementptr i8, ptr %3, i64 %55
  %scevgep112 = getelementptr i8, ptr %2, i64 %55
  %bound0 = icmp ugt ptr %scevgep112, %3
  %bound1 = icmp ugt ptr %scevgep, %2
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %.lr.ph102.preheader132, label %vector.ph

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

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %53, %n.vec
  br i1 %cmp.n, label %._crit_edge103, label %.lr.ph102.preheader132

.lr.ph102.preheader132:                           ; preds = %middle.block, %vector.memcheck, %.lr.ph102.preheader
  %.1100.ph = phi i64 [ 1, %vector.memcheck ], [ 1, %.lr.ph102.preheader ], [ %ind.end, %middle.block ]
  %63 = sub i64 %.pre, %.1100.ph
  %xtraiter133 = and i64 %63, 3
  %lcmp.mod134.not = icmp eq i64 %xtraiter133, 0
  br i1 %lcmp.mod134.not, label %.lr.ph102.prol.loopexit, label %.lr.ph102.prol

.lr.ph102.prol:                                   ; preds = %.lr.ph102.preheader132, %.lr.ph102.prol
  %.1100.prol = phi i64 [ %69, %.lr.ph102.prol ], [ %.1100.ph, %.lr.ph102.preheader132 ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph102.prol ], [ 0, %.lr.ph102.preheader132 ]
  %64 = getelementptr inbounds float, ptr %13, i64 %.1100.prol
  %65 = load float, ptr %64, align 4, !tbaa !9
  %66 = getelementptr inbounds float, ptr %14, i64 %.1100.prol
  %67 = load float, ptr %66, align 4, !tbaa !9
  %68 = fmul float %65, %67
  store float %68, ptr %66, align 4, !tbaa !9
  %69 = add nuw nsw i64 %.1100.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter133
  br i1 %prol.iter.cmp.not, label %.lr.ph102.prol.loopexit, label %.lr.ph102.prol, !llvm.loop !23

.lr.ph102.prol.loopexit:                          ; preds = %.lr.ph102.prol, %.lr.ph102.preheader132
  %.1100.unr = phi i64 [ %.1100.ph, %.lr.ph102.preheader132 ], [ %69, %.lr.ph102.prol ]
  %70 = sub i64 %.1100.ph, %.pre
  %71 = icmp ugt i64 %70, -4
  br i1 %71, label %._crit_edge103, label %.lr.ph102

.lr.ph102:                                        ; preds = %.lr.ph102.prol.loopexit, %.lr.ph102
  %.1100 = phi i64 [ %94, %.lr.ph102 ], [ %.1100.unr, %.lr.ph102.prol.loopexit ]
  %72 = getelementptr inbounds float, ptr %13, i64 %.1100
  %73 = load float, ptr %72, align 4, !tbaa !9
  %74 = getelementptr inbounds float, ptr %14, i64 %.1100
  %75 = load float, ptr %74, align 4, !tbaa !9
  %76 = fmul float %73, %75
  store float %76, ptr %74, align 4, !tbaa !9
  %77 = getelementptr float, ptr %2, i64 %.1100
  %78 = load float, ptr %77, align 4, !tbaa !9
  %79 = getelementptr float, ptr %3, i64 %.1100
  %80 = load float, ptr %79, align 4, !tbaa !9
  %81 = fmul float %78, %80
  store float %81, ptr %79, align 4, !tbaa !9
  %82 = add nuw nsw i64 %.1100, 2
  %83 = getelementptr inbounds float, ptr %13, i64 %82
  %84 = load float, ptr %83, align 4, !tbaa !9
  %85 = getelementptr inbounds float, ptr %14, i64 %82
  %86 = load float, ptr %85, align 4, !tbaa !9
  %87 = fmul float %84, %86
  store float %87, ptr %85, align 4, !tbaa !9
  %88 = add nuw nsw i64 %.1100, 3
  %89 = getelementptr inbounds float, ptr %13, i64 %88
  %90 = load float, ptr %89, align 4, !tbaa !9
  %91 = getelementptr inbounds float, ptr %14, i64 %88
  %92 = load float, ptr %91, align 4, !tbaa !9
  %93 = fmul float %90, %92
  store float %93, ptr %91, align 4, !tbaa !9
  %94 = add nuw nsw i64 %.1100, 4
  %exitcond108.not.3 = icmp eq i64 %94, %.pre
  br i1 %exitcond108.not.3, label %._crit_edge103, label %.lr.ph102, !llvm.loop !24

._crit_edge103:                                   ; preds = %.lr.ph102.prol.loopexit, %.lr.ph102, %middle.block, %40, %._crit_edge
  %95 = phi i64 [ %.pre, %._crit_edge ], [ %41, %40 ], [ %.pre, %middle.block ], [ %.pre, %.lr.ph102 ], [ %.pre, %.lr.ph102.prol.loopexit ]
  %spec.select96 = select i1 %.not, i64 %95, i64 0
  store i64 %spec.select96, ptr %12, align 8, !tbaa !5
  %96 = call i32 @cbdsqr_(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
  %97 = load i64, ptr %7, align 8, !tbaa !5
  %98 = icmp eq i64 %97, 0
  %99 = load i64, ptr %1, align 8, !tbaa !5
  br i1 %98, label %100, label %110

100:                                              ; preds = %._crit_edge103
  %.not88104 = icmp slt i64 %99, 1
  br i1 %.not88104, label %.loopexit, label %.lr.ph107.preheader

.lr.ph107.preheader:                              ; preds = %100
  %min.iters.check118 = icmp ult i64 %99, 8
  br i1 %min.iters.check118, label %.lr.ph107.preheader131, label %vector.ph119

vector.ph119:                                     ; preds = %.lr.ph107.preheader
  %n.vec121 = and i64 %99, 9223372036854775800
  %ind.end122 = or disjoint i64 %n.vec121, 1
  br label %vector.body124

vector.body124:                                   ; preds = %vector.body124, %vector.ph119
  %index125 = phi i64 [ 0, %vector.ph119 ], [ %index.next129, %vector.body124 ]
  %101 = getelementptr float, ptr %2, i64 %index125
  %102 = getelementptr inbounds i8, ptr %101, i64 16
  %wide.load127 = load <4 x float>, ptr %101, align 4, !tbaa !9
  %wide.load128 = load <4 x float>, ptr %102, align 4, !tbaa !9
  %103 = fmul <4 x float> %wide.load127, %wide.load127
  %104 = fmul <4 x float> %wide.load128, %wide.load128
  store <4 x float> %103, ptr %101, align 4, !tbaa !9
  store <4 x float> %104, ptr %102, align 4, !tbaa !9
  %index.next129 = add nuw i64 %index125, 8
  %105 = icmp eq i64 %index.next129, %n.vec121
  br i1 %105, label %middle.block116, label %vector.body124, !llvm.loop !25

middle.block116:                                  ; preds = %vector.body124
  %cmp.n130 = icmp eq i64 %99, %n.vec121
  br i1 %cmp.n130, label %.loopexit, label %.lr.ph107.preheader131

.lr.ph107.preheader131:                           ; preds = %middle.block116, %.lr.ph107.preheader
  %.2105.ph = phi i64 [ 1, %.lr.ph107.preheader ], [ %ind.end122, %middle.block116 ]
  br label %.lr.ph107

.lr.ph107:                                        ; preds = %.lr.ph107.preheader131, %.lr.ph107
  %.2105 = phi i64 [ %109, %.lr.ph107 ], [ %.2105.ph, %.lr.ph107.preheader131 ]
  %106 = getelementptr inbounds float, ptr %13, i64 %.2105
  %107 = load float, ptr %106, align 4, !tbaa !9
  %108 = fmul float %107, %107
  store float %108, ptr %106, align 4, !tbaa !9
  %109 = add nuw i64 %.2105, 1
  %exitcond109.not = icmp eq i64 %.2105, %99
  br i1 %exitcond109.not, label %.loopexit, label %.lr.ph107, !llvm.loop !26

110:                                              ; preds = %._crit_edge103
  %111 = add nsw i64 %99, %97
  store i64 %111, ptr %7, align 8, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph107, %middle.block116, %100, %110, %37, %32, %33, %31, %.thread94
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #3
  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 @claset_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare i32 @cbdsqr_(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 = !{!"long", !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,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass