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

; 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.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<libNumerics::SVDElement, std::allocator<libNumerics::SVDElement>>::_Vector_impl" }
%"struct.std::_Vector_base<libNumerics::SVDElement, std::allocator<libNumerics::SVDElement>>::_Vector_impl" = type { %"struct.std::_Vector_base<libNumerics::SVDElement, std::allocator<libNumerics::SVDElement>>::_Vector_impl_data" }
%"struct.std::_Vector_base<libNumerics::SVDElement, std::allocator<libNumerics::SVDElement>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.libNumerics::SVDElement" = type <{ double, i32, [4 x i8] }>
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"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" }

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11libNumerics3SVD4sortEv(ptr noundef nonnull align 8 dereferenceable(72) %0) #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.std::vector.0", align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.libNumerics::SVDElement", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"class.libNumerics::vector", align 8
  %14 = alloca %"class.libNumerics::vector", align 8
  %15 = alloca double, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.libNumerics::vector", align 8
  %18 = alloca %"class.libNumerics::vector", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %19 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #5
  call void @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %20

20:                                               ; preds = %36, %1
  %21 = load i32, ptr %4, align 4, !tbaa !9
  %22 = getelementptr inbounds %"class.libNumerics::SVD", ptr %19, i32 0, i32 2
  %23 = invoke noundef i32 @_ZNK11libNumerics6matrixIdE4nrowEv(ptr noundef nonnull align 8 dereferenceable(24) %22)
          to label %24 unwind label %27

24:                                               ; preds = %20
  %25 = icmp slt i32 %21, %23
  br i1 %25, label %31, label %26

26:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %44

27:                                               ; preds = %20
  %28 = landingpad { ptr, i32 }
          cleanup
  %29 = extractvalue { ptr, i32 } %28, 0
  store ptr %29, ptr %5, align 8
  %30 = extractvalue { ptr, i32 } %28, 1
  store i32 %30, ptr %6, align 4
  br label %43

31:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #5
  %32 = getelementptr inbounds %"class.libNumerics::SVD", ptr %19, i32 0, i32 2
  %33 = load i32, ptr %4, align 4, !tbaa !9
  invoke void @_ZN11libNumerics10SVDElementC2ERKNS_6vectorIdEEi(ptr noundef nonnull align 8 dereferenceable(12) %7, ptr noundef nonnull align 8 dereferenceable(24) %32, i32 noundef %33)
          to label %34 unwind label %39

34:                                               ; preds = %31
  invoke void @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(12) %7)
          to label %35 unwind label %39

35:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #5
  br label %36

36:                                               ; preds = %35
  %37 = load i32, ptr %4, align 4, !tbaa !9
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %4, align 4, !tbaa !9
  br label %20, !llvm.loop !11

39:                                               ; preds = %34, %31
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %5, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #5
  br label %43

43:                                               ; preds = %39, %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %209

44:                                               ; preds = %26
  %45 = call ptr @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %46 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %45, ptr %46, align 8
  %47 = call ptr @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %48 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %47, ptr %48, align 8
  %49 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  %50 = load ptr, ptr %49, align 8
  %51 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  %52 = load ptr, ptr %51, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPN11libNumerics10SVDElementESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %50, ptr %52)
          to label %53 unwind label %68

53:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %54 = getelementptr inbounds %"class.libNumerics::SVD", ptr %19, i32 0, i32 0
  %55 = invoke noundef i32 @_ZNK11libNumerics6matrixIdE4ncolEv(ptr noundef nonnull align 8 dereferenceable(24) %54)
          to label %56 unwind label %72

56:                                               ; preds = %53
  store i32 %55, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %57 = getelementptr inbounds %"class.libNumerics::SVD", ptr %19, i32 0, i32 1
  %58 = invoke noundef i32 @_ZNK11libNumerics6matrixIdE4ncolEv(ptr noundef nonnull align 8 dereferenceable(24) %57)
          to label %59 unwind label %76

59:                                               ; preds = %56
  store i32 %58, ptr %12, align 4, !tbaa !9
  %60 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %61 unwind label %76

61:                                               ; preds = %59
  %62 = load i32, ptr %60, align 4, !tbaa !9
  %63 = sub nsw i32 %62, 1
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  store i32 %63, ptr %10, align 4, !tbaa !9
  br label %64

64:                                               ; preds = %204, %61
  %65 = load i32, ptr %10, align 4, !tbaa !9
  %66 = icmp sge i32 %65, 0
  br i1 %66, label %81, label %67

67:                                               ; preds = %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %208

68:                                               ; preds = %44
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %5, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %6, align 4
  br label %209

72:                                               ; preds = %53
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %5, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %6, align 4
  br label %80

76:                                               ; preds = %59, %56
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %5, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %80

80:                                               ; preds = %76, %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %207

81:                                               ; preds = %64
  %82 = load i32, ptr %10, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %83) #5
  %85 = getelementptr inbounds %"class.libNumerics::SVDElement", ptr %84, i32 0, i32 1
  %86 = load i32, ptr %85, align 8, !tbaa !13
  %87 = load i32, ptr %10, align 4, !tbaa !9
  %88 = icmp ne i32 %86, %87
  br i1 %88, label %89, label %203

89:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #5
  %90 = getelementptr inbounds %"class.libNumerics::SVD", ptr %19, i32 0, i32 0
  %91 = load i32, ptr %10, align 4, !tbaa !9
  invoke void @_ZNK11libNumerics6matrixIdE3colEi(ptr dead_on_unwind writable sret(%"class.libNumerics::vector") align 8 %13, ptr noundef nonnull align 8 dereferenceable(24) %90, i32 noundef %91)
          to label %92 unwind label %148

92:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #5
  %93 = getelementptr inbounds %"class.libNumerics::SVD", ptr %19, i32 0, i32 1
  %94 = load i32, ptr %10, align 4, !tbaa !9
  invoke void @_ZNK11libNumerics6matrixIdE3colEi(ptr dead_on_unwind writable sret(%"class.libNumerics::vector") align 8 %14, ptr noundef nonnull align 8 dereferenceable(24) %93, i32 noundef %94)
          to label %95 unwind label %152

95:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %96 = getelementptr inbounds %"class.libNumerics::SVD", ptr %19, i32 0, i32 2
  %97 = load i32, ptr %10, align 4, !tbaa !9
  %98 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %96, i32 noundef %97)
          to label %99 unwind label %156

99:                                               ; preds = %95
  %100 = load double, ptr %98, align 8, !tbaa !16
  store double %100, ptr %15, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %101 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %101, ptr %16, align 4, !tbaa !9
  br label %102

102:                                              ; preds = %143, %99
  %103 = load i32, ptr %16, align 4, !tbaa !9
  %104 = sext i32 %103 to i64
  %105 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %104) #5
  %106 = getelementptr inbounds %"class.libNumerics::SVDElement", ptr %105, i32 0, i32 1
  %107 = load i32, ptr %106, align 8, !tbaa !13
  %108 = load i32, ptr %10, align 4, !tbaa !9
  %109 = icmp ne i32 %107, %108
  br i1 %109, label %110, label %182

110:                                              ; preds = %102
  %111 = getelementptr inbounds %"class.libNumerics::SVD", ptr %19, i32 0, i32 0
  %112 = load i32, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #5
  %113 = getelementptr inbounds %"class.libNumerics::SVD", ptr %19, i32 0, i32 0
  %114 = load i32, ptr %16, align 4, !tbaa !9
  %115 = sext i32 %114 to i64
  %116 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %115) #5
  %117 = getelementptr inbounds %"class.libNumerics::SVDElement", ptr %116, i32 0, i32 1
  %118 = load i32, ptr %117, align 8, !tbaa !13
  invoke void @_ZNK11libNumerics6matrixIdE3colEi(ptr dead_on_unwind writable sret(%"class.libNumerics::vector") align 8 %17, ptr noundef nonnull align 8 dereferenceable(24) %113, i32 noundef %118)
          to label %119 unwind label %160

119:                                              ; preds = %110
  invoke void @_ZN11libNumerics6matrixIdE5pasteEiiRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %111, i32 noundef 0, i32 noundef %112, ptr noundef nonnull align 8 dereferenceable(24) %17)
          to label %120 unwind label %164

120:                                              ; preds = %119
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #5
  %121 = getelementptr inbounds %"class.libNumerics::SVD", ptr %19, i32 0, i32 1
  %122 = load i32, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #5
  %123 = getelementptr inbounds %"class.libNumerics::SVD", ptr %19, i32 0, i32 1
  %124 = load i32, ptr %16, align 4, !tbaa !9
  %125 = sext i32 %124 to i64
  %126 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %125) #5
  %127 = getelementptr inbounds %"class.libNumerics::SVDElement", ptr %126, i32 0, i32 1
  %128 = load i32, ptr %127, align 8, !tbaa !13
  invoke void @_ZNK11libNumerics6matrixIdE3colEi(ptr dead_on_unwind writable sret(%"class.libNumerics::vector") align 8 %18, ptr noundef nonnull align 8 dereferenceable(24) %123, i32 noundef %128)
          to label %129 unwind label %169

129:                                              ; preds = %120
  invoke void @_ZN11libNumerics6matrixIdE5pasteEiiRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %121, i32 noundef 0, i32 noundef %122, ptr noundef nonnull align 8 dereferenceable(24) %18)
          to label %130 unwind label %173

130:                                              ; preds = %129
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #5
  %131 = getelementptr inbounds %"class.libNumerics::SVD", ptr %19, i32 0, i32 2
  %132 = load i32, ptr %16, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %133) #5
  %135 = getelementptr inbounds %"class.libNumerics::SVDElement", ptr %134, i32 0, i32 1
  %136 = load i32, ptr %135, align 8, !tbaa !13
  %137 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %131, i32 noundef %136)
          to label %138 unwind label %178

138:                                              ; preds = %130
  %139 = load double, ptr %137, align 8, !tbaa !16
  %140 = getelementptr inbounds %"class.libNumerics::SVD", ptr %19, i32 0, i32 2
  %141 = load i32, ptr %16, align 4, !tbaa !9
  %142 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %140, i32 noundef %141)
          to label %143 unwind label %178

143:                                              ; preds = %138
  store double %139, ptr %142, align 8, !tbaa !16
  %144 = load i32, ptr %16, align 4, !tbaa !9
  %145 = sext i32 %144 to i64
  %146 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %145) #5
  %147 = getelementptr inbounds %"class.libNumerics::SVDElement", ptr %146, i32 0, i32 1
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %147) #5
  br label %102, !llvm.loop !17

148:                                              ; preds = %89
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %5, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %6, align 4
  br label %202

152:                                              ; preds = %92
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %5, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %6, align 4
  br label %201

156:                                              ; preds = %95
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %5, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %6, align 4
  br label %200

160:                                              ; preds = %110
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %5, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %6, align 4
  br label %168

164:                                              ; preds = %119
  %165 = landingpad { ptr, i32 }
          cleanup
  %166 = extractvalue { ptr, i32 } %165, 0
  store ptr %166, ptr %5, align 8
  %167 = extractvalue { ptr, i32 } %165, 1
  store i32 %167, ptr %6, align 4
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  br label %168

168:                                              ; preds = %164, %160
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #5
  br label %199

169:                                              ; preds = %120
  %170 = landingpad { ptr, i32 }
          cleanup
  %171 = extractvalue { ptr, i32 } %170, 0
  store ptr %171, ptr %5, align 8
  %172 = extractvalue { ptr, i32 } %170, 1
  store i32 %172, ptr %6, align 4
  br label %177

173:                                              ; preds = %129
  %174 = landingpad { ptr, i32 }
          cleanup
  %175 = extractvalue { ptr, i32 } %174, 0
  store ptr %175, ptr %5, align 8
  %176 = extractvalue { ptr, i32 } %174, 1
  store i32 %176, ptr %6, align 4
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #5
  br label %177

177:                                              ; preds = %173, %169
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #5
  br label %199

178:                                              ; preds = %193, %190, %182, %138, %130
  %179 = landingpad { ptr, i32 }
          cleanup
  %180 = extractvalue { ptr, i32 } %179, 0
  store ptr %180, ptr %5, align 8
  %181 = extractvalue { ptr, i32 } %179, 1
  store i32 %181, ptr %6, align 4
  br label %199

182:                                              ; preds = %102
  %183 = load i32, ptr %16, align 4, !tbaa !9
  %184 = load i32, ptr %16, align 4, !tbaa !9
  %185 = sext i32 %184 to i64
  %186 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %185) #5
  %187 = getelementptr inbounds %"class.libNumerics::SVDElement", ptr %186, i32 0, i32 1
  store i32 %183, ptr %187, align 8, !tbaa !13
  %188 = getelementptr inbounds %"class.libNumerics::SVD", ptr %19, i32 0, i32 0
  %189 = load i32, ptr %16, align 4, !tbaa !9
  invoke void @_ZN11libNumerics6matrixIdE5pasteEiiRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %188, i32 noundef 0, i32 noundef %189, ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %190 unwind label %178

190:                                              ; preds = %182
  %191 = getelementptr inbounds %"class.libNumerics::SVD", ptr %19, i32 0, i32 1
  %192 = load i32, ptr %16, align 4, !tbaa !9
  invoke void @_ZN11libNumerics6matrixIdE5pasteEiiRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %191, i32 noundef 0, i32 noundef %192, ptr noundef nonnull align 8 dereferenceable(24) %14)
          to label %193 unwind label %178

193:                                              ; preds = %190
  %194 = load double, ptr %15, align 8, !tbaa !16
  %195 = getelementptr inbounds %"class.libNumerics::SVD", ptr %19, i32 0, i32 2
  %196 = load i32, ptr %16, align 4, !tbaa !9
  %197 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %195, i32 noundef %196)
          to label %198 unwind label %178

198:                                              ; preds = %193
  store double %194, ptr %197, align 8, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #5
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #5
  br label %203

199:                                              ; preds = %178, %177, %168
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %200

200:                                              ; preds = %199, %156
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  br label %201

201:                                              ; preds = %200, %152
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #5
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  br label %202

202:                                              ; preds = %201, %148
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #5
  br label %207

203:                                              ; preds = %198, %81
  br label %204

204:                                              ; preds = %203
  %205 = load i32, ptr %10, align 4, !tbaa !9
  %206 = add nsw i32 %205, -1
  store i32 %206, ptr %10, align 4, !tbaa !9
  br label %64, !llvm.loop !18

207:                                              ; preds = %202, %80
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %209

208:                                              ; preds = %67
  call void @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #5
  ret void

209:                                              ; preds = %207, %68, %43
  call void @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #5
  br label %210

210:                                              ; preds = %209
  %211 = load ptr, ptr %5, align 8
  %212 = load i32, ptr %6, align 4
  %213 = insertvalue { ptr, i32 } poison, ptr %211, 0
  %214 = insertvalue { ptr, i32 } %213, i32 %212, 1
  resume { ptr, i32 } %214
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(12)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11libNumerics10SVDElementC2ERKNS_6vectorIdEEi(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPN11libNumerics10SVDElementESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr, ptr) #4

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 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) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11libNumerics6matrixIdE5pasteEiiRKS1_(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { 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 #5 = { 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 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !10, i64 8}
!14 = !{!"_ZTSN11libNumerics10SVDElementE", !15, i64 0, !10, i64 8}
!15 = !{!"double", !7, i64 0}
!16 = !{!15, !15, i64 0}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}


; 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.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<libNumerics::SVDElement, std::allocator<libNumerics::SVDElement>>::_Vector_impl" }
%"struct.std::_Vector_base<libNumerics::SVDElement, std::allocator<libNumerics::SVDElement>>::_Vector_impl" = type { %"struct.std::_Vector_base<libNumerics::SVDElement, std::allocator<libNumerics::SVDElement>>::_Vector_impl_data" }
%"struct.std::_Vector_base<libNumerics::SVDElement, std::allocator<libNumerics::SVDElement>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.libNumerics::SVDElement" = type <{ double, i32, [4 x i8] }>
%"class.libNumerics::vector" = type { %"class.libNumerics::matrix" }
%"class.libNumerics::matrix" = type { ptr, i32, i32, ptr }

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 #0 align 2

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

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11libNumerics3SVD4sortEv(ptr noundef nonnull align 8 dereferenceable(72) %0) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::vector.0", align 8
  %3 = alloca %"class.libNumerics::SVDElement", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.libNumerics::vector", align 8
  %7 = alloca %"class.libNumerics::vector", align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.libNumerics::vector", align 8
  %10 = alloca %"class.libNumerics::vector", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #5
  call void @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  %11 = getelementptr inbounds i8, ptr %0, i64 48
  %12 = call noundef i32 @_ZNK11libNumerics6matrixIdE4nrowEv(ptr noundef nonnull align 8 dereferenceable(24) %11)
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %17, %1
  %14 = call ptr @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  %15 = call ptr @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPN11libNumerics10SVDElementESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %14, ptr %15)
          to label %23 unwind label %31

.lr.ph:                                           ; preds = %1, %17
  %.029 = phi i32 [ %18, %17 ], [ 0, %1 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #5
  invoke void @_ZN11libNumerics10SVDElementC2ERKNS_6vectorIdEEi(ptr noundef nonnull align 8 dereferenceable(12) %3, ptr noundef nonnull align 8 dereferenceable(24) %11, i32 noundef %.029)
          to label %16 unwind label %21

16:                                               ; preds = %.lr.ph
  invoke void @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(12) %3)
          to label %17 unwind label %21

17:                                               ; preds = %16
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  %18 = add nuw nsw i32 %.029, 1
  %19 = call noundef i32 @_ZNK11libNumerics6matrixIdE4nrowEv(ptr noundef nonnull align 8 dereferenceable(24) %11)
  %20 = icmp slt i32 %18, %19
  br i1 %20, label %.lr.ph, label %._crit_edge, !llvm.loop !5

21:                                               ; preds = %16, %.lr.ph
  %22 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  br label %99

23:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %24 = call noundef i32 @_ZNK11libNumerics6matrixIdE4ncolEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  store i32 %24, ptr %4, align 4, !tbaa !7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  %25 = getelementptr inbounds i8, ptr %0, i64 24
  %26 = call noundef i32 @_ZNK11libNumerics6matrixIdE4ncolEv(ptr noundef nonnull align 8 dereferenceable(24) %25)
  store i32 %26, ptr %5, align 4, !tbaa !7
  %27 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %28 = load i32, ptr %27, align 4, !tbaa !7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  %29 = icmp sgt i32 %28, 0
  br i1 %29, label %.lr.ph37.preheader, label %._crit_edge38

.lr.ph37.preheader:                               ; preds = %23
  %30 = zext nneg i32 %28 to i64
  br label %.lr.ph37

._crit_edge38:                                    ; preds = %97, %23
  call void @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  ret void

31:                                               ; preds = %._crit_edge
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %99

.lr.ph37:                                         ; preds = %.lr.ph37.preheader, %97
  %indvars.iv = phi i64 [ %30, %.lr.ph37.preheader ], [ %indvars.iv.next, %97 ]
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %33 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv.next) #5
  %34 = getelementptr inbounds i8, ptr %33, i64 8
  %35 = load i32, ptr %34, align 8, !tbaa !11
  %36 = zext i32 %35 to i64
  %.not = icmp eq i64 %indvars.iv.next, %36
  br i1 %.not, label %97, label %37

37:                                               ; preds = %.lr.ph37
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #5
  %38 = trunc nuw nsw i64 %indvars.iv.next to i32
  invoke void @_ZNK11libNumerics6matrixIdE3colEi(ptr dead_on_unwind nonnull writable sret(%"class.libNumerics::vector") align 8 %6, ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %38)
          to label %39 unwind label %78

39:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #5
  invoke void @_ZNK11libNumerics6matrixIdE3colEi(ptr dead_on_unwind nonnull writable sret(%"class.libNumerics::vector") align 8 %7, ptr noundef nonnull align 8 dereferenceable(24) %25, i32 noundef %38)
          to label %40 unwind label %80

40:                                               ; preds = %39
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %11, i32 noundef %38)
  %42 = load double, ptr %41, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  store i32 %38, ptr %8, align 4, !tbaa !7
  %43 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv.next) #5
  %44 = getelementptr inbounds i8, ptr %43, i64 8
  %45 = load i32, ptr %44, align 8, !tbaa !11
  %46 = zext i32 %45 to i64
  %.not2230 = icmp eq i64 %indvars.iv.next, %46
  br i1 %.not2230, label %._crit_edge33, label %.lr.ph32

.lr.ph32:                                         ; preds = %40, %58
  %47 = load i32, ptr %8, align 4, !tbaa !7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #5
  %48 = sext i32 %47 to i64
  %49 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %48) #5
  %50 = getelementptr inbounds i8, ptr %49, i64 8
  %51 = load i32, ptr %50, align 8, !tbaa !11
  invoke void @_ZNK11libNumerics6matrixIdE3colEi(ptr dead_on_unwind nonnull writable sret(%"class.libNumerics::vector") align 8 %9, ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %51)
          to label %52 unwind label %82

52:                                               ; preds = %.lr.ph32
  call void @_ZN11libNumerics6matrixIdE5pasteEiiRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef 0, i32 noundef %47, ptr noundef nonnull align 8 dereferenceable(24) %9)
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #5
  %53 = load i32, ptr %8, align 4, !tbaa !7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #5
  %54 = sext i32 %53 to i64
  %55 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %54) #5
  %56 = getelementptr inbounds i8, ptr %55, i64 8
  %57 = load i32, ptr %56, align 8, !tbaa !11
  invoke void @_ZNK11libNumerics6matrixIdE3colEi(ptr dead_on_unwind nonnull writable sret(%"class.libNumerics::vector") align 8 %10, ptr noundef nonnull align 8 dereferenceable(24) %25, i32 noundef %57)
          to label %58 unwind label %84

58:                                               ; preds = %52
  call void @_ZN11libNumerics6matrixIdE5pasteEiiRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %25, i32 noundef 0, i32 noundef %53, ptr noundef nonnull align 8 dereferenceable(24) %10)
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #5
  %59 = load i32, ptr %8, align 4, !tbaa !7
  %60 = sext i32 %59 to i64
  %61 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %60) #5
  %62 = getelementptr inbounds i8, ptr %61, i64 8
  %63 = load i32, ptr %62, align 8, !tbaa !11
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %11, i32 noundef %63)
  %65 = load double, ptr %64, align 8, !tbaa !14
  %66 = load i32, ptr %8, align 4, !tbaa !7
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %11, i32 noundef %66)
  store double %65, ptr %67, align 8, !tbaa !14
  %68 = load i32, ptr %8, align 4, !tbaa !7
  %69 = sext i32 %68 to i64
  %70 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %69) #5
  %71 = getelementptr inbounds i8, ptr %70, i64 8
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %71) #5
  %72 = load i32, ptr %8, align 4, !tbaa !7
  %73 = sext i32 %72 to i64
  %74 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %73) #5
  %75 = getelementptr inbounds i8, ptr %74, i64 8
  %76 = load i32, ptr %75, align 8, !tbaa !11
  %77 = zext i32 %76 to i64
  %.not22 = icmp eq i64 %indvars.iv.next, %77
  br i1 %.not22, label %._crit_edge33, label %.lr.ph32, !llvm.loop !15

78:                                               ; preds = %37
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %96

80:                                               ; preds = %39
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %95

82:                                               ; preds = %.lr.ph32
  %83 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #5
  br label %94

84:                                               ; preds = %52
  %85 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #5
  br label %94

._crit_edge33:                                    ; preds = %58, %40
  %86 = load i32, ptr %8, align 4, !tbaa !7
  %87 = sext i32 %86 to i64
  %88 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %87) #5
  %89 = getelementptr inbounds i8, ptr %88, i64 8
  store i32 %86, ptr %89, align 8, !tbaa !11
  %90 = load i32, ptr %8, align 4, !tbaa !7
  call void @_ZN11libNumerics6matrixIdE5pasteEiiRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef 0, i32 noundef %90, ptr noundef nonnull align 8 dereferenceable(24) %6)
  %91 = load i32, ptr %8, align 4, !tbaa !7
  call void @_ZN11libNumerics6matrixIdE5pasteEiiRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %25, i32 noundef 0, i32 noundef %91, ptr noundef nonnull align 8 dereferenceable(24) %7)
  %92 = load i32, ptr %8, align 4, !tbaa !7
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %11, i32 noundef %92)
  store double %42, ptr %93, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  br label %97

94:                                               ; preds = %84, %82
  %.pn = phi { ptr, i32 } [ %85, %84 ], [ %83, %82 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  br label %95

95:                                               ; preds = %94, %80
  %.pn.pn = phi { ptr, i32 } [ %.pn, %94 ], [ %81, %80 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  br label %96

96:                                               ; preds = %95, %78
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %95 ], [ %79, %78 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  br label %99

97:                                               ; preds = %.lr.ph37, %._crit_edge33
  %98 = icmp ugt i64 %indvars.iv, 1
  br i1 %98, label %.lr.ph37, label %._crit_edge38, !llvm.loop !16

99:                                               ; preds = %96, %31, %21
  %.pn26 = phi { ptr, i32 } [ %22, %21 ], [ %.pn.pn.pn, %96 ], [ %32, %31 ]
  call void @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn26
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11libNumerics10SVDElementC2ERKNS_6vectorIdEEi(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPN11libNumerics10SVDElementESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr, ptr) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorIN11libNumerics10SVDElementESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 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 #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11libNumerics6matrixIdE5pasteEiiRKS1_(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { 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 #5 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!12, !8, i64 8}
!12 = !{!"_ZTSN11libNumerics10SVDElementE", !13, i64 0, !8, i64 8}
!13 = !{!"double", !9, i64 0}
!14 = !{!13, !13, i64 0}
!15 = distinct !{!15, !6}
!16 = distinct !{!16, !6}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass