; LLVM IR from OpenMathLib/OpenBLAS :: lapack-netlib/LAPACKE/src (lapacke_cungtsqr_row_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 [26 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @LAPACKE_cungtsqr_row_work(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef %5, i32 noundef %6, ptr noundef %7, i32 noundef %8, ptr noundef %9, i32 noundef %10) #0 {
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %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 i32, align 4
  %29 = alloca ptr, align 8
  store i32 %0, ptr %13, align 4, !tbaa !5
  store i32 %1, ptr %14, align 4, !tbaa !5
  store i32 %2, ptr %15, align 4, !tbaa !5
  store i32 %3, ptr %16, align 4, !tbaa !5
  store i32 %4, ptr %17, align 4, !tbaa !5
  store ptr %5, ptr %18, align 8, !tbaa !9
  store i32 %6, ptr %19, align 4, !tbaa !5
  store ptr %7, ptr %20, align 8, !tbaa !9
  store i32 %8, ptr %21, align 4, !tbaa !5
  store ptr %9, ptr %22, align 8, !tbaa !9
  store i32 %10, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store i32 0, ptr %24, align 4, !tbaa !5
  %30 = load i32, ptr %13, align 4, !tbaa !5
  %31 = icmp eq i32 %30, 102
  br i1 %31, label %32, label %42

32:                                               ; preds = %11
  %33 = load ptr, ptr %18, align 8, !tbaa !9
  %34 = load ptr, ptr %20, align 8, !tbaa !9
  %35 = load ptr, ptr %22, align 8, !tbaa !9
  call void @cungtsqr_row_(ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %33, ptr noundef %19, ptr noundef %34, ptr noundef %21, ptr noundef %35, ptr noundef %23, ptr noundef %24)
  %36 = load i32, ptr %24, align 4, !tbaa !5
  %37 = icmp slt i32 %36, 0
  br i1 %37, label %38, label %41

38:                                               ; preds = %32
  %39 = load i32, ptr %24, align 4, !tbaa !5
  %40 = sub nsw i32 %39, 1
  store i32 %40, ptr %24, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %38, %32
  br label %169

42:                                               ; preds = %11
  %43 = load i32, ptr %13, align 4, !tbaa !5
  %44 = icmp eq i32 %43, 101
  br i1 %44, label %45, label %166

45:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  %46 = load i32, ptr %14, align 4, !tbaa !5
  %47 = icmp sgt i32 1, %46
  br i1 %47, label %48, label %49

48:                                               ; preds = %45
  br label %51

49:                                               ; preds = %45
  %50 = load i32, ptr %14, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %49, %48
  %52 = phi i32 [ 1, %48 ], [ %50, %49 ]
  store i32 %52, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  store ptr null, ptr %26, align 8, !tbaa !9
  %53 = load i32, ptr %19, align 4, !tbaa !5
  %54 = load i32, ptr %15, align 4, !tbaa !5
  %55 = icmp slt i32 %53, %54
  br i1 %55, label %56, label %59

56:                                               ; preds = %51
  store i32 -7, ptr %24, align 4, !tbaa !5
  %57 = load i32, ptr %24, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %57)
  %58 = load i32, ptr %24, align 4, !tbaa !5
  store i32 %58, ptr %12, align 4
  store i32 1, ptr %27, align 4
  br label %163

59:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  %60 = load i32, ptr %17, align 4, !tbaa !5
  %61 = icmp sgt i32 1, %60
  br i1 %61, label %62, label %63

62:                                               ; preds = %59
  br label %65

63:                                               ; preds = %59
  %64 = load i32, ptr %17, align 4, !tbaa !5
  br label %65

65:                                               ; preds = %63, %62
  %66 = phi i32 [ 1, %62 ], [ %64, %63 ]
  store i32 %66, ptr %28, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  store ptr null, ptr %29, align 8, !tbaa !9
  %67 = load i32, ptr %21, align 4, !tbaa !5
  %68 = load i32, ptr %15, align 4, !tbaa !5
  %69 = icmp slt i32 %67, %68
  br i1 %69, label %70, label %73

70:                                               ; preds = %65
  store i32 -9, ptr %24, align 4, !tbaa !5
  %71 = load i32, ptr %24, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %71)
  %72 = load i32, ptr %24, align 4, !tbaa !5
  store i32 %72, ptr %12, align 4
  store i32 1, ptr %27, align 4
  br label %162

73:                                               ; preds = %65
  %74 = load i32, ptr %23, align 4, !tbaa !5
  %75 = icmp eq i32 %74, -1
  br i1 %75, label %76, label %89

76:                                               ; preds = %73
  %77 = load ptr, ptr %18, align 8, !tbaa !9
  %78 = load ptr, ptr %20, align 8, !tbaa !9
  %79 = load ptr, ptr %22, align 8, !tbaa !9
  call void @cungtsqr_row_(ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %77, ptr noundef %25, ptr noundef %78, ptr noundef %28, ptr noundef %79, ptr noundef %23, ptr noundef %24)
  %80 = load i32, ptr %24, align 4, !tbaa !5
  %81 = icmp slt i32 %80, 0
  br i1 %81, label %82, label %85

82:                                               ; preds = %76
  %83 = load i32, ptr %24, align 4, !tbaa !5
  %84 = sub nsw i32 %83, 1
  br label %87

85:                                               ; preds = %76
  %86 = load i32, ptr %24, align 4, !tbaa !5
  br label %87

87:                                               ; preds = %85, %82
  %88 = phi i32 [ %84, %82 ], [ %86, %85 ]
  store i32 %88, ptr %12, align 4
  store i32 1, ptr %27, align 4
  br label %162

89:                                               ; preds = %73
  %90 = load i32, ptr %25, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = mul i64 8, %91
  %93 = load i32, ptr %15, align 4, !tbaa !5
  %94 = icmp sgt i32 1, %93
  br i1 %94, label %95, label %96

95:                                               ; preds = %89
  br label %98

96:                                               ; preds = %89
  %97 = load i32, ptr %15, align 4, !tbaa !5
  br label %98

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

105:                                              ; preds = %98
  store i32 -1011, ptr %24, align 4, !tbaa !5
  br label %156

106:                                              ; preds = %98
  %107 = load i32, ptr %28, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = mul i64 8, %108
  %110 = load i32, ptr %15, align 4, !tbaa !5
  %111 = icmp sgt i32 1, %110
  br i1 %111, label %112, label %113

112:                                              ; preds = %106
  br label %115

113:                                              ; preds = %106
  %114 = load i32, ptr %15, align 4, !tbaa !5
  br label %115

115:                                              ; preds = %113, %112
  %116 = phi i32 [ 1, %112 ], [ %114, %113 ]
  %117 = sext i32 %116 to i64
  %118 = mul i64 %109, %117
  %119 = call noalias ptr @malloc(i64 noundef %118) #6
  store ptr %119, ptr %29, align 8, !tbaa !9
  %120 = load ptr, ptr %29, align 8, !tbaa !9
  %121 = icmp eq ptr %120, null
  br i1 %121, label %122, label %123

122:                                              ; preds = %115
  store i32 -1011, ptr %24, align 4, !tbaa !5
  br label %154

123:                                              ; preds = %115
  %124 = load i32, ptr %13, align 4, !tbaa !5
  %125 = load i32, ptr %14, align 4, !tbaa !5
  %126 = load i32, ptr %15, align 4, !tbaa !5
  %127 = load ptr, ptr %18, align 8, !tbaa !9
  %128 = load i32, ptr %19, align 4, !tbaa !5
  %129 = load ptr, ptr %26, align 8, !tbaa !9
  %130 = load i32, ptr %25, align 4, !tbaa !5
  call void @LAPACKE_cge_trans(i32 noundef %124, i32 noundef %125, i32 noundef %126, ptr noundef %127, i32 noundef %128, ptr noundef %129, i32 noundef %130)
  %131 = load i32, ptr %13, align 4, !tbaa !5
  %132 = load i32, ptr %17, align 4, !tbaa !5
  %133 = load i32, ptr %15, align 4, !tbaa !5
  %134 = load ptr, ptr %18, align 8, !tbaa !9
  %135 = load i32, ptr %19, align 4, !tbaa !5
  %136 = load ptr, ptr %29, align 8, !tbaa !9
  %137 = load i32, ptr %28, align 4, !tbaa !5
  call void @LAPACKE_cge_trans(i32 noundef %131, i32 noundef %132, i32 noundef %133, ptr noundef %134, i32 noundef %135, ptr noundef %136, i32 noundef %137)
  %138 = load ptr, ptr %26, align 8, !tbaa !9
  %139 = load ptr, ptr %29, align 8, !tbaa !9
  %140 = load ptr, ptr %22, align 8, !tbaa !9
  call void @cungtsqr_row_(ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %138, ptr noundef %25, ptr noundef %139, ptr noundef %28, ptr noundef %140, ptr noundef %23, ptr noundef %24)
  %141 = load i32, ptr %24, align 4, !tbaa !5
  %142 = icmp slt i32 %141, 0
  br i1 %142, label %143, label %146

143:                                              ; preds = %123
  %144 = load i32, ptr %24, align 4, !tbaa !5
  %145 = sub nsw i32 %144, 1
  store i32 %145, ptr %24, align 4, !tbaa !5
  br label %146

146:                                              ; preds = %143, %123
  %147 = load i32, ptr %14, align 4, !tbaa !5
  %148 = load i32, ptr %15, align 4, !tbaa !5
  %149 = load ptr, ptr %26, align 8, !tbaa !9
  %150 = load i32, ptr %25, align 4, !tbaa !5
  %151 = load ptr, ptr %18, align 8, !tbaa !9
  %152 = load i32, ptr %19, align 4, !tbaa !5
  call void @LAPACKE_cge_trans(i32 noundef 102, i32 noundef %147, i32 noundef %148, ptr noundef %149, i32 noundef %150, ptr noundef %151, i32 noundef %152)
  %153 = load ptr, ptr %29, align 8, !tbaa !9
  call void @free(ptr noundef %153) #5
  br label %154

154:                                              ; preds = %146, %122
  %155 = load ptr, ptr %26, align 8, !tbaa !9
  call void @free(ptr noundef %155) #5
  br label %156

156:                                              ; preds = %154, %105
  %157 = load i32, ptr %24, align 4, !tbaa !5
  %158 = icmp eq i32 %157, -1011
  br i1 %158, label %159, label %161

159:                                              ; preds = %156
  %160 = load i32, ptr %24, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %160)
  br label %161

161:                                              ; preds = %159, %156
  store i32 0, ptr %27, align 4
  br label %162

162:                                              ; preds = %161, %87, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  br label %163

163:                                              ; preds = %162, %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  %164 = load i32, ptr %27, align 4
  switch i32 %164, label %171 [
    i32 0, label %165
  ]

165:                                              ; preds = %163
  br label %168

166:                                              ; preds = %42
  store i32 -1, ptr %24, align 4, !tbaa !5
  %167 = load i32, ptr %24, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %167)
  br label %168

168:                                              ; preds = %166, %165
  br label %169

169:                                              ; preds = %168, %41
  %170 = load i32, ptr %24, align 4, !tbaa !5
  store i32 %170, ptr %12, align 4
  store i32 1, ptr %27, align 4
  br label %171

171:                                              ; preds = %169, %163
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  %172 = load i32, ptr %12, 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 @cungtsqr_row_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr 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_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 = !{!10, !10, i64 0}
!10 = !{!"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 [26 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @LAPACKE_cungtsqr_row_work(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef %5, i32 noundef %6, ptr noundef %7, i32 noundef %8, ptr noundef %9, i32 noundef %10) local_unnamed_addr #0 {
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %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
  store i32 %1, ptr %12, align 4, !tbaa !5
  store i32 %2, ptr %13, align 4, !tbaa !5
  store i32 %3, ptr %14, align 4, !tbaa !5
  store i32 %4, ptr %15, align 4, !tbaa !5
  store i32 %6, ptr %16, align 4, !tbaa !5
  store i32 %8, ptr %17, align 4, !tbaa !5
  store i32 %10, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #6
  store i32 0, ptr %19, align 4, !tbaa !5
  switch i32 %0, label %62 [
    i32 102, label %22
    i32 101, label %24
  ]

22:                                               ; preds = %11
  call void @cungtsqr_row_(ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef %5, ptr noundef nonnull %16, ptr noundef %7, ptr noundef nonnull %17, ptr noundef %9, ptr noundef nonnull %18, ptr noundef nonnull %19) #6
  %23 = load i32, ptr %19, align 4, !tbaa !5
  %.lobit41 = ashr i32 %23, 31
  %spec.select = add nsw i32 %23, %.lobit41
  br label %63

24:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #6
  %25 = tail call i32 @llvm.smax.i32(i32 %1, i32 1)
  store i32 %25, ptr %20, align 4, !tbaa !5
  %26 = icmp slt i32 %6, %2
  br i1 %26, label %.thread35, label %27

.thread35:                                        ; preds = %24
  tail call void @LAPACKE_xerbla(ptr noundef nonnull @.str, i32 noundef -7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #6
  br label %63

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

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

31:                                               ; preds = %27
  %32 = icmp eq i32 %10, -1
  br i1 %32, label %33, label %36

33:                                               ; preds = %31
  call void @cungtsqr_row_(ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef %5, ptr noundef nonnull %20, ptr noundef %7, ptr noundef nonnull %21, ptr noundef %9, ptr noundef nonnull %18, ptr noundef nonnull %19) #6
  %34 = load i32, ptr %19, align 4
  %.lobit = ashr i32 %34, 31
  %35 = add nsw i32 %.lobit, %34
  br label %61

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

.thread:                                          ; preds = %36
  store i32 -1011, ptr %19, align 4, !tbaa !5
  br label %60

44:                                               ; preds = %36
  %45 = zext nneg i32 %28 to i64
  %46 = shl nuw nsw i64 %40, 3
  %47 = mul i64 %46, %45
  %48 = tail call noalias ptr @malloc(i64 noundef %47) #7
  %49 = icmp eq ptr %48, null
  br i1 %49, label %.thread33, label %50

.thread33:                                        ; preds = %44
  store i32 -1011, ptr %19, align 4, !tbaa !5
  tail call void @free(ptr noundef nonnull %42) #6
  br label %60

50:                                               ; preds = %44
  tail call void @LAPACKE_cge_trans(i32 noundef 101, i32 noundef %1, i32 noundef %2, ptr noundef %5, i32 noundef %6, ptr noundef nonnull %42, i32 noundef %25) #6
  tail call void @LAPACKE_cge_trans(i32 noundef 101, i32 noundef %4, i32 noundef %2, ptr noundef %5, i32 noundef %6, ptr noundef nonnull %48, i32 noundef %28) #6
  call void @cungtsqr_row_(ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull %42, ptr noundef nonnull %20, ptr noundef nonnull %48, ptr noundef nonnull %21, ptr noundef %9, ptr noundef nonnull %18, ptr noundef nonnull %19) #6
  %51 = load i32, ptr %19, align 4, !tbaa !5
  %52 = icmp slt i32 %51, 0
  br i1 %52, label %53, label %55

53:                                               ; preds = %50
  %54 = add nsw i32 %51, -1
  store i32 %54, ptr %19, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %50, %53
  %56 = load i32, ptr %12, align 4, !tbaa !5
  %57 = load i32, ptr %13, align 4, !tbaa !5
  %58 = load i32, ptr %20, align 4, !tbaa !5
  call void @LAPACKE_cge_trans(i32 noundef 102, i32 noundef %56, i32 noundef %57, ptr noundef nonnull %42, i32 noundef %58, ptr noundef %5, i32 noundef %6) #6
  call void @free(ptr noundef nonnull %48) #6
  %.pr.pr = load i32, ptr %19, align 4, !tbaa !5
  call void @free(ptr noundef nonnull %42) #6
  %59 = icmp eq i32 %.pr.pr, -1011
  br i1 %59, label %60, label %.thread38

60:                                               ; preds = %.thread33, %.thread, %55
  call void @LAPACKE_xerbla(ptr noundef nonnull @.str, i32 noundef -1011) #6
  %.pre.pre = load i32, ptr %19, align 4, !tbaa !5
  br label %.thread38

.thread38:                                        ; preds = %60, %55
  %.pre = phi i32 [ %.pre.pre, %60 ], [ %.pr.pr, %55 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #6
  br label %63

61:                                               ; preds = %30, %33
  %.024 = phi i32 [ -9, %30 ], [ %35, %33 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #6
  br label %63

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

63:                                               ; preds = %22, %62, %.thread38, %61, %.thread35
  %.2 = phi i32 [ %.024, %61 ], [ -7, %.thread35 ], [ %.pre, %.thread38 ], [ -1, %62 ], [ %spec.select, %22 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #6
  ret i32 %.2
}

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

declare void @cungtsqr_row_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr 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_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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}


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