; LLVM IR from buresjan/optim_lbm :: nomad/src/Cache/CacheSet.ll (ZN9NOMAD_4_38CacheSet5purgeEv)

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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<NOMAD_4_3::EvalPoint, NOMAD_4_3::EvalPoint, std::_Identity<NOMAD_4_3::EvalPoint>, NOMAD_4_3::EvalPointCompare>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<NOMAD_4_3::EvalPoint, NOMAD_4_3::EvalPoint, std::_Identity<NOMAD_4_3::EvalPoint>, NOMAD_4_3::EvalPointCompare>::_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.NOMAD_4_3::Double" = type <{ ptr, double, i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"class.NOMAD_4_3::CacheSet" = type { %"class.NOMAD_4_3::CacheBase.base", %"class.std::set" }
%"class.NOMAD_4_3::CacheBase.base" = type <{ ptr, %"class.std::__cxx11::basic_string", i64, %"class.std::shared_ptr", i64, %"struct.std::atomic.8" }>
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"struct.std::atomic.8" = type { %"struct.std::__atomic_base.9" }
%"struct.std::__atomic_base.9" = type { i8 }
%"class.NOMAD_4_3::CacheBase" = type <{ ptr, %"class.std::__cxx11::basic_string", i64, %"class.std::shared_ptr", i64, %"struct.std::atomic.8", [7 x i8] }>

@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.30 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [46 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

declare i32 @__gxx_personality_v0(...)

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

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

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

declare void @_ZN9NOMAD_4_36DoubleC1Ev(ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt23_Rb_tree_const_iteratorIN9NOMAD_4_39EvalPointEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 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 zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIN9NOMAD_4_39EvalPointEES4_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(160)) #5 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #6

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK9NOMAD_4_36Double9isDefinedEv(ptr noundef nonnull align 8 dereferenceable(17)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN9NOMAD_4_3ltERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(17)) #6

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9NOMAD_4_38CacheSet5purgeEv(ptr noundef nonnull align 8 dereferenceable(128) %0) unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::set", align 8
  %5 = alloca %"class.NOMAD_4_3::Double", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, 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
  %12 = alloca %"class.NOMAD_4_3::Double", align 8
  %13 = alloca %"class.NOMAD_4_3::Double", align 8
  %14 = alloca %"struct.std::pair", align 8
  %15 = alloca i64, align 8
  %16 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %17 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %18 = alloca %"struct.std::pair", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %19 = load ptr, ptr %2, align 8
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.30)
  %21 = getelementptr inbounds %"class.NOMAD_4_3::CacheSet", ptr %19, i32 0, i32 1
  %22 = call noundef i64 @_ZNKSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %21) #7
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %20, i64 noundef %22)
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef @.str.31)
  %25 = getelementptr inbounds %"class.NOMAD_4_3::CacheBase", ptr %19, i32 0, i32 2
  %26 = load i64, ptr %25, align 8, !tbaa !9
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %24, i64 noundef %26)
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef @.str.32)
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %30 = getelementptr inbounds %"class.NOMAD_4_3::CacheBase", ptr %19, i32 0, i32 2
  %31 = load i64, ptr %30, align 8, !tbaa !9
  %32 = icmp eq i64 %31, -1
  br i1 %32, label %39, label %33

33:                                               ; preds = %1
  %34 = getelementptr inbounds %"class.NOMAD_4_3::CacheSet", ptr %19, i32 0, i32 1
  %35 = call noundef i64 @_ZNKSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %34) #7
  %36 = getelementptr inbounds %"class.NOMAD_4_3::CacheBase", ptr %19, i32 0, i32 2
  %37 = load i64, ptr %36, align 8, !tbaa !9
  %38 = icmp ult i64 %35, %37
  br i1 %38, label %39, label %40

39:                                               ; preds = %33, %1
  br label %173

40:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  store i64 1, ptr %3, align 8, !tbaa !20
  br label %41

41:                                               ; preds = %169, %40
  %42 = getelementptr inbounds %"class.NOMAD_4_3::CacheSet", ptr %19, i32 0, i32 1
  %43 = call noundef i64 @_ZNKSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %42) #7
  %44 = getelementptr inbounds %"class.NOMAD_4_3::CacheBase", ptr %19, i32 0, i32 2
  %45 = load i64, ptr %44, align 8, !tbaa !9
  %46 = icmp uge i64 %43, %45
  br i1 %46, label %47, label %172

47:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 48, ptr %4) #7
  call void @_ZNSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #7
  invoke void @_ZN9NOMAD_4_36DoubleC1Ev(ptr noundef nonnull align 8 dereferenceable(17) %5)
          to label %48 unwind label %74

48:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %49 = load ptr, ptr %19, align 8, !tbaa !21
  %50 = getelementptr inbounds ptr, ptr %49, i64 2
  %51 = load ptr, ptr %50, align 8
  %52 = invoke noundef i64 %51(ptr noundef nonnull align 8 dereferenceable(128) %19, ptr noundef nonnull align 8 dereferenceable(17) %5)
          to label %53 unwind label %78

53:                                               ; preds = %48
  store i64 %52, ptr %8, align 8, !tbaa !20
  %54 = load i64, ptr %8, align 8, !tbaa !20
  %55 = icmp ugt i64 %54, 0
  br i1 %55, label %56, label %130

56:                                               ; preds = %53
  %57 = load i64, ptr %3, align 8, !tbaa !20
  %58 = icmp ugt i64 %57, 0
  br i1 %58, label %59, label %130

59:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  call void @_ZNSt23_Rb_tree_const_iteratorIN9NOMAD_4_39EvalPointEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %60 = getelementptr inbounds %"class.NOMAD_4_3::CacheSet", ptr %19, i32 0, i32 1
  %61 = call ptr @_ZNKSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %60) #7
  %62 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %10, i32 0, i32 0
  store ptr %61, ptr %62, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %10, i64 8, i1 false), !tbaa.struct !23
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %63

63:                                               ; preds = %126, %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %64 = getelementptr inbounds %"class.NOMAD_4_3::CacheSet", ptr %19, i32 0, i32 1
  %65 = call ptr @_ZNKSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %64) #7
  %66 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %11, i32 0, i32 0
  store ptr %65, ptr %66, align 8
  %67 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIN9NOMAD_4_39EvalPointEES4_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br i1 %67, label %68, label %128

68:                                               ; preds = %63
  %69 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN9NOMAD_4_39EvalPointEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %70 = invoke noundef i32 @_ZNK9NOMAD_4_39EvalPoint13getEvalStatusENS_8EvalTypeE(ptr noundef nonnull align 8 dereferenceable(160) %69, i32 noundef 0)
          to label %71 unwind label %82

71:                                               ; preds = %68
  %72 = icmp ne i32 4, %70
  br i1 %72, label %73, label %86

73:                                               ; preds = %71
  br label %126

74:                                               ; preds = %47
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %6, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %7, align 4
  br label %171

78:                                               ; preds = %48
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %6, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %7, align 4
  br label %170

82:                                               ; preds = %107, %68
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %6, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %7, align 4
  br label %129

86:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #7
  %87 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN9NOMAD_4_39EvalPointEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  invoke void @_ZNK9NOMAD_4_39EvalPoint4getFENS_8EvalTypeENS_11ComputeTypeE(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::Double") align 8 %12, ptr noundef nonnull align 8 dereferenceable(160) %87, i32 noundef 0, i32 noundef 0)
          to label %88 unwind label %93

88:                                               ; preds = %86
  %89 = invoke noundef zeroext i1 @_ZNK9NOMAD_4_36Double9isDefinedEv(ptr noundef nonnull align 8 dereferenceable(17) %12)
          to label %90 unwind label %97

90:                                               ; preds = %88
  %91 = xor i1 %89, true
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %12) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #7
  br i1 %91, label %92, label %102

92:                                               ; preds = %90
  br label %126

93:                                               ; preds = %86
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %6, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %7, align 4
  br label %101

97:                                               ; preds = %88
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %6, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %7, align 4
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %12) #7
  br label %101

101:                                              ; preds = %97, %93
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #7
  br label %129

102:                                              ; preds = %90
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #7
  %103 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN9NOMAD_4_39EvalPointEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  invoke void @_ZNK9NOMAD_4_39EvalPoint4getFENS_8EvalTypeENS_11ComputeTypeE(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::Double") align 8 %13, ptr noundef nonnull align 8 dereferenceable(160) %103, i32 noundef 0, i32 noundef 0)
          to label %104 unwind label %115

104:                                              ; preds = %102
  %105 = invoke noundef zeroext i1 @_ZN9NOMAD_4_3ltERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17) %13, ptr noundef nonnull align 8 dereferenceable(17) %5)
          to label %106 unwind label %119

106:                                              ; preds = %104
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %13) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #7
  br i1 %105, label %107, label %124

107:                                              ; preds = %106
  %108 = call noundef nonnull align 8 dereferenceable(160) ptr @_ZNKSt23_Rb_tree_const_iteratorIN9NOMAD_4_39EvalPointEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %109 = invoke { ptr, i8 } @_ZNSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(160) %108)
          to label %110 unwind label %82

110:                                              ; preds = %107
  %111 = getelementptr inbounds { ptr, i8 }, ptr %14, i32 0, i32 0
  %112 = extractvalue { ptr, i8 } %109, 0
  store ptr %112, ptr %111, align 8
  %113 = getelementptr inbounds { ptr, i8 }, ptr %14, i32 0, i32 1
  %114 = extractvalue { ptr, i8 } %109, 1
  store i8 %114, ptr %113, align 8
  br label %125

115:                                              ; preds = %102
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %6, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %7, align 4
  br label %123

119:                                              ; preds = %104
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %6, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %7, align 4
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %13) #7
  br label %123

123:                                              ; preds = %119, %115
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #7
  br label %129

124:                                              ; preds = %106
  br label %125

125:                                              ; preds = %124, %110
  br label %126

126:                                              ; preds = %125, %92, %73
  %127 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIN9NOMAD_4_39EvalPointEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  br label %63, !llvm.loop !24

128:                                              ; preds = %63
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %157

129:                                              ; preds = %123, %101, %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %170

130:                                              ; preds = %56, %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store i64 0, ptr %15, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  call void @_ZNSt23_Rb_tree_const_iteratorIN9NOMAD_4_39EvalPointEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %131 = getelementptr inbounds %"class.NOMAD_4_3::CacheSet", ptr %19, i32 0, i32 1
  %132 = call ptr @_ZNKSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %131) #7
  %133 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %17, i32 0, i32 0
  store ptr %132, ptr %133, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %17, i64 8, i1 false), !tbaa.struct !23
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %134

134:                                              ; preds = %148, %130
  %135 = load i64, ptr %15, align 8, !tbaa !20
  %136 = getelementptr inbounds %"class.NOMAD_4_3::CacheSet", ptr %19, i32 0, i32 1
  %137 = call noundef i64 @_ZNKSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %136) #7
  %138 = udiv i64 %137, 2
  %139 = icmp ult i64 %135, %138
  br i1 %139, label %140, label %156

140:                                              ; preds = %134
  %141 = call noundef nonnull align 8 dereferenceable(160) ptr @_ZNKSt23_Rb_tree_const_iteratorIN9NOMAD_4_39EvalPointEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  %142 = invoke { ptr, i8 } @_ZNSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(160) %141)
          to label %143 unwind label %152

143:                                              ; preds = %140
  %144 = getelementptr inbounds { ptr, i8 }, ptr %18, i32 0, i32 0
  %145 = extractvalue { ptr, i8 } %142, 0
  store ptr %145, ptr %144, align 8
  %146 = getelementptr inbounds { ptr, i8 }, ptr %18, i32 0, i32 1
  %147 = extractvalue { ptr, i8 } %142, 1
  store i8 %147, ptr %146, align 8
  br label %148

148:                                              ; preds = %143
  %149 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIN9NOMAD_4_39EvalPointEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  %150 = load i64, ptr %15, align 8, !tbaa !20
  %151 = add i64 %150, 1
  store i64 %151, ptr %15, align 8, !tbaa !20
  br label %134, !llvm.loop !26

152:                                              ; preds = %140
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %6, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %170

156:                                              ; preds = %134
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %157

157:                                              ; preds = %156, %128
  %158 = call noundef i64 @_ZNKSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  %159 = icmp eq i64 0, %158
  br i1 %159, label %160, label %161

160:                                              ; preds = %157
  store i64 0, ptr %3, align 8, !tbaa !20
  br label %169

161:                                              ; preds = %157
  %162 = getelementptr inbounds %"class.NOMAD_4_3::CacheSet", ptr %19, i32 0, i32 1
  %163 = call noundef i64 @_ZNKSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %162) #7
  %164 = call noundef i64 @_ZNKSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  %165 = sub i64 %163, %164
  store i64 %165, ptr %3, align 8, !tbaa !20
  %166 = getelementptr inbounds %"class.NOMAD_4_3::CacheSet", ptr %19, i32 0, i32 1
  call void @_ZNSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) %166) #7
  %167 = getelementptr inbounds %"class.NOMAD_4_3::CacheSet", ptr %19, i32 0, i32 1
  %168 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(48) %167, ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  br label %169

169:                                              ; preds = %161, %160
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #7
  call void @_ZNSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %4) #7
  br label %41, !llvm.loop !27

170:                                              ; preds = %152, %129, %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %5) #7
  br label %171

171:                                              ; preds = %170, %74
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #7
  call void @_ZNSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  br label %174

172:                                              ; preds = %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  br label %173

173:                                              ; preds = %172, %39
  ret void

174:                                              ; preds = %171
  %175 = load ptr, ptr %6, align 8
  %176 = load i32, ptr %7, align 4
  %177 = insertvalue { ptr, i32 } poison, ptr %175, 0
  %178 = insertvalue { ptr, i32 } %177, i32 %176, 1
  resume { ptr, i32 } %178
}

declare noundef i32 @_ZNK9NOMAD_4_39EvalPoint13getEvalStatusENS_8EvalTypeE(ptr noundef nonnull align 8 dereferenceable(160), i32 noundef) #2

declare void @_ZNK9NOMAD_4_39EvalPoint4getFENS_8EvalTypeENS_11ComputeTypeE(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::Double") align 8, ptr noundef nonnull align 8 dereferenceable(160), i32 noundef, i32 noundef) #2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { 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 #7 = { 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, !13, i64 40}
!10 = !{!"_ZTSN9NOMAD_4_39CacheBaseE", !11, i64 8, !13, i64 40, !14, i64 48, !13, i64 64, !17, i64 72}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !12, i64 0, !13, i64 8, !7, i64 16}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_ZTSSt10shared_ptrIN9NOMAD_4_315CacheParametersEE", !15, i64 0}
!15 = !{!"_ZTSSt12__shared_ptrIN9NOMAD_4_315CacheParametersELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !16, i64 8}
!16 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!17 = !{!"_ZTSSt6atomicIbE", !18, i64 0}
!18 = !{!"_ZTSSt13__atomic_baseIbE", !19, i64 0}
!19 = !{!"bool", !7, i64 0}
!20 = !{!13, !13, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"vtable pointer", !8, i64 0}
!23 = !{i64 0, i64 8, !5}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = distinct !{!27, !25}


; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<NOMAD_4_3::EvalPoint, NOMAD_4_3::EvalPoint, std::_Identity<NOMAD_4_3::EvalPoint>, NOMAD_4_3::EvalPointCompare>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<NOMAD_4_3::EvalPoint, NOMAD_4_3::EvalPoint, std::_Identity<NOMAD_4_3::EvalPoint>, NOMAD_4_3::EvalPointCompare>::_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.NOMAD_4_3::Double" = type <{ ptr, double, i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.30 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [46 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

declare i32 @__gxx_personality_v0(...)

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

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

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

declare void @_ZN9NOMAD_4_36DoubleC1Ev(ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #3

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #5

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN9NOMAD_4_3ltERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(17)) local_unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9NOMAD_4_38CacheSet5purgeEv(ptr noundef nonnull align 8 dereferenceable(128) %0) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::set", align 8
  %3 = alloca %"class.NOMAD_4_3::Double", align 8
  %4 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %5 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %6 = alloca %"class.NOMAD_4_3::Double", align 8
  %7 = alloca %"class.NOMAD_4_3::Double", align 8
  %8 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %9 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.30)
  %10 = getelementptr inbounds i8, ptr %0, i64 80
  %11 = tail call noundef i64 @_ZNKSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %10) #6
  %12 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %9, i64 noundef %11)
  %13 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull @.str.31)
  %14 = getelementptr inbounds i8, ptr %0, i64 40
  %15 = load i64, ptr %14, align 8, !tbaa !5
  %16 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %13, i64 noundef %15)
  %17 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull @.str.32)
  %18 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %19 = load i64, ptr %14, align 8, !tbaa !5
  %20 = icmp eq i64 %19, -1
  br i1 %20, label %.loopexit, label %21

21:                                               ; preds = %1
  %22 = tail call noundef i64 @_ZNKSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %10) #6
  %23 = load i64, ptr %14, align 8, !tbaa !5
  %24 = icmp ult i64 %22, %23
  br i1 %24, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %21
  %25 = tail call noundef i64 @_ZNKSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %10) #6
  %26 = load i64, ptr %14, align 8, !tbaa !5
  %.not28 = icmp ult i64 %25, %26
  br i1 %.not28, label %.loopexit, label %.lr.ph30

.lr.ph30:                                         ; preds = %.preheader, %93
  %.029 = phi i64 [ %.1, %93 ], [ 1, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %2) #6
  call void @_ZNSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #6
  invoke void @_ZN9NOMAD_4_36DoubleC1Ev(ptr noundef nonnull align 8 dereferenceable(17) %3)
          to label %27 unwind label %42

27:                                               ; preds = %.lr.ph30
  %28 = load ptr, ptr %0, align 8, !tbaa !19
  %29 = getelementptr inbounds i8, ptr %28, i64 16
  %30 = load ptr, ptr %29, align 8
  %31 = invoke noundef i64 %30(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull align 8 dereferenceable(17) %3)
          to label %32 unwind label %44

32:                                               ; preds = %27
  %33 = icmp ne i64 %31, 0
  %34 = icmp ne i64 %.029, 0
  %or.cond = and i1 %34, %33
  br i1 %or.cond, label %35, label %72

35:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  call void @_ZNSt23_Rb_tree_const_iteratorIN9NOMAD_4_39EvalPointEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %36 = call ptr @_ZNKSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %10) #6
  store ptr %36, ptr %4, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %37 = call ptr @_ZNKSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %10) #6
  store ptr %37, ptr %5, align 8
  %38 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIN9NOMAD_4_39EvalPointEES4_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br i1 %38, label %.lr.ph26, label %._crit_edge27

.lr.ph26:                                         ; preds = %35, %67
  %39 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN9NOMAD_4_39EvalPointEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %40 = invoke noundef i32 @_ZNK9NOMAD_4_39EvalPoint13getEvalStatusENS_8EvalTypeE(ptr noundef nonnull align 8 dereferenceable(160) %39, i32 noundef 0)
          to label %41 unwind label %46

41:                                               ; preds = %.lr.ph26
  %.not18 = icmp eq i32 %40, 4
  br i1 %.not18, label %48, label %67

42:                                               ; preds = %.lr.ph30
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %97

44:                                               ; preds = %27
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %96

46:                                               ; preds = %59, %.lr.ph26
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %71

48:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  %49 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN9NOMAD_4_39EvalPointEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  invoke void @_ZNK9NOMAD_4_39EvalPoint4getFENS_8EvalTypeENS_11ComputeTypeE(ptr dead_on_unwind nonnull writable sret(%"class.NOMAD_4_3::Double") align 8 %6, ptr noundef nonnull align 8 dereferenceable(160) %49, i32 noundef 0, i32 noundef 0)
          to label %50 unwind label %52

50:                                               ; preds = %48
  %51 = call noundef zeroext i1 @_ZNK9NOMAD_4_36Double9isDefinedEv(ptr noundef nonnull align 8 dereferenceable(17) %6)
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  br i1 %51, label %54, label %67

52:                                               ; preds = %48
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  br label %71

54:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  %55 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN9NOMAD_4_39EvalPointEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  invoke void @_ZNK9NOMAD_4_39EvalPoint4getFENS_8EvalTypeENS_11ComputeTypeE(ptr dead_on_unwind nonnull writable sret(%"class.NOMAD_4_3::Double") align 8 %7, ptr noundef nonnull align 8 dereferenceable(160) %55, i32 noundef 0, i32 noundef 0)
          to label %56 unwind label %62

56:                                               ; preds = %54
  %57 = invoke noundef zeroext i1 @_ZN9NOMAD_4_3ltERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17) %7, ptr noundef nonnull align 8 dereferenceable(17) %3)
          to label %58 unwind label %64

58:                                               ; preds = %56
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  br i1 %57, label %59, label %67

59:                                               ; preds = %58
  %60 = call noundef nonnull align 8 dereferenceable(160) ptr @_ZNKSt23_Rb_tree_const_iteratorIN9NOMAD_4_39EvalPointEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %61 = invoke { ptr, i8 } @_ZNSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(160) %60)
          to label %67 unwind label %46

62:                                               ; preds = %54
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %66

64:                                               ; preds = %56
  %65 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %7) #6
  br label %66

66:                                               ; preds = %64, %62
  %.pn = phi { ptr, i32 } [ %65, %64 ], [ %63, %62 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  br label %71

67:                                               ; preds = %59, %58, %50, %41
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIN9NOMAD_4_39EvalPointEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %69 = call ptr @_ZNKSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %10) #6
  store ptr %69, ptr %5, align 8
  %70 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIN9NOMAD_4_39EvalPointEES4_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br i1 %70, label %.lr.ph26, label %._crit_edge27, !llvm.loop !22

._crit_edge27:                                    ; preds = %67, %35
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br label %85

71:                                               ; preds = %66, %52, %46
  %.pn20 = phi { ptr, i32 } [ %47, %46 ], [ %.pn, %66 ], [ %53, %52 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br label %96

72:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  call void @_ZNSt23_Rb_tree_const_iteratorIN9NOMAD_4_39EvalPointEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %73 = call ptr @_ZNKSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %10) #6
  store ptr %73, ptr %8, align 8, !tbaa !21
  %74 = call noundef i64 @_ZNKSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %10) #6
  %.not31 = icmp ult i64 %74, 2
  br i1 %.not31, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %72, %77
  %.01724 = phi i64 [ %79, %77 ], [ 0, %72 ]
  %75 = call noundef nonnull align 8 dereferenceable(160) ptr @_ZNKSt23_Rb_tree_const_iteratorIN9NOMAD_4_39EvalPointEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %76 = invoke { ptr, i8 } @_ZNSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(160) %75)
          to label %77 unwind label %83

77:                                               ; preds = %.lr.ph
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIN9NOMAD_4_39EvalPointEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %79 = add nuw nsw i64 %.01724, 1
  %80 = call noundef i64 @_ZNKSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %10) #6
  %81 = lshr i64 %80, 1
  %82 = icmp ult i64 %79, %81
  br i1 %82, label %.lr.ph, label %._crit_edge, !llvm.loop !24

83:                                               ; preds = %.lr.ph
  %84 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %96

._crit_edge:                                      ; preds = %77, %72
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %85

85:                                               ; preds = %._crit_edge, %._crit_edge27
  %86 = call noundef i64 @_ZNKSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #6
  %87 = icmp eq i64 %86, 0
  br i1 %87, label %93, label %88

88:                                               ; preds = %85
  %89 = call noundef i64 @_ZNKSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %10) #6
  %90 = call noundef i64 @_ZNKSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #6
  %91 = sub i64 %89, %90
  call void @_ZNSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) %10) #6
  %92 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 8 dereferenceable(48) %2) #6
  br label %93

93:                                               ; preds = %85, %88
  %.1 = phi i64 [ %91, %88 ], [ 0, %85 ]
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  call void @_ZNSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #6
  %94 = call noundef i64 @_ZNKSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %10) #6
  %95 = load i64, ptr %14, align 8, !tbaa !5
  %.not = icmp ult i64 %94, %95
  br i1 %.not, label %.loopexit, label %.lr.ph30, !llvm.loop !25

96:                                               ; preds = %83, %71, %44
  %.pn20.pn = phi { ptr, i32 } [ %.pn20, %71 ], [ %84, %83 ], [ %45, %44 ]
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %3) #6
  br label %97

97:                                               ; preds = %96, %42
  %.pn20.pn.pn = phi { ptr, i32 } [ %.pn20.pn, %96 ], [ %43, %42 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  call void @_ZNSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #6
  resume { ptr, i32 } %.pn20.pn.pn

.loopexit:                                        ; preds = %93, %.preheader, %1, %21
  ret void
}

declare noundef i32 @_ZNK9NOMAD_4_39EvalPoint13getEvalStatusENS_8EvalTypeE(ptr noundef nonnull align 8 dereferenceable(160), i32 noundef) local_unnamed_addr #2

declare void @_ZNK9NOMAD_4_39EvalPoint4getFENS_8EvalTypeENS_11ComputeTypeE(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::Double") align 8, ptr noundef nonnull align 8 dereferenceable(160), i32 noundef, i32 noundef) local_unnamed_addr #2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { 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 #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, !12, i64 40}
!6 = !{!"_ZTSN9NOMAD_4_39CacheBaseE", !7, i64 8, !12, i64 40, !13, i64 48, !12, i64 64, !16, i64 72}
!7 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !8, i64 0, !12, i64 8, !10, i64 16}
!8 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = !{!"_ZTSSt10shared_ptrIN9NOMAD_4_315CacheParametersEE", !14, i64 0}
!14 = !{!"_ZTSSt12__shared_ptrIN9NOMAD_4_315CacheParametersELN9__gnu_cxx12_Lock_policyE2EE", !9, i64 0, !15, i64 8}
!15 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !9, i64 0}
!16 = !{!"_ZTSSt6atomicIbE", !17, i64 0}
!17 = !{!"_ZTSSt13__atomic_baseIbE", !18, i64 0}
!18 = !{!"bool", !10, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"vtable pointer", !11, i64 0}
!21 = !{!9, !9, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = distinct !{!25, !23}


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