; LLVM IR from rdguez-mariano/fast_imas_IPOL :: libNumerics/numerics.ll (ZN11libNumerics3SVD9NullspaceERKNS_6matrixIdEEPNS_6vectorIdEEdd)

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

%"class.libNumerics::vector" = type { %"class.libNumerics::matrix" }
%"class.libNumerics::matrix" = type { ptr, i32, i32, ptr }
%"class.libNumerics::SVD" = type { %"class.libNumerics::matrix", %"class.libNumerics::matrix", %"class.libNumerics::vector" }

@.str.1 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [8 x i8], align 1
@__PRETTY_FUNCTION__._ZN11libNumerics3SVD9NullspaceERKNS_6matrixIdEEPNS_6vectorIdEEdd = external hidden unnamed_addr constant [76 x i8], align 1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics6vectorIdEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11libNumerics6matrixIdE4nrowEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11libNumerics6matrixIdE4ncolEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK11libNumerics3SVD2svEi(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK11libNumerics6matrixIdE3colEi(ptr dead_on_unwind noalias writable sret(%"class.libNumerics::vector") align 8, ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11libNumerics3SVD9NullspaceERKNS_6matrixIdEEPNS_6vectorIdEEdd(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %1, double noundef %2, double noundef %3) #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca i1, align 1
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca %"class.libNumerics::SVD", align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca i32, align 4
  %21 = alloca %"class.libNumerics::vector", align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store double %2, ptr %8, align 8, !tbaa !9
  store double %3, ptr %9, align 8, !tbaa !9
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = call noundef i32 @_ZNK11libNumerics6matrixIdE4nrowEv(ptr noundef nonnull align 8 dereferenceable(24) %22)
  %24 = add nsw i32 %23, 1
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = call noundef i32 @_ZNK11libNumerics6matrixIdE4ncolEv(ptr noundef nonnull align 8 dereferenceable(24) %25)
  %27 = icmp slt i32 %24, %26
  br i1 %27, label %28, label %29

28:                                               ; preds = %4
  store i1 false, ptr %5, align 1
  br label %129

29:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 72, ptr %10) #6
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11libNumerics3SVDC1ERKNS_6matrixIdEE(ptr noundef nonnull align 8 dereferenceable(72) %10, ptr noundef nonnull align 8 dereferenceable(24) %30)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = invoke noundef i32 @_ZNK11libNumerics6matrixIdE7lastColEv(ptr noundef nonnull align 8 dereferenceable(24) %31)
          to label %33 unwind label %38

33:                                               ; preds = %29
  store i32 %32, ptr %11, align 4, !tbaa !11
  %34 = load i32, ptr %11, align 4, !tbaa !11
  %35 = icmp sge i32 %34, 1
  br i1 %35, label %36, label %37

36:                                               ; preds = %33
  br label %43

37:                                               ; preds = %33
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 183, ptr noundef @__PRETTY_FUNCTION__._ZN11libNumerics3SVD9NullspaceERKNS_6matrixIdEEPNS_6vectorIdEEdd) #7
  unreachable

38:                                               ; preds = %29
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %12, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %13, align 4
  br label %128

42:                                               ; No predecessors!
  br label %43

43:                                               ; preds = %42, %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %44 = load i32, ptr %11, align 4, !tbaa !11
  %45 = invoke noundef double @_ZNK11libNumerics3SVD2svEi(ptr noundef nonnull align 8 dereferenceable(72) %10, i32 noundef %44)
          to label %46 unwind label %85

46:                                               ; preds = %43
  store double %45, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %47 = call noundef double @_ZNSt14numeric_limitsIdE7epsilonEv() #6
  %48 = invoke noundef double @_ZNK11libNumerics3SVD2svEi(ptr noundef nonnull align 8 dereferenceable(72) %10, i32 noundef 0)
          to label %49 unwind label %89

49:                                               ; preds = %46
  %50 = fmul double %47, %48
  store double %50, ptr %16, align 8, !tbaa !9
  %51 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %52 unwind label %89

52:                                               ; preds = %49
  %53 = load double, ptr %51, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  store double %53, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %54 = load i32, ptr %11, align 4, !tbaa !11
  %55 = sub nsw i32 %54, 1
  %56 = invoke noundef double @_ZNK11libNumerics3SVD2svEi(ptr noundef nonnull align 8 dereferenceable(72) %10, i32 noundef %55)
          to label %57 unwind label %94

57:                                               ; preds = %52
  store double %56, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %58 = call noundef double @_ZNSt14numeric_limitsIdE7epsilonEv() #6
  %59 = invoke noundef double @_ZNK11libNumerics3SVD2svEi(ptr noundef nonnull align 8 dereferenceable(72) %10, i32 noundef 0)
          to label %60 unwind label %98

60:                                               ; preds = %57
  %61 = fmul double %58, %59
  store double %61, ptr %19, align 8, !tbaa !9
  %62 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %63 unwind label %98

63:                                               ; preds = %60
  %64 = load double, ptr %62, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  store double %64, ptr %17, align 8, !tbaa !9
  %65 = load double, ptr %14, align 8, !tbaa !9
  %66 = load double, ptr %8, align 8, !tbaa !9
  %67 = invoke noundef double @_ZNK11libNumerics3SVD2svEi(ptr noundef nonnull align 8 dereferenceable(72) %10, i32 noundef 0)
          to label %68 unwind label %103

68:                                               ; preds = %63
  %69 = fmul double %66, %67
  %70 = fcmp oge double %65, %69
  br i1 %70, label %84, label %71

71:                                               ; preds = %68
  %72 = load double, ptr %17, align 8, !tbaa !9
  %73 = load double, ptr %8, align 8, !tbaa !9
  %74 = invoke noundef double @_ZNK11libNumerics3SVD2svEi(ptr noundef nonnull align 8 dereferenceable(72) %10, i32 noundef 0)
          to label %75 unwind label %103

75:                                               ; preds = %71
  %76 = fmul double %73, %74
  %77 = fcmp olt double %72, %76
  br i1 %77, label %78, label %107

78:                                               ; preds = %75
  %79 = load double, ptr %14, align 8, !tbaa !9
  %80 = load double, ptr %9, align 8, !tbaa !9
  %81 = load double, ptr %17, align 8, !tbaa !9
  %82 = fmul double %80, %81
  %83 = fcmp oge double %79, %82
  br i1 %83, label %84, label %107

84:                                               ; preds = %78, %68
  store i1 false, ptr %5, align 1
  store i32 1, ptr %20, align 4
  br label %125

85:                                               ; preds = %43
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %12, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %13, align 4
  br label %93

89:                                               ; preds = %49, %46
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %12, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %93

93:                                               ; preds = %89, %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %127

94:                                               ; preds = %52
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %12, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %13, align 4
  br label %102

98:                                               ; preds = %60, %57
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %12, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %102

102:                                              ; preds = %98, %94
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %126

103:                                              ; preds = %71, %63
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %12, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %13, align 4
  br label %126

107:                                              ; preds = %78, %75
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #6
  %108 = getelementptr inbounds %"class.libNumerics::SVD", ptr %10, i32 0, i32 1
  %109 = getelementptr inbounds %"class.libNumerics::SVD", ptr %10, i32 0, i32 1
  %110 = invoke noundef i32 @_ZNK11libNumerics6matrixIdE7lastColEv(ptr noundef nonnull align 8 dereferenceable(24) %109)
          to label %111 unwind label %116

111:                                              ; preds = %107
  invoke void @_ZNK11libNumerics6matrixIdE3colEi(ptr dead_on_unwind writable sret(%"class.libNumerics::vector") align 8 %21, ptr noundef nonnull align 8 dereferenceable(24) %108, i32 noundef %110)
          to label %112 unwind label %116

112:                                              ; preds = %111
  %113 = load ptr, ptr %7, align 8, !tbaa !5
  %114 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics6vectorIdEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %113, ptr noundef nonnull align 8 dereferenceable(24) %21)
          to label %115 unwind label %120

115:                                              ; preds = %112
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #6
  store i1 true, ptr %5, align 1
  store i32 1, ptr %20, align 4
  br label %125

116:                                              ; preds = %111, %107
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %12, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %13, align 4
  br label %124

120:                                              ; preds = %112
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %12, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %13, align 4
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #6
  br label %124

124:                                              ; preds = %120, %116
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #6
  br label %126

125:                                              ; preds = %115, %84
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @_ZN11libNumerics3SVDD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %10) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %10) #6
  br label %129

126:                                              ; preds = %124, %103, %102
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %127

127:                                              ; preds = %126, %93
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %128

128:                                              ; preds = %127, %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @_ZN11libNumerics3SVDD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %10) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %10) #6
  br label %131

129:                                              ; preds = %125, %28
  %130 = load i1, ptr %5, align 1
  ret i1 %130

131:                                              ; preds = %128
  %132 = load ptr, ptr %12, align 8
  %133 = load i32, ptr %13, align 4
  %134 = insertvalue { ptr, i32 } poison, ptr %132, 0
  %135 = insertvalue { ptr, i32 } %134, i32 %133, 1
  resume { ptr, i32 } %135
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11libNumerics6matrixIdE7lastColEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNSt14numeric_limitsIdE7epsilonEv() #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN11libNumerics3SVDD2Ev(ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #5 align 2

declare void @_ZN11libNumerics3SVDC1ERKNS_6matrixIdEE(ptr, ptr)

attributes #0 = { inlinehint mustprogress 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 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 #2 = { noreturn 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress 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 #5 = { inlinehint mustprogress 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 #6 = { nounwind }
attributes #7 = { noreturn 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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !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"

%"class.libNumerics::vector" = type { %"class.libNumerics::matrix" }
%"class.libNumerics::matrix" = type { ptr, i32, i32, ptr }
%"class.libNumerics::SVD" = type { %"class.libNumerics::matrix", %"class.libNumerics::matrix", %"class.libNumerics::vector" }

@.str.1 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [8 x i8], align 1
@__PRETTY_FUNCTION__._ZN11libNumerics3SVD9NullspaceERKNS_6matrixIdEEPNS_6vectorIdEEdd = external hidden unnamed_addr constant [76 x i8], align 1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics6vectorIdEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11libNumerics6matrixIdE4nrowEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11libNumerics6matrixIdE4ncolEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK11libNumerics3SVD2svEi(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK11libNumerics6matrixIdE3colEi(ptr dead_on_unwind noalias writable sret(%"class.libNumerics::vector") align 8, ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11libNumerics3SVD9NullspaceERKNS_6matrixIdEEPNS_6vectorIdEEdd(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %1, double noundef %2, double noundef %3) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.libNumerics::SVD", align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca %"class.libNumerics::vector", align 8
  %11 = tail call noundef i32 @_ZNK11libNumerics6matrixIdE4nrowEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %12 = add nsw i32 %11, 1
  %13 = tail call noundef i32 @_ZNK11libNumerics6matrixIdE4ncolEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %14 = icmp slt i32 %12, %13
  br i1 %14, label %73, label %15

15:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %5) #6
  call void @_ZN11libNumerics3SVDC1ERKNS_6matrixIdEE(ptr noundef nonnull align 8 dereferenceable(72) %5, ptr noundef nonnull align 8 dereferenceable(24) %0)
  %16 = call noundef i32 @_ZNK11libNumerics6matrixIdE7lastColEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %19, label %18

18:                                               ; preds = %15
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 183, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN11libNumerics3SVD9NullspaceERKNS_6matrixIdEEPNS_6vectorIdEEdd) #7
  unreachable

19:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %20 = invoke noundef double @_ZNK11libNumerics3SVD2svEi(ptr noundef nonnull align 8 dereferenceable(72) %5, i32 noundef %16)
          to label %21 unwind label %48

21:                                               ; preds = %19
  store double %20, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %22 = call noundef double @_ZNSt14numeric_limitsIdE7epsilonEv() #6
  %23 = invoke noundef double @_ZNK11libNumerics3SVD2svEi(ptr noundef nonnull align 8 dereferenceable(72) %5, i32 noundef 0)
          to label %24 unwind label %50

24:                                               ; preds = %21
  %25 = fmul double %22, %23
  store double %25, ptr %7, align 8, !tbaa !5
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %27 = load double, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %28 = add nsw i32 %16, -1
  %29 = invoke noundef double @_ZNK11libNumerics3SVD2svEi(ptr noundef nonnull align 8 dereferenceable(72) %5, i32 noundef %28)
          to label %30 unwind label %53

30:                                               ; preds = %24
  store double %29, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %31 = call noundef double @_ZNSt14numeric_limitsIdE7epsilonEv() #6
  %32 = invoke noundef double @_ZNK11libNumerics3SVD2svEi(ptr noundef nonnull align 8 dereferenceable(72) %5, i32 noundef 0)
          to label %33 unwind label %55

33:                                               ; preds = %30
  %34 = fmul double %31, %32
  store double %34, ptr %9, align 8, !tbaa !5
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %36 = load double, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  %37 = invoke noundef double @_ZNK11libNumerics3SVD2svEi(ptr noundef nonnull align 8 dereferenceable(72) %5, i32 noundef 0)
          to label %38 unwind label %58

38:                                               ; preds = %33
  %39 = fmul double %37, %2
  %40 = fcmp ult double %27, %39
  br i1 %40, label %41, label %71

41:                                               ; preds = %38
  %42 = invoke noundef double @_ZNK11libNumerics3SVD2svEi(ptr noundef nonnull align 8 dereferenceable(72) %5, i32 noundef 0)
          to label %43 unwind label %58

43:                                               ; preds = %41
  %44 = fmul double %42, %2
  %45 = fcmp uge double %36, %44
  %46 = fmul double %36, %3
  %47 = fcmp ult double %27, %46
  %or.cond = select i1 %45, i1 true, i1 %47
  br i1 %or.cond, label %60, label %71

48:                                               ; preds = %19
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %52

50:                                               ; preds = %21
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %52

52:                                               ; preds = %50, %48
  %.pn = phi { ptr, i32 } [ %51, %50 ], [ %49, %48 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %72

53:                                               ; preds = %24
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %57

55:                                               ; preds = %30
  %56 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br label %57

57:                                               ; preds = %55, %53
  %.pn28 = phi { ptr, i32 } [ %56, %55 ], [ %54, %53 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %72

58:                                               ; preds = %41, %33
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %72

60:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #6
  %61 = getelementptr inbounds i8, ptr %5, i64 24
  %62 = call noundef i32 @_ZNK11libNumerics6matrixIdE7lastColEv(ptr noundef nonnull align 8 dereferenceable(24) %61)
  invoke void @_ZNK11libNumerics6matrixIdE3colEi(ptr dead_on_unwind nonnull writable sret(%"class.libNumerics::vector") align 8 %10, ptr noundef nonnull align 8 dereferenceable(24) %61, i32 noundef %62)
          to label %63 unwind label %66

63:                                               ; preds = %60
  %64 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics6vectorIdEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %65 unwind label %68

65:                                               ; preds = %63
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  br label %71

66:                                               ; preds = %60
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %70

68:                                               ; preds = %63
  %69 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  br label %70

70:                                               ; preds = %68, %66
  %.pn30 = phi { ptr, i32 } [ %69, %68 ], [ %67, %66 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  br label %72

71:                                               ; preds = %38, %43, %65
  %.0 = phi i1 [ true, %65 ], [ false, %43 ], [ false, %38 ]
  call void @_ZN11libNumerics3SVDD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %5) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #6
  br label %73

72:                                               ; preds = %57, %58, %70, %52
  %.pn30.pn.pn = phi { ptr, i32 } [ %.pn, %52 ], [ %.pn30, %70 ], [ %59, %58 ], [ %.pn28, %57 ]
  call void @_ZN11libNumerics3SVDD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %5) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #6
  resume { ptr, i32 } %.pn30.pn.pn

73:                                               ; preds = %4, %71
  %.1 = phi i1 [ %.0, %71 ], [ false, %4 ]
  ret i1 %.1
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11libNumerics6matrixIdE7lastColEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNSt14numeric_limitsIdE7epsilonEv() local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN11libNumerics3SVDD2Ev(ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #5 align 2

declare void @_ZN11libNumerics3SVDC1ERKNS_6matrixIdEE(ptr, ptr) local_unnamed_addr

attributes #0 = { inlinehint mustprogress 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 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 #2 = { noreturn 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress 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 #5 = { inlinehint mustprogress 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 #6 = { nounwind }
attributes #7 = { noreturn 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, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass