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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@c__1 = external hidden global i64, align 8
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

57:                                               ; preds = %53
  %58 = load ptr, ptr %17, align 8, !tbaa !5
  store i64 -1, ptr %58, align 8, !tbaa !9
  br label %82

59:                                               ; preds = %53, %8
  %60 = load ptr, ptr %11, align 8, !tbaa !5
  %61 = load i64, ptr %60, align 8, !tbaa !9
  %62 = icmp slt i64 %61, 0
  br i1 %62, label %63, label %65

63:                                               ; preds = %59
  %64 = load ptr, ptr %17, align 8, !tbaa !5
  store i64 -2, ptr %64, align 8, !tbaa !9
  br label %81

65:                                               ; preds = %59
  %66 = load ptr, ptr %15, align 8, !tbaa !5
  %67 = load i64, ptr %66, align 8, !tbaa !9
  %68 = icmp slt i64 %67, 1
  br i1 %68, label %78, label %69

69:                                               ; preds = %65
  %70 = load i64, ptr %28, align 8, !tbaa !9
  %71 = icmp ne i64 %70, 0
  br i1 %71, label %72, label %80

72:                                               ; preds = %69
  %73 = load ptr, ptr %15, align 8, !tbaa !5
  %74 = load i64, ptr %73, align 8, !tbaa !9
  %75 = load ptr, ptr %11, align 8, !tbaa !5
  %76 = load i64, ptr %75, align 8, !tbaa !9
  %77 = icmp slt i64 %74, %76
  br i1 %77, label %78, label %80

78:                                               ; preds = %72, %65
  %79 = load ptr, ptr %17, align 8, !tbaa !5
  store i64 -6, ptr %79, align 8, !tbaa !9
  br label %80

80:                                               ; preds = %78, %72, %69
  br label %81

81:                                               ; preds = %80, %63
  br label %82

82:                                               ; preds = %81, %57
  %83 = load ptr, ptr %17, align 8, !tbaa !5
  %84 = load i64, ptr %83, align 8, !tbaa !9
  %85 = icmp ne i64 %84, 0
  br i1 %85, label %86, label %91

86:                                               ; preds = %82
  %87 = load ptr, ptr %17, align 8, !tbaa !5
  %88 = load i64, ptr %87, align 8, !tbaa !9
  %89 = sub nsw i64 0, %88
  store i64 %89, ptr %20, align 8, !tbaa !9
  %90 = call i32 @xerbla_(ptr noundef @.str.2, ptr noundef %20)
  store i32 0, ptr %9, align 4
  store i32 1, ptr %33, align 4
  br label %206

91:                                               ; preds = %82
  %92 = load ptr, ptr %11, align 8, !tbaa !5
  %93 = load i64, ptr %92, align 8, !tbaa !9
  %94 = icmp eq i64 %93, 0
  br i1 %94, label %95, label %96

95:                                               ; preds = %91
  store i32 0, ptr %9, align 4
  store i32 1, ptr %33, align 4
  br label %206

96:                                               ; preds = %91
  %97 = load ptr, ptr %11, align 8, !tbaa !5
  %98 = load i64, ptr %97, align 8, !tbaa !9
  %99 = icmp eq i64 %98, 1
  br i1 %99, label %100, label %109

100:                                              ; preds = %96
  %101 = load i64, ptr %28, align 8, !tbaa !9
  %102 = icmp ne i64 %101, 0
  br i1 %102, label %103, label %108

103:                                              ; preds = %100
  %104 = load ptr, ptr %14, align 8, !tbaa !5
  %105 = load i64, ptr %18, align 8, !tbaa !9
  %106 = add nsw i64 %105, 1
  %107 = getelementptr inbounds double, ptr %104, i64 %106
  store double 1.000000e+00, ptr %107, align 8, !tbaa !11
  br label %108

108:                                              ; preds = %103, %100
  store i32 0, ptr %9, align 4
  store i32 1, ptr %33, align 4
  br label %206

109:                                              ; preds = %96
  %110 = call double @dlamch_(ptr noundef @.str.3)
  store double %110, ptr %30, align 8, !tbaa !11
  %111 = call double @dlamch_(ptr noundef @.str.4)
  store double %111, ptr %22, align 8, !tbaa !11
  %112 = load double, ptr %30, align 8, !tbaa !11
  %113 = load double, ptr %22, align 8, !tbaa !11
  %114 = fdiv double %112, %113
  store double %114, ptr %32, align 8, !tbaa !11
  %115 = load double, ptr %32, align 8, !tbaa !11
  %116 = fdiv double 1.000000e+00, %115
  store double %116, ptr %31, align 8, !tbaa !11
  %117 = load double, ptr %32, align 8, !tbaa !11
  %118 = call double @sqrt(double noundef %117) #4
  store double %118, ptr %24, align 8, !tbaa !11
  %119 = load double, ptr %31, align 8, !tbaa !11
  %120 = call double @sqrt(double noundef %119) #4
  store double %120, ptr %25, align 8, !tbaa !11
  store i64 0, ptr %29, align 8, !tbaa !9
  %121 = load ptr, ptr %11, align 8, !tbaa !5
  %122 = load ptr, ptr %12, align 8, !tbaa !5
  %123 = getelementptr inbounds double, ptr %122, i64 1
  %124 = load ptr, ptr %13, align 8, !tbaa !5
  %125 = getelementptr inbounds double, ptr %124, i64 1
  %126 = call double @dlanst_(ptr noundef @.str.5, ptr noundef %121, ptr noundef %123, ptr noundef %125)
  store double %126, ptr %26, align 8, !tbaa !11
  %127 = load double, ptr %26, align 8, !tbaa !11
  %128 = fcmp ogt double %127, 0.000000e+00
  br i1 %128, label %129, label %137

129:                                              ; preds = %109
  %130 = load double, ptr %26, align 8, !tbaa !11
  %131 = load double, ptr %24, align 8, !tbaa !11
  %132 = fcmp olt double %130, %131
  br i1 %132, label %133, label %137

133:                                              ; preds = %129
  store i64 1, ptr %29, align 8, !tbaa !9
  %134 = load double, ptr %24, align 8, !tbaa !11
  %135 = load double, ptr %26, align 8, !tbaa !11
  %136 = fdiv double %134, %135
  store double %136, ptr %27, align 8, !tbaa !11
  br label %146

137:                                              ; preds = %129, %109
  %138 = load double, ptr %26, align 8, !tbaa !11
  %139 = load double, ptr %25, align 8, !tbaa !11
  %140 = fcmp ogt double %138, %139
  br i1 %140, label %141, label %145

141:                                              ; preds = %137
  store i64 1, ptr %29, align 8, !tbaa !9
  %142 = load double, ptr %25, align 8, !tbaa !11
  %143 = load double, ptr %26, align 8, !tbaa !11
  %144 = fdiv double %142, %143
  store double %144, ptr %27, align 8, !tbaa !11
  br label %145

145:                                              ; preds = %141, %137
  br label %146

146:                                              ; preds = %145, %133
  %147 = load i64, ptr %29, align 8, !tbaa !9
  %148 = icmp eq i64 %147, 1
  br i1 %148, label %149, label %160

149:                                              ; preds = %146
  %150 = load ptr, ptr %11, align 8, !tbaa !5
  %151 = load ptr, ptr %12, align 8, !tbaa !5
  %152 = getelementptr inbounds double, ptr %151, i64 1
  %153 = call i32 @f2c_dscal(ptr noundef %150, ptr noundef %27, ptr noundef %152, ptr noundef @c__1)
  %154 = load ptr, ptr %11, align 8, !tbaa !5
  %155 = load i64, ptr %154, align 8, !tbaa !9
  %156 = sub nsw i64 %155, 1
  store i64 %156, ptr %20, align 8, !tbaa !9
  %157 = load ptr, ptr %13, align 8, !tbaa !5
  %158 = getelementptr inbounds double, ptr %157, i64 1
  %159 = call i32 @f2c_dscal(ptr noundef %20, ptr noundef %27, ptr noundef %158, ptr noundef @c__1)
  br label %160

160:                                              ; preds = %149, %146
  %161 = load i64, ptr %28, align 8, !tbaa !9
  %162 = icmp ne i64 %161, 0
  br i1 %162, label %171, label %163

163:                                              ; preds = %160
  %164 = load ptr, ptr %11, align 8, !tbaa !5
  %165 = load ptr, ptr %12, align 8, !tbaa !5
  %166 = getelementptr inbounds double, ptr %165, i64 1
  %167 = load ptr, ptr %13, align 8, !tbaa !5
  %168 = getelementptr inbounds double, ptr %167, i64 1
  %169 = load ptr, ptr %17, align 8, !tbaa !5
  %170 = call i32 @dsterf_(ptr noundef %164, ptr noundef %166, ptr noundef %168, ptr noundef %169)
  br label %185

171:                                              ; preds = %160
  %172 = load ptr, ptr %11, align 8, !tbaa !5
  %173 = load ptr, ptr %12, align 8, !tbaa !5
  %174 = getelementptr inbounds double, ptr %173, i64 1
  %175 = load ptr, ptr %13, align 8, !tbaa !5
  %176 = getelementptr inbounds double, ptr %175, i64 1
  %177 = load ptr, ptr %14, align 8, !tbaa !5
  %178 = load i64, ptr %19, align 8, !tbaa !9
  %179 = getelementptr inbounds double, ptr %177, i64 %178
  %180 = load ptr, ptr %15, align 8, !tbaa !5
  %181 = load ptr, ptr %16, align 8, !tbaa !5
  %182 = getelementptr inbounds double, ptr %181, i64 1
  %183 = load ptr, ptr %17, align 8, !tbaa !5
  %184 = call i32 @dsteqr_(ptr noundef @.str.6, ptr noundef %172, ptr noundef %174, ptr noundef %176, ptr noundef %179, ptr noundef %180, ptr noundef %182, ptr noundef %183)
  br label %185

185:                                              ; preds = %171, %163
  %186 = load i64, ptr %29, align 8, !tbaa !9
  %187 = icmp eq i64 %186, 1
  br i1 %187, label %188, label %205

188:                                              ; preds = %185
  %189 = load ptr, ptr %17, align 8, !tbaa !5
  %190 = load i64, ptr %189, align 8, !tbaa !9
  %191 = icmp eq i64 %190, 0
  br i1 %191, label %192, label %195

192:                                              ; preds = %188
  %193 = load ptr, ptr %11, align 8, !tbaa !5
  %194 = load i64, ptr %193, align 8, !tbaa !9
  store i64 %194, ptr %23, align 8, !tbaa !9
  br label %199

195:                                              ; preds = %188
  %196 = load ptr, ptr %17, align 8, !tbaa !5
  %197 = load i64, ptr %196, align 8, !tbaa !9
  %198 = sub nsw i64 %197, 1
  store i64 %198, ptr %23, align 8, !tbaa !9
  br label %199

199:                                              ; preds = %195, %192
  %200 = load double, ptr %27, align 8, !tbaa !11
  %201 = fdiv double 1.000000e+00, %200
  store double %201, ptr %21, align 8, !tbaa !11
  %202 = load ptr, ptr %12, align 8, !tbaa !5
  %203 = getelementptr inbounds double, ptr %202, i64 1
  %204 = call i32 @f2c_dscal(ptr noundef %23, ptr noundef %21, ptr noundef %203, ptr noundef @c__1)
  br label %205

205:                                              ; preds = %199, %185
  store i32 0, ptr %9, align 4
  store i32 1, ptr %33, align 4
  br label %206

206:                                              ; preds = %205, %108, %95, %86
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  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
  %207 = load i32, ptr %9, align 4
  ret i32 %207
}

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

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

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

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

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

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@c__1 = external hidden global i64, align 8
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @dstev_(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 double, align 8
  %11 = alloca i64, align 8
  %12 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  %13 = tail call i64 @lsame_(ptr noundef %0, ptr noundef nonnull @.str) #4
  store i64 0, ptr %7, align 8, !tbaa !5
  %.not = icmp ne i64 %13, 0
  br i1 %.not, label %16, label %14

14:                                               ; preds = %8
  %15 = tail call i64 @lsame_(ptr noundef %0, ptr noundef nonnull @.str.1) #4
  %.not74 = icmp eq i64 %15, 0
  br i1 %.not74, label %.thread.sink.split, label %16

16:                                               ; preds = %14, %8
  %17 = load i64, ptr %1, align 8, !tbaa !5
  %18 = icmp slt i64 %17, 0
  br i1 %18, label %.thread.sink.split, label %19

19:                                               ; preds = %16
  %20 = load i64, ptr %5, align 8, !tbaa !5
  %21 = icmp slt i64 %20, 1
  %22 = icmp ult i64 %20, %17
  %or.cond = and i1 %.not, %22
  %or.cond81 = or i1 %21, %or.cond
  br i1 %or.cond81, label %.thread.sink.split, label %23

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

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

.thread:                                          ; preds = %.thread.sink.split, %23
  %24 = phi i64 [ %.pr, %23 ], [ %.sink, %.thread.sink.split ]
  %25 = sub nsw i64 0, %24
  store i64 %25, ptr %9, align 8, !tbaa !5
  %26 = call i32 @xerbla_(ptr noundef nonnull @.str.2, ptr noundef nonnull %9) #4
  br label %65

27:                                               ; preds = %23
  switch i64 %17, label %30 [
    i64 0, label %65
    i64 1, label %28
  ]

28:                                               ; preds = %27
  br i1 %.not, label %29, label %65

29:                                               ; preds = %28
  store double 1.000000e+00, ptr %4, align 8, !tbaa !9
  br label %65

30:                                               ; preds = %27
  %31 = tail call double @dlamch_(ptr noundef nonnull @.str.3) #4
  %32 = tail call double @dlamch_(ptr noundef nonnull @.str.4) #4
  %33 = fdiv double %31, %32
  %34 = fdiv double 1.000000e+00, %33
  %35 = tail call double @sqrt(double noundef %33) #4
  %36 = tail call double @sqrt(double noundef %34) #4
  %37 = tail call double @dlanst_(ptr noundef nonnull @.str.5, ptr noundef nonnull %1, ptr noundef %2, ptr noundef %3) #4
  %38 = fcmp ogt double %37, 0.000000e+00
  %39 = fcmp olt double %37, %35
  %or.cond76 = select i1 %38, i1 %39, i1 false
  br i1 %or.cond76, label %42, label %40

40:                                               ; preds = %30
  %41 = fcmp ogt double %37, %36
  br i1 %41, label %42, label %47

42:                                               ; preds = %40, %30
  %.pn = phi double [ %35, %30 ], [ %36, %40 ]
  %storemerge80 = fdiv double %.pn, %37
  store double %storemerge80, ptr %12, align 8, !tbaa !9
  %43 = call i32 @f2c_dscal(ptr noundef nonnull %1, ptr noundef nonnull %12, ptr noundef %2, ptr noundef nonnull @c__1) #4
  %44 = load i64, ptr %1, align 8, !tbaa !5
  %45 = add nsw i64 %44, -1
  store i64 %45, ptr %9, align 8, !tbaa !5
  %46 = call i32 @f2c_dscal(ptr noundef nonnull %9, ptr noundef nonnull %12, ptr noundef %3, ptr noundef nonnull @c__1) #4
  br label %47

47:                                               ; preds = %40, %42
  %48 = phi i1 [ true, %42 ], [ false, %40 ]
  br i1 %.not, label %51, label %49

49:                                               ; preds = %47
  %50 = call i32 @dsterf_(ptr noundef nonnull %1, ptr noundef %2, ptr noundef %3, ptr noundef nonnull %7) #4
  br label %53

51:                                               ; preds = %47
  %52 = call i32 @dsteqr_(ptr noundef nonnull @.str.6, ptr noundef nonnull %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef nonnull %5, ptr noundef %6, ptr noundef nonnull %7) #4
  br label %53

53:                                               ; preds = %51, %49
  br i1 %48, label %54, label %65

54:                                               ; preds = %53
  %55 = load i64, ptr %7, align 8, !tbaa !5
  %56 = icmp eq i64 %55, 0
  br i1 %56, label %57, label %59

57:                                               ; preds = %54
  %58 = load i64, ptr %1, align 8, !tbaa !5
  br label %61

59:                                               ; preds = %54
  %60 = add nsw i64 %55, -1
  br label %61

61:                                               ; preds = %59, %57
  %storemerge = phi i64 [ %60, %59 ], [ %58, %57 ]
  store i64 %storemerge, ptr %11, align 8, !tbaa !5
  %62 = load double, ptr %12, align 8, !tbaa !9
  %63 = fdiv double 1.000000e+00, %62
  store double %63, ptr %10, align 8, !tbaa !9
  %64 = call i32 @f2c_dscal(ptr noundef nonnull %11, ptr noundef nonnull %10, ptr noundef %2, ptr noundef nonnull @c__1) #4
  br label %65

65:                                               ; preds = %53, %61, %28, %29, %27, %.thread
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  ret i32 0
}

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

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

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

declare double @dlamch_(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #3

declare double @dlanst_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass