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

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

34:                                               ; preds = %12
  %35 = load ptr, ptr %20, align 8, !tbaa !9
  %36 = load ptr, ptr %22, align 8, !tbaa !9
  %37 = load ptr, ptr %24, align 8, !tbaa !9
  call void @cgetsqrhrt_(ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %35, ptr noundef %21, ptr noundef %36, ptr noundef %23, ptr noundef %37, ptr noundef %25, ptr noundef %26)
  %38 = load i32, ptr %26, align 4, !tbaa !5
  %39 = icmp slt i32 %38, 0
  br i1 %39, label %40, label %43

40:                                               ; preds = %34
  %41 = load i32, ptr %26, align 4, !tbaa !5
  %42 = sub nsw i32 %41, 1
  store i32 %42, ptr %26, align 4, !tbaa !5
  br label %43

43:                                               ; preds = %40, %34
  br label %169

44:                                               ; preds = %12
  %45 = load i32, ptr %14, align 4, !tbaa !5
  %46 = icmp eq i32 %45, 101
  br i1 %46, label %47, label %166

47:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  %48 = load i32, ptr %15, align 4, !tbaa !5
  %49 = icmp sgt i32 1, %48
  br i1 %49, label %50, label %51

50:                                               ; preds = %47
  br label %53

51:                                               ; preds = %47
  %52 = load i32, ptr %15, align 4, !tbaa !5
  br label %53

53:                                               ; preds = %51, %50
  %54 = phi i32 [ 1, %50 ], [ %52, %51 ]
  store i32 %54, ptr %27, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  store ptr null, ptr %28, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  %55 = load i32, ptr %19, align 4, !tbaa !5
  %56 = icmp sgt i32 1, %55
  br i1 %56, label %57, label %58

57:                                               ; preds = %53
  br label %60

58:                                               ; preds = %53
  %59 = load i32, ptr %19, align 4, !tbaa !5
  br label %60

60:                                               ; preds = %58, %57
  %61 = phi i32 [ 1, %57 ], [ %59, %58 ]
  store i32 %61, ptr %29, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  store ptr null, ptr %30, align 8, !tbaa !9
  %62 = load i32, ptr %21, align 4, !tbaa !5
  %63 = load i32, ptr %16, align 4, !tbaa !5
  %64 = icmp slt i32 %62, %63
  br i1 %64, label %65, label %68

65:                                               ; preds = %60
  store i32 -8, ptr %26, align 4, !tbaa !5
  %66 = load i32, ptr %26, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %66)
  %67 = load i32, ptr %26, align 4, !tbaa !5
  store i32 %67, ptr %13, align 4
  store i32 1, ptr %31, align 4
  br label %163

68:                                               ; preds = %60
  %69 = load i32, ptr %23, align 4, !tbaa !5
  %70 = load i32, ptr %16, align 4, !tbaa !5
  %71 = icmp slt i32 %69, %70
  br i1 %71, label %72, label %75

72:                                               ; preds = %68
  store i32 -10, ptr %26, align 4, !tbaa !5
  %73 = load i32, ptr %26, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %73)
  %74 = load i32, ptr %26, align 4, !tbaa !5
  store i32 %74, ptr %13, align 4
  store i32 1, ptr %31, align 4
  br label %163

75:                                               ; preds = %68
  %76 = load i32, ptr %25, align 4, !tbaa !5
  %77 = icmp eq i32 %76, -1
  br i1 %77, label %78, label %91

78:                                               ; preds = %75
  %79 = load ptr, ptr %20, align 8, !tbaa !9
  %80 = load ptr, ptr %22, align 8, !tbaa !9
  %81 = load ptr, ptr %24, align 8, !tbaa !9
  call void @cgetsqrhrt_(ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %79, ptr noundef %27, ptr noundef %80, ptr noundef %29, ptr noundef %81, ptr noundef %25, ptr noundef %26)
  %82 = load i32, ptr %26, align 4, !tbaa !5
  %83 = icmp slt i32 %82, 0
  br i1 %83, label %84, label %87

84:                                               ; preds = %78
  %85 = load i32, ptr %26, align 4, !tbaa !5
  %86 = sub nsw i32 %85, 1
  br label %89

87:                                               ; preds = %78
  %88 = load i32, ptr %26, align 4, !tbaa !5
  br label %89

89:                                               ; preds = %87, %84
  %90 = phi i32 [ %86, %84 ], [ %88, %87 ]
  store i32 %90, ptr %13, align 4
  store i32 1, ptr %31, align 4
  br label %163

91:                                               ; preds = %75
  %92 = load i32, ptr %27, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = mul i64 8, %93
  %95 = load i32, ptr %16, align 4, !tbaa !5
  %96 = icmp sgt i32 1, %95
  br i1 %96, label %97, label %98

97:                                               ; preds = %91
  br label %100

98:                                               ; preds = %91
  %99 = load i32, ptr %16, align 4, !tbaa !5
  br label %100

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

107:                                              ; preds = %100
  store i32 -1011, ptr %26, align 4, !tbaa !5
  br label %157

108:                                              ; preds = %100
  %109 = load i32, ptr %29, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = mul i64 8, %110
  %112 = load i32, ptr %16, align 4, !tbaa !5
  %113 = icmp sgt i32 1, %112
  br i1 %113, label %114, label %115

114:                                              ; preds = %108
  br label %117

115:                                              ; preds = %108
  %116 = load i32, ptr %16, align 4, !tbaa !5
  br label %117

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

124:                                              ; preds = %117
  store i32 -1011, ptr %26, align 4, !tbaa !5
  br label %155

125:                                              ; preds = %117
  %126 = load i32, ptr %14, align 4, !tbaa !5
  %127 = load i32, ptr %15, align 4, !tbaa !5
  %128 = load i32, ptr %16, align 4, !tbaa !5
  %129 = load ptr, ptr %20, align 8, !tbaa !9
  %130 = load i32, ptr %21, align 4, !tbaa !5
  %131 = load ptr, ptr %28, align 8, !tbaa !9
  %132 = load i32, ptr %27, align 4, !tbaa !5
  call void @LAPACKE_cge_trans(i32 noundef %126, i32 noundef %127, i32 noundef %128, ptr noundef %129, i32 noundef %130, ptr noundef %131, i32 noundef %132)
  %133 = load ptr, ptr %28, align 8, !tbaa !9
  %134 = load ptr, ptr %30, align 8, !tbaa !9
  %135 = load ptr, ptr %24, align 8, !tbaa !9
  call void @cgetsqrhrt_(ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %133, ptr noundef %27, ptr noundef %134, ptr noundef %29, ptr noundef %135, ptr noundef %25, ptr noundef %26)
  %136 = load i32, ptr %26, align 4, !tbaa !5
  %137 = icmp slt i32 %136, 0
  br i1 %137, label %138, label %141

138:                                              ; preds = %125
  %139 = load i32, ptr %26, align 4, !tbaa !5
  %140 = sub nsw i32 %139, 1
  store i32 %140, ptr %26, align 4, !tbaa !5
  br label %141

141:                                              ; preds = %138, %125
  %142 = load i32, ptr %15, align 4, !tbaa !5
  %143 = load i32, ptr %16, align 4, !tbaa !5
  %144 = load ptr, ptr %28, align 8, !tbaa !9
  %145 = load i32, ptr %27, align 4, !tbaa !5
  %146 = load ptr, ptr %20, align 8, !tbaa !9
  %147 = load i32, ptr %21, align 4, !tbaa !5
  call void @LAPACKE_cge_trans(i32 noundef 102, i32 noundef %142, i32 noundef %143, ptr noundef %144, i32 noundef %145, ptr noundef %146, i32 noundef %147)
  %148 = load i32, ptr %19, align 4, !tbaa !5
  %149 = load i32, ptr %16, align 4, !tbaa !5
  %150 = load ptr, ptr %30, align 8, !tbaa !9
  %151 = load i32, ptr %29, align 4, !tbaa !5
  %152 = load ptr, ptr %22, align 8, !tbaa !9
  %153 = load i32, ptr %23, align 4, !tbaa !5
  call void @LAPACKE_cge_trans(i32 noundef 102, i32 noundef %148, i32 noundef %149, ptr noundef %150, i32 noundef %151, ptr noundef %152, i32 noundef %153)
  %154 = load ptr, ptr %30, align 8, !tbaa !9
  call void @free(ptr noundef %154) #5
  br label %155

155:                                              ; preds = %141, %124
  %156 = load ptr, ptr %28, align 8, !tbaa !9
  call void @free(ptr noundef %156) #5
  br label %157

157:                                              ; preds = %155, %107
  %158 = load i32, ptr %26, align 4, !tbaa !5
  %159 = icmp eq i32 %158, -1011
  br i1 %159, label %160, label %162

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

162:                                              ; preds = %160, %157
  store i32 0, ptr %31, align 4
  br label %163

163:                                              ; preds = %162, %89, %72, %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  %164 = load i32, ptr %31, align 4
  switch i32 %164, label %171 [
    i32 0, label %165
  ]

165:                                              ; preds = %163
  br label %168

166:                                              ; preds = %44
  store i32 -1, ptr %26, align 4, !tbaa !5
  %167 = load i32, ptr %26, 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, %43
  %170 = load i32, ptr %26, align 4, !tbaa !5
  store i32 %170, ptr %13, align 4
  store i32 1, ptr %31, align 4
  br label %171

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

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

24:                                               ; preds = %12
  call void @cgetsqrhrt_(ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef %6, ptr noundef nonnull %18, ptr noundef %8, ptr noundef nonnull %19, ptr noundef %10, ptr noundef nonnull %20, ptr noundef nonnull %21) #6
  %25 = load i32, ptr %21, align 4, !tbaa !5
  %.lobit37 = ashr i32 %25, 31
  %spec.select = add nsw i32 %25, %.lobit37
  br label %69

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

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

31:                                               ; preds = %26
  %32 = icmp slt i32 %9, %2
  br i1 %32, label %33, label %34

33:                                               ; preds = %31
  tail call void @LAPACKE_xerbla(ptr noundef nonnull @.str, i32 noundef -10) #6
  br label %.thread33

34:                                               ; preds = %31
  %35 = icmp eq i32 %11, -1
  br i1 %35, label %36, label %39

36:                                               ; preds = %34
  call void @cgetsqrhrt_(ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef %6, ptr noundef nonnull %22, ptr noundef %8, ptr noundef nonnull %23, ptr noundef %10, ptr noundef nonnull %20, ptr noundef nonnull %21) #6
  %37 = load i32, ptr %21, align 4
  %.lobit = ashr i32 %37, 31
  %38 = add nsw i32 %.lobit, %37
  br label %.thread33

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

.thread:                                          ; preds = %39
  store i32 -1011, ptr %21, align 4, !tbaa !5
  br label %66

47:                                               ; preds = %39
  %48 = zext nneg i32 %28 to i64
  %49 = shl nuw nsw i64 %43, 3
  %50 = mul i64 %49, %48
  %51 = tail call noalias ptr @malloc(i64 noundef %50) #7
  %52 = icmp eq ptr %51, null
  br i1 %52, label %.thread31, label %53

.thread31:                                        ; preds = %47
  store i32 -1011, ptr %21, align 4, !tbaa !5
  tail call void @free(ptr noundef nonnull %45) #6
  br label %66

53:                                               ; preds = %47
  tail call void @LAPACKE_cge_trans(i32 noundef 101, i32 noundef %1, i32 noundef %2, ptr noundef %6, i32 noundef %7, ptr noundef nonnull %45, i32 noundef %27) #6
  call void @cgetsqrhrt_(ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef nonnull %45, ptr noundef nonnull %22, ptr noundef nonnull %51, ptr noundef nonnull %23, ptr noundef %10, ptr noundef nonnull %20, ptr noundef nonnull %21) #6
  %54 = load i32, ptr %21, align 4, !tbaa !5
  %55 = icmp slt i32 %54, 0
  br i1 %55, label %56, label %58

56:                                               ; preds = %53
  %57 = add nsw i32 %54, -1
  store i32 %57, ptr %21, align 4, !tbaa !5
  br label %58

58:                                               ; preds = %53, %56
  %59 = load i32, ptr %13, align 4, !tbaa !5
  %60 = load i32, ptr %14, align 4, !tbaa !5
  %61 = load i32, ptr %22, align 4, !tbaa !5
  call void @LAPACKE_cge_trans(i32 noundef 102, i32 noundef %59, i32 noundef %60, ptr noundef nonnull %45, i32 noundef %61, ptr noundef %6, i32 noundef %7) #6
  %62 = load i32, ptr %17, align 4, !tbaa !5
  %63 = load i32, ptr %14, align 4, !tbaa !5
  %64 = load i32, ptr %23, align 4, !tbaa !5
  call void @LAPACKE_cge_trans(i32 noundef 102, i32 noundef %62, i32 noundef %63, ptr noundef nonnull %51, i32 noundef %64, ptr noundef %8, i32 noundef %9) #6
  call void @free(ptr noundef nonnull %51) #6
  %.pr.pr = load i32, ptr %21, align 4, !tbaa !5
  call void @free(ptr noundef nonnull %45) #6
  %65 = icmp eq i32 %.pr.pr, -1011
  br i1 %65, label %66, label %67

66:                                               ; preds = %.thread31, %.thread, %58
  call void @LAPACKE_xerbla(ptr noundef nonnull @.str, i32 noundef -1011) #6
  %.pre.pre = load i32, ptr %21, align 4, !tbaa !5
  br label %67

.thread33:                                        ; preds = %30, %33, %36
  %.023.ph = phi i32 [ %38, %36 ], [ -10, %33 ], [ -8, %30 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #6
  br label %69

67:                                               ; preds = %58, %66
  %.pre = phi i32 [ %.pr.pr, %58 ], [ %.pre.pre, %66 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #6
  br label %69

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

69:                                               ; preds = %24, %68, %67, %.thread33
  %.1 = phi i32 [ %.023.ph, %.thread33 ], [ %.pre, %67 ], [ -1, %68 ], [ %spec.select, %24 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #6
  ret i32 %.1
}

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

declare void @cgetsqrhrt_(ptr noundef, 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