; 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.NOMAD_4_3::Double" = type <{ ptr, double, i8, [7 x i8] }>
%"class.__gnu_cxx::__normal_iterator.112" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.107" = 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_count" = type { ptr }
%"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

declare noundef i32 @_ZN9NOMAD_4_312getThreadNumEv() #1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK9NOMAD_4_316EvaluatorControl7getHMaxEi(ptr dead_on_unwind noalias writable sret(%"class.NOMAD_4_3::Double") align 8, ptr noundef nonnull align 8 dereferenceable(352), i32 noundef) #3 align 2

declare noundef nonnull align 8 dereferenceable(17) ptr @_ZN9NOMAD_4_36DoubleaSERKS0_(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(17)) #1

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN9NOMAD_4_316EvaluatorControl12popEvalPointERSt10shared_ptrINS_14EvalQueuePointEERPNS_9EvaluatorERNS_6DoubleE(ptr noundef nonnull align 8 dereferenceable(352) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(17) %3) #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i8, align 1
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.NOMAD_4_3::Double", align 8
  %15 = alloca i1, align 1
  %16 = alloca i1, align 1
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca %"class.__gnu_cxx::__normal_iterator.112", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator.107", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator.107", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator.107", align 8
  %23 = alloca i32, align 4
  %24 = alloca %"class.NOMAD_4_3::Double", align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %25 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %26 = call noundef i32 @_ZN9NOMAD_4_312getThreadNumEv()
  store i32 %26, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #6
  store i8 0, ptr %10, align 1, !tbaa !11
  %27 = getelementptr inbounds %"class.NOMAD_4_3::EvaluatorControl", ptr %25, i32 0, i32 5
  %28 = call noundef zeroext i1 @_ZNKSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %27) #6
  br i1 %28, label %150, label %29

29:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %30 = getelementptr inbounds %"class.NOMAD_4_3::EvaluatorControl", ptr %25, i32 0, i32 5
  %31 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #6
  %32 = trunc i64 %31 to i32
  %33 = sub nsw i32 %32, 1
  store i32 %33, ptr %11, align 4, !tbaa !9
  br label %34

34:                                               ; preds = %144, %29
  %35 = load i32, ptr %11, align 4, !tbaa !9
  %36 = icmp sge i32 %35, 0
  br i1 %36, label %38, label %37

37:                                               ; preds = %34
  store i32 2, ptr %12, align 4
  br label %148

38:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %39 = getelementptr inbounds %"class.NOMAD_4_3::EvaluatorControl", ptr %25, i32 0, i32 5
  %40 = load i32, ptr %11, align 4, !tbaa !9
  %41 = sext i32 %40 to i64
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef %41) #6
  %43 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_314EvalQueuePointELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %42) #6
  %44 = call noundef i32 @_ZNK9NOMAD_4_39EvalPoint13getThreadAlgoEv(ptr noundef nonnull align 8 dereferenceable(160) %43)
  store i32 %44, ptr %13, align 4, !tbaa !9
  %45 = load i32, ptr %9, align 4, !tbaa !9
  %46 = load i32, ptr %13, align 4, !tbaa !9
  %47 = icmp ne i32 %45, %46
  br i1 %47, label %48, label %52

48:                                               ; preds = %38
  %49 = load i32, ptr %13, align 4, !tbaa !9
  %50 = call noundef zeroext i1 @_ZNK9NOMAD_4_316EvaluatorControl12stopMainEvalEi(ptr noundef nonnull align 8 dereferenceable(352) %25, i32 noundef %49)
  br i1 %50, label %51, label %52

51:                                               ; preds = %48
  store i32 4, ptr %12, align 4
  br label %141

52:                                               ; preds = %48, %38
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = load ptr, ptr %53, align 8, !tbaa !5
  %55 = icmp ne ptr %54, null
  store i1 false, ptr %15, align 1
  store i1 false, ptr %16, align 1
  br i1 %55, label %56, label %63

56:                                               ; preds = %52
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = load ptr, ptr %57, align 8, !tbaa !5
  %59 = load i32, ptr %13, align 4, !tbaa !9
  %60 = call noundef nonnull align 8 dereferenceable(248) ptr @_ZNK9NOMAD_4_316EvaluatorControl17getMainThreadInfoEi(ptr noundef nonnull align 8 dereferenceable(352) %25, i32 noundef %59)
  %61 = call noundef ptr @_ZN9NOMAD_4_317EvcMainThreadInfo19getCurrentEvaluatorEv(ptr noundef nonnull align 8 dereferenceable(248) %60)
  %62 = icmp eq ptr %58, %61
  br i1 %62, label %63, label %73

63:                                               ; preds = %56, %52
  %64 = load ptr, ptr %8, align 8, !tbaa !5
  %65 = call noundef zeroext i1 @_ZNK9NOMAD_4_36Double9isDefinedEv(ptr noundef nonnull align 8 dereferenceable(17) %64)
  br i1 %65, label %66, label %71

66:                                               ; preds = %63
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #6
  store i1 true, ptr %15, align 1
  %68 = load i32, ptr %13, align 4, !tbaa !9
  call void @_ZNK9NOMAD_4_316EvaluatorControl7getHMaxEi(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::Double") align 8 %14, ptr noundef nonnull align 8 dereferenceable(352) %25, i32 noundef %68)
  store i1 true, ptr %16, align 1
  %69 = invoke noundef zeroext i1 @_ZN9NOMAD_4_3eqERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17) %67, ptr noundef nonnull align 8 dereferenceable(17) %14)
          to label %70 unwind label %113

70:                                               ; preds = %66
  br label %71

71:                                               ; preds = %70, %63
  %72 = phi i1 [ true, %63 ], [ %69, %70 ]
  br label %73

73:                                               ; preds = %71, %56
  %74 = phi i1 [ false, %56 ], [ %72, %71 ]
  %75 = load i1, ptr %16, align 1
  br i1 %75, label %76, label %77

76:                                               ; preds = %73
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %14) #6
  br label %77

77:                                               ; preds = %76, %73
  %78 = load i1, ptr %15, align 1
  br i1 %78, label %79, label %80

79:                                               ; preds = %77
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  br label %80

80:                                               ; preds = %79, %77
  br i1 %74, label %81, label %140

81:                                               ; preds = %80
  %82 = getelementptr inbounds %"class.NOMAD_4_3::EvaluatorControl", ptr %25, i32 0, i32 5
  %83 = load i32, ptr %11, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %82, i64 noundef %84) #6
  %86 = load ptr, ptr %6, align 8, !tbaa !5
  %87 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN9NOMAD_4_314EvalQueuePointEEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(16) %86, ptr noundef nonnull align 8 dereferenceable(16) %85) #6
  %88 = getelementptr inbounds %"class.NOMAD_4_3::EvaluatorControl", ptr %25, i32 0, i32 5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %89 = getelementptr inbounds %"class.NOMAD_4_3::EvaluatorControl", ptr %25, i32 0, i32 5
  %90 = call ptr @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %89) #6
  %91 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.107", ptr %21, i32 0, i32 0
  store ptr %90, ptr %91, align 8
  %92 = load i32, ptr %11, align 4, !tbaa !9
  %93 = sext i32 %92 to i64
  %94 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESt6vectorIS4_SaIS4_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %21, i64 noundef %93) #6
  %95 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.107", ptr %20, i32 0, i32 0
  store ptr %94, ptr %95, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESt6vectorIS4_SaIS4_EEEC2IPS4_vEERKNS0_IT_S9_EE(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  %96 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.112", ptr %19, i32 0, i32 0
  %97 = load ptr, ptr %96, align 8
  %98 = call ptr @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS3_S5_EE(ptr noundef nonnull align 8 dereferenceable(24) %88, ptr %97)
  %99 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.107", ptr %22, i32 0, i32 0
  store ptr %98, ptr %99, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  %100 = load ptr, ptr %7, align 8, !tbaa !5
  %101 = load ptr, ptr %100, align 8, !tbaa !5
  %102 = icmp ne ptr %101, null
  br i1 %102, label %123, label %103

103:                                              ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_314EvalQueuePointELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %104) #6
  %106 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9NOMAD_4_314EvalQueuePoint11getEvalTypeEv(ptr noundef nonnull align 8 dereferenceable(184) %105)
  %107 = load i32, ptr %106, align 4, !tbaa !13
  store i32 %107, ptr %23, align 4, !tbaa !13
  %108 = load i32, ptr %13, align 4, !tbaa !9
  %109 = call noundef nonnull align 8 dereferenceable(248) ptr @_ZNK9NOMAD_4_316EvaluatorControl17getMainThreadInfoEi(ptr noundef nonnull align 8 dereferenceable(352) %25, i32 noundef %108)
  %110 = load i32, ptr %23, align 4, !tbaa !13
  %111 = call noundef ptr @_ZN9NOMAD_4_317EvcMainThreadInfo12getEvaluatorENS_8EvalTypeE(ptr noundef nonnull align 8 dereferenceable(248) %109, i32 noundef %110)
  %112 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %111, ptr %112, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %123

113:                                              ; preds = %66
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %17, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %18, align 4
  %117 = load i1, ptr %16, align 1
  br i1 %117, label %118, label %119

118:                                              ; preds = %113
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %14) #6
  br label %119

119:                                              ; preds = %118, %113
  %120 = load i1, ptr %15, align 1
  br i1 %120, label %121, label %122

121:                                              ; preds = %119
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  br label %122

122:                                              ; preds = %121, %119
  br label %147

123:                                              ; preds = %103, %81
  %124 = load ptr, ptr %8, align 8, !tbaa !5
  %125 = call noundef zeroext i1 @_ZNK9NOMAD_4_36Double9isDefinedEv(ptr noundef nonnull align 8 dereferenceable(17) %124)
  br i1 %125, label %135, label %126

126:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #6
  %127 = load i32, ptr %13, align 4, !tbaa !9
  call void @_ZNK9NOMAD_4_316EvaluatorControl7getHMaxEi(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::Double") align 8 %24, ptr noundef nonnull align 8 dereferenceable(352) %25, i32 noundef %127)
  %128 = load ptr, ptr %8, align 8, !tbaa !5
  %129 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZN9NOMAD_4_36DoubleaSERKS0_(ptr noundef nonnull align 8 dereferenceable(17) %128, ptr noundef nonnull align 8 dereferenceable(17) %24)
          to label %130 unwind label %131

130:                                              ; preds = %126
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %24) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #6
  br label %135

131:                                              ; preds = %126
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %17, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %18, align 4
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %24) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #6
  br label %147

135:                                              ; preds = %130, %123
  %136 = load i32, ptr %13, align 4, !tbaa !9
  %137 = call noundef nonnull align 8 dereferenceable(248) ptr @_ZNK9NOMAD_4_316EvaluatorControl17getMainThreadInfoEi(ptr noundef nonnull align 8 dereferenceable(352) %25, i32 noundef %136)
  call void @_ZN9NOMAD_4_317EvcMainThreadInfo19incCurrentlyRunningEv(ptr noundef nonnull align 8 dereferenceable(248) %137)
  %138 = load i32, ptr %13, align 4, !tbaa !9
  %139 = call noundef nonnull align 8 dereferenceable(248) ptr @_ZNK9NOMAD_4_316EvaluatorControl17getMainThreadInfoEi(ptr noundef nonnull align 8 dereferenceable(352) %25, i32 noundef %138)
  call void @_ZN9NOMAD_4_317EvcMainThreadInfo18decNbPointsInQueueEv(ptr noundef nonnull align 8 dereferenceable(248) %139)
  store i8 1, ptr %10, align 1, !tbaa !11
  store i32 2, ptr %12, align 4
  br label %141

140:                                              ; preds = %80
  store i32 0, ptr %12, align 4
  br label %141

141:                                              ; preds = %140, %135, %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  %142 = load i32, ptr %12, align 4
  switch i32 %142, label %148 [
    i32 0, label %143
    i32 4, label %144
  ]

143:                                              ; preds = %141
  br label %144

144:                                              ; preds = %143, %141
  %145 = load i32, ptr %11, align 4, !tbaa !9
  %146 = add nsw i32 %145, -1
  store i32 %146, ptr %11, align 4, !tbaa !9
  br label %34, !llvm.loop !15

147:                                              ; preds = %131, %122
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %153

148:                                              ; preds = %141, %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %149

149:                                              ; preds = %148
  br label %150

150:                                              ; preds = %149, %4
  %151 = load i8, ptr %10, align 1, !tbaa !11, !range !17, !noundef !18
  %152 = trunc i8 %151 to i1
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  ret i1 %152

153:                                              ; preds = %147
  %154 = load ptr, ptr %17, align 8
  %155 = load i32, ptr %18, align 4
  %156 = insertvalue { ptr, i32 } poison, ptr %154, 0
  %157 = insertvalue { ptr, i32 } %156, i32 %155, 1
  resume { ptr, i32 } %157
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK9NOMAD_4_316EvaluatorControl12stopMainEvalEi(ptr noundef nonnull align 8 dereferenceable(352), i32 noundef) #3 align 2

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

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

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

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

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

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

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

declare void @_ZN9NOMAD_4_317EvcMainThreadInfo19incCurrentlyRunningEv(ptr noundef nonnull align 8 dereferenceable(248)) #1

declare void @_ZN9NOMAD_4_317EvcMainThreadInfo18decNbPointsInQueueEv(ptr noundef nonnull align 8 dereferenceable(248)) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 "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, !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}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_ZTSN9NOMAD_4_38EvalTypeE", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{i8 0, i8 2}
!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"

%"class.NOMAD_4_3::Double" = type <{ ptr, double, i8, [7 x i8] }>
%"class.__gnu_cxx::__normal_iterator.112" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.107" = 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

declare noundef i32 @_ZN9NOMAD_4_312getThreadNumEv() local_unnamed_addr #1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK9NOMAD_4_316EvaluatorControl7getHMaxEi(ptr dead_on_unwind noalias writable sret(%"class.NOMAD_4_3::Double") align 8, ptr noundef nonnull align 8 dereferenceable(352), i32 noundef) local_unnamed_addr #3 align 2

declare noundef nonnull align 8 dereferenceable(17) ptr @_ZN9NOMAD_4_36DoubleaSERKS0_(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(17)) local_unnamed_addr #1

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN9NOMAD_4_316EvaluatorControl12popEvalPointERSt10shared_ptrINS_14EvalQueuePointEERPNS_9EvaluatorERNS_6DoubleE(ptr noundef nonnull align 8 dereferenceable(352) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr nocapture noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(17) %3) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.NOMAD_4_3::Double", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.112", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.107", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.107", align 8
  %9 = alloca %"class.NOMAD_4_3::Double", align 8
  %10 = tail call noundef i32 @_ZN9NOMAD_4_312getThreadNumEv()
  %11 = getelementptr inbounds i8, ptr %0, i64 136
  %12 = tail call noundef zeroext i1 @_ZNKSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  br i1 %12, label %.loopexit, label %13

13:                                               ; preds = %4
  %14 = tail call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  %15 = trunc i64 %14 to i32
  %16 = icmp sgt i32 %15, 0
  br i1 %16, label %.lr.ph.preheader, label %.loopexit

.lr.ph.preheader:                                 ; preds = %13
  %17 = and i64 %14, 2147483647
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.thread
  %indvars.iv = phi i64 [ %17, %.lr.ph.preheader ], [ %indvars.iv.next, %.thread ]
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %indvars.iv.next) #6
  %19 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_314EvalQueuePointELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %18) #6
  %20 = call noundef i32 @_ZNK9NOMAD_4_39EvalPoint13getThreadAlgoEv(ptr noundef nonnull align 8 dereferenceable(160) %19)
  %.not = icmp eq i32 %10, %20
  br i1 %.not, label %23, label %21

21:                                               ; preds = %.lr.ph
  %22 = call noundef zeroext i1 @_ZNK9NOMAD_4_316EvaluatorControl12stopMainEvalEi(ptr noundef nonnull align 8 dereferenceable(352) %0, i32 noundef %20)
  br i1 %22, label %.thread, label %23

23:                                               ; preds = %21, %.lr.ph
  %24 = load ptr, ptr %2, align 8, !tbaa !5
  %.not41 = icmp eq ptr %24, null
  br i1 %.not41, label %29, label %25

25:                                               ; preds = %23
  %26 = call noundef nonnull align 8 dereferenceable(248) ptr @_ZNK9NOMAD_4_316EvaluatorControl17getMainThreadInfoEi(ptr noundef nonnull align 8 dereferenceable(352) %0, i32 noundef %20)
  %27 = call noundef ptr @_ZN9NOMAD_4_317EvcMainThreadInfo19getCurrentEvaluatorEv(ptr noundef nonnull align 8 dereferenceable(248) %26)
  %28 = icmp eq ptr %24, %27
  br i1 %28, label %29, label %.thread

29:                                               ; preds = %25, %23
  %30 = call noundef zeroext i1 @_ZNK9NOMAD_4_36Double9isDefinedEv(ptr noundef nonnull align 8 dereferenceable(17) %3)
  br i1 %30, label %31, label %.thread.thread

31:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  call void @_ZNK9NOMAD_4_316EvaluatorControl7getHMaxEi(ptr dead_on_unwind nonnull writable sret(%"class.NOMAD_4_3::Double") align 8 %5, ptr noundef nonnull align 8 dereferenceable(352) %0, i32 noundef %20)
  %32 = invoke noundef zeroext i1 @_ZN9NOMAD_4_3eqERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17) %3, ptr noundef nonnull align 8 dereferenceable(17) %5)
          to label %.critedge unwind label %46

.critedge:                                        ; preds = %31
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  br i1 %32, label %.thread.thread, label %.thread

.thread.thread:                                   ; preds = %29, %.critedge
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %indvars.iv.next) #6
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN9NOMAD_4_314EvalQueuePointEEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %33) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %35 = call ptr @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  store ptr %35, ptr %8, align 8
  %36 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESt6vectorIS4_SaIS4_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %8, i64 noundef %indvars.iv.next) #6
  store ptr %36, ptr %7, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESt6vectorIS4_SaIS4_EEEC2IPS4_vEERKNS0_IT_S9_EE(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %37 = load ptr, ptr %6, align 8
  %38 = call ptr @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS3_S5_EE(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr %37)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  %39 = load ptr, ptr %2, align 8, !tbaa !5
  %.not42 = icmp eq ptr %39, null
  br i1 %.not42, label %40, label %48

40:                                               ; preds = %.thread.thread
  %41 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_314EvalQueuePointELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #6
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9NOMAD_4_314EvalQueuePoint11getEvalTypeEv(ptr noundef nonnull align 8 dereferenceable(184) %41)
  %43 = load i32, ptr %42, align 4, !tbaa !9
  %44 = call noundef nonnull align 8 dereferenceable(248) ptr @_ZNK9NOMAD_4_316EvaluatorControl17getMainThreadInfoEi(ptr noundef nonnull align 8 dereferenceable(352) %0, i32 noundef %20)
  %45 = call noundef ptr @_ZN9NOMAD_4_317EvcMainThreadInfo12getEvaluatorENS_8EvalTypeE(ptr noundef nonnull align 8 dereferenceable(248) %44, i32 noundef %43)
  store ptr %45, ptr %2, align 8, !tbaa !5
  br label %48

46:                                               ; preds = %31
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  br label %59

48:                                               ; preds = %40, %.thread.thread
  %49 = call noundef zeroext i1 @_ZNK9NOMAD_4_36Double9isDefinedEv(ptr noundef nonnull align 8 dereferenceable(17) %3)
  br i1 %49, label %55, label %50

50:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #6
  call void @_ZNK9NOMAD_4_316EvaluatorControl7getHMaxEi(ptr dead_on_unwind nonnull writable sret(%"class.NOMAD_4_3::Double") align 8 %9, ptr noundef nonnull align 8 dereferenceable(352) %0, i32 noundef %20)
  %51 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZN9NOMAD_4_36DoubleaSERKS0_(ptr noundef nonnull align 8 dereferenceable(17) %3, ptr noundef nonnull align 8 dereferenceable(17) %9)
          to label %52 unwind label %53

52:                                               ; preds = %50
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  br label %55

53:                                               ; preds = %50
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  br label %59

55:                                               ; preds = %48, %52
  %56 = call noundef nonnull align 8 dereferenceable(248) ptr @_ZNK9NOMAD_4_316EvaluatorControl17getMainThreadInfoEi(ptr noundef nonnull align 8 dereferenceable(352) %0, i32 noundef %20)
  call void @_ZN9NOMAD_4_317EvcMainThreadInfo19incCurrentlyRunningEv(ptr noundef nonnull align 8 dereferenceable(248) %56)
  %57 = call noundef nonnull align 8 dereferenceable(248) ptr @_ZNK9NOMAD_4_316EvaluatorControl17getMainThreadInfoEi(ptr noundef nonnull align 8 dereferenceable(352) %0, i32 noundef %20)
  call void @_ZN9NOMAD_4_317EvcMainThreadInfo18decNbPointsInQueueEv(ptr noundef nonnull align 8 dereferenceable(248) %57)
  br label %.loopexit

.thread:                                          ; preds = %25, %21, %.critedge
  %58 = icmp ugt i64 %indvars.iv, 1
  br i1 %58, label %.lr.ph, label %.loopexit, !llvm.loop !11

59:                                               ; preds = %46, %53
  %.pn = phi { ptr, i32 } [ %54, %53 ], [ %47, %46 ]
  resume { ptr, i32 } %.pn

.loopexit:                                        ; preds = %.thread, %13, %55, %4
  %.3 = phi i1 [ false, %4 ], [ true, %55 ], [ false, %13 ], [ false, %.thread ]
  ret i1 %.3
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK9NOMAD_4_316EvaluatorControl12stopMainEvalEi(ptr noundef nonnull align 8 dereferenceable(352), i32 noundef) local_unnamed_addr #3 align 2

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

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

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

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

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

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

declare void @_ZN9NOMAD_4_317EvcMainThreadInfo19incCurrentlyRunningEv(ptr noundef nonnull align 8 dereferenceable(248)) local_unnamed_addr #1

declare void @_ZN9NOMAD_4_317EvcMainThreadInfo18decNbPointsInQueueEv(ptr noundef nonnull align 8 dereferenceable(248)) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 "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, !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 = !{!"_ZTSN9NOMAD_4_38EvalTypeE", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: ConstraintEliminationPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass