; LLVM IR from ERGO-Code/HiGHS :: src/mip/HighsNodeQueue.ll (ZN14HighsNodeQueue12link_domchgsEl)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%class.HighsNodeQueue = type <{ %"class.std::unique_ptr", %"class.std::vector", %"class.std::priority_queue", %"class.std::unique_ptr.14", %"class.std::unique_ptr.14", i64, i64, i64, i64, i64, i64, i64, double, i32, [4 x i8] }>
%"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.5" }
%"struct.std::_Head_base.5" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<HighsNodeQueue::OpenNode, std::allocator<HighsNodeQueue::OpenNode>>::_Vector_impl" }
%"struct.std::_Vector_base<HighsNodeQueue::OpenNode, std::allocator<HighsNodeQueue::OpenNode>>::_Vector_impl" = type { %"struct.std::_Vector_base<HighsNodeQueue::OpenNode, std::allocator<HighsNodeQueue::OpenNode>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HighsNodeQueue::OpenNode, std::allocator<HighsNodeQueue::OpenNode>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::priority_queue" = type <{ %"class.std::vector.9", [8 x i8] }>
%"class.std::vector.9" = type { %"struct.std::_Vector_base.10" }
%"struct.std::_Vector_base.10" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unique_ptr.14" = type { %"struct.std::__uniq_ptr_data.15" }
%"struct.std::__uniq_ptr_data.15" = type { %"class.std::__uniq_ptr_impl.16" }
%"class.std::__uniq_ptr_impl.16" = type { %"class.std::tuple.17" }
%"class.std::tuple.17" = type { %"struct.std::_Tuple_impl.18" }
%"struct.std::_Tuple_impl.18" = type { %"struct.std::_Head_base.21" }
%"struct.std::_Head_base.21" = type { ptr }
%"struct.HighsNodeQueue::OpenNode" = type { %"class.std::vector.22", %"class.std::vector.27", %"class.std::vector.32", double, double, i32, %"struct.highs::RbTreeLinks", %"struct.highs::RbTreeLinks" }
%"class.std::vector.22" = type { %"struct.std::_Vector_base.23" }
%"struct.std::_Vector_base.23" = type { %"struct.std::_Vector_base<HighsDomainChange, std::allocator<HighsDomainChange>>::_Vector_impl" }
%"struct.std::_Vector_base<HighsDomainChange, std::allocator<HighsDomainChange>>::_Vector_impl" = type { %"struct.std::_Vector_base<HighsDomainChange, std::allocator<HighsDomainChange>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HighsDomainChange, std::allocator<HighsDomainChange>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.27" = type { %"struct.std::_Vector_base.28" }
%"struct.std::_Vector_base.28" = 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 }
%"class.std::vector.32" = type { %"struct.std::_Vector_base.33" }
%"struct.std::_Vector_base.33" = type { %"struct.std::_Vector_base<std::_Rb_tree_const_iterator<std::pair<double, long>>, std::allocator<std::_Rb_tree_const_iterator<std::pair<double, long>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::_Rb_tree_const_iterator<std::pair<double, long>>, std::allocator<std::_Rb_tree_const_iterator<std::pair<double, long>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::_Rb_tree_const_iterator<std::pair<double, long>>, std::allocator<std::_Rb_tree_const_iterator<std::pair<double, long>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::_Rb_tree_const_iterator<std::pair<double, long>>, std::allocator<std::_Rb_tree_const_iterator<std::pair<double, long>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.highs::RbTreeLinks" = type { [2 x i64], i64 }
%struct.HighsDomainChange = type { double, i32, i32 }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<double, long>, std::pair<double, long>, std::_Identity<std::pair<double, long>>, std::less<std::pair<double, long>>, HighsNodeQueue::NodesetAllocator<std::pair<double, long>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<double, long>, std::pair<double, long>, std::_Identity<std::pair<double, long>>, std::less<std::pair<double, long>>, HighsNodeQueue::NodesetAllocator<std::pair<double, long>>>::_Rb_tree_impl" = type { %"class.HighsNodeQueue::NodesetAllocator", [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.HighsNodeQueue::NodesetAllocator" = type { ptr }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }

@.str.51 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [76 x i8], align 1
@__PRETTY_FUNCTION__._ZN14HighsNodeQueue12link_domchgsEl = external hidden unnamed_addr constant [43 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14HighsNodeQueue12link_domchgsEl(ptr noundef nonnull align 8 dereferenceable(148) %0, i64 noundef %1) #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca double, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::pair", align 8
  %10 = alloca { ptr, i8 }, align 8
  %11 = alloca %"struct.std::pair", align 8
  %12 = alloca { ptr, i8 }, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i64 %1, ptr %4, align 8, !tbaa !9
  %13 = load ptr, ptr %3, align 8
  %14 = load i64, ptr %4, align 8, !tbaa !9
  %15 = icmp ne i64 %14, -1
  br i1 %15, label %16, label %17

16:                                               ; preds = %2
  br label %19

17:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str.51, ptr noundef @.str.52, i32 noundef 153, ptr noundef @__PRETTY_FUNCTION__._ZN14HighsNodeQueue12link_domchgsEl) #5
  unreachable

18:                                               ; No predecessors!
  br label %19

19:                                               ; preds = %18, %16
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %20 = getelementptr inbounds %class.HighsNodeQueue, ptr %13, i32 0, i32 1
  %21 = load i64, ptr %4, align 8, !tbaa !9
  %22 = call noundef nonnull align 8 dereferenceable(144) ptr @_ZNSt6vectorIN14HighsNodeQueue8OpenNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %21) #6
  %23 = getelementptr inbounds %"struct.HighsNodeQueue::OpenNode", ptr %22, i32 0, i32 0
  %24 = call noundef i64 @_ZNKSt6vectorI17HighsDomainChangeSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #6
  %25 = trunc i64 %24 to i32
  store i32 %25, ptr %5, align 4, !tbaa !11
  %26 = getelementptr inbounds %class.HighsNodeQueue, ptr %13, i32 0, i32 1
  %27 = load i64, ptr %4, align 8, !tbaa !9
  %28 = call noundef nonnull align 8 dereferenceable(144) ptr @_ZNSt6vectorIN14HighsNodeQueue8OpenNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %27) #6
  %29 = getelementptr inbounds %"struct.HighsNodeQueue::OpenNode", ptr %28, i32 0, i32 2
  %30 = load i32, ptr %5, align 4, !tbaa !11
  %31 = sext i32 %30 to i64
  call void @_ZNSt6vectorISt23_Rb_tree_const_iteratorISt4pairIdlEESaIS3_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %31)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !11
  br label %32

32:                                               ; preds = %96, %19
  %33 = load i32, ptr %6, align 4, !tbaa !11
  %34 = load i32, ptr %5, align 4, !tbaa !11
  %35 = icmp ne i32 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %99

37:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %38 = getelementptr inbounds %class.HighsNodeQueue, ptr %13, i32 0, i32 1
  %39 = load i64, ptr %4, align 8, !tbaa !9
  %40 = call noundef nonnull align 8 dereferenceable(144) ptr @_ZNSt6vectorIN14HighsNodeQueue8OpenNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %39) #6
  %41 = getelementptr inbounds %"struct.HighsNodeQueue::OpenNode", ptr %40, i32 0, i32 0
  %42 = load i32, ptr %6, align 4, !tbaa !11
  %43 = sext i32 %42 to i64
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI17HighsDomainChangeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %41, i64 noundef %43) #6
  %45 = getelementptr inbounds %struct.HighsDomainChange, ptr %44, i32 0, i32 0
  %46 = load double, ptr %45, align 8, !tbaa !13
  store double %46, ptr %7, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %47 = getelementptr inbounds %class.HighsNodeQueue, ptr %13, i32 0, i32 1
  %48 = load i64, ptr %4, align 8, !tbaa !9
  %49 = call noundef nonnull align 8 dereferenceable(144) ptr @_ZNSt6vectorIN14HighsNodeQueue8OpenNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %48) #6
  %50 = getelementptr inbounds %"struct.HighsNodeQueue::OpenNode", ptr %49, i32 0, i32 0
  %51 = load i32, ptr %6, align 4, !tbaa !11
  %52 = sext i32 %51 to i64
  %53 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI17HighsDomainChangeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %50, i64 noundef %52) #6
  %54 = getelementptr inbounds %struct.HighsDomainChange, ptr %53, i32 0, i32 1
  %55 = load i32, ptr %54, align 8, !tbaa !18
  store i32 %55, ptr %8, align 4, !tbaa !11
  %56 = getelementptr inbounds %class.HighsNodeQueue, ptr %13, i32 0, i32 1
  %57 = load i64, ptr %4, align 8, !tbaa !9
  %58 = call noundef nonnull align 8 dereferenceable(144) ptr @_ZNSt6vectorIN14HighsNodeQueue8OpenNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %56, i64 noundef %57) #6
  %59 = getelementptr inbounds %"struct.HighsNodeQueue::OpenNode", ptr %58, i32 0, i32 0
  %60 = load i32, ptr %6, align 4, !tbaa !11
  %61 = sext i32 %60 to i64
  %62 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI17HighsDomainChangeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %59, i64 noundef %61) #6
  %63 = getelementptr inbounds %struct.HighsDomainChange, ptr %62, i32 0, i32 2
  %64 = load i32, ptr %63, align 4, !tbaa !19
  switch i32 %64, label %95 [
    i32 0, label %65
    i32 1, label %80
  ]

65:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #6
  %66 = getelementptr inbounds %class.HighsNodeQueue, ptr %13, i32 0, i32 3
  %67 = call noundef ptr @_ZNKSt10unique_ptrISt3setISt4pairIdlESt4lessIS2_EN14HighsNodeQueue16NodesetAllocatorIS2_EEENS5_20GlobalOperatorDeleteEE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %66) #6
  %68 = load i32, ptr %8, align 4, !tbaa !11
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds %"class.std::set", ptr %67, i64 %69
  %71 = call { ptr, i8 } @_ZNSt3setISt4pairIdlESt4lessIS1_EN14HighsNodeQueue16NodesetAllocatorIS1_EEE7emplaceIJRdRlEEES0_ISt23_Rb_tree_const_iteratorIS1_EbEDpOT_(ptr noundef nonnull align 8 dereferenceable(56) %70, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %4)
  store { ptr, i8 } %71, ptr %10, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %10, i64 9, i1 false)
  %72 = getelementptr inbounds %"struct.std::pair", ptr %9, i32 0, i32 0
  %73 = getelementptr inbounds %class.HighsNodeQueue, ptr %13, i32 0, i32 1
  %74 = load i64, ptr %4, align 8, !tbaa !9
  %75 = call noundef nonnull align 8 dereferenceable(144) ptr @_ZNSt6vectorIN14HighsNodeQueue8OpenNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %73, i64 noundef %74) #6
  %76 = getelementptr inbounds %"struct.HighsNodeQueue::OpenNode", ptr %75, i32 0, i32 2
  %77 = load i32, ptr %6, align 4, !tbaa !11
  %78 = sext i32 %77 to i64
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorISt23_Rb_tree_const_iteratorISt4pairIdlEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %76, i64 noundef %78) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %79, ptr align 8 %72, i64 8, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  br label %95

80:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #6
  %81 = getelementptr inbounds %class.HighsNodeQueue, ptr %13, i32 0, i32 4
  %82 = call noundef ptr @_ZNKSt10unique_ptrISt3setISt4pairIdlESt4lessIS2_EN14HighsNodeQueue16NodesetAllocatorIS2_EEENS5_20GlobalOperatorDeleteEE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %81) #6
  %83 = load i32, ptr %8, align 4, !tbaa !11
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds %"class.std::set", ptr %82, i64 %84
  %86 = call { ptr, i8 } @_ZNSt3setISt4pairIdlESt4lessIS1_EN14HighsNodeQueue16NodesetAllocatorIS1_EEE7emplaceIJRdRlEEES0_ISt23_Rb_tree_const_iteratorIS1_EbEDpOT_(ptr noundef nonnull align 8 dereferenceable(56) %85, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %4)
  store { ptr, i8 } %86, ptr %12, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 %12, i64 9, i1 false)
  %87 = getelementptr inbounds %"struct.std::pair", ptr %11, i32 0, i32 0
  %88 = getelementptr inbounds %class.HighsNodeQueue, ptr %13, i32 0, i32 1
  %89 = load i64, ptr %4, align 8, !tbaa !9
  %90 = call noundef nonnull align 8 dereferenceable(144) ptr @_ZNSt6vectorIN14HighsNodeQueue8OpenNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %88, i64 noundef %89) #6
  %91 = getelementptr inbounds %"struct.HighsNodeQueue::OpenNode", ptr %90, i32 0, i32 2
  %92 = load i32, ptr %6, align 4, !tbaa !11
  %93 = sext i32 %92 to i64
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorISt23_Rb_tree_const_iteratorISt4pairIdlEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %91, i64 noundef %93) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %94, ptr align 8 %87, i64 8, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  br label %95

95:                                               ; preds = %80, %65, %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %96

96:                                               ; preds = %95
  %97 = load i32, ptr %6, align 4, !tbaa !11
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %6, align 4, !tbaa !11
  br label %32, !llvm.loop !21

99:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(144) ptr @_ZNSt6vectorIN14HighsNodeQueue8OpenNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI17HighsDomainChangeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setISt4pairIdlESt4lessIS1_EN14HighsNodeQueue16NodesetAllocatorIS1_EEE7emplaceIJRdRlEEES0_ISt23_Rb_tree_const_iteratorIS1_EbEDpOT_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { noreturn nounwind }
attributes #6 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTS17HighsDomainChange", !15, i64 0, !12, i64 8, !16, i64 12}
!15 = !{!"double", !7, i64 0}
!16 = !{!"_ZTS14HighsBoundType", !7, i64 0}
!17 = !{!15, !15, i64 0}
!18 = !{!14, !12, i64 8}
!19 = !{!14, !16, i64 12}
!20 = !{i64 0, i64 8, !5}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}


; 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::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<double, long>, std::pair<double, long>, std::_Identity<std::pair<double, long>>, std::less<std::pair<double, long>>, HighsNodeQueue::NodesetAllocator<std::pair<double, long>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<double, long>, std::pair<double, long>, std::_Identity<std::pair<double, long>>, std::less<std::pair<double, long>>, HighsNodeQueue::NodesetAllocator<std::pair<double, long>>>::_Rb_tree_impl" = type { %"class.HighsNodeQueue::NodesetAllocator", [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.HighsNodeQueue::NodesetAllocator" = type { ptr }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }

@.str.51 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [76 x i8], align 1
@__PRETTY_FUNCTION__._ZN14HighsNodeQueue12link_domchgsEl = external hidden unnamed_addr constant [43 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14HighsNodeQueue12link_domchgsEl(ptr noundef nonnull align 8 dereferenceable(148) %0, i64 noundef %1) local_unnamed_addr #2 align 2 {
  %3 = alloca i64, align 8
  %4 = alloca double, align 8
  store i64 %1, ptr %3, align 8, !tbaa !5
  %.not = icmp eq i64 %1, -1
  br i1 %.not, label %5, label %6

5:                                                ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.51, ptr noundef nonnull @.str.52, i32 noundef 153, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14HighsNodeQueue12link_domchgsEl) #4
  unreachable

6:                                                ; preds = %2
  %7 = getelementptr inbounds i8, ptr %0, i64 8
  %8 = tail call noundef nonnull align 8 dereferenceable(144) ptr @_ZNSt6vectorIN14HighsNodeQueue8OpenNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %1) #5
  %9 = tail call noundef i64 @_ZNKSt6vectorI17HighsDomainChangeSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %10 = tail call noundef nonnull align 8 dereferenceable(144) ptr @_ZNSt6vectorIN14HighsNodeQueue8OpenNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %1) #5
  %11 = getelementptr inbounds i8, ptr %10, i64 48
  %sext = shl i64 %9, 32
  %12 = ashr exact i64 %sext, 32
  tail call void @_ZNSt6vectorISt23_Rb_tree_const_iteratorISt4pairIdlEESaIS3_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %12)
  %13 = and i64 %9, 4294967295
  %.not2021 = icmp eq i64 %13, 0
  br i1 %.not2021, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %6
  %14 = getelementptr inbounds i8, ptr %0, i64 72
  %15 = getelementptr inbounds i8, ptr %0, i64 64
  %16 = and i64 %9, 4294967295
  br label %17

._crit_edge:                                      ; preds = %40, %6
  ret void

17:                                               ; preds = %.lr.ph, %40
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %40 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %18 = load i64, ptr %3, align 8, !tbaa !5
  %19 = call noundef nonnull align 8 dereferenceable(144) ptr @_ZNSt6vectorIN14HighsNodeQueue8OpenNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %18) #5
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI17HighsDomainChangeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %indvars.iv) #5
  %21 = load double, ptr %20, align 8, !tbaa !9
  store double %21, ptr %4, align 8, !tbaa !14
  %22 = load i64, ptr %3, align 8, !tbaa !5
  %23 = call noundef nonnull align 8 dereferenceable(144) ptr @_ZNSt6vectorIN14HighsNodeQueue8OpenNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %22) #5
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI17HighsDomainChangeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %indvars.iv) #5
  %25 = getelementptr inbounds i8, ptr %24, i64 8
  %26 = load i32, ptr %25, align 8, !tbaa !15
  %27 = load i64, ptr %3, align 8, !tbaa !5
  %28 = call noundef nonnull align 8 dereferenceable(144) ptr @_ZNSt6vectorIN14HighsNodeQueue8OpenNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %27) #5
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI17HighsDomainChangeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %indvars.iv) #5
  %30 = getelementptr inbounds i8, ptr %29, i64 12
  %31 = load i32, ptr %30, align 4, !tbaa !16
  switch i32 %31, label %40 [
    i32 0, label %.sink.split
    i32 1, label %32
  ]

32:                                               ; preds = %17
  br label %.sink.split

.sink.split:                                      ; preds = %17, %32
  %.sink = phi ptr [ %14, %32 ], [ %15, %17 ]
  %33 = call noundef ptr @_ZNKSt10unique_ptrISt3setISt4pairIdlESt4lessIS2_EN14HighsNodeQueue16NodesetAllocatorIS2_EEENS5_20GlobalOperatorDeleteEE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %.sink) #5
  %34 = sext i32 %26 to i64
  %35 = getelementptr inbounds %"class.std::set", ptr %33, i64 %34
  %36 = call { ptr, i8 } @_ZNSt3setISt4pairIdlESt4lessIS1_EN14HighsNodeQueue16NodesetAllocatorIS1_EEE7emplaceIJRdRlEEES0_ISt23_Rb_tree_const_iteratorIS1_EbEDpOT_(ptr noundef nonnull align 8 dereferenceable(56) %35, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %.fca.0.extract.sink = extractvalue { ptr, i8 } %36, 0
  %.sink25 = load i64, ptr %3, align 8, !tbaa !5
  %37 = call noundef nonnull align 8 dereferenceable(144) ptr @_ZNSt6vectorIN14HighsNodeQueue8OpenNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %.sink25) #5
  %38 = getelementptr inbounds i8, ptr %37, i64 48
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorISt23_Rb_tree_const_iteratorISt4pairIdlEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %indvars.iv) #5
  store ptr %.fca.0.extract.sink, ptr %39, align 8, !tbaa !17
  br label %40

40:                                               ; preds = %.sink.split, %17
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %.not20 = icmp eq i64 %indvars.iv.next, %16
  br i1 %.not20, label %._crit_edge, label %17, !llvm.loop !19
}

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setISt4pairIdlESt4lessIS1_EN14HighsNodeQueue16NodesetAllocatorIS1_EEE7emplaceIJRdRlEEES0_ISt23_Rb_tree_const_iteratorIS1_EbEDpOT_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #4 = { noreturn nounwind }
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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTS17HighsDomainChange", !11, i64 0, !12, i64 8, !13, i64 12}
!11 = !{!"double", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTS14HighsBoundType", !7, i64 0}
!14 = !{!11, !11, i64 0}
!15 = !{!10, !12, i64 8}
!16 = !{!10, !13, i64 12}
!17 = !{!18, !18, i64 0}
!18 = !{!"any pointer", !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


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