; LLVM IR from tsotchke/quantum_geometric_tensor :: src/quantum_geometric/core (lapack_wrapper)

; 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"

%struct.anon = type { i32, i8, i64, ptr }
%struct.ComplexFloat = type { float, float }

@lapack_state = external hidden global %struct.anon, align 8

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @initialize_lapack() #0

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

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

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

; Function Attrs: nounwind uwtable
declare hidden void @convert_layout(ptr noundef, ptr noundef, i64 noundef, i64 noundef, i32 noundef, i32 noundef) #0

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

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @lapack_svd(ptr noundef %0, i64 noundef %1, i64 noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, i32 noundef %6) #0 {
  %8 = alloca i1, align 1
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i8, align 1
  %19 = alloca i8, align 1
  %20 = alloca i32, align 4
  %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 i32, align 4
  %27 = alloca %struct.ComplexFloat, align 4
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  store ptr %0, ptr %9, align 8, !tbaa !5
  store i64 %1, ptr %10, align 8, !tbaa !9
  store i64 %2, ptr %11, align 8, !tbaa !9
  store ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store i32 %6, ptr %15, align 4, !tbaa !11
  %30 = call zeroext i1 @initialize_lapack()
  br i1 %30, label %31, label %49

31:                                               ; preds = %7
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = icmp ne ptr %32, null
  br i1 %33, label %34, label %49

34:                                               ; preds = %31
  %35 = load ptr, ptr %12, align 8, !tbaa !5
  %36 = icmp ne ptr %35, null
  br i1 %36, label %37, label %49

37:                                               ; preds = %34
  %38 = load ptr, ptr %13, align 8, !tbaa !5
  %39 = icmp ne ptr %38, null
  br i1 %39, label %40, label %49

40:                                               ; preds = %37
  %41 = load ptr, ptr %14, align 8, !tbaa !5
  %42 = icmp ne ptr %41, null
  br i1 %42, label %43, label %49

43:                                               ; preds = %40
  %44 = load i64, ptr %10, align 8, !tbaa !9
  %45 = icmp eq i64 %44, 0
  br i1 %45, label %49, label %46

46:                                               ; preds = %43
  %47 = load i64, ptr %11, align 8, !tbaa !9
  %48 = icmp eq i64 %47, 0
  br i1 %48, label %49, label %50

49:                                               ; preds = %46, %43, %40, %37, %34, %31, %7
  store i32 -1, ptr @lapack_state, align 8, !tbaa !13
  store i1 false, ptr %8, align 1
  br label %127

50:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %51 = load i64, ptr %10, align 8, !tbaa !9
  %52 = load i64, ptr %11, align 8, !tbaa !9
  %53 = mul i64 %51, %52
  %54 = mul i64 %53, 8
  %55 = call noalias ptr @malloc(i64 noundef %54) #6
  store ptr %55, ptr %16, align 8, !tbaa !5
  %56 = load ptr, ptr %16, align 8, !tbaa !5
  %57 = icmp ne ptr %56, null
  br i1 %57, label %59, label %58

58:                                               ; preds = %50
  store i32 -2, ptr @lapack_state, align 8, !tbaa !13
  store i1 false, ptr %8, align 1
  store i32 1, ptr %17, align 4
  br label %126

59:                                               ; preds = %50
  %60 = load ptr, ptr %16, align 8, !tbaa !5
  %61 = load ptr, ptr %9, align 8, !tbaa !5
  %62 = load i64, ptr %10, align 8, !tbaa !9
  %63 = load i64, ptr %11, align 8, !tbaa !9
  %64 = load i32, ptr %15, align 4, !tbaa !11
  call void @convert_layout(ptr noundef %60, ptr noundef %61, i64 noundef %62, i64 noundef %63, i32 noundef %64, i32 noundef 102)
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #5
  store i8 65, ptr %18, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #5
  store i8 65, ptr %19, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %65 = load i64, ptr %10, align 8, !tbaa !9
  %66 = trunc i64 %65 to i32
  store i32 %66, ptr %20, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %67 = load i64, ptr %11, align 8, !tbaa !9
  %68 = trunc i64 %67 to i32
  store i32 %68, ptr %21, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  %69 = load i32, ptr %20, align 4, !tbaa !11
  store i32 %69, ptr %22, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  %70 = load i32, ptr %20, align 4, !tbaa !11
  store i32 %70, ptr %23, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  %71 = load i32, ptr %21, align 4, !tbaa !11
  store i32 %71, ptr %24, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  store i32 -1, ptr %25, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  %72 = load i64, ptr %10, align 8, !tbaa !9
  %73 = load i64, ptr %11, align 8, !tbaa !9
  %74 = icmp ult i64 %72, %73
  br i1 %74, label %75, label %77

75:                                               ; preds = %59
  %76 = load i64, ptr %10, align 8, !tbaa !9
  br label %79

77:                                               ; preds = %59
  %78 = load i64, ptr %11, align 8, !tbaa !9
  br label %79

79:                                               ; preds = %77, %75
  %80 = phi i64 [ %76, %75 ], [ %78, %77 ]
  %81 = mul i64 5, %80
  %82 = mul i64 %81, 4
  %83 = call noalias ptr @malloc(i64 noundef %82) #6
  store ptr %83, ptr %28, align 8, !tbaa !5
  %84 = load ptr, ptr %28, align 8, !tbaa !5
  %85 = icmp ne ptr %84, null
  br i1 %85, label %88, label %86

86:                                               ; preds = %79
  %87 = load ptr, ptr %16, align 8, !tbaa !5
  call void @free(ptr noundef %87) #5
  store i32 -2, ptr @lapack_state, align 8, !tbaa !13
  store i1 false, ptr %8, align 1
  store i32 1, ptr %17, align 4
  br label %125

88:                                               ; preds = %79
  %89 = load ptr, ptr %16, align 8, !tbaa !5
  %90 = load ptr, ptr %13, align 8, !tbaa !5
  %91 = load ptr, ptr %12, align 8, !tbaa !5
  %92 = load ptr, ptr %14, align 8, !tbaa !5
  %93 = load ptr, ptr %28, align 8, !tbaa !5
  call void @cgesvd_(ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef %21, ptr noundef %89, ptr noundef %22, ptr noundef %90, ptr noundef %91, ptr noundef %23, ptr noundef %92, ptr noundef %24, ptr noundef %27, ptr noundef %25, ptr noundef %93, ptr noundef %26)
  %94 = getelementptr inbounds %struct.ComplexFloat, ptr %27, i32 0, i32 0
  %95 = load float, ptr %94, align 4, !tbaa !17
  %96 = fptosi float %95 to i32
  store i32 %96, ptr %25, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  %97 = load i32, ptr %25, align 4, !tbaa !11
  %98 = sext i32 %97 to i64
  %99 = mul i64 %98, 8
  %100 = call noalias ptr @malloc(i64 noundef %99) #6
  store ptr %100, ptr %29, align 8, !tbaa !5
  %101 = load ptr, ptr %29, align 8, !tbaa !5
  %102 = icmp ne ptr %101, null
  br i1 %102, label %106, label %103

103:                                              ; preds = %88
  %104 = load ptr, ptr %28, align 8, !tbaa !5
  call void @free(ptr noundef %104) #5
  %105 = load ptr, ptr %16, align 8, !tbaa !5
  call void @free(ptr noundef %105) #5
  store i32 -2, ptr @lapack_state, align 8, !tbaa !13
  store i1 false, ptr %8, align 1
  store i32 1, ptr %17, align 4
  br label %124

106:                                              ; preds = %88
  %107 = load ptr, ptr %16, align 8, !tbaa !5
  %108 = load ptr, ptr %13, align 8, !tbaa !5
  %109 = load ptr, ptr %12, align 8, !tbaa !5
  %110 = load ptr, ptr %14, align 8, !tbaa !5
  %111 = load ptr, ptr %29, align 8, !tbaa !5
  %112 = load ptr, ptr %28, align 8, !tbaa !5
  call void @cgesvd_(ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef %21, ptr noundef %107, ptr noundef %22, ptr noundef %108, ptr noundef %109, ptr noundef %23, ptr noundef %110, ptr noundef %24, ptr noundef %111, ptr noundef %25, ptr noundef %112, ptr noundef %26)
  %113 = load ptr, ptr %29, align 8, !tbaa !5
  call void @free(ptr noundef %113) #5
  %114 = load ptr, ptr %28, align 8, !tbaa !5
  call void @free(ptr noundef %114) #5
  %115 = load ptr, ptr %16, align 8, !tbaa !5
  call void @free(ptr noundef %115) #5
  %116 = load i32, ptr %26, align 4, !tbaa !11
  %117 = icmp ne i32 %116, 0
  br i1 %117, label %118, label %123

118:                                              ; preds = %106
  %119 = load i32, ptr %26, align 4, !tbaa !11
  %120 = icmp sgt i32 %119, 0
  %121 = zext i1 %120 to i64
  %122 = select i1 %120, i32 -4, i32 -1
  store i32 %122, ptr @lapack_state, align 8, !tbaa !13
  store i1 false, ptr %8, align 1
  store i32 1, ptr %17, align 4
  br label %124

123:                                              ; preds = %106
  store i32 0, ptr @lapack_state, align 8, !tbaa !13
  store i1 true, ptr %8, align 1
  store i32 1, ptr %17, align 4
  br label %124

124:                                              ; preds = %123, %118, %103
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  br label %125

125:                                              ; preds = %124, %86
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  br label %126

126:                                              ; preds = %125, %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %127

127:                                              ; preds = %126, %49
  %128 = load i1, ptr %8, align 1
  ret i1 %128
}

declare void @cgesvd_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4

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 = { 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 #3 = { 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 #4 = { "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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 0}
!14 = !{!"", !12, i64 0, !15, i64 4, !10, i64 8, !6, i64 16}
!15 = !{!"_Bool", !7, i64 0}
!16 = !{!7, !7, i64 0}
!17 = !{!18, !19, i64 0}
!18 = !{!"", !19, i64 0, !19, i64 4}
!19 = !{!"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"

%struct.anon = type { i32, i8, i64, ptr }
%struct.ComplexFloat = type { float, float }

@lapack_state = external hidden local_unnamed_addr global %struct.anon, align 8

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @initialize_lapack() local_unnamed_addr #0

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 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 #3

; Function Attrs: nounwind uwtable
declare hidden void @convert_layout(ptr noundef, ptr noundef, i64 noundef, i64 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local noundef zeroext i1 @lapack_svd(ptr noundef %0, i64 noundef %1, i64 noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, i32 noundef %6) local_unnamed_addr #0 {
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %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 %struct.ComplexFloat, align 4
  %18 = tail call zeroext i1 @initialize_lapack()
  %19 = insertelement <4 x ptr> poison, ptr %0, i64 0
  %20 = insertelement <4 x ptr> %19, ptr %3, i64 1
  %21 = insertelement <4 x ptr> %20, ptr %4, i64 2
  %22 = insertelement <4 x ptr> %21, ptr %5, i64 3
  %23 = icmp eq <4 x ptr> %22, zeroinitializer
  %24 = bitcast <4 x i1> %23 to i4
  %25 = icmp eq i4 %24, 0
  %op.rdx = and i1 %25, %18
  %or.cond7.not = xor i1 %op.rdx, true
  %26 = icmp eq i64 %1, 0
  %or.cond9 = or i1 %26, %or.cond7.not
  %27 = icmp eq i64 %2, 0
  %or.cond11 = or i1 %27, %or.cond9
  br i1 %or.cond11, label %28, label %29

28:                                               ; preds = %7
  store i32 -1, ptr @lapack_state, align 8, !tbaa !5
  br label %54

29:                                               ; preds = %7
  %30 = shl i64 %1, 3
  %31 = mul i64 %30, %2
  %32 = tail call noalias ptr @malloc(i64 noundef %31) #6
  %.not = icmp eq ptr %32, null
  br i1 %.not, label %33, label %34

33:                                               ; preds = %29
  store i32 -2, ptr @lapack_state, align 8, !tbaa !5
  br label %54

34:                                               ; preds = %29
  tail call void @convert_layout(ptr noundef nonnull %32, ptr noundef %0, i64 noundef %1, i64 noundef %2, i32 noundef %6, i32 noundef 102)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #7
  store i8 65, ptr %8, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #7
  store i8 65, ptr %9, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #7
  %35 = trunc i64 %1 to i32
  store i32 %35, ptr %10, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #7
  %36 = trunc i64 %2 to i32
  store i32 %36, ptr %11, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #7
  store i32 %35, ptr %12, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #7
  store i32 %35, ptr %13, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #7
  store i32 %36, ptr %14, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #7
  store i32 -1, ptr %15, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #7
  %37 = tail call i64 @llvm.umin.i64(i64 %1, i64 %2)
  %38 = mul i64 %37, 20
  %39 = tail call noalias ptr @malloc(i64 noundef %38) #6
  %.not56 = icmp eq ptr %39, null
  br i1 %.not56, label %40, label %41

40:                                               ; preds = %34
  tail call void @free(ptr noundef nonnull %32) #7
  br label %53

41:                                               ; preds = %34
  call void @cgesvd_(ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %32, ptr noundef nonnull %12, ptr noundef nonnull %4, ptr noundef %3, ptr noundef nonnull %13, ptr noundef nonnull %5, ptr noundef nonnull %14, ptr noundef nonnull %17, ptr noundef nonnull %15, ptr noundef nonnull %39, ptr noundef nonnull %16) #7
  %42 = load float, ptr %17, align 4, !tbaa !15
  %43 = fptosi float %42 to i32
  store i32 %43, ptr %15, align 4, !tbaa !14
  %44 = sext i32 %43 to i64
  %45 = shl nsw i64 %44, 3
  %46 = call noalias ptr @malloc(i64 noundef %45) #6
  %.not57 = icmp eq ptr %46, null
  br i1 %.not57, label %47, label %48

47:                                               ; preds = %41
  call void @free(ptr noundef nonnull %39) #7
  call void @free(ptr noundef nonnull %32) #7
  br label %53

48:                                               ; preds = %41
  call void @cgesvd_(ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %32, ptr noundef nonnull %12, ptr noundef nonnull %4, ptr noundef %3, ptr noundef nonnull %13, ptr noundef nonnull %5, ptr noundef nonnull %14, ptr noundef nonnull %46, ptr noundef nonnull %15, ptr noundef nonnull %39, ptr noundef nonnull %16) #7
  call void @free(ptr noundef nonnull %46) #7
  call void @free(ptr noundef nonnull %39) #7
  call void @free(ptr noundef nonnull %32) #7
  %49 = load i32, ptr %16, align 4, !tbaa !14
  %.not58 = icmp eq i32 %49, 0
  br i1 %.not58, label %53, label %50

50:                                               ; preds = %48
  %51 = icmp sgt i32 %49, 0
  %52 = select i1 %51, i32 -4, i32 -1
  br label %53

53:                                               ; preds = %48, %47, %50, %40
  %.sink = phi i32 [ -2, %47 ], [ %52, %50 ], [ -2, %40 ], [ 0, %48 ]
  %.1 = phi i1 [ false, %47 ], [ false, %50 ], [ false, %40 ], [ true, %48 ]
  store i32 %.sink, ptr @lapack_state, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #7
  br label %54

54:                                               ; preds = %33, %53, %28
  %.3 = phi i1 [ false, %28 ], [ %.1, %53 ], [ false, %33 ]
  ret i1 %.3
}

declare void @cgesvd_(ptr noundef, ptr noundef, ptr noundef, 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 #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umin.i64(i64, i64) #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 = { 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 #3 = { 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 #4 = { "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 allocsize(0) }
attributes #7 = { nounwind }

!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, !7, i64 0}
!6 = !{!"", !7, i64 0, !10, i64 4, !11, i64 8, !12, i64 16}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"_Bool", !8, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!8, !8, i64 0}
!14 = !{!7, !7, i64 0}
!15 = !{!16, !17, i64 0}
!16 = !{!"", !17, i64 0, !17, i64 4}
!17 = !{!"float", !8, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalDCEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass