; LLVM IR from buresjan/optim_lbm :: nomad/src/Eval (EvaluatorControl)

; 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::shared_ptr.130" = type { %"class.std::__shared_ptr.131" }
%"class.std::__shared_ptr.131" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::vector.136" = type { %"struct.std::_Vector_base.137" }
%"struct.std::_Vector_base.137" = type { %"struct.std::_Vector_base<std::shared_ptr<NOMAD_4_3::Direction>, std::allocator<std::shared_ptr<NOMAD_4_3::Direction>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<NOMAD_4_3::Direction>, std::allocator<std::shared_ptr<NOMAD_4_3::Direction>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<NOMAD_4_3::Direction>, std::allocator<std::shared_ptr<NOMAD_4_3::Direction>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<NOMAD_4_3::Direction>, std::allocator<std::shared_ptr<NOMAD_4_3::Direction>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.138" = type { i8 }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.NOMAD_4_3::EvaluatorControl" = type { ptr, %"class.std::shared_ptr.3", %"class.std::shared_ptr.6", %"class.std::set.9", %"class.std::map", %"class.std::vector", %"class.std::shared_ptr.22", %"struct.std::atomic", %"struct.std::atomic", %"struct.std::atomic", %"struct.std::atomic", %"struct.std::atomic", %"struct.std::atomic", %"struct.std::atomic", %"struct.std::atomic", %"struct.std::atomic", %"struct.std::atomic", %"struct.std::atomic", %"struct.std::atomic", %"struct.std::atomic", i8, %"class.NOMAD_4_3::SuccessStats" }
%"class.std::shared_ptr.3" = type { %"class.std::__shared_ptr.4" }
%"class.std::__shared_ptr.4" = type { ptr, %"class.std::__shared_count" }
%"class.std::shared_ptr.6" = type { %"class.std::__shared_ptr.7" }
%"class.std::__shared_ptr.7" = type { ptr, %"class.std::__shared_count" }
%"class.std::set.9" = type { %"class.std::_Rb_tree.10" }
%"class.std::_Rb_tree.10" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree.15" }
%"class.std::_Rb_tree.15" = type { %"struct.std::_Rb_tree<int, std::pair<const int, NOMAD_4_3::EvcMainThreadInfo>, std::_Select1st<std::pair<const int, NOMAD_4_3::EvcMainThreadInfo>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, NOMAD_4_3::EvcMainThreadInfo>, std::_Select1st<std::pair<const int, NOMAD_4_3::EvcMainThreadInfo>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::shared_ptr<NOMAD_4_3::EvalQueuePoint>, std::allocator<std::shared_ptr<NOMAD_4_3::EvalQueuePoint>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<NOMAD_4_3::EvalQueuePoint>, std::allocator<std::shared_ptr<NOMAD_4_3::EvalQueuePoint>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<NOMAD_4_3::EvalQueuePoint>, std::allocator<std::shared_ptr<NOMAD_4_3::EvalQueuePoint>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<NOMAD_4_3::EvalQueuePoint>, std::allocator<std::shared_ptr<NOMAD_4_3::EvalQueuePoint>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::shared_ptr.22" = type { %"class.std::__shared_ptr.23" }
%"class.std::__shared_ptr.23" = type { ptr, %"class.std::__shared_count" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i64 }
%"class.NOMAD_4_3::SuccessStats" = type { %"class.std::map.25", i64, i64 }
%"class.std::map.25" = type { %"class.std::_Rb_tree.26" }
%"class.std::_Rb_tree.26" = type { %"struct.std::_Rb_tree<std::pair<NOMAD_4_3::StepType, NOMAD_4_3::SuccessType>, std::pair<const std::pair<NOMAD_4_3::StepType, NOMAD_4_3::SuccessType>, unsigned long>, std::_Select1st<std::pair<const std::pair<NOMAD_4_3::StepType, NOMAD_4_3::SuccessType>, unsigned long>>, std::less<std::pair<NOMAD_4_3::StepType, NOMAD_4_3::SuccessType>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<NOMAD_4_3::StepType, NOMAD_4_3::SuccessType>, std::pair<const std::pair<NOMAD_4_3::StepType, NOMAD_4_3::SuccessType>, unsigned long>, std::_Select1st<std::pair<const std::pair<NOMAD_4_3::StepType, NOMAD_4_3::SuccessType>, unsigned long>>, std::less<std::pair<NOMAD_4_3::StepType, NOMAD_4_3::SuccessType>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }

; 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 ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(248) ptr @_ZNK9NOMAD_4_316EvaluatorControl17getMainThreadInfoEi(ptr noundef nonnull align 8 dereferenceable(352), i32 noundef) #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK9NOMAD_4_316EvaluatorControl30makeCompMethodOrderByDirectionEv(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.130") align 8 %0, ptr noundef nonnull align 8 dereferenceable(352) %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::vector.136", align 8
  %6 = alloca %"class.std::allocator.138", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::vector.136", align 8
  %10 = alloca %"class.std::allocator.138", align 1
  %11 = alloca ptr, align 8
  %12 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %13 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %14 = alloca i32, align 4
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %15 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #4
  %16 = getelementptr inbounds %"class.NOMAD_4_3::EvaluatorControl", ptr %15, i32 0, i32 3
  %17 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %16) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #4
  call void @_ZNSaISt10shared_ptrIN9NOMAD_4_39DirectionEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #4
  invoke void @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_39DirectionEESaIS3_EEC2EmRKS4_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %17, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %18 unwind label %32

18:                                               ; preds = %2
  call void @_ZNSt15__new_allocatorISt10shared_ptrIN9NOMAD_4_39DirectionEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #4
  %19 = getelementptr inbounds %"class.NOMAD_4_3::EvaluatorControl", ptr %15, i32 0, i32 3
  %20 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %19) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #4
  call void @_ZNSaISt10shared_ptrIN9NOMAD_4_39DirectionEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  invoke void @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_39DirectionEESaIS3_EEC2EmRKS4_(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %20, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %21 unwind label %36

21:                                               ; preds = %18
  call void @_ZNSt15__new_allocatorISt10shared_ptrIN9NOMAD_4_39DirectionEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %22 = getelementptr inbounds %"class.NOMAD_4_3::EvaluatorControl", ptr %15, i32 0, i32 3
  store ptr %22, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %23 = load ptr, ptr %11, align 8, !tbaa !5
  %24 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %23) #4
  %25 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %12, i32 0, i32 0
  store ptr %24, ptr %25, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %26 = load ptr, ptr %11, align 8, !tbaa !5
  %27 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %26) #4
  %28 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %13, i32 0, i32 0
  store ptr %27, ptr %28, align 8
  br label %29

29:                                               ; preds = %61, %21
  %30 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #4
  br i1 %30, label %40, label %31

31:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %67

32:                                               ; preds = %2
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %7, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %8, align 4
  call void @_ZNSt15__new_allocatorISt10shared_ptrIN9NOMAD_4_39DirectionEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #4
  br label %75

36:                                               ; preds = %18
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %7, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %8, align 4
  call void @_ZNSt15__new_allocatorISt10shared_ptrIN9NOMAD_4_39DirectionEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #4
  br label %74

40:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  %42 = load i32, ptr %41, align 4, !tbaa !9
  store i32 %42, ptr %14, align 4, !tbaa !9
  %43 = load i32, ptr %14, align 4, !tbaa !9
  %44 = invoke noundef nonnull align 8 dereferenceable(248) ptr @_ZNK9NOMAD_4_316EvaluatorControl17getMainThreadInfoEi(ptr noundef nonnull align 8 dereferenceable(352) %15, i32 noundef %43)
          to label %45 unwind label %63

45:                                               ; preds = %40
  %46 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9NOMAD_4_317EvcMainThreadInfo24getLastSuccessfulFeasDirEv(ptr noundef nonnull align 8 dereferenceable(248) %44)
          to label %47 unwind label %63

47:                                               ; preds = %45
  %48 = load i32, ptr %14, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_39DirectionEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %49) #4
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN9NOMAD_4_39DirectionEEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %50, ptr noundef nonnull align 8 dereferenceable(16) %46) #4
  %52 = load i32, ptr %14, align 4, !tbaa !9
  %53 = invoke noundef nonnull align 8 dereferenceable(248) ptr @_ZNK9NOMAD_4_316EvaluatorControl17getMainThreadInfoEi(ptr noundef nonnull align 8 dereferenceable(352) %15, i32 noundef %52)
          to label %54 unwind label %63

54:                                               ; preds = %47
  %55 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9NOMAD_4_317EvcMainThreadInfo23getLastSuccessfulInfDirEv(ptr noundef nonnull align 8 dereferenceable(248) %53)
          to label %56 unwind label %63

56:                                               ; preds = %54
  %57 = load i32, ptr %14, align 4, !tbaa !9
  %58 = sext i32 %57 to i64
  %59 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_39DirectionEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %58) #4
  %60 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN9NOMAD_4_39DirectionEEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %59, ptr noundef nonnull align 8 dereferenceable(16) %55) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %61

61:                                               ; preds = %56
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  br label %29

63:                                               ; preds = %54, %47, %45, %40
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %7, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %73

67:                                               ; preds = %31
  invoke void @_ZSt11make_sharedIN9NOMAD_4_316OrderByDirectionEJRSt6vectorISt10shared_ptrINS0_9DirectionEESaIS5_EES8_EES3_INSt9enable_ifIXntsr8is_arrayIT_EE5valueESA_E4typeEEDpOT0_(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.130") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %68 unwind label %69

68:                                               ; preds = %67
  call void @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_39DirectionEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #4
  call void @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_39DirectionEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #4
  ret void

69:                                               ; preds = %67
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %7, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %8, align 4
  br label %73

73:                                               ; preds = %69, %63
  call void @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_39DirectionEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  br label %74

74:                                               ; preds = %73, %36
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #4
  call void @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_39DirectionEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  br label %75

75:                                               ; preds = %74, %32
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #4
  br label %76

76:                                               ; preds = %75
  %77 = load ptr, ptr %7, align 8
  %78 = load i32, ptr %8, align 4
  %79 = insertvalue { ptr, i32 } poison, ptr %77, 0
  %80 = insertvalue { ptr, i32 } %79, i32 %78, 1
  resume { ptr, i32 } %80
}

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11make_sharedIN9NOMAD_4_316OrderByDirectionEJRSt6vectorISt10shared_ptrINS0_9DirectionEESaIS5_EES8_EES3_INSt9enable_ifIXntsr8is_arrayIT_EE5valueESA_E4typeEEDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.130") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_39DirectionEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #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 = { 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 = { 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 = { 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 = !{!"int", !7, i64 0}


; 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::shared_ptr.130" = type { %"class.std::__shared_ptr.131" }
%"class.std::__shared_ptr.131" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::vector.136" = type { %"struct.std::_Vector_base.137" }
%"struct.std::_Vector_base.137" = type { %"struct.std::_Vector_base<std::shared_ptr<NOMAD_4_3::Direction>, std::allocator<std::shared_ptr<NOMAD_4_3::Direction>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<NOMAD_4_3::Direction>, std::allocator<std::shared_ptr<NOMAD_4_3::Direction>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<NOMAD_4_3::Direction>, std::allocator<std::shared_ptr<NOMAD_4_3::Direction>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<NOMAD_4_3::Direction>, std::allocator<std::shared_ptr<NOMAD_4_3::Direction>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.138" = type { i8 }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

; 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 ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(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 noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(248) ptr @_ZNK9NOMAD_4_316EvaluatorControl17getMainThreadInfoEi(ptr noundef nonnull align 8 dereferenceable(352), i32 noundef) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK9NOMAD_4_316EvaluatorControl30makeCompMethodOrderByDirectionEv(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.130") align 8 %0, ptr noundef nonnull align 8 dereferenceable(352) %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::vector.136", align 8
  %4 = alloca %"class.std::allocator.138", align 1
  %5 = alloca %"class.std::vector.136", align 8
  %6 = alloca %"class.std::allocator.138", align 1
  %7 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %8 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #4
  %9 = getelementptr inbounds i8, ptr %1, i64 40
  %10 = tail call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %9) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #4
  call void @_ZNSaISt10shared_ptrIN9NOMAD_4_39DirectionEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  invoke void @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_39DirectionEESaIS3_EEC2EmRKS4_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %10, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %11 unwind label %17

11:                                               ; preds = %2
  call void @_ZNSt15__new_allocatorISt10shared_ptrIN9NOMAD_4_39DirectionEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #4
  %12 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %9) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #4
  call void @_ZNSaISt10shared_ptrIN9NOMAD_4_39DirectionEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #4
  invoke void @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_39DirectionEESaIS3_EEC2EmRKS4_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %12, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %13 unwind label %19

13:                                               ; preds = %11
  call void @_ZNSt15__new_allocatorISt10shared_ptrIN9NOMAD_4_39DirectionEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %14 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %9) #4
  store ptr %14, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  %15 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %9) #4
  store ptr %15, ptr %8, align 8
  %16 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  br i1 %16, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %30, %13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  invoke void @_ZSt11make_sharedIN9NOMAD_4_316OrderByDirectionEJRSt6vectorISt10shared_ptrINS0_9DirectionEESaIS5_EES8_EES3_INSt9enable_ifIXntsr8is_arrayIT_EE5valueESA_E4typeEEDpOT0_(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.130") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %38 unwind label %39

17:                                               ; preds = %2
  %18 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt10shared_ptrIN9NOMAD_4_39DirectionEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #4
  br label %43

19:                                               ; preds = %11
  %20 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt10shared_ptrIN9NOMAD_4_39DirectionEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #4
  br label %42

.lr.ph:                                           ; preds = %13, %30
  %21 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  %22 = load i32, ptr %21, align 4, !tbaa !5
  %23 = invoke noundef nonnull align 8 dereferenceable(248) ptr @_ZNK9NOMAD_4_316EvaluatorControl17getMainThreadInfoEi(ptr noundef nonnull align 8 dereferenceable(352) %1, i32 noundef %22)
          to label %24 unwind label %36

24:                                               ; preds = %.lr.ph
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9NOMAD_4_317EvcMainThreadInfo24getLastSuccessfulFeasDirEv(ptr noundef nonnull align 8 dereferenceable(248) %23)
  %26 = sext i32 %22 to i64
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_39DirectionEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %26) #4
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN9NOMAD_4_39DirectionEEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 8 dereferenceable(16) %25) #4
  %29 = invoke noundef nonnull align 8 dereferenceable(248) ptr @_ZNK9NOMAD_4_316EvaluatorControl17getMainThreadInfoEi(ptr noundef nonnull align 8 dereferenceable(352) %1, i32 noundef %22)
          to label %30 unwind label %36

30:                                               ; preds = %24
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9NOMAD_4_317EvcMainThreadInfo23getLastSuccessfulInfDirEv(ptr noundef nonnull align 8 dereferenceable(248) %29)
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_39DirectionEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %26) #4
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN9NOMAD_4_39DirectionEEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 8 dereferenceable(16) %31) #4
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  %35 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  br i1 %35, label %.lr.ph, label %._crit_edge

36:                                               ; preds = %24, %.lr.ph
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  br label %41

38:                                               ; preds = %._crit_edge
  call void @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_39DirectionEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  call void @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_39DirectionEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  ret void

39:                                               ; preds = %._crit_edge
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %41

41:                                               ; preds = %39, %36
  %.pn = phi { ptr, i32 } [ %37, %36 ], [ %40, %39 ]
  call void @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_39DirectionEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  br label %42

42:                                               ; preds = %41, %19
  %.pn.pn = phi { ptr, i32 } [ %.pn, %41 ], [ %20, %19 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  call void @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_39DirectionEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  br label %43

43:                                               ; preds = %42, %17
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %42 ], [ %18, %17 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  resume { ptr, i32 } %.pn.pn.pn
}

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11make_sharedIN9NOMAD_4_316OrderByDirectionEJRSt6vectorISt10shared_ptrINS0_9DirectionEESaIS5_EES8_EES3_INSt9enable_ifIXntsr8is_arrayIT_EE5valueESA_E4typeEEDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.130") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_39DirectionEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) 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 = { 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 = { 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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


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