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

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

52:                                               ; preds = %20
  %53 = load i32, ptr %22, align 4, !tbaa !5
  %54 = icmp ne i32 %53, 101
  br i1 %54, label %55, label %56

55:                                               ; preds = %52
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef -1)
  store i32 -1, ptr %21, align 4
  store i32 1, ptr %49, align 4
  br label %186

56:                                               ; preds = %52, %20
  %57 = call i32 @LAPACKE_get_nancheck()
  %58 = icmp ne i32 %57, 0
  br i1 %58, label %59, label %104

59:                                               ; preds = %56
  %60 = load i32, ptr %22, align 4, !tbaa !5
  %61 = load i32, ptr %27, align 4, !tbaa !5
  %62 = load i32, ptr %27, align 4, !tbaa !5
  %63 = load ptr, ptr %28, align 8, !tbaa !9
  %64 = load i32, ptr %29, align 4, !tbaa !5
  %65 = call i32 @LAPACKE_cge_nancheck(i32 noundef %60, i32 noundef %61, i32 noundef %62, ptr noundef %63, i32 noundef %64)
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %67, label %68

67:                                               ; preds = %59
  store i32 -7, ptr %21, align 4
  store i32 1, ptr %49, align 4
  br label %186

68:                                               ; preds = %59
  %69 = load i32, ptr %22, align 4, !tbaa !5
  %70 = load i32, ptr %27, align 4, !tbaa !5
  %71 = load i32, ptr %27, align 4, !tbaa !5
  %72 = load ptr, ptr %30, align 8, !tbaa !9
  %73 = load i32, ptr %31, align 4, !tbaa !5
  %74 = call i32 @LAPACKE_cge_nancheck(i32 noundef %69, i32 noundef %70, i32 noundef %71, ptr noundef %72, i32 noundef %73)
  %75 = icmp ne i32 %74, 0
  br i1 %75, label %76, label %77

76:                                               ; preds = %68
  store i32 -9, ptr %21, align 4
  store i32 1, ptr %49, align 4
  br label %186

77:                                               ; preds = %68
  %78 = load i32, ptr %24, align 4, !tbaa !5
  %79 = icmp ne i32 %78, 0
  br i1 %79, label %80, label %90

80:                                               ; preds = %77
  %81 = load i32, ptr %22, align 4, !tbaa !5
  %82 = load i32, ptr %27, align 4, !tbaa !5
  %83 = load i32, ptr %27, align 4, !tbaa !5
  %84 = load ptr, ptr %34, align 8, !tbaa !9
  %85 = load i32, ptr %35, align 4, !tbaa !5
  %86 = call i32 @LAPACKE_cge_nancheck(i32 noundef %81, i32 noundef %82, i32 noundef %83, ptr noundef %84, i32 noundef %85)
  %87 = icmp ne i32 %86, 0
  br i1 %87, label %88, label %89

88:                                               ; preds = %80
  store i32 -13, ptr %21, align 4
  store i32 1, ptr %49, align 4
  br label %186

89:                                               ; preds = %80
  br label %90

90:                                               ; preds = %89, %77
  %91 = load i32, ptr %25, align 4, !tbaa !5
  %92 = icmp ne i32 %91, 0
  br i1 %92, label %93, label %103

93:                                               ; preds = %90
  %94 = load i32, ptr %22, align 4, !tbaa !5
  %95 = load i32, ptr %27, align 4, !tbaa !5
  %96 = load i32, ptr %27, align 4, !tbaa !5
  %97 = load ptr, ptr %36, align 8, !tbaa !9
  %98 = load i32, ptr %37, align 4, !tbaa !5
  %99 = call i32 @LAPACKE_cge_nancheck(i32 noundef %94, i32 noundef %95, i32 noundef %96, ptr noundef %97, i32 noundef %98)
  %100 = icmp ne i32 %99, 0
  br i1 %100, label %101, label %102

101:                                              ; preds = %93
  store i32 -15, ptr %21, align 4
  store i32 1, ptr %49, align 4
  br label %186

102:                                              ; preds = %93
  br label %103

103:                                              ; preds = %102, %90
  br label %104

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

130:                                              ; preds = %104
  br label %179

131:                                              ; preds = %104
  %132 = load i32, ptr %47, align 4, !tbaa !5
  store i32 %132, ptr %43, align 4, !tbaa !5
  %133 = load float, ptr %48, align 4, !tbaa !11
  %134 = fptosi float %133 to i32
  store i32 %134, ptr %44, align 4, !tbaa !5
  %135 = load i32, ptr %43, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = mul i64 4, %136
  %138 = call noalias ptr @malloc(i64 noundef %137) #6
  store ptr %138, ptr %45, align 8, !tbaa !9
  %139 = load ptr, ptr %45, align 8, !tbaa !9
  %140 = icmp eq ptr %139, null
  br i1 %140, label %141, label %142

141:                                              ; preds = %131
  store i32 -1010, ptr %42, align 4, !tbaa !5
  br label %179

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

149:                                              ; preds = %142
  store i32 -1010, ptr %42, align 4, !tbaa !5
  br label %177

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

177:                                              ; preds = %150, %149
  %178 = load ptr, ptr %45, align 8, !tbaa !9
  call void @free(ptr noundef %178) #5
  br label %179

179:                                              ; preds = %177, %141, %130
  %180 = load i32, ptr %42, align 4, !tbaa !5
  %181 = icmp eq i32 %180, -1010
  br i1 %181, label %182, label %184

182:                                              ; preds = %179
  %183 = load i32, ptr %42, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %183)
  br label %184

184:                                              ; preds = %182, %179
  %185 = load i32, ptr %42, align 4, !tbaa !5
  store i32 %185, ptr %21, align 4
  store i32 1, ptr %49, align 4
  br label %186

186:                                              ; preds = %184, %101, %88, %76, %67, %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #5
  %187 = load i32, ptr %21, align 4
  ret i32 %187
}

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

declare i32 @LAPACKE_ctgsen_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, 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 = !{!"float", !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_ctgsen(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, i32 noundef %13, ptr noundef %14, i32 noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %19) local_unnamed_addr #0 {
  %21 = alloca i32, align 4
  %22 = alloca { float, float }, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %21) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #5
  %23 = add i32 %0, -103
  %or.cond = icmp ult i32 %23, -2
  br i1 %or.cond, label %24, label %25

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

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

27:                                               ; preds = %25
  %28 = tail call i32 @LAPACKE_cge_nancheck(i32 noundef %0, i32 noundef %5, i32 noundef %5, ptr noundef %6, i32 noundef %7) #5
  %.not85 = icmp eq i32 %28, 0
  br i1 %.not85, label %29, label %57

29:                                               ; preds = %27
  %30 = tail call i32 @LAPACKE_cge_nancheck(i32 noundef %0, i32 noundef %5, i32 noundef %5, ptr noundef %8, i32 noundef %9) #5
  %.not86 = icmp eq i32 %30, 0
  br i1 %.not86, label %31, label %57

31:                                               ; preds = %29
  %.not87 = icmp eq i32 %2, 0
  br i1 %.not87, label %34, label %32

32:                                               ; preds = %31
  %33 = tail call i32 @LAPACKE_cge_nancheck(i32 noundef %0, i32 noundef %5, i32 noundef %5, ptr noundef %12, i32 noundef %13) #5
  %.not88 = icmp eq i32 %33, 0
  br i1 %.not88, label %34, label %57

34:                                               ; preds = %32, %31
  %.not89 = icmp eq i32 %3, 0
  br i1 %.not89, label %37, label %35

35:                                               ; preds = %34
  %36 = tail call i32 @LAPACKE_cge_nancheck(i32 noundef %0, i32 noundef %5, i32 noundef %5, ptr noundef %14, i32 noundef %15) #5
  %.not90 = icmp eq i32 %36, 0
  br i1 %.not90, label %37, label %57

37:                                               ; preds = %34, %35, %25
  %38 = call i32 @LAPACKE_ctgsen_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, i32 noundef %13, ptr noundef %14, i32 noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef nonnull %22, i32 noundef -1, ptr noundef nonnull %21, i32 noundef -1) #5
  %.not91 = icmp eq i32 %38, 0
  br i1 %.not91, label %39, label %55

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

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

52:                                               ; preds = %47
  %53 = call i32 @LAPACKE_ctgsen_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, i32 noundef %13, ptr noundef %14, i32 noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef nonnull %50, i32 noundef %42, ptr noundef nonnull %45, i32 noundef %40) #5
  call void @free(ptr noundef nonnull %50) #5
  br label %54

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

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

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

57:                                               ; preds = %55, %.thread, %35, %32, %29, %27, %24
  %.081 = phi i32 [ -1, %24 ], [ -7, %27 ], [ -9, %29 ], [ -13, %32 ], [ -15, %35 ], [ -1010, %.thread ], [ %.1, %55 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #5
  ret i32 %.081
}

; 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_cge_nancheck(i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @LAPACKE_ctgsen_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, 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 = !{!"float", !7, i64 0}


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