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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @LAPACKE_dgeesx(i32 noundef %0, i8 noundef signext %1, i8 noundef signext %2, ptr noundef %3, i8 noundef signext %4, i32 noundef %5, ptr noundef %6, i32 noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, i32 noundef %12, ptr noundef %13, ptr noundef %14) #0 {
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i8, align 1
  %19 = alloca i8, align 1
  %20 = alloca ptr, align 8
  %21 = alloca i8, align 1
  %22 = alloca i32, align 4
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca i32, align 4
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  %37 = alloca ptr, align 8
  %38 = alloca i32, align 4
  %39 = alloca double, align 8
  %40 = alloca i32, align 4
  store i32 %0, ptr %17, align 4, !tbaa !5
  store i8 %1, ptr %18, align 1, !tbaa !9
  store i8 %2, ptr %19, align 1, !tbaa !9
  store ptr %3, ptr %20, align 8, !tbaa !10
  store i8 %4, ptr %21, align 1, !tbaa !9
  store i32 %5, ptr %22, align 4, !tbaa !5
  store ptr %6, ptr %23, align 8, !tbaa !10
  store i32 %7, ptr %24, align 4, !tbaa !5
  store ptr %8, ptr %25, align 8, !tbaa !10
  store ptr %9, ptr %26, align 8, !tbaa !10
  store ptr %10, ptr %27, align 8, !tbaa !10
  store ptr %11, ptr %28, align 8, !tbaa !10
  store i32 %12, ptr %29, align 4, !tbaa !5
  store ptr %13, ptr %30, align 8, !tbaa !10
  store ptr %14, ptr %31, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #6
  store i32 0, ptr %32, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #6
  store i32 -1, ptr %33, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #6
  store i32 -1, ptr %34, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #6
  store ptr null, ptr %35, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #6
  store ptr null, ptr %36, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #6
  store ptr null, ptr %37, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #6
  %41 = load i32, ptr %17, align 4, !tbaa !5
  %42 = icmp ne i32 %41, 102
  br i1 %42, label %43, label %47

43:                                               ; preds = %15
  %44 = load i32, ptr %17, align 4, !tbaa !5
  %45 = icmp ne i32 %44, 101
  br i1 %45, label %46, label %47

46:                                               ; preds = %43
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef -1)
  store i32 -1, ptr %16, align 4
  store i32 1, ptr %40, align 4
  br label %171

47:                                               ; preds = %43, %15
  %48 = call i32 @LAPACKE_get_nancheck()
  %49 = icmp ne i32 %48, 0
  br i1 %49, label %50, label %60

50:                                               ; preds = %47
  %51 = load i32, ptr %17, align 4, !tbaa !5
  %52 = load i32, ptr %22, align 4, !tbaa !5
  %53 = load i32, ptr %22, align 4, !tbaa !5
  %54 = load ptr, ptr %23, align 8, !tbaa !10
  %55 = load i32, ptr %24, align 4, !tbaa !5
  %56 = call i32 @LAPACKE_dge_nancheck(i32 noundef %51, i32 noundef %52, i32 noundef %53, ptr noundef %54, i32 noundef %55)
  %57 = icmp ne i32 %56, 0
  br i1 %57, label %58, label %59

58:                                               ; preds = %50
  store i32 -7, ptr %16, align 4
  store i32 1, ptr %40, align 4
  br label %171

59:                                               ; preds = %50
  br label %60

60:                                               ; preds = %59, %47
  %61 = load i8, ptr %19, align 1, !tbaa !9
  %62 = call i32 @LAPACKE_lsame(i8 noundef signext %61, i8 noundef signext 115) #7
  %63 = icmp ne i32 %62, 0
  br i1 %63, label %64, label %79

64:                                               ; preds = %60
  %65 = load i32, ptr %22, align 4, !tbaa !5
  %66 = icmp sgt i32 1, %65
  br i1 %66, label %67, label %68

67:                                               ; preds = %64
  br label %70

68:                                               ; preds = %64
  %69 = load i32, ptr %22, align 4, !tbaa !5
  br label %70

70:                                               ; preds = %68, %67
  %71 = phi i32 [ 1, %67 ], [ %69, %68 ]
  %72 = sext i32 %71 to i64
  %73 = mul i64 4, %72
  %74 = call noalias ptr @malloc(i64 noundef %73) #8
  store ptr %74, ptr %35, align 8, !tbaa !10
  %75 = load ptr, ptr %35, align 8, !tbaa !10
  %76 = icmp eq ptr %75, null
  br i1 %76, label %77, label %78

77:                                               ; preds = %70
  store i32 -1010, ptr %32, align 4, !tbaa !5
  br label %164

78:                                               ; preds = %70
  br label %79

79:                                               ; preds = %78, %60
  %80 = load i32, ptr %17, align 4, !tbaa !5
  %81 = load i8, ptr %18, align 1, !tbaa !9
  %82 = load i8, ptr %19, align 1, !tbaa !9
  %83 = load ptr, ptr %20, align 8, !tbaa !10
  %84 = load i8, ptr %21, align 1, !tbaa !9
  %85 = load i32, ptr %22, align 4, !tbaa !5
  %86 = load ptr, ptr %23, align 8, !tbaa !10
  %87 = load i32, ptr %24, align 4, !tbaa !5
  %88 = load ptr, ptr %25, align 8, !tbaa !10
  %89 = load ptr, ptr %26, align 8, !tbaa !10
  %90 = load ptr, ptr %27, align 8, !tbaa !10
  %91 = load ptr, ptr %28, align 8, !tbaa !10
  %92 = load i32, ptr %29, align 4, !tbaa !5
  %93 = load ptr, ptr %30, align 8, !tbaa !10
  %94 = load ptr, ptr %31, align 8, !tbaa !10
  %95 = load i32, ptr %34, align 4, !tbaa !5
  %96 = load i32, ptr %33, align 4, !tbaa !5
  %97 = load ptr, ptr %35, align 8, !tbaa !10
  %98 = call i32 @LAPACKE_dgeesx_work(i32 noundef %80, i8 noundef signext %81, i8 noundef signext %82, ptr noundef %83, i8 noundef signext %84, i32 noundef %85, ptr noundef %86, i32 noundef %87, ptr noundef %88, ptr noundef %89, ptr noundef %90, ptr noundef %91, i32 noundef %92, ptr noundef %93, ptr noundef %94, ptr noundef %39, i32 noundef %95, ptr noundef %38, i32 noundef %96, ptr noundef %97)
  store i32 %98, ptr %32, align 4, !tbaa !5
  %99 = load i32, ptr %32, align 4, !tbaa !5
  %100 = icmp ne i32 %99, 0
  br i1 %100, label %101, label %102

101:                                              ; preds = %79
  br label %157

102:                                              ; preds = %79
  %103 = load i32, ptr %38, align 4, !tbaa !5
  store i32 %103, ptr %33, align 4, !tbaa !5
  %104 = load double, ptr %39, align 8, !tbaa !12
  %105 = fptosi double %104 to i32
  store i32 %105, ptr %34, align 4, !tbaa !5
  %106 = load i8, ptr %21, align 1, !tbaa !9
  %107 = call i32 @LAPACKE_lsame(i8 noundef signext %106, i8 noundef signext 98) #7
  %108 = icmp ne i32 %107, 0
  br i1 %108, label %113, label %109

109:                                              ; preds = %102
  %110 = load i8, ptr %21, align 1, !tbaa !9
  %111 = call i32 @LAPACKE_lsame(i8 noundef signext %110, i8 noundef signext 118) #7
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %113, label %118

113:                                              ; preds = %109, %102
  %114 = load i32, ptr %33, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = mul i64 4, %115
  %117 = call noalias ptr @malloc(i64 noundef %116) #8
  store ptr %117, ptr %36, align 8, !tbaa !10
  br label %120

118:                                              ; preds = %109
  %119 = call noalias ptr @malloc(i64 noundef 4) #8
  store ptr %119, ptr %36, align 8, !tbaa !10
  br label %120

120:                                              ; preds = %118, %113
  %121 = load ptr, ptr %36, align 8, !tbaa !10
  %122 = icmp eq ptr %121, null
  br i1 %122, label %123, label %124

123:                                              ; preds = %120
  store i32 -1010, ptr %32, align 4, !tbaa !5
  br label %157

124:                                              ; preds = %120
  %125 = load i32, ptr %34, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = mul i64 8, %126
  %128 = call noalias ptr @malloc(i64 noundef %127) #8
  store ptr %128, ptr %37, align 8, !tbaa !10
  %129 = load ptr, ptr %37, align 8, !tbaa !10
  %130 = icmp eq ptr %129, null
  br i1 %130, label %131, label %132

131:                                              ; preds = %124
  store i32 -1010, ptr %32, align 4, !tbaa !5
  br label %155

132:                                              ; preds = %124
  %133 = load i32, ptr %17, align 4, !tbaa !5
  %134 = load i8, ptr %18, align 1, !tbaa !9
  %135 = load i8, ptr %19, align 1, !tbaa !9
  %136 = load ptr, ptr %20, align 8, !tbaa !10
  %137 = load i8, ptr %21, align 1, !tbaa !9
  %138 = load i32, ptr %22, align 4, !tbaa !5
  %139 = load ptr, ptr %23, align 8, !tbaa !10
  %140 = load i32, ptr %24, align 4, !tbaa !5
  %141 = load ptr, ptr %25, align 8, !tbaa !10
  %142 = load ptr, ptr %26, align 8, !tbaa !10
  %143 = load ptr, ptr %27, align 8, !tbaa !10
  %144 = load ptr, ptr %28, align 8, !tbaa !10
  %145 = load i32, ptr %29, align 4, !tbaa !5
  %146 = load ptr, ptr %30, align 8, !tbaa !10
  %147 = load ptr, ptr %31, align 8, !tbaa !10
  %148 = load ptr, ptr %37, align 8, !tbaa !10
  %149 = load i32, ptr %34, align 4, !tbaa !5
  %150 = load ptr, ptr %36, align 8, !tbaa !10
  %151 = load i32, ptr %33, align 4, !tbaa !5
  %152 = load ptr, ptr %35, align 8, !tbaa !10
  %153 = call i32 @LAPACKE_dgeesx_work(i32 noundef %133, i8 noundef signext %134, i8 noundef signext %135, ptr noundef %136, i8 noundef signext %137, i32 noundef %138, ptr noundef %139, i32 noundef %140, ptr noundef %141, ptr noundef %142, ptr noundef %143, ptr noundef %144, i32 noundef %145, ptr noundef %146, ptr noundef %147, ptr noundef %148, i32 noundef %149, ptr noundef %150, i32 noundef %151, ptr noundef %152)
  store i32 %153, ptr %32, align 4, !tbaa !5
  %154 = load ptr, ptr %37, align 8, !tbaa !10
  call void @free(ptr noundef %154) #6
  br label %155

155:                                              ; preds = %132, %131
  %156 = load ptr, ptr %36, align 8, !tbaa !10
  call void @free(ptr noundef %156) #6
  br label %157

157:                                              ; preds = %155, %123, %101
  %158 = load i8, ptr %19, align 1, !tbaa !9
  %159 = call i32 @LAPACKE_lsame(i8 noundef signext %158, i8 noundef signext 115) #7
  %160 = icmp ne i32 %159, 0
  br i1 %160, label %161, label %163

161:                                              ; preds = %157
  %162 = load ptr, ptr %35, align 8, !tbaa !10
  call void @free(ptr noundef %162) #6
  br label %163

163:                                              ; preds = %161, %157
  br label %164

164:                                              ; preds = %163, %77
  %165 = load i32, ptr %32, align 4, !tbaa !5
  %166 = icmp eq i32 %165, -1010
  br i1 %166, label %167, label %169

167:                                              ; preds = %164
  %168 = load i32, ptr %32, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %168)
  br label %169

169:                                              ; preds = %167, %164
  %170 = load i32, ptr %32, align 4, !tbaa !5
  store i32 %170, ptr %16, align 4
  store i32 1, ptr %40, align 4
  br label %171

171:                                              ; preds = %169, %58, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  %172 = load i32, ptr %16, align 4
  ret i32 %172
}

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

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

declare i32 @LAPACKE_get_nancheck() #2

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

; Function Attrs: nounwind willreturn memory(none)
declare i32 @LAPACKE_lsame(i8 noundef signext, i8 noundef signext) #3

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

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

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

; 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 willreturn memory(none) "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 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(none) }
attributes #8 = { 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}
!12 = !{!13, !13, i64 0}
!13 = !{!"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 [15 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @LAPACKE_dgeesx(i32 noundef %0, i8 noundef signext %1, i8 noundef signext %2, ptr noundef %3, i8 noundef signext %4, i32 noundef %5, ptr noundef %6, i32 noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, i32 noundef %12, ptr noundef %13, ptr noundef %14) local_unnamed_addr #0 {
  %16 = alloca i32, align 4
  %17 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #7
  %18 = add i32 %0, -103
  %or.cond = icmp ult i32 %18, -2
  br i1 %or.cond, label %19, label %20

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

20:                                               ; preds = %15
  %21 = tail call i32 @LAPACKE_get_nancheck() #7
  %.not = icmp eq i32 %21, 0
  br i1 %.not, label %24, label %22

22:                                               ; preds = %20
  %23 = tail call i32 @LAPACKE_dge_nancheck(i32 noundef %0, i32 noundef %5, i32 noundef %5, ptr noundef %6, i32 noundef %7) #7
  %.not70 = icmp eq i32 %23, 0
  br i1 %.not70, label %24, label %61

24:                                               ; preds = %22, %20
  %25 = tail call i32 @LAPACKE_lsame(i8 noundef signext %2, i8 noundef signext 115) #8
  %.not71 = icmp eq i32 %25, 0
  br i1 %.not71, label %32, label %26

26:                                               ; preds = %24
  %27 = tail call i32 @llvm.smax.i32(i32 %5, i32 1)
  %28 = zext nneg i32 %27 to i64
  %29 = shl nuw nsw i64 %28, 2
  %30 = tail call noalias ptr @malloc(i64 noundef %29) #9
  %31 = icmp eq ptr %30, null
  br i1 %31, label %.thread, label %32

32:                                               ; preds = %26, %24
  %.064 = phi ptr [ %30, %26 ], [ null, %24 ]
  %33 = call i32 @LAPACKE_dgeesx_work(i32 noundef %0, i8 noundef signext %1, i8 noundef signext %2, ptr noundef %3, i8 noundef signext %4, i32 noundef %5, ptr noundef %6, i32 noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, i32 noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef nonnull %17, i32 noundef -1, ptr noundef nonnull %16, i32 noundef -1, ptr noundef %.064) #7
  %.not72 = icmp eq i32 %33, 0
  br i1 %.not72, label %34, label %57

34:                                               ; preds = %32
  %35 = load i32, ptr %16, align 4, !tbaa !5
  %36 = load double, ptr %17, align 8, !tbaa !9
  %37 = fptosi double %36 to i32
  %38 = call i32 @LAPACKE_lsame(i8 noundef signext %4, i8 noundef signext 98) #8
  %.not73 = icmp eq i32 %38, 0
  br i1 %.not73, label %39, label %41

39:                                               ; preds = %34
  %40 = call i32 @LAPACKE_lsame(i8 noundef signext %4, i8 noundef signext 118) #8
  %.not74 = icmp eq i32 %40, 0
  br i1 %.not74, label %45, label %41

41:                                               ; preds = %39, %34
  %42 = sext i32 %35 to i64
  %43 = shl nsw i64 %42, 2
  %44 = call noalias ptr @malloc(i64 noundef %43) #9
  br label %47

45:                                               ; preds = %39
  %46 = call noalias dereferenceable_or_null(4) ptr @malloc(i64 noundef 4) #9
  br label %47

47:                                               ; preds = %45, %41
  %.0 = phi ptr [ %44, %41 ], [ %46, %45 ]
  %48 = icmp eq ptr %.0, null
  br i1 %48, label %57, label %49

49:                                               ; preds = %47
  %50 = sext i32 %37 to i64
  %51 = shl nsw i64 %50, 3
  %52 = call noalias ptr @malloc(i64 noundef %51) #9
  %53 = icmp eq ptr %52, null
  br i1 %53, label %56, label %54

54:                                               ; preds = %49
  %55 = call i32 @LAPACKE_dgeesx_work(i32 noundef %0, i8 noundef signext %1, i8 noundef signext %2, ptr noundef %3, i8 noundef signext %4, i32 noundef %5, ptr noundef %6, i32 noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, i32 noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef nonnull %52, i32 noundef %37, ptr noundef nonnull %.0, i32 noundef %35, ptr noundef %.064) #7
  call void @free(ptr noundef nonnull %52) #7
  br label %56

56:                                               ; preds = %49, %54
  %.065 = phi i32 [ %55, %54 ], [ -1010, %49 ]
  call void @free(ptr noundef nonnull %.0) #7
  br label %57

57:                                               ; preds = %47, %32, %56
  %.1 = phi i32 [ %33, %32 ], [ %.065, %56 ], [ -1010, %47 ]
  br i1 %.not71, label %59, label %58

58:                                               ; preds = %57
  call void @free(ptr noundef %.064) #7
  br label %59

59:                                               ; preds = %57, %58
  %60 = icmp eq i32 %.1, -1010
  br i1 %60, label %.thread, label %61

.thread:                                          ; preds = %26, %59
  call void @LAPACKE_xerbla(ptr noundef nonnull @.str, i32 noundef -1010) #7
  br label %61

61:                                               ; preds = %59, %.thread, %22, %19
  %.066 = phi i32 [ -1, %19 ], [ -7, %22 ], [ -1010, %.thread ], [ %.1, %59 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  ret i32 %.066
}

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

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

declare i32 @LAPACKE_get_nancheck() local_unnamed_addr #2

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

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare i32 @LAPACKE_lsame(i8 noundef signext, i8 noundef signext) local_unnamed_addr #3

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

declare i32 @LAPACKE_dgeesx_work(i32 noundef, i8 noundef signext, i8 noundef signext, ptr noundef, i8 noundef signext, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr 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 #5

; 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) #6

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 nosync nounwind willreturn memory(none) "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 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 #5 = { 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(none) }
attributes #9 = { 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 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}


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