; LLVM IR from ERGO-Code/HiGHS :: src/qpsolver/basis.ll (ZN5Basis7rebuildEv)

; 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.Basis = type <{ %class.HVectorBase, %struct.QpVector, %struct.QpVector, ptr, %class.HFactor, i32, [4 x i8], %struct.MatrixBase, %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::map", %"class.std::vector", %struct.QpVector, %struct.QpVector, i32, i32, %class.HVectorBase, %class.HVectorBase, i8, [7 x i8] }>
%class.HFactor = type { double, double, i32, %"class.std::vector", %"class.std::vector", %"class.std::vector", %struct.RefactorInfo, i32, i32, i32, i32, i32, i32, i32, double, i8, ptr, ptr, ptr, ptr, double, double, i32, double, %"class.std::unique_ptr", %struct.HighsLogOptions, i8, i8, i32, i32, ptr, i32, %"class.std::vector", %"class.std::vector.8", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector.8", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector.8", %"class.std::vector.8", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector.13", %"class.std::vector.8", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector.8", %"class.std::vector", %"class.std::vector", %"class.std::vector.8", %"class.std::vector", %"class.std::vector", %"class.std::vector.8", i32, i32, %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector.8", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector.8", %"class.std::vector.8", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector.8", %class.HVectorBase }
%struct.RefactorInfo = type { i8, %"class.std::vector", %"class.std::vector", %"class.std::vector.15", double }
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<signed char, std::allocator<signed char>>::_Vector_impl" }
%"struct.std::_Vector_base<signed char, std::allocator<signed char>>::_Vector_impl" = type { %"struct.std::_Vector_base<signed char, std::allocator<signed char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<signed char, std::allocator<signed char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.21" }
%"struct.std::_Head_base.21" = type { ptr }
%struct.HighsLogOptions = type <{ ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::function", ptr, i8, [7 x i8] }>
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.MatrixBase = type { i32, i32, %"class.std::vector", %"class.std::vector", %"class.std::vector.8" }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, BasisStatus>, std::_Select1st<std::pair<const int, BasisStatus>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, BasisStatus>, std::_Select1st<std::pair<const int, BasisStatus>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.QpVector = type { i32, i32, %"class.std::vector", %"class.std::vector.8" }
%class.HVectorBase = type { i32, i32, %"class.std::vector", %"class.std::vector.8", double, %"class.std::vector.13", %"class.std::vector", ptr, i8, i32, %"class.std::vector", %"class.std::vector.8" }

@.str.51 = external hidden unnamed_addr constant [97 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [72 x i8], align 1
@__PRETTY_FUNCTION__._ZN5Basis7rebuildEv = external hidden unnamed_addr constant [22 x i8], align 1

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE6assignEmRKi(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

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

declare noundef i32 @_ZN7HFactor5buildEP15HighsTimerClock(ptr noundef nonnull align 8 dereferenceable(1912), ptr noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5Basis7rebuildEv(ptr noundef nonnull align 8 dereferenceable(2913) %0) #2 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %5 = load ptr, ptr %2, align 8
  %6 = getelementptr inbounds %class.Basis, ptr %5, i32 0, i32 5
  store i32 0, ptr %6, align 8, !tbaa !9
  %7 = getelementptr inbounds %class.Basis, ptr %5, i32 0, i32 12
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  %8 = getelementptr inbounds %class.Basis, ptr %5, i32 0, i32 12
  %9 = getelementptr inbounds %class.Basis, ptr %5, i32 0, i32 7
  %10 = getelementptr inbounds %struct.MatrixBase, ptr %9, i32 0, i32 0
  %11 = load i32, ptr %10, align 8, !tbaa !53
  %12 = getelementptr inbounds %class.Basis, ptr %5, i32 0, i32 7
  %13 = getelementptr inbounds %struct.MatrixBase, ptr %12, i32 0, i32 1
  %14 = load i32, ptr %13, align 4, !tbaa !54
  %15 = add nsw i32 %11, %14
  %16 = sext i32 %15 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 -1, ptr %3, align 4, !tbaa !55
  call void @_ZNSt6vectorIiSaIiEE6assignEmRKi(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %16, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  %17 = getelementptr inbounds %class.Basis, ptr %5, i32 0, i32 9
  %18 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  %19 = getelementptr inbounds %class.Basis, ptr %5, i32 0, i32 8
  %20 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #5
  %21 = add i64 %18, %20
  %22 = trunc i64 %21 to i32
  %23 = getelementptr inbounds %class.Basis, ptr %5, i32 0, i32 7
  %24 = getelementptr inbounds %struct.MatrixBase, ptr %23, i32 0, i32 0
  %25 = load i32, ptr %24, align 8, !tbaa !53
  %26 = icmp eq i32 %22, %25
  br i1 %26, label %27, label %28

27:                                               ; preds = %1
  br label %30

28:                                               ; preds = %1
  call void @__assert_fail(ptr noundef @.str.51, ptr noundef @.str.52, i32 noundef 89, ptr noundef @__PRETTY_FUNCTION__._ZN5Basis7rebuildEv) #6
  unreachable

29:                                               ; No predecessors!
  br label %30

30:                                               ; preds = %29, %27
  %31 = getelementptr inbounds %class.Basis, ptr %5, i32 0, i32 4
  %32 = call noundef i32 @_ZN7HFactor5buildEP15HighsTimerClock(ptr noundef nonnull align 8 dereferenceable(1912) %31, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  store i64 0, ptr %4, align 8, !tbaa !56
  br label %33

33:                                               ; preds = %52, %30
  %34 = load i64, ptr %4, align 8, !tbaa !56
  %35 = getelementptr inbounds %class.Basis, ptr %5, i32 0, i32 8
  %36 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %35) #5
  %37 = getelementptr inbounds %class.Basis, ptr %5, i32 0, i32 9
  %38 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #5
  %39 = add i64 %36, %38
  %40 = icmp ult i64 %34, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  br label %55

42:                                               ; preds = %33
  %43 = load i64, ptr %4, align 8, !tbaa !56
  %44 = trunc i64 %43 to i32
  %45 = getelementptr inbounds %class.Basis, ptr %5, i32 0, i32 12
  %46 = getelementptr inbounds %class.Basis, ptr %5, i32 0, i32 10
  %47 = load i64, ptr %4, align 8, !tbaa !56
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef %47) #5
  %49 = load i32, ptr %48, align 4, !tbaa !55
  %50 = sext i32 %49 to i64
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef %50) #5
  store i32 %44, ptr %51, align 4, !tbaa !55
  br label %52

52:                                               ; preds = %42
  %53 = load i64, ptr %4, align 8, !tbaa !56
  %54 = add i64 %53, 1
  store i64 %54, ptr %4, align 8, !tbaa !56
  br label %33, !llvm.loop !57

55:                                               ; preds = %41
  %56 = getelementptr inbounds %class.Basis, ptr %5, i32 0, i32 19
  store i8 0, ptr %56, align 8, !tbaa !59
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { 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 #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 = { 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, !12, i64 2208}
!10 = !{!"_ZTS5Basis", !11, i64 0, !27, i64 176, !27, i64 232, !6, i64 288, !28, i64 296, !12, i64 2208, !43, i64 2216, !13, i64 2296, !13, i64 2320, !13, i64 2344, !44, i64 2368, !13, i64 2416, !27, i64 2440, !27, i64 2496, !12, i64 2552, !12, i64 2556, !11, i64 2560, !11, i64 2736, !26, i64 2912}
!11 = !{!"_ZTS11HVectorBaseIdE", !12, i64 0, !12, i64 4, !13, i64 8, !17, i64 32, !21, i64 56, !22, i64 64, !13, i64 88, !6, i64 112, !26, i64 120, !12, i64 124, !13, i64 128, !17, i64 152}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTSSt6vectorIiSaIiEE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!"_ZTSSt6vectorIdSaIdEE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"double", !7, i64 0}
!22 = !{!"_ZTSSt6vectorIcSaIcEE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIcSaIcEE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!"bool", !7, i64 0}
!27 = !{!"_ZTS8QpVector", !12, i64 0, !12, i64 4, !13, i64 8, !17, i64 32}
!28 = !{!"_ZTS7HFactor", !21, i64 0, !21, i64 8, !12, i64 16, !13, i64 24, !13, i64 48, !13, i64 72, !29, i64 96, !12, i64 184, !12, i64 188, !12, i64 192, !12, i64 196, !12, i64 200, !12, i64 204, !12, i64 208, !21, i64 216, !26, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !21, i64 264, !21, i64 272, !12, i64 280, !21, i64 288, !34, i64 296, !40, i64 304, !26, i64 400, !26, i64 401, !12, i64 404, !12, i64 408, !6, i64 416, !12, i64 424, !13, i64 432, !17, i64 456, !13, i64 480, !13, i64 504, !13, i64 528, !17, i64 552, !13, i64 576, !13, i64 600, !13, i64 624, !13, i64 648, !13, i64 672, !13, i64 696, !13, i64 720, !17, i64 744, !17, i64 768, !13, i64 792, !13, i64 816, !13, i64 840, !13, i64 864, !13, i64 888, !13, i64 912, !22, i64 936, !17, i64 960, !13, i64 984, !13, i64 1008, !13, i64 1032, !13, i64 1056, !13, i64 1080, !13, i64 1104, !13, i64 1128, !13, i64 1152, !13, i64 1176, !13, i64 1200, !17, i64 1224, !13, i64 1248, !13, i64 1272, !17, i64 1296, !13, i64 1320, !13, i64 1344, !17, i64 1368, !12, i64 1392, !12, i64 1396, !13, i64 1400, !13, i64 1424, !13, i64 1448, !17, i64 1472, !13, i64 1496, !13, i64 1520, !13, i64 1544, !13, i64 1568, !17, i64 1592, !17, i64 1616, !13, i64 1640, !13, i64 1664, !13, i64 1688, !17, i64 1712, !11, i64 1736}
!29 = !{!"_ZTS12RefactorInfo", !26, i64 0, !13, i64 8, !13, i64 32, !30, i64 56, !21, i64 80}
!30 = !{!"_ZTSSt6vectorIaSaIaEE", !31, i64 0}
!31 = !{!"_ZTSSt12_Vector_baseIaSaIaEE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIaSaIaEE12_Vector_implE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIaSaIaEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!34 = !{!"_ZTSSt10unique_ptrIN7HFactor7LogDataESt14default_deleteIS1_EE", !35, i64 0}
!35 = !{!"_ZTSSt15__uniq_ptr_dataIN7HFactor7LogDataESt14default_deleteIS1_ELb1ELb1EE", !36, i64 0}
!36 = !{!"_ZTSSt15__uniq_ptr_implIN7HFactor7LogDataESt14default_deleteIS1_EE", !37, i64 0}
!37 = !{!"_ZTSSt5tupleIJPN7HFactor7LogDataESt14default_deleteIS1_EEE", !38, i64 0}
!38 = !{!"_ZTSSt11_Tuple_implILm0EJPN7HFactor7LogDataESt14default_deleteIS1_EEE", !39, i64 0}
!39 = !{!"_ZTSSt10_Head_baseILm0EPN7HFactor7LogDataELb0EE", !6, i64 0}
!40 = !{!"_ZTS15HighsLogOptions", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !41, i64 48, !6, i64 80, !26, i64 88}
!41 = !{!"_ZTSSt8functionIFviRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPK20HighsCallbackDataOutP19HighsCallbackDataInPvEE", !42, i64 0, !6, i64 24}
!42 = !{!"_ZTSSt14_Function_base", !7, i64 0, !6, i64 16}
!43 = !{!"_ZTS10MatrixBase", !12, i64 0, !12, i64 4, !13, i64 8, !13, i64 32, !17, i64 56}
!44 = !{!"_ZTSSt3mapIi11BasisStatusSt4lessIiESaISt4pairIKiS0_EEE", !45, i64 0}
!45 = !{!"_ZTSSt8_Rb_treeIiSt4pairIKi11BasisStatusESt10_Select1stIS3_ESt4lessIiESaIS3_EE", !46, i64 0}
!46 = !{!"_ZTSNSt8_Rb_treeIiSt4pairIKi11BasisStatusESt10_Select1stIS3_ESt4lessIiESaIS3_EE13_Rb_tree_implIS7_Lb1EEE", !47, i64 0, !49, i64 8}
!47 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIiEE", !48, i64 0}
!48 = !{!"_ZTSSt4lessIiE"}
!49 = !{!"_ZTSSt15_Rb_tree_header", !50, i64 0, !52, i64 32}
!50 = !{!"_ZTSSt18_Rb_tree_node_base", !51, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!51 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!52 = !{!"long", !7, i64 0}
!53 = !{!10, !12, i64 2216}
!54 = !{!10, !12, i64 2220}
!55 = !{!12, !12, i64 0}
!56 = !{!52, !52, i64 0}
!57 = distinct !{!57, !58}
!58 = !{!"llvm.loop.mustprogress"}
!59 = !{!10, !26, i64 2912}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str.51 = external hidden unnamed_addr constant [97 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [72 x i8], align 1
@__PRETTY_FUNCTION__._ZN5Basis7rebuildEv = external hidden unnamed_addr constant [22 x i8], align 1

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE6assignEmRKi(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

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

declare noundef i32 @_ZN7HFactor5buildEP15HighsTimerClock(ptr noundef nonnull align 8 dereferenceable(1912), ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5Basis7rebuildEv(ptr noundef nonnull align 8 dereferenceable(2913) %0) local_unnamed_addr #2 align 2 {
  %2 = alloca i32, align 4
  %3 = getelementptr inbounds i8, ptr %0, i64 2208
  store i32 0, ptr %3, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 2416
  tail call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %5 = getelementptr inbounds i8, ptr %0, i64 2216
  %6 = load i32, ptr %5, align 8, !tbaa !52
  %7 = getelementptr inbounds i8, ptr %0, i64 2220
  %8 = load i32, ptr %7, align 4, !tbaa !53
  %9 = add nsw i32 %8, %6
  %10 = sext i32 %9 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  store i32 -1, ptr %2, align 4, !tbaa !54
  call void @_ZNSt6vectorIiSaIiEE6assignEmRKi(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %10, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  %11 = getelementptr inbounds i8, ptr %0, i64 2320
  %12 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  %13 = getelementptr inbounds i8, ptr %0, i64 2296
  %14 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  %15 = add i64 %14, %12
  %16 = trunc i64 %15 to i32
  %17 = load i32, ptr %5, align 8, !tbaa !52
  %18 = icmp eq i32 %17, %16
  br i1 %18, label %20, label %19

19:                                               ; preds = %1
  call void @__assert_fail(ptr noundef nonnull @.str.51, ptr noundef nonnull @.str.52, i32 noundef 89, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5Basis7rebuildEv) #6
  unreachable

20:                                               ; preds = %1
  %21 = getelementptr inbounds i8, ptr %0, i64 296
  %22 = call noundef i32 @_ZN7HFactor5buildEP15HighsTimerClock(ptr noundef nonnull align 8 dereferenceable(1912) %21, ptr noundef null)
  %23 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  %24 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  %25 = sub i64 0, %23
  %.not = icmp eq i64 %24, %25
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %20
  %26 = getelementptr inbounds i8, ptr %0, i64 2344
  br label %28

._crit_edge:                                      ; preds = %28, %20
  %27 = getelementptr inbounds i8, ptr %0, i64 2912
  store i8 0, ptr %27, align 8, !tbaa !55
  ret void

28:                                               ; preds = %.lr.ph, %28
  %.04 = phi i64 [ 0, %.lr.ph ], [ %34, %28 ]
  %29 = trunc i64 %.04 to i32
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %.04) #5
  %31 = load i32, ptr %30, align 4, !tbaa !54
  %32 = sext i32 %31 to i64
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %32) #5
  store i32 %29, ptr %33, align 4, !tbaa !54
  %34 = add nuw i64 %.04, 1
  %35 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  %36 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  %37 = add i64 %36, %35
  %38 = icmp ult i64 %34, %37
  br i1 %38, label %28, label %._crit_edge, !llvm.loop !56
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { 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 #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 = { 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, !8, i64 2208}
!6 = !{!"_ZTS5Basis", !7, i64 0, !26, i64 176, !26, i64 232, !15, i64 288, !27, i64 296, !8, i64 2208, !42, i64 2216, !11, i64 2296, !11, i64 2320, !11, i64 2344, !43, i64 2368, !11, i64 2416, !26, i64 2440, !26, i64 2496, !8, i64 2552, !8, i64 2556, !7, i64 2560, !7, i64 2736, !25, i64 2912}
!7 = !{!"_ZTS11HVectorBaseIdE", !8, i64 0, !8, i64 4, !11, i64 8, !16, i64 32, !20, i64 56, !21, i64 64, !11, i64 88, !15, i64 112, !25, i64 120, !8, i64 124, !11, i64 128, !16, i64 152}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSSt6vectorIiSaIiEE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!15 = !{!"any pointer", !9, i64 0}
!16 = !{!"_ZTSSt6vectorIdSaIdEE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!20 = !{!"double", !9, i64 0}
!21 = !{!"_ZTSSt6vectorIcSaIcEE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIcSaIcEE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!25 = !{!"bool", !9, i64 0}
!26 = !{!"_ZTS8QpVector", !8, i64 0, !8, i64 4, !11, i64 8, !16, i64 32}
!27 = !{!"_ZTS7HFactor", !20, i64 0, !20, i64 8, !8, i64 16, !11, i64 24, !11, i64 48, !11, i64 72, !28, i64 96, !8, i64 184, !8, i64 188, !8, i64 192, !8, i64 196, !8, i64 200, !8, i64 204, !8, i64 208, !20, i64 216, !25, i64 224, !15, i64 232, !15, i64 240, !15, i64 248, !15, i64 256, !20, i64 264, !20, i64 272, !8, i64 280, !20, i64 288, !33, i64 296, !39, i64 304, !25, i64 400, !25, i64 401, !8, i64 404, !8, i64 408, !15, i64 416, !8, i64 424, !11, i64 432, !16, i64 456, !11, i64 480, !11, i64 504, !11, i64 528, !16, i64 552, !11, i64 576, !11, i64 600, !11, i64 624, !11, i64 648, !11, i64 672, !11, i64 696, !11, i64 720, !16, i64 744, !16, i64 768, !11, i64 792, !11, i64 816, !11, i64 840, !11, i64 864, !11, i64 888, !11, i64 912, !21, i64 936, !16, i64 960, !11, i64 984, !11, i64 1008, !11, i64 1032, !11, i64 1056, !11, i64 1080, !11, i64 1104, !11, i64 1128, !11, i64 1152, !11, i64 1176, !11, i64 1200, !16, i64 1224, !11, i64 1248, !11, i64 1272, !16, i64 1296, !11, i64 1320, !11, i64 1344, !16, i64 1368, !8, i64 1392, !8, i64 1396, !11, i64 1400, !11, i64 1424, !11, i64 1448, !16, i64 1472, !11, i64 1496, !11, i64 1520, !11, i64 1544, !11, i64 1568, !16, i64 1592, !16, i64 1616, !11, i64 1640, !11, i64 1664, !11, i64 1688, !16, i64 1712, !7, i64 1736}
!28 = !{!"_ZTS12RefactorInfo", !25, i64 0, !11, i64 8, !11, i64 32, !29, i64 56, !20, i64 80}
!29 = !{!"_ZTSSt6vectorIaSaIaEE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseIaSaIaEE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIaSaIaEE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIaSaIaEE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!33 = !{!"_ZTSSt10unique_ptrIN7HFactor7LogDataESt14default_deleteIS1_EE", !34, i64 0}
!34 = !{!"_ZTSSt15__uniq_ptr_dataIN7HFactor7LogDataESt14default_deleteIS1_ELb1ELb1EE", !35, i64 0}
!35 = !{!"_ZTSSt15__uniq_ptr_implIN7HFactor7LogDataESt14default_deleteIS1_EE", !36, i64 0}
!36 = !{!"_ZTSSt5tupleIJPN7HFactor7LogDataESt14default_deleteIS1_EEE", !37, i64 0}
!37 = !{!"_ZTSSt11_Tuple_implILm0EJPN7HFactor7LogDataESt14default_deleteIS1_EEE", !38, i64 0}
!38 = !{!"_ZTSSt10_Head_baseILm0EPN7HFactor7LogDataELb0EE", !15, i64 0}
!39 = !{!"_ZTS15HighsLogOptions", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24, !15, i64 32, !15, i64 40, !40, i64 48, !15, i64 80, !25, i64 88}
!40 = !{!"_ZTSSt8functionIFviRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPK20HighsCallbackDataOutP19HighsCallbackDataInPvEE", !41, i64 0, !15, i64 24}
!41 = !{!"_ZTSSt14_Function_base", !9, i64 0, !15, i64 16}
!42 = !{!"_ZTS10MatrixBase", !8, i64 0, !8, i64 4, !11, i64 8, !11, i64 32, !16, i64 56}
!43 = !{!"_ZTSSt3mapIi11BasisStatusSt4lessIiESaISt4pairIKiS0_EEE", !44, i64 0}
!44 = !{!"_ZTSSt8_Rb_treeIiSt4pairIKi11BasisStatusESt10_Select1stIS3_ESt4lessIiESaIS3_EE", !45, i64 0}
!45 = !{!"_ZTSNSt8_Rb_treeIiSt4pairIKi11BasisStatusESt10_Select1stIS3_ESt4lessIiESaIS3_EE13_Rb_tree_implIS7_Lb1EEE", !46, i64 0, !48, i64 8}
!46 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIiEE", !47, i64 0}
!47 = !{!"_ZTSSt4lessIiE"}
!48 = !{!"_ZTSSt15_Rb_tree_header", !49, i64 0, !51, i64 32}
!49 = !{!"_ZTSSt18_Rb_tree_node_base", !50, i64 0, !15, i64 8, !15, i64 16, !15, i64 24}
!50 = !{!"_ZTSSt14_Rb_tree_color", !9, i64 0}
!51 = !{!"long", !9, i64 0}
!52 = !{!6, !8, i64 2216}
!53 = !{!6, !8, i64 2220}
!54 = !{!8, !8, i64 0}
!55 = !{!6, !25, i64 2912}
!56 = distinct !{!56, !57}
!57 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass