; LLVM IR from OpenMathLib/OpenBLAS :: lapack-netlib/LAPACKE/src (lapacke_cheevd_2stage_work)

; 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 [27 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @LAPACKE_cheevd_2stage_work(i32 noundef %0, i8 noundef signext %1, i8 noundef signext %2, i32 noundef %3, ptr noundef %4, i32 noundef %5, ptr noundef %6, ptr noundef %7, i32 noundef %8, ptr noundef %9, i32 noundef %10, ptr noundef %11, i32 noundef %12) #0 {
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i8, align 1
  %17 = alloca i8, align 1
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca ptr, align 8
  %31 = alloca i32, align 4
  store i32 %0, ptr %15, align 4, !tbaa !5
  store i8 %1, ptr %16, align 1, !tbaa !9
  store i8 %2, ptr %17, align 1, !tbaa !9
  store i32 %3, ptr %18, align 4, !tbaa !5
  store ptr %4, ptr %19, align 8, !tbaa !10
  store i32 %5, ptr %20, align 4, !tbaa !5
  store ptr %6, ptr %21, align 8, !tbaa !10
  store ptr %7, ptr %22, align 8, !tbaa !10
  store i32 %8, ptr %23, align 4, !tbaa !5
  store ptr %9, ptr %24, align 8, !tbaa !10
  store i32 %10, ptr %25, align 4, !tbaa !5
  store ptr %11, ptr %26, align 8, !tbaa !10
  store i32 %12, ptr %27, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  store i32 0, ptr %28, align 4, !tbaa !5
  %32 = load i32, ptr %15, align 4, !tbaa !5
  %33 = icmp eq i32 %32, 102
  br i1 %33, label %34, label %46

34:                                               ; preds = %13
  %35 = load ptr, ptr %19, align 8, !tbaa !10
  %36 = load ptr, ptr %21, align 8, !tbaa !10
  %37 = load ptr, ptr %22, align 8, !tbaa !10
  %38 = load ptr, ptr %24, align 8, !tbaa !10
  %39 = load ptr, ptr %26, align 8, !tbaa !10
  call void @cheevd_2stage_(ptr noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %35, ptr noundef %20, ptr noundef %36, ptr noundef %37, ptr noundef %23, ptr noundef %38, ptr noundef %25, ptr noundef %39, ptr noundef %27, ptr noundef %28, i64 noundef 1, i64 noundef 1)
  %40 = load i32, ptr %28, align 4, !tbaa !5
  %41 = icmp slt i32 %40, 0
  br i1 %41, label %42, label %45

42:                                               ; preds = %34
  %43 = load i32, ptr %28, align 4, !tbaa !5
  %44 = sub nsw i32 %43, 1
  store i32 %44, ptr %28, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %42, %34
  br label %158

46:                                               ; preds = %13
  %47 = load i32, ptr %15, align 4, !tbaa !5
  %48 = icmp eq i32 %47, 101
  br i1 %48, label %49, label %155

49:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  %50 = load i32, ptr %18, align 4, !tbaa !5
  %51 = icmp sgt i32 1, %50
  br i1 %51, label %52, label %53

52:                                               ; preds = %49
  br label %55

53:                                               ; preds = %49
  %54 = load i32, ptr %18, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %53, %52
  %56 = phi i32 [ 1, %52 ], [ %54, %53 ]
  store i32 %56, ptr %29, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  store ptr null, ptr %30, align 8, !tbaa !10
  %57 = load i32, ptr %20, align 4, !tbaa !5
  %58 = load i32, ptr %18, align 4, !tbaa !5
  %59 = icmp slt i32 %57, %58
  br i1 %59, label %60, label %63

60:                                               ; preds = %55
  store i32 -6, ptr %28, align 4, !tbaa !5
  %61 = load i32, ptr %28, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %61)
  %62 = load i32, ptr %28, align 4, !tbaa !5
  store i32 %62, ptr %14, align 4
  store i32 1, ptr %31, align 4
  br label %152

63:                                               ; preds = %55
  %64 = load i32, ptr %27, align 4, !tbaa !5
  %65 = icmp eq i32 %64, -1
  br i1 %65, label %72, label %66

66:                                               ; preds = %63
  %67 = load i32, ptr %25, align 4, !tbaa !5
  %68 = icmp eq i32 %67, -1
  br i1 %68, label %72, label %69

69:                                               ; preds = %66
  %70 = load i32, ptr %23, align 4, !tbaa !5
  %71 = icmp eq i32 %70, -1
  br i1 %71, label %72, label %87

72:                                               ; preds = %69, %66, %63
  %73 = load ptr, ptr %19, align 8, !tbaa !10
  %74 = load ptr, ptr %21, align 8, !tbaa !10
  %75 = load ptr, ptr %22, align 8, !tbaa !10
  %76 = load ptr, ptr %24, align 8, !tbaa !10
  %77 = load ptr, ptr %26, align 8, !tbaa !10
  call void @cheevd_2stage_(ptr noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %73, ptr noundef %29, ptr noundef %74, ptr noundef %75, ptr noundef %23, ptr noundef %76, ptr noundef %25, ptr noundef %77, ptr noundef %27, ptr noundef %28, i64 noundef 1, i64 noundef 1)
  %78 = load i32, ptr %28, align 4, !tbaa !5
  %79 = icmp slt i32 %78, 0
  br i1 %79, label %80, label %83

80:                                               ; preds = %72
  %81 = load i32, ptr %28, align 4, !tbaa !5
  %82 = sub nsw i32 %81, 1
  br label %85

83:                                               ; preds = %72
  %84 = load i32, ptr %28, align 4, !tbaa !5
  br label %85

85:                                               ; preds = %83, %80
  %86 = phi i32 [ %82, %80 ], [ %84, %83 ]
  store i32 %86, ptr %14, align 4
  store i32 1, ptr %31, align 4
  br label %152

87:                                               ; preds = %69
  %88 = load i32, ptr %29, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = mul i64 8, %89
  %91 = load i32, ptr %18, align 4, !tbaa !5
  %92 = icmp sgt i32 1, %91
  br i1 %92, label %93, label %94

93:                                               ; preds = %87
  br label %96

94:                                               ; preds = %87
  %95 = load i32, ptr %18, align 4, !tbaa !5
  br label %96

96:                                               ; preds = %94, %93
  %97 = phi i32 [ 1, %93 ], [ %95, %94 ]
  %98 = sext i32 %97 to i64
  %99 = mul i64 %90, %98
  %100 = call noalias ptr @malloc(i64 noundef %99) #6
  store ptr %100, ptr %30, align 8, !tbaa !10
  %101 = load ptr, ptr %30, align 8, !tbaa !10
  %102 = icmp eq ptr %101, null
  br i1 %102, label %103, label %104

103:                                              ; preds = %96
  store i32 -1011, ptr %28, align 4, !tbaa !5
  br label %146

104:                                              ; preds = %96
  %105 = load i32, ptr %15, align 4, !tbaa !5
  %106 = load i8, ptr %17, align 1, !tbaa !9
  %107 = load i32, ptr %18, align 4, !tbaa !5
  %108 = load ptr, ptr %19, align 8, !tbaa !10
  %109 = load i32, ptr %20, align 4, !tbaa !5
  %110 = load ptr, ptr %30, align 8, !tbaa !10
  %111 = load i32, ptr %29, align 4, !tbaa !5
  call void @LAPACKE_che_trans(i32 noundef %105, i8 noundef signext %106, i32 noundef %107, ptr noundef %108, i32 noundef %109, ptr noundef %110, i32 noundef %111)
  %112 = load ptr, ptr %30, align 8, !tbaa !10
  %113 = load ptr, ptr %21, align 8, !tbaa !10
  %114 = load ptr, ptr %22, align 8, !tbaa !10
  %115 = load ptr, ptr %24, align 8, !tbaa !10
  %116 = load ptr, ptr %26, align 8, !tbaa !10
  call void @cheevd_2stage_(ptr noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %112, ptr noundef %29, ptr noundef %113, ptr noundef %114, ptr noundef %23, ptr noundef %115, ptr noundef %25, ptr noundef %116, ptr noundef %27, ptr noundef %28, i64 noundef 1, i64 noundef 1)
  %117 = load i32, ptr %28, align 4, !tbaa !5
  %118 = icmp slt i32 %117, 0
  br i1 %118, label %119, label %122

119:                                              ; preds = %104
  %120 = load i32, ptr %28, align 4, !tbaa !5
  %121 = sub nsw i32 %120, 1
  store i32 %121, ptr %28, align 4, !tbaa !5
  br label %122

122:                                              ; preds = %119, %104
  %123 = load i8, ptr %16, align 1, !tbaa !9
  %124 = sext i8 %123 to i32
  %125 = icmp eq i32 %124, 86
  br i1 %125, label %130, label %126

126:                                              ; preds = %122
  %127 = load i8, ptr %16, align 1, !tbaa !9
  %128 = sext i8 %127 to i32
  %129 = icmp eq i32 %128, 118
  br i1 %129, label %130, label %137

130:                                              ; preds = %126, %122
  %131 = load i32, ptr %18, align 4, !tbaa !5
  %132 = load i32, ptr %18, align 4, !tbaa !5
  %133 = load ptr, ptr %30, align 8, !tbaa !10
  %134 = load i32, ptr %29, align 4, !tbaa !5
  %135 = load ptr, ptr %19, align 8, !tbaa !10
  %136 = load i32, ptr %20, align 4, !tbaa !5
  call void @LAPACKE_cge_trans(i32 noundef 102, i32 noundef %131, i32 noundef %132, ptr noundef %133, i32 noundef %134, ptr noundef %135, i32 noundef %136)
  br label %144

137:                                              ; preds = %126
  %138 = load i8, ptr %17, align 1, !tbaa !9
  %139 = load i32, ptr %18, align 4, !tbaa !5
  %140 = load ptr, ptr %30, align 8, !tbaa !10
  %141 = load i32, ptr %29, align 4, !tbaa !5
  %142 = load ptr, ptr %19, align 8, !tbaa !10
  %143 = load i32, ptr %20, align 4, !tbaa !5
  call void @LAPACKE_che_trans(i32 noundef 102, i8 noundef signext %138, i32 noundef %139, ptr noundef %140, i32 noundef %141, ptr noundef %142, i32 noundef %143)
  br label %144

144:                                              ; preds = %137, %130
  %145 = load ptr, ptr %30, align 8, !tbaa !10
  call void @free(ptr noundef %145) #5
  br label %146

146:                                              ; preds = %144, %103
  %147 = load i32, ptr %28, align 4, !tbaa !5
  %148 = icmp eq i32 %147, -1011
  br i1 %148, label %149, label %151

149:                                              ; preds = %146
  %150 = load i32, ptr %28, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %150)
  br label %151

151:                                              ; preds = %149, %146
  store i32 0, ptr %31, align 4
  br label %152

152:                                              ; preds = %151, %85, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  %153 = load i32, ptr %31, align 4
  switch i32 %153, label %160 [
    i32 0, label %154
  ]

154:                                              ; preds = %152
  br label %157

155:                                              ; preds = %46
  store i32 -1, ptr %28, align 4, !tbaa !5
  %156 = load i32, ptr %28, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %156)
  br label %157

157:                                              ; preds = %155, %154
  br label %158

158:                                              ; preds = %157, %45
  %159 = load i32, ptr %28, align 4, !tbaa !5
  store i32 %159, ptr %14, align 4
  store i32 1, ptr %31, align 4
  br label %160

160:                                              ; preds = %158, %152
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  %161 = load i32, ptr %14, align 4
  ret i32 %161
}

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

declare void @cheevd_2stage_(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, i64 noundef, i64 noundef) #2

declare void @LAPACKE_xerbla(ptr noundef, i32 noundef) #2

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #3

declare void @LAPACKE_che_trans(i32 noundef, i8 noundef signext, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) #2

declare void @LAPACKE_cge_trans(i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) #2

; Function Attrs: nounwind
declare void @free(ptr noundef) #4

; 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 allocsize(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 #4 = { 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 #5 = { nounwind }
attributes #6 = { nounwind allocsize(0) }

!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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !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 [27 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @LAPACKE_cheevd_2stage_work(i32 noundef %0, i8 noundef signext %1, i8 noundef signext %2, i32 noundef %3, ptr noundef %4, i32 noundef %5, ptr noundef %6, ptr noundef %7, i32 noundef %8, ptr noundef %9, i32 noundef %10, ptr noundef %11, i32 noundef %12) local_unnamed_addr #0 {
  %14 = alloca i8, align 1
  %15 = alloca i8, align 1
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  store i8 %1, ptr %14, align 1, !tbaa !5
  store i8 %2, ptr %15, align 1, !tbaa !5
  store i32 %3, ptr %16, align 4, !tbaa !8
  store i32 %5, ptr %17, align 4, !tbaa !8
  store i32 %8, ptr %18, align 4, !tbaa !8
  store i32 %10, ptr %19, align 4, !tbaa !8
  store i32 %12, ptr %20, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %21) #6
  store i32 0, ptr %21, align 4, !tbaa !8
  switch i32 %0, label %61 [
    i32 102, label %23
    i32 101, label %25
  ]

23:                                               ; preds = %13
  call void @cheevd_2stage_(ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef %4, ptr noundef nonnull %17, ptr noundef %6, ptr noundef %7, ptr noundef nonnull %18, ptr noundef %9, ptr noundef nonnull %19, ptr noundef %11, ptr noundef nonnull %20, ptr noundef nonnull %21, i64 noundef 1, i64 noundef 1) #6
  %24 = load i32, ptr %21, align 4, !tbaa !8
  %.lobit44 = ashr i32 %24, 31
  %spec.select = add nsw i32 %24, %.lobit44
  br label %62

25:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %22) #6
  %26 = tail call i32 @llvm.smax.i32(i32 %3, i32 1)
  store i32 %26, ptr %22, align 4, !tbaa !8
  %27 = icmp slt i32 %5, %3
  br i1 %27, label %28, label %29

28:                                               ; preds = %25
  tail call void @LAPACKE_xerbla(ptr noundef nonnull @.str, i32 noundef -6) #6
  br label %60

29:                                               ; preds = %25
  %30 = icmp eq i32 %12, -1
  %31 = icmp eq i32 %10, -1
  %or.cond = or i1 %31, %30
  %32 = icmp eq i32 %8, -1
  %or.cond3 = or i1 %32, %or.cond
  br i1 %or.cond3, label %33, label %36

33:                                               ; preds = %29
  call void @cheevd_2stage_(ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef %4, ptr noundef nonnull %22, ptr noundef %6, ptr noundef %7, ptr noundef nonnull %18, ptr noundef %9, ptr noundef nonnull %19, ptr noundef %11, ptr noundef nonnull %20, ptr noundef nonnull %21, i64 noundef 1, i64 noundef 1) #6
  %34 = load i32, ptr %21, align 4
  %.lobit = ashr i32 %34, 31
  %35 = add nsw i32 %.lobit, %34
  br label %60

36:                                               ; preds = %29
  %37 = zext nneg i32 %26 to i64
  %38 = shl nuw nsw i64 %37, 3
  %39 = mul i64 %38, %37
  %40 = tail call noalias ptr @malloc(i64 noundef %39) #7
  %41 = icmp eq ptr %40, null
  br i1 %41, label %.thread, label %42

.thread:                                          ; preds = %36
  store i32 -1011, ptr %21, align 4, !tbaa !8
  br label %59

42:                                               ; preds = %36
  tail call void @LAPACKE_che_trans(i32 noundef 101, i8 noundef signext %2, i32 noundef %3, ptr noundef %4, i32 noundef %5, ptr noundef nonnull %40, i32 noundef %26) #6
  call void @cheevd_2stage_(ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef nonnull %40, ptr noundef nonnull %22, ptr noundef %6, ptr noundef %7, ptr noundef nonnull %18, ptr noundef %9, ptr noundef nonnull %19, ptr noundef %11, ptr noundef nonnull %20, ptr noundef nonnull %21, i64 noundef 1, i64 noundef 1) #6
  %43 = load i32, ptr %21, align 4, !tbaa !8
  %44 = icmp slt i32 %43, 0
  br i1 %44, label %45, label %47

45:                                               ; preds = %42
  %46 = add nsw i32 %43, -1
  store i32 %46, ptr %21, align 4, !tbaa !8
  br label %47

47:                                               ; preds = %45, %42
  %48 = load i8, ptr %14, align 1
  %49 = and i8 %48, -33
  %or.cond6 = icmp eq i8 %49, 86
  br i1 %or.cond6, label %50, label %53

50:                                               ; preds = %47
  %51 = load i32, ptr %16, align 4, !tbaa !8
  %52 = load i32, ptr %22, align 4, !tbaa !8
  call void @LAPACKE_cge_trans(i32 noundef 102, i32 noundef %51, i32 noundef %51, ptr noundef nonnull %40, i32 noundef %52, ptr noundef %4, i32 noundef %5) #6
  br label %57

53:                                               ; preds = %47
  %54 = load i8, ptr %15, align 1, !tbaa !5
  %55 = load i32, ptr %16, align 4, !tbaa !8
  %56 = load i32, ptr %22, align 4, !tbaa !8
  call void @LAPACKE_che_trans(i32 noundef 102, i8 noundef signext %54, i32 noundef %55, ptr noundef nonnull %40, i32 noundef %56, ptr noundef %4, i32 noundef %5) #6
  br label %57

57:                                               ; preds = %50, %53
  call void @free(ptr noundef nonnull %40) #6
  %.pr = load i32, ptr %21, align 4, !tbaa !8
  %58 = icmp eq i32 %.pr, -1011
  br i1 %58, label %59, label %.thread40

59:                                               ; preds = %.thread, %57
  call void @LAPACKE_xerbla(ptr noundef nonnull @.str, i32 noundef -1011) #6
  %.pre.pre = load i32, ptr %21, align 4, !tbaa !8
  br label %.thread40

.thread40:                                        ; preds = %59, %57
  %.pre = phi i32 [ %.pre.pre, %59 ], [ %.pr, %57 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #6
  br label %62

60:                                               ; preds = %33, %28
  %.033 = phi i32 [ -6, %28 ], [ %35, %33 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #6
  br label %62

61:                                               ; preds = %13
  tail call void @LAPACKE_xerbla(ptr noundef nonnull @.str, i32 noundef -1) #6
  br label %62

62:                                               ; preds = %23, %61, %.thread40, %60
  %.1 = phi i32 [ %.033, %60 ], [ %.pre, %.thread40 ], [ -1, %61 ], [ %spec.select, %23 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #6
  ret i32 %.1
}

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

declare void @cheevd_2stage_(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, i64 noundef, i64 noundef) local_unnamed_addr #2

declare void @LAPACKE_xerbla(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

declare void @LAPACKE_che_trans(i32 noundef, i8 noundef signext, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @LAPACKE_cge_trans(i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #4

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #5

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 allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}


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