; LLVM IR from ERGO-Code/HiGHS :: src/mip/HighsNodeQueue.ll (ZN14HighsNodeQueue14unlink_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::_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__._ZN14HighsNodeQueue14unlink_domchgsEl = external hidden unnamed_addr constant [45 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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(144) ptr @_ZNSt6vectorIN14HighsNodeQueue8OpenNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt10unique_ptrISt3setISt4pairIdlESt4lessIS2_EN14HighsNodeQueue16NodesetAllocatorIS2_EEENS5_20GlobalOperatorDeleteEE3getEv(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) #3

; 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) #2 align 2

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

15:                                               ; preds = %2
  br label %18

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

17:                                               ; No predecessors!
  br label %18

18:                                               ; preds = %17, %15
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %19 = getelementptr inbounds %class.HighsNodeQueue, ptr %12, i32 0, i32 1
  %20 = load i64, ptr %4, align 8, !tbaa !9
  %21 = call noundef nonnull align 8 dereferenceable(144) ptr @_ZNSt6vectorIN14HighsNodeQueue8OpenNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %20) #6
  %22 = getelementptr inbounds %"struct.HighsNodeQueue::OpenNode", ptr %21, i32 0, i32 0
  %23 = call noundef i64 @_ZNKSt6vectorI17HighsDomainChangeSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #6
  %24 = trunc i64 %23 to i32
  store i32 %24, ptr %5, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !11
  br label %25

25:                                               ; preds = %84, %18
  %26 = load i32, ptr %6, align 4, !tbaa !11
  %27 = load i32, ptr %5, align 4, !tbaa !11
  %28 = icmp ne i32 %26, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %87

30:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %31 = getelementptr inbounds %class.HighsNodeQueue, ptr %12, i32 0, i32 1
  %32 = load i64, ptr %4, align 8, !tbaa !9
  %33 = call noundef nonnull align 8 dereferenceable(144) ptr @_ZNSt6vectorIN14HighsNodeQueue8OpenNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %31, i64 noundef %32) #6
  %34 = getelementptr inbounds %"struct.HighsNodeQueue::OpenNode", ptr %33, i32 0, i32 0
  %35 = load i32, ptr %6, align 4, !tbaa !11
  %36 = sext i32 %35 to i64
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI17HighsDomainChangeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %34, i64 noundef %36) #6
  %38 = getelementptr inbounds %struct.HighsDomainChange, ptr %37, i32 0, i32 1
  %39 = load i32, ptr %38, align 8, !tbaa !13
  store i32 %39, ptr %7, align 4, !tbaa !11
  %40 = getelementptr inbounds %class.HighsNodeQueue, ptr %12, i32 0, i32 1
  %41 = load i64, ptr %4, align 8, !tbaa !9
  %42 = call noundef nonnull align 8 dereferenceable(144) ptr @_ZNSt6vectorIN14HighsNodeQueue8OpenNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %41) #6
  %43 = getelementptr inbounds %"struct.HighsNodeQueue::OpenNode", ptr %42, i32 0, i32 0
  %44 = load i32, ptr %6, align 4, !tbaa !11
  %45 = sext i32 %44 to i64
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI17HighsDomainChangeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %45) #6
  %47 = getelementptr inbounds %struct.HighsDomainChange, ptr %46, i32 0, i32 2
  %48 = load i32, ptr %47, align 4, !tbaa !17
  switch i32 %48, label %83 [
    i32 0, label %49
    i32 1, label %66
  ]

49:                                               ; preds = %30
  %50 = getelementptr inbounds %class.HighsNodeQueue, ptr %12, i32 0, i32 3
  %51 = call noundef ptr @_ZNKSt10unique_ptrISt3setISt4pairIdlESt4lessIS2_EN14HighsNodeQueue16NodesetAllocatorIS2_EEENS5_20GlobalOperatorDeleteEE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %50) #6
  %52 = load i32, ptr %7, align 4, !tbaa !11
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds %"class.std::set", ptr %51, i64 %53
  %55 = getelementptr inbounds %class.HighsNodeQueue, ptr %12, i32 0, i32 1
  %56 = load i64, ptr %4, align 8, !tbaa !9
  %57 = call noundef nonnull align 8 dereferenceable(144) ptr @_ZNSt6vectorIN14HighsNodeQueue8OpenNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %55, i64 noundef %56) #6
  %58 = getelementptr inbounds %"struct.HighsNodeQueue::OpenNode", ptr %57, i32 0, i32 2
  %59 = load i32, ptr %6, align 4, !tbaa !11
  %60 = sext i32 %59 to i64
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorISt23_Rb_tree_const_iteratorISt4pairIdlEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %58, i64 noundef %60) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %61, i64 8, i1 false), !tbaa.struct !18
  %62 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %8, i32 0, i32 0
  %63 = load ptr, ptr %62, align 8
  %64 = call ptr @_ZNSt3setISt4pairIdlESt4lessIS1_EN14HighsNodeQueue16NodesetAllocatorIS1_EEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(56) %54, ptr %63)
  %65 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %9, i32 0, i32 0
  store ptr %64, ptr %65, align 8
  br label %83

66:                                               ; preds = %30
  %67 = getelementptr inbounds %class.HighsNodeQueue, ptr %12, i32 0, i32 4
  %68 = call noundef ptr @_ZNKSt10unique_ptrISt3setISt4pairIdlESt4lessIS2_EN14HighsNodeQueue16NodesetAllocatorIS2_EEENS5_20GlobalOperatorDeleteEE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %67) #6
  %69 = load i32, ptr %7, align 4, !tbaa !11
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds %"class.std::set", ptr %68, i64 %70
  %72 = getelementptr inbounds %class.HighsNodeQueue, ptr %12, i32 0, i32 1
  %73 = load i64, ptr %4, align 8, !tbaa !9
  %74 = call noundef nonnull align 8 dereferenceable(144) ptr @_ZNSt6vectorIN14HighsNodeQueue8OpenNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %72, i64 noundef %73) #6
  %75 = getelementptr inbounds %"struct.HighsNodeQueue::OpenNode", ptr %74, i32 0, i32 2
  %76 = load i32, ptr %6, align 4, !tbaa !11
  %77 = sext i32 %76 to i64
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorISt23_Rb_tree_const_iteratorISt4pairIdlEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %75, i64 noundef %77) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 %78, i64 8, i1 false), !tbaa.struct !18
  %79 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %10, i32 0, i32 0
  %80 = load ptr, ptr %79, align 8
  %81 = call ptr @_ZNSt3setISt4pairIdlESt4lessIS1_EN14HighsNodeQueue16NodesetAllocatorIS1_EEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(56) %71, ptr %80)
  %82 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %11, i32 0, i32 0
  store ptr %81, ptr %82, align 8
  br label %83

83:                                               ; preds = %66, %49, %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %84

84:                                               ; preds = %83
  %85 = load i32, ptr %6, align 4, !tbaa !11
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %6, align 4, !tbaa !11
  br label %25, !llvm.loop !19

87:                                               ; preds = %29
  %88 = getelementptr inbounds %class.HighsNodeQueue, ptr %12, 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
  call void @_ZNSt6vectorISt23_Rb_tree_const_iteratorISt4pairIdlEESaIS3_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %91) #6
  %92 = getelementptr inbounds %class.HighsNodeQueue, ptr %12, i32 0, i32 1
  %93 = load i64, ptr %4, align 8, !tbaa !9
  %94 = call noundef nonnull align 8 dereferenceable(144) ptr @_ZNSt6vectorIN14HighsNodeQueue8OpenNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %92, i64 noundef %93) #6
  %95 = getelementptr inbounds %"struct.HighsNodeQueue::OpenNode", ptr %94, i32 0, i32 2
  call void @_ZNSt6vectorISt23_Rb_tree_const_iteratorISt4pairIdlEESaIS3_EE13shrink_to_fitEv(ptr noundef nonnull align 8 dereferenceable(24) %95)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt3setISt4pairIdlESt4lessIS1_EN14HighsNodeQueue16NodesetAllocatorIS1_EEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(56), ptr) #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt23_Rb_tree_const_iteratorISt4pairIdlEESaIS3_EE13shrink_to_fitEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 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 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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, !12, i64 8}
!14 = !{!"_ZTS17HighsDomainChange", !15, i64 0, !12, i64 8, !16, i64 12}
!15 = !{!"double", !7, i64 0}
!16 = !{!"_ZTS14HighsBoundType", !7, i64 0}
!17 = !{!14, !16, i64 12}
!18 = !{i64 0, i64 8, !5}
!19 = distinct !{!19, !20}
!20 = !{!"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__._ZN14HighsNodeQueue14unlink_domchgsEl = external hidden unnamed_addr constant [45 x i8], align 1

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

; 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 #1 align 2

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

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

3:                                                ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.51, ptr noundef nonnull @.str.52, i32 noundef 173, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14HighsNodeQueue14unlink_domchgsEl) #3
  unreachable

4:                                                ; preds = %2
  %5 = getelementptr inbounds i8, ptr %0, i64 8
  %6 = tail call noundef nonnull align 8 dereferenceable(144) ptr @_ZNSt6vectorIN14HighsNodeQueue8OpenNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %1) #4
  %7 = tail call noundef i64 @_ZNKSt6vectorI17HighsDomainChangeSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  %8 = and i64 %7, 4294967295
  %.not2122 = icmp eq i64 %8, 0
  br i1 %.not2122, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %4
  %9 = getelementptr inbounds i8, ptr %0, i64 72
  %10 = getelementptr inbounds i8, ptr %0, i64 64
  %11 = and i64 %7, 4294967295
  br label %16

._crit_edge:                                      ; preds = %33, %4
  %12 = tail call noundef nonnull align 8 dereferenceable(144) ptr @_ZNSt6vectorIN14HighsNodeQueue8OpenNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %1) #4
  %13 = getelementptr inbounds i8, ptr %12, i64 48
  tail call void @_ZNSt6vectorISt23_Rb_tree_const_iteratorISt4pairIdlEESaIS3_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  %14 = tail call noundef nonnull align 8 dereferenceable(144) ptr @_ZNSt6vectorIN14HighsNodeQueue8OpenNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %1) #4
  %15 = getelementptr inbounds i8, ptr %14, i64 48
  tail call void @_ZNSt6vectorISt23_Rb_tree_const_iteratorISt4pairIdlEESaIS3_EE13shrink_to_fitEv(ptr noundef nonnull align 8 dereferenceable(24) %15)
  ret void

16:                                               ; preds = %.lr.ph, %33
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %33 ]
  %17 = tail call noundef nonnull align 8 dereferenceable(144) ptr @_ZNSt6vectorIN14HighsNodeQueue8OpenNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %1) #4
  %18 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI17HighsDomainChangeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %indvars.iv) #4
  %19 = getelementptr inbounds i8, ptr %18, i64 8
  %20 = load i32, ptr %19, align 8, !tbaa !5
  %21 = tail call noundef nonnull align 8 dereferenceable(144) ptr @_ZNSt6vectorIN14HighsNodeQueue8OpenNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %1) #4
  %22 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI17HighsDomainChangeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %indvars.iv) #4
  %23 = getelementptr inbounds i8, ptr %22, i64 12
  %24 = load i32, ptr %23, align 4, !tbaa !12
  switch i32 %24, label %33 [
    i32 0, label %.sink.split
    i32 1, label %25
  ]

25:                                               ; preds = %16
  br label %.sink.split

.sink.split:                                      ; preds = %16, %25
  %.sink = phi ptr [ %9, %25 ], [ %10, %16 ]
  %26 = tail call noundef ptr @_ZNKSt10unique_ptrISt3setISt4pairIdlESt4lessIS2_EN14HighsNodeQueue16NodesetAllocatorIS2_EEENS5_20GlobalOperatorDeleteEE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %.sink) #4
  %27 = sext i32 %20 to i64
  %28 = getelementptr inbounds %"class.std::set", ptr %26, i64 %27
  %29 = tail call noundef nonnull align 8 dereferenceable(144) ptr @_ZNSt6vectorIN14HighsNodeQueue8OpenNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %1) #4
  %30 = getelementptr inbounds i8, ptr %29, i64 48
  %31 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorISt23_Rb_tree_const_iteratorISt4pairIdlEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef %indvars.iv) #4
  %.sroa.01.0.copyload = load ptr, ptr %31, align 8, !tbaa !13
  %32 = tail call ptr @_ZNSt3setISt4pairIdlESt4lessIS1_EN14HighsNodeQueue16NodesetAllocatorIS1_EEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(56) %28, ptr %.sroa.01.0.copyload)
  br label %33

33:                                               ; preds = %.sink.split, %16
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %.not21 = icmp eq i64 %indvars.iv.next, %11
  br i1 %.not21, label %._crit_edge, label %16, !llvm.loop !15
}

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

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

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

attributes #0 = { 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 #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 }
attributes #4 = { 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, !10, i64 8}
!6 = !{!"_ZTS17HighsDomainChange", !7, i64 0, !10, i64 8, !11, i64 12}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTS14HighsBoundType", !8, i64 0}
!12 = !{!6, !11, i64 12}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !8, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


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