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

; 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_dtgsen(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, ptr noundef %4, i32 noundef %5, ptr noundef %6, i32 noundef %7, ptr noundef %8, i32 noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13, i32 noundef %14, ptr noundef %15, i32 noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %20) #0 {
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca ptr, align 8
  %28 = alloca i32, align 4
  %29 = alloca ptr, align 8
  %30 = alloca i32, align 4
  %31 = alloca ptr, align 8
  %32 = alloca i32, align 4
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  %37 = alloca i32, align 4
  %38 = alloca ptr, align 8
  %39 = alloca i32, align 4
  %40 = alloca ptr, align 8
  %41 = alloca ptr, align 8
  %42 = alloca ptr, align 8
  %43 = alloca ptr, align 8
  %44 = alloca i32, align 4
  %45 = alloca i32, align 4
  %46 = alloca i32, align 4
  %47 = alloca ptr, align 8
  %48 = alloca ptr, align 8
  %49 = alloca i32, align 4
  %50 = alloca double, align 8
  %51 = alloca i32, align 4
  store i32 %0, ptr %23, align 4, !tbaa !5
  store i32 %1, ptr %24, align 4, !tbaa !5
  store i32 %2, ptr %25, align 4, !tbaa !5
  store i32 %3, ptr %26, align 4, !tbaa !5
  store ptr %4, ptr %27, align 8, !tbaa !9
  store i32 %5, ptr %28, align 4, !tbaa !5
  store ptr %6, ptr %29, align 8, !tbaa !9
  store i32 %7, ptr %30, align 4, !tbaa !5
  store ptr %8, ptr %31, align 8, !tbaa !9
  store i32 %9, ptr %32, align 4, !tbaa !5
  store ptr %10, ptr %33, align 8, !tbaa !9
  store ptr %11, ptr %34, align 8, !tbaa !9
  store ptr %12, ptr %35, align 8, !tbaa !9
  store ptr %13, ptr %36, align 8, !tbaa !9
  store i32 %14, ptr %37, align 4, !tbaa !5
  store ptr %15, ptr %38, align 8, !tbaa !9
  store i32 %16, ptr %39, align 4, !tbaa !5
  store ptr %17, ptr %40, align 8, !tbaa !9
  store ptr %18, ptr %41, align 8, !tbaa !9
  store ptr %19, ptr %42, align 8, !tbaa !9
  store ptr %20, ptr %43, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #5
  store i32 0, ptr %44, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #5
  store i32 -1, ptr %45, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #5
  store i32 -1, ptr %46, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #5
  store ptr null, ptr %47, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #5
  store ptr null, ptr %48, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #5
  %52 = load i32, ptr %23, align 4, !tbaa !5
  %53 = icmp ne i32 %52, 102
  br i1 %53, label %54, label %58

54:                                               ; preds = %21
  %55 = load i32, ptr %23, align 4, !tbaa !5
  %56 = icmp ne i32 %55, 101
  br i1 %56, label %57, label %58

57:                                               ; preds = %54
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef -1)
  store i32 -1, ptr %22, align 4
  store i32 1, ptr %51, align 4
  br label %190

58:                                               ; preds = %54, %21
  %59 = call i32 @LAPACKE_get_nancheck()
  %60 = icmp ne i32 %59, 0
  br i1 %60, label %61, label %106

61:                                               ; preds = %58
  %62 = load i32, ptr %23, align 4, !tbaa !5
  %63 = load i32, ptr %28, align 4, !tbaa !5
  %64 = load i32, ptr %28, align 4, !tbaa !5
  %65 = load ptr, ptr %29, align 8, !tbaa !9
  %66 = load i32, ptr %30, align 4, !tbaa !5
  %67 = call i32 @LAPACKE_dge_nancheck(i32 noundef %62, i32 noundef %63, i32 noundef %64, ptr noundef %65, i32 noundef %66)
  %68 = icmp ne i32 %67, 0
  br i1 %68, label %69, label %70

69:                                               ; preds = %61
  store i32 -7, ptr %22, align 4
  store i32 1, ptr %51, align 4
  br label %190

70:                                               ; preds = %61
  %71 = load i32, ptr %23, align 4, !tbaa !5
  %72 = load i32, ptr %28, align 4, !tbaa !5
  %73 = load i32, ptr %28, align 4, !tbaa !5
  %74 = load ptr, ptr %31, align 8, !tbaa !9
  %75 = load i32, ptr %32, align 4, !tbaa !5
  %76 = call i32 @LAPACKE_dge_nancheck(i32 noundef %71, i32 noundef %72, i32 noundef %73, ptr noundef %74, i32 noundef %75)
  %77 = icmp ne i32 %76, 0
  br i1 %77, label %78, label %79

78:                                               ; preds = %70
  store i32 -9, ptr %22, align 4
  store i32 1, ptr %51, align 4
  br label %190

79:                                               ; preds = %70
  %80 = load i32, ptr %25, align 4, !tbaa !5
  %81 = icmp ne i32 %80, 0
  br i1 %81, label %82, label %92

82:                                               ; preds = %79
  %83 = load i32, ptr %23, align 4, !tbaa !5
  %84 = load i32, ptr %28, align 4, !tbaa !5
  %85 = load i32, ptr %28, align 4, !tbaa !5
  %86 = load ptr, ptr %36, align 8, !tbaa !9
  %87 = load i32, ptr %37, align 4, !tbaa !5
  %88 = call i32 @LAPACKE_dge_nancheck(i32 noundef %83, i32 noundef %84, i32 noundef %85, ptr noundef %86, i32 noundef %87)
  %89 = icmp ne i32 %88, 0
  br i1 %89, label %90, label %91

90:                                               ; preds = %82
  store i32 -14, ptr %22, align 4
  store i32 1, ptr %51, align 4
  br label %190

91:                                               ; preds = %82
  br label %92

92:                                               ; preds = %91, %79
  %93 = load i32, ptr %26, align 4, !tbaa !5
  %94 = icmp ne i32 %93, 0
  br i1 %94, label %95, label %105

95:                                               ; preds = %92
  %96 = load i32, ptr %23, align 4, !tbaa !5
  %97 = load i32, ptr %28, align 4, !tbaa !5
  %98 = load i32, ptr %28, align 4, !tbaa !5
  %99 = load ptr, ptr %38, align 8, !tbaa !9
  %100 = load i32, ptr %39, align 4, !tbaa !5
  %101 = call i32 @LAPACKE_dge_nancheck(i32 noundef %96, i32 noundef %97, i32 noundef %98, ptr noundef %99, i32 noundef %100)
  %102 = icmp ne i32 %101, 0
  br i1 %102, label %103, label %104

103:                                              ; preds = %95
  store i32 -16, ptr %22, align 4
  store i32 1, ptr %51, align 4
  br label %190

104:                                              ; preds = %95
  br label %105

105:                                              ; preds = %104, %92
  br label %106

106:                                              ; preds = %105, %58
  %107 = load i32, ptr %23, align 4, !tbaa !5
  %108 = load i32, ptr %24, align 4, !tbaa !5
  %109 = load i32, ptr %25, align 4, !tbaa !5
  %110 = load i32, ptr %26, align 4, !tbaa !5
  %111 = load ptr, ptr %27, align 8, !tbaa !9
  %112 = load i32, ptr %28, align 4, !tbaa !5
  %113 = load ptr, ptr %29, align 8, !tbaa !9
  %114 = load i32, ptr %30, align 4, !tbaa !5
  %115 = load ptr, ptr %31, align 8, !tbaa !9
  %116 = load i32, ptr %32, align 4, !tbaa !5
  %117 = load ptr, ptr %33, align 8, !tbaa !9
  %118 = load ptr, ptr %34, align 8, !tbaa !9
  %119 = load ptr, ptr %35, align 8, !tbaa !9
  %120 = load ptr, ptr %36, align 8, !tbaa !9
  %121 = load i32, ptr %37, align 4, !tbaa !5
  %122 = load ptr, ptr %38, align 8, !tbaa !9
  %123 = load i32, ptr %39, align 4, !tbaa !5
  %124 = load ptr, ptr %40, align 8, !tbaa !9
  %125 = load ptr, ptr %41, align 8, !tbaa !9
  %126 = load ptr, ptr %42, align 8, !tbaa !9
  %127 = load ptr, ptr %43, align 8, !tbaa !9
  %128 = load i32, ptr %46, align 4, !tbaa !5
  %129 = load i32, ptr %45, align 4, !tbaa !5
  %130 = call i32 @LAPACKE_dtgsen_work(i32 noundef %107, i32 noundef %108, i32 noundef %109, i32 noundef %110, ptr noundef %111, i32 noundef %112, ptr noundef %113, i32 noundef %114, ptr noundef %115, i32 noundef %116, ptr noundef %117, ptr noundef %118, ptr noundef %119, ptr noundef %120, i32 noundef %121, ptr noundef %122, i32 noundef %123, ptr noundef %124, ptr noundef %125, ptr noundef %126, ptr noundef %127, ptr noundef %50, i32 noundef %128, ptr noundef %49, i32 noundef %129)
  store i32 %130, ptr %44, align 4, !tbaa !5
  %131 = load i32, ptr %44, align 4, !tbaa !5
  %132 = icmp ne i32 %131, 0
  br i1 %132, label %133, label %134

133:                                              ; preds = %106
  br label %183

134:                                              ; preds = %106
  %135 = load i32, ptr %49, align 4, !tbaa !5
  store i32 %135, ptr %45, align 4, !tbaa !5
  %136 = load double, ptr %50, align 8, !tbaa !11
  %137 = fptosi double %136 to i32
  store i32 %137, ptr %46, align 4, !tbaa !5
  %138 = load i32, ptr %45, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = mul i64 4, %139
  %141 = call noalias ptr @malloc(i64 noundef %140) #6
  store ptr %141, ptr %47, align 8, !tbaa !9
  %142 = load ptr, ptr %47, align 8, !tbaa !9
  %143 = icmp eq ptr %142, null
  br i1 %143, label %144, label %145

144:                                              ; preds = %134
  store i32 -1010, ptr %44, align 4, !tbaa !5
  br label %183

145:                                              ; preds = %134
  %146 = load i32, ptr %46, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = mul i64 8, %147
  %149 = call noalias ptr @malloc(i64 noundef %148) #6
  store ptr %149, ptr %48, align 8, !tbaa !9
  %150 = load ptr, ptr %48, align 8, !tbaa !9
  %151 = icmp eq ptr %150, null
  br i1 %151, label %152, label %153

152:                                              ; preds = %145
  store i32 -1010, ptr %44, align 4, !tbaa !5
  br label %181

153:                                              ; preds = %145
  %154 = load i32, ptr %23, align 4, !tbaa !5
  %155 = load i32, ptr %24, align 4, !tbaa !5
  %156 = load i32, ptr %25, align 4, !tbaa !5
  %157 = load i32, ptr %26, align 4, !tbaa !5
  %158 = load ptr, ptr %27, align 8, !tbaa !9
  %159 = load i32, ptr %28, align 4, !tbaa !5
  %160 = load ptr, ptr %29, align 8, !tbaa !9
  %161 = load i32, ptr %30, align 4, !tbaa !5
  %162 = load ptr, ptr %31, align 8, !tbaa !9
  %163 = load i32, ptr %32, align 4, !tbaa !5
  %164 = load ptr, ptr %33, align 8, !tbaa !9
  %165 = load ptr, ptr %34, align 8, !tbaa !9
  %166 = load ptr, ptr %35, align 8, !tbaa !9
  %167 = load ptr, ptr %36, align 8, !tbaa !9
  %168 = load i32, ptr %37, align 4, !tbaa !5
  %169 = load ptr, ptr %38, align 8, !tbaa !9
  %170 = load i32, ptr %39, align 4, !tbaa !5
  %171 = load ptr, ptr %40, align 8, !tbaa !9
  %172 = load ptr, ptr %41, align 8, !tbaa !9
  %173 = load ptr, ptr %42, align 8, !tbaa !9
  %174 = load ptr, ptr %43, align 8, !tbaa !9
  %175 = load ptr, ptr %48, align 8, !tbaa !9
  %176 = load i32, ptr %46, align 4, !tbaa !5
  %177 = load ptr, ptr %47, align 8, !tbaa !9
  %178 = load i32, ptr %45, align 4, !tbaa !5
  %179 = call i32 @LAPACKE_dtgsen_work(i32 noundef %154, i32 noundef %155, i32 noundef %156, i32 noundef %157, ptr noundef %158, i32 noundef %159, ptr noundef %160, i32 noundef %161, ptr noundef %162, i32 noundef %163, ptr noundef %164, ptr noundef %165, ptr noundef %166, ptr noundef %167, i32 noundef %168, ptr noundef %169, i32 noundef %170, ptr noundef %171, ptr noundef %172, ptr noundef %173, ptr noundef %174, ptr noundef %175, i32 noundef %176, ptr noundef %177, i32 noundef %178)
  store i32 %179, ptr %44, align 4, !tbaa !5
  %180 = load ptr, ptr %48, align 8, !tbaa !9
  call void @free(ptr noundef %180) #5
  br label %181

181:                                              ; preds = %153, %152
  %182 = load ptr, ptr %47, align 8, !tbaa !9
  call void @free(ptr noundef %182) #5
  br label %183

183:                                              ; preds = %181, %144, %133
  %184 = load i32, ptr %44, align 4, !tbaa !5
  %185 = icmp eq i32 %184, -1010
  br i1 %185, label %186, label %188

186:                                              ; preds = %183
  %187 = load i32, ptr %44, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %187)
  br label %188

188:                                              ; preds = %186, %183
  %189 = load i32, ptr %44, align 4, !tbaa !5
  store i32 %189, ptr %22, align 4
  store i32 1, ptr %51, align 4
  br label %190

190:                                              ; preds = %188, %103, %90, %78, %69, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #5
  %191 = load i32, ptr %22, align 4
  ret i32 %191
}

; 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

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

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

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

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

25:                                               ; preds = %21
  tail call void @LAPACKE_xerbla(ptr noundef nonnull @.str, i32 noundef -1) #5
  br label %58

26:                                               ; preds = %21
  %27 = tail call i32 @LAPACKE_get_nancheck() #5
  %.not = icmp eq i32 %27, 0
  br i1 %.not, label %38, label %28

28:                                               ; preds = %26
  %29 = tail call i32 @LAPACKE_dge_nancheck(i32 noundef %0, i32 noundef %5, i32 noundef %5, ptr noundef %6, i32 noundef %7) #5
  %.not87 = icmp eq i32 %29, 0
  br i1 %.not87, label %30, label %58

30:                                               ; preds = %28
  %31 = tail call i32 @LAPACKE_dge_nancheck(i32 noundef %0, i32 noundef %5, i32 noundef %5, ptr noundef %8, i32 noundef %9) #5
  %.not88 = icmp eq i32 %31, 0
  br i1 %.not88, label %32, label %58

32:                                               ; preds = %30
  %.not89 = icmp eq i32 %2, 0
  br i1 %.not89, label %35, label %33

33:                                               ; preds = %32
  %34 = tail call i32 @LAPACKE_dge_nancheck(i32 noundef %0, i32 noundef %5, i32 noundef %5, ptr noundef %13, i32 noundef %14) #5
  %.not90 = icmp eq i32 %34, 0
  br i1 %.not90, label %35, label %58

35:                                               ; preds = %33, %32
  %.not91 = icmp eq i32 %3, 0
  br i1 %.not91, label %38, label %36

36:                                               ; preds = %35
  %37 = tail call i32 @LAPACKE_dge_nancheck(i32 noundef %0, i32 noundef %5, i32 noundef %5, ptr noundef %15, i32 noundef %16) #5
  %.not92 = icmp eq i32 %37, 0
  br i1 %.not92, label %38, label %58

38:                                               ; preds = %35, %36, %26
  %39 = call i32 @LAPACKE_dtgsen_work(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, ptr noundef %4, i32 noundef %5, ptr noundef %6, i32 noundef %7, ptr noundef %8, i32 noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13, i32 noundef %14, ptr noundef %15, i32 noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef nonnull %23, i32 noundef -1, ptr noundef nonnull %22, i32 noundef -1) #5
  %.not93 = icmp eq i32 %39, 0
  br i1 %.not93, label %40, label %56

40:                                               ; preds = %38
  %41 = load i32, ptr %22, align 4, !tbaa !5
  %42 = load double, ptr %23, align 8, !tbaa !9
  %43 = fptosi double %42 to i32
  %44 = sext i32 %41 to i64
  %45 = shl nsw i64 %44, 2
  %46 = call noalias ptr @malloc(i64 noundef %45) #6
  %47 = icmp eq ptr %46, null
  br i1 %47, label %.thread, label %48

48:                                               ; preds = %40
  %49 = sext i32 %43 to i64
  %50 = shl nsw i64 %49, 3
  %51 = call noalias ptr @malloc(i64 noundef %50) #6
  %52 = icmp eq ptr %51, null
  br i1 %52, label %55, label %53

53:                                               ; preds = %48
  %54 = call i32 @LAPACKE_dtgsen_work(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, ptr noundef %4, i32 noundef %5, ptr noundef %6, i32 noundef %7, ptr noundef %8, i32 noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13, i32 noundef %14, ptr noundef %15, i32 noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef nonnull %51, i32 noundef %43, ptr noundef nonnull %46, i32 noundef %41) #5
  call void @free(ptr noundef nonnull %51) #5
  br label %55

55:                                               ; preds = %48, %53
  %.0 = phi i32 [ %54, %53 ], [ -1010, %48 ]
  call void @free(ptr noundef nonnull %46) #5
  br label %56

56:                                               ; preds = %38, %55
  %.1 = phi i32 [ %39, %38 ], [ %.0, %55 ]
  %57 = icmp eq i32 %.1, -1010
  br i1 %57, label %.thread, label %58

.thread:                                          ; preds = %40, %56
  call void @LAPACKE_xerbla(ptr noundef nonnull @.str, i32 noundef -1010) #5
  br label %58

58:                                               ; preds = %56, %.thread, %36, %33, %30, %28, %25
  %.083 = phi i32 [ -1, %25 ], [ -7, %28 ], [ -9, %30 ], [ -14, %33 ], [ -16, %36 ], [ -1010, %.thread ], [ %.1, %56 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #5
  ret i32 %.083
}

; 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

declare i32 @LAPACKE_dtgsen_work(i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, 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

; 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

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 = { 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 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}


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