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

; 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::__detail::_Node_iterator", %"struct.std::__detail::_Node_iterator" }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%class.HighsCutPool = type { %class.HighsDynamicRowMatrix, %"class.std::vector.8", %"class.std::vector.21", %"class.std::vector.8", %"class.std::vector.8", %"class.std::vector.13", %"class.std::unordered_multimap", %"class.std::vector.31", %"class.std::set", double, double, double, i32, i32, i32, i32, i32, %"class.std::vector.3", %"class.std::vector.36" }
%class.HighsDynamicRowMatrix = type { %"class.std::vector", %"class.std::vector.3", %"class.std::vector.8", %"class.std::vector.3", %"class.std::vector.3", %"class.std::vector.3", %"class.std::vector.3", %"class.std::vector.3", %"class.std::vector.3", %"class.std::vector.3", %"class.std::vector.13", %"class.std::set", %"class.std::vector.3" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.21" = type { %"struct.std::_Vector_base.22" }
%"struct.std::_Vector_base.22" = type { %"struct.std::_Vector_base<short, std::allocator<short>>::_Vector_impl" }
%"struct.std::_Vector_base<short, std::allocator<short>>::_Vector_impl" = type { %"struct.std::_Vector_base<short, std::allocator<short>>::_Vector_impl_data" }
%"struct.std::_Vector_base<short, std::allocator<short>>::_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 }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_multimap" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::vector.31" = type { %"struct.std::_Vector_base.32" }
%"struct.std::_Vector_base.32" = type { %"struct.std::_Vector_base<HighsDomain::CutpoolPropagation *, std::allocator<HighsDomain::CutpoolPropagation *>>::_Vector_impl" }
%"struct.std::_Vector_base<HighsDomain::CutpoolPropagation *, std::allocator<HighsDomain::CutpoolPropagation *>>::_Vector_impl" = type { %"struct.std::_Vector_base<HighsDomain::CutpoolPropagation *, std::allocator<HighsDomain::CutpoolPropagation *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HighsDomain::CutpoolPropagation *, std::allocator<HighsDomain::CutpoolPropagation *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int>>, std::less<std::pair<int, 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.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = 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.36" = type { %"struct.std::_Vector_base.37" }
%"struct.std::_Vector_base.37" = type { %"struct.std::_Vector_base<std::pair<int, double>, std::allocator<std::pair<int, double>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, double>, std::allocator<std::pair<int, double>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, double>, std::allocator<std::pair<int, double>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, double>, std::allocator<std::pair<int, double>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair.41" = type <{ i64, i32, [4 x i8] }>

; 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 uwtable
define dso_local noundef zeroext i1 @_ZN12HighsCutPool11isDuplicateEmdPKiPKdid(ptr noundef nonnull align 8 dereferenceable(680) %0, i64 noundef %1, double noundef %2, ptr noundef %3, ptr noundef %4, i32 noundef %5, double noundef %6) #1 align 2 {
  %8 = alloca i1, align 1
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca double, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca double, align 8
  %16 = alloca %"struct.std::pair", align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca double, align 8
  %25 = alloca i32, align 4
  %26 = alloca double, align 8
  store ptr %0, ptr %9, align 8, !tbaa !5
  store i64 %1, ptr %10, align 8, !tbaa !9
  store double %2, ptr %11, align 8, !tbaa !11
  store ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  store i32 %5, ptr %14, align 4, !tbaa !13
  store double %6, ptr %15, align 8, !tbaa !11
  %27 = load ptr, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #6
  %28 = getelementptr inbounds %class.HighsCutPool, ptr %27, i32 0, i32 6
  %29 = call { ptr, ptr } @_ZNSt18unordered_multimapImiSt4hashImESt8equal_toImESaISt4pairIKmiEEE11equal_rangeERS5_(ptr noundef nonnull align 8 dereferenceable(56) %28, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %30 = getelementptr inbounds { ptr, ptr }, ptr %16, i32 0, i32 0
  %31 = extractvalue { ptr, ptr } %29, 0
  store ptr %31, ptr %30, align 8
  %32 = getelementptr inbounds { ptr, ptr }, ptr %16, i32 0, i32 1
  %33 = extractvalue { ptr, ptr } %29, 1
  store ptr %33, ptr %32, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %34 = getelementptr inbounds %class.HighsCutPool, ptr %27, i32 0, i32 0
  %35 = call noundef ptr @_ZNK21HighsDynamicRowMatrix10getARvalueEv(ptr noundef nonnull align 8 dereferenceable(336) %34)
  store ptr %35, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %36 = getelementptr inbounds %class.HighsCutPool, ptr %27, i32 0, i32 0
  %37 = call noundef ptr @_ZNK21HighsDynamicRowMatrix10getARindexEv(ptr noundef nonnull align 8 dereferenceable(336) %36)
  store ptr %37, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %38 = getelementptr inbounds %"struct.std::pair", ptr %16, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %19, ptr align 8 %38, i64 8, i1 false)
  br label %39

39:                                               ; preds = %115, %7
  %40 = getelementptr inbounds %"struct.std::pair", ptr %16, i32 0, i32 1
  %41 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKmiELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %40) #6
  br i1 %41, label %43, label %42

42:                                               ; preds = %39
  store i32 2, ptr %20, align 4
  br label %117

43:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %44 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKmiELb0ELb0EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  %45 = getelementptr inbounds %"struct.std::pair.41", ptr %44, i32 0, i32 1
  %46 = load i32, ptr %45, align 8, !tbaa !15
  store i32 %46, ptr %21, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %47 = getelementptr inbounds %class.HighsCutPool, ptr %27, i32 0, i32 0
  %48 = load i32, ptr %21, align 4, !tbaa !13
  %49 = call noundef i32 @_ZNK21HighsDynamicRowMatrix11getRowStartEi(ptr noundef nonnull align 8 dereferenceable(336) %47, i32 noundef %48)
  store i32 %49, ptr %22, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  %50 = getelementptr inbounds %class.HighsCutPool, ptr %27, i32 0, i32 0
  %51 = load i32, ptr %21, align 4, !tbaa !13
  %52 = call noundef i32 @_ZNK21HighsDynamicRowMatrix9getRowEndEi(ptr noundef nonnull align 8 dereferenceable(336) %50, i32 noundef %51)
  store i32 %52, ptr %23, align 4, !tbaa !13
  %53 = load i32, ptr %23, align 4, !tbaa !13
  %54 = load i32, ptr %22, align 4, !tbaa !13
  %55 = sub nsw i32 %53, %54
  %56 = load i32, ptr %14, align 4, !tbaa !13
  %57 = icmp ne i32 %55, %56
  br i1 %57, label %58, label %59

58:                                               ; preds = %43
  store i32 4, ptr %20, align 4
  br label %112

59:                                               ; preds = %43
  %60 = load ptr, ptr %12, align 8, !tbaa !5
  %61 = load ptr, ptr %12, align 8, !tbaa !5
  %62 = load i32, ptr %14, align 4, !tbaa !13
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds i32, ptr %61, i64 %63
  %65 = load ptr, ptr %18, align 8, !tbaa !5
  %66 = load i32, ptr %22, align 4, !tbaa !13
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds i32, ptr %65, i64 %67
  %69 = call noundef zeroext i1 @_ZSt5equalIPKiS1_EbT_S2_T0_(ptr noundef %60, ptr noundef %64, ptr noundef %68)
  br i1 %69, label %70, label %111

70:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  store double 0.000000e+00, ptr %24, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  store i32 0, ptr %25, align 4, !tbaa !13
  br label %71

71:                                               ; preds = %91, %70
  %72 = load i32, ptr %25, align 4, !tbaa !13
  %73 = load i32, ptr %14, align 4, !tbaa !13
  %74 = icmp ne i32 %72, %73
  br i1 %74, label %76, label %75

75:                                               ; preds = %71
  store i32 5, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %94

76:                                               ; preds = %71
  %77 = load ptr, ptr %13, align 8, !tbaa !5
  %78 = load i32, ptr %25, align 4, !tbaa !13
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds double, ptr %77, i64 %79
  %81 = load double, ptr %80, align 8, !tbaa !11
  %82 = load ptr, ptr %17, align 8, !tbaa !5
  %83 = load i32, ptr %22, align 4, !tbaa !13
  %84 = load i32, ptr %25, align 4, !tbaa !13
  %85 = add nsw i32 %83, %84
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds double, ptr %82, i64 %86
  %88 = load double, ptr %87, align 8, !tbaa !11
  %89 = load double, ptr %24, align 8, !tbaa !11
  %90 = call double @llvm.fmuladd.f64(double %81, double %88, double %89)
  store double %90, ptr %24, align 8, !tbaa !11
  br label %91

91:                                               ; preds = %76
  %92 = load i32, ptr %25, align 4, !tbaa !13
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %25, align 4, !tbaa !13
  br label %71, !llvm.loop !17

94:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %95 = load double, ptr %24, align 8, !tbaa !11
  %96 = getelementptr inbounds %class.HighsCutPool, ptr %27, i32 0, i32 3
  %97 = load i32, ptr %21, align 4, !tbaa !13
  %98 = sext i32 %97 to i64
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %96, i64 noundef %98) #6
  %100 = load double, ptr %99, align 8, !tbaa !11
  %101 = fmul double %95, %100
  %102 = load double, ptr %11, align 8, !tbaa !11
  %103 = fmul double %101, %102
  store double %103, ptr %26, align 8, !tbaa !11
  %104 = load double, ptr %26, align 8, !tbaa !11
  %105 = fcmp oge double %104, 0x3FEFFFFDE7210BE9
  br i1 %105, label %106, label %107

106:                                              ; preds = %94
  store i1 true, ptr %8, align 1
  store i32 1, ptr %20, align 4
  br label %108

107:                                              ; preds = %94
  store i32 0, ptr %20, align 4
  br label %108

108:                                              ; preds = %107, %106
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  %109 = load i32, ptr %20, align 4
  switch i32 %109, label %112 [
    i32 0, label %110
  ]

110:                                              ; preds = %108
  br label %111

111:                                              ; preds = %110, %59
  store i32 0, ptr %20, align 4
  br label %112

112:                                              ; preds = %111, %108, %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  %113 = load i32, ptr %20, align 4
  switch i32 %113, label %117 [
    i32 0, label %114
    i32 4, label %115
  ]

114:                                              ; preds = %112
  br label %115

115:                                              ; preds = %114, %112
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKmiELb0ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  br label %39, !llvm.loop !19

117:                                              ; preds = %112, %42
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  %118 = load i32, ptr %20, align 4
  switch i32 %118, label %120 [
    i32 2, label %119
  ]

119:                                              ; preds = %117
  store i1 false, ptr %8, align 1
  store i32 1, ptr %20, align 4
  br label %120

120:                                              ; preds = %119, %117
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #6
  %121 = load i1, ptr %8, align 1
  ret i1 %121
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK21HighsDynamicRowMatrix10getARindexEv(ptr noundef nonnull align 8 dereferenceable(336)) #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 zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKmiELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZSt5equalIPKiS1_EbT_S2_T0_(ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #5

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

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


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

%"struct.std::pair" = type { %"struct.std::__detail::_Node_iterator", %"struct.std::__detail::_Node_iterator" }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }

; 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 uwtable
define dso_local noundef zeroext i1 @_ZN12HighsCutPool11isDuplicateEmdPKiPKdid(ptr noundef nonnull align 8 dereferenceable(680) %0, i64 noundef %1, double noundef %2, ptr noundef %3, ptr nocapture noundef readonly %4, i32 noundef %5, double noundef %6) local_unnamed_addr #1 align 2 {
  %8 = alloca i64, align 8
  %9 = alloca %"struct.std::pair", align 8
  %10 = alloca %"struct.std::__detail::_Node_iterator", align 8
  store i64 %1, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #5
  %11 = getelementptr inbounds i8, ptr %0, i64 456
  %12 = call { ptr, ptr } @_ZNSt18unordered_multimapImiSt4hashImESt8equal_toImESaISt4pairIKmiEEE11equal_rangeERS5_(ptr noundef nonnull align 8 dereferenceable(56) %11, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %13 = extractvalue { ptr, ptr } %12, 0
  store ptr %13, ptr %9, align 8
  %14 = getelementptr inbounds i8, ptr %9, i64 8
  %15 = extractvalue { ptr, ptr } %12, 1
  store ptr %15, ptr %14, align 8
  %16 = call noundef ptr @_ZNK21HighsDynamicRowMatrix10getARvalueEv(ptr noundef nonnull align 8 dereferenceable(336) %0)
  %17 = call noundef ptr @_ZNK21HighsDynamicRowMatrix10getARindexEv(ptr noundef nonnull align 8 dereferenceable(336) %0)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  %18 = ptrtoint ptr %13 to i64
  store i64 %18, ptr %10, align 8
  %19 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKmiELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  br i1 %19, label %.lr.ph41, label %.critedge

.lr.ph41:                                         ; preds = %7
  %20 = sext i32 %5 to i64
  %21 = getelementptr inbounds i32, ptr %3, i64 %20
  %.not3437 = icmp eq i32 %5, 0
  %22 = getelementptr inbounds i8, ptr %0, i64 384
  br i1 %.not3437, label %.lr.ph41.split.us, label %.lr.ph41.split.preheader

.lr.ph41.split.preheader:                         ; preds = %.lr.ph41
  %23 = zext i32 %5 to i64
  %xtraiter = and i64 %23, 3
  %24 = icmp ult i32 %5, 4
  %unroll_iter = and i64 %23, 4294967292
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.lr.ph41.split

.lr.ph41.split.us:                                ; preds = %.lr.ph41, %34
  %25 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKmiELb0ELb0EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %26 = getelementptr inbounds i8, ptr %25, i64 8
  %27 = load i32, ptr %26, align 8, !tbaa !9
  %28 = call noundef i32 @_ZNK21HighsDynamicRowMatrix11getRowStartEi(ptr noundef nonnull align 8 dereferenceable(336) %0, i32 noundef %27)
  %29 = call noundef i32 @_ZNK21HighsDynamicRowMatrix9getRowEndEi(ptr noundef nonnull align 8 dereferenceable(336) %0, i32 noundef %27)
  %.not.us = icmp eq i32 %29, %28
  br i1 %.not.us, label %30, label %34

30:                                               ; preds = %.lr.ph41.split.us
  %31 = sext i32 %28 to i64
  %32 = getelementptr inbounds i32, ptr %17, i64 %31
  %33 = call noundef zeroext i1 @_ZSt5equalIPKiS1_EbT_S2_T0_(ptr noundef %3, ptr noundef %21, ptr noundef %32)
  br i1 %33, label %.preheader.us, label %34

34:                                               ; preds = %.preheader.us, %30, %.lr.ph41.split.us
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKmiELb0ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %36 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKmiELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  br i1 %36, label %.lr.ph41.split.us, label %.critedge, !llvm.loop !12

.preheader.us:                                    ; preds = %30
  %37 = sext i32 %27 to i64
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %37) #5
  %39 = load double, ptr %38, align 8, !tbaa !14
  %40 = fmul double %39, 0.000000e+00
  %41 = fmul double %40, %2
  %42 = fcmp ult double %41, 0x3FEFFFFDE7210BE9
  br i1 %42, label %34, label %.split.us

.lr.ph41.split:                                   ; preds = %.lr.ph41.split.preheader, %79
  %43 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKmiELb0ELb0EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %44 = getelementptr inbounds i8, ptr %43, i64 8
  %45 = load i32, ptr %44, align 8, !tbaa !9
  %46 = call noundef i32 @_ZNK21HighsDynamicRowMatrix11getRowStartEi(ptr noundef nonnull align 8 dereferenceable(336) %0, i32 noundef %45)
  %47 = call noundef i32 @_ZNK21HighsDynamicRowMatrix9getRowEndEi(ptr noundef nonnull align 8 dereferenceable(336) %0, i32 noundef %45)
  %48 = sub nsw i32 %47, %46
  %.not = icmp eq i32 %48, %5
  br i1 %.not, label %49, label %79

49:                                               ; preds = %.lr.ph41.split
  %50 = sext i32 %46 to i64
  %51 = getelementptr inbounds i32, ptr %17, i64 %50
  %52 = call noundef zeroext i1 @_ZSt5equalIPKiS1_EbT_S2_T0_(ptr noundef %3, ptr noundef nonnull %21, ptr noundef %51)
  br i1 %52, label %.preheader.preheader, label %79

.preheader.preheader:                             ; preds = %49
  %invariant.gep = getelementptr double, ptr %16, i64 %50
  br i1 %24, label %._crit_edge.unr-lcssa, label %.preheader

._crit_edge.unr-lcssa:                            ; preds = %.preheader, %.preheader.preheader
  %.lcssa.ph = phi double [ poison, %.preheader.preheader ], [ %78, %.preheader ]
  %indvars.iv.unr = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next.3, %.preheader ]
  %.02938.unr = phi double [ 0.000000e+00, %.preheader.preheader ], [ %78, %.preheader ]
  br i1 %lcmp.mod.not, label %._crit_edge, label %.preheader.epil

.preheader.epil:                                  ; preds = %._crit_edge.unr-lcssa, %.preheader.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.preheader.epil ], [ %indvars.iv.unr, %._crit_edge.unr-lcssa ]
  %.02938.epil = phi double [ %56, %.preheader.epil ], [ %.02938.unr, %._crit_edge.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.preheader.epil ], [ 0, %._crit_edge.unr-lcssa ]
  %53 = getelementptr inbounds double, ptr %4, i64 %indvars.iv.epil
  %54 = load double, ptr %53, align 8, !tbaa !14
  %gep.epil = getelementptr double, ptr %invariant.gep, i64 %indvars.iv.epil
  %55 = load double, ptr %gep.epil, align 8, !tbaa !14
  %56 = call double @llvm.fmuladd.f64(double %54, double %55, double %.02938.epil)
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.preheader.epil, !llvm.loop !16

._crit_edge:                                      ; preds = %.preheader.epil, %._crit_edge.unr-lcssa
  %.lcssa = phi double [ %.lcssa.ph, %._crit_edge.unr-lcssa ], [ %56, %.preheader.epil ]
  %57 = sext i32 %45 to i64
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %57) #5
  %59 = load double, ptr %58, align 8, !tbaa !14
  %60 = fmul double %.lcssa, %59
  %61 = fmul double %60, %2
  %62 = fcmp ult double %61, 0x3FEFFFFDE7210BE9
  br i1 %62, label %79, label %.split.us

.preheader:                                       ; preds = %.preheader.preheader, %.preheader
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %.preheader ], [ 0, %.preheader.preheader ]
  %.02938 = phi double [ %78, %.preheader ], [ 0.000000e+00, %.preheader.preheader ]
  %niter = phi i64 [ %niter.next.3, %.preheader ], [ 0, %.preheader.preheader ]
  %63 = getelementptr inbounds double, ptr %4, i64 %indvars.iv
  %64 = load double, ptr %63, align 8, !tbaa !14
  %gep = getelementptr double, ptr %invariant.gep, i64 %indvars.iv
  %65 = load double, ptr %gep, align 8, !tbaa !14
  %66 = call double @llvm.fmuladd.f64(double %64, double %65, double %.02938)
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %67 = getelementptr inbounds double, ptr %4, i64 %indvars.iv.next
  %68 = load double, ptr %67, align 8, !tbaa !14
  %gep.1 = getelementptr double, ptr %invariant.gep, i64 %indvars.iv.next
  %69 = load double, ptr %gep.1, align 8, !tbaa !14
  %70 = call double @llvm.fmuladd.f64(double %68, double %69, double %66)
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %71 = getelementptr inbounds double, ptr %4, i64 %indvars.iv.next.1
  %72 = load double, ptr %71, align 8, !tbaa !14
  %gep.2 = getelementptr double, ptr %invariant.gep, i64 %indvars.iv.next.1
  %73 = load double, ptr %gep.2, align 8, !tbaa !14
  %74 = call double @llvm.fmuladd.f64(double %72, double %73, double %70)
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %75 = getelementptr inbounds double, ptr %4, i64 %indvars.iv.next.2
  %76 = load double, ptr %75, align 8, !tbaa !14
  %gep.3 = getelementptr double, ptr %invariant.gep, i64 %indvars.iv.next.2
  %77 = load double, ptr %gep.3, align 8, !tbaa !14
  %78 = call double @llvm.fmuladd.f64(double %76, double %77, double %74)
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.unr-lcssa, label %.preheader, !llvm.loop !18

79:                                               ; preds = %49, %._crit_edge, %.lr.ph41.split
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKmiELb0ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %81 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKmiELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  br i1 %81, label %.lr.ph41.split, label %.critedge, !llvm.loop !12

.split.us:                                        ; preds = %._crit_edge, %.preheader.us
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  br label %82

.critedge:                                        ; preds = %79, %34, %7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  br label %82

82:                                               ; preds = %.split.us, %.critedge
  %83 = phi i1 [ true, %.split.us ], [ false, %.critedge ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  ret i1 %83
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKmiELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZSt5equalIPKiS1_EbT_S2_T0_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass