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

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

%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.107" = type { ptr }
%class.anon.141 = type { i32 }
%class.anon.142 = type <{ i32, i8, [3 x i8] }>
%"class.__gnu_cxx::__normal_iterator.112" = 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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZN9NOMAD_4_316EvaluatorControl10clearQueueEib(ptr noundef nonnull align 8 dereferenceable(352) %0, i32 noundef %1, i1 noundef zeroext %2) #1 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i8, align 1
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %10 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.107", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator.107", align 8
  %14 = alloca %class.anon.141, align 4
  %15 = alloca %"class.__gnu_cxx::__normal_iterator.107", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator.107", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator.107", align 8
  %18 = alloca %class.anon.142, align 4
  %19 = alloca %"class.__gnu_cxx::__normal_iterator.112", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator.112", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator.107", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator.107", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  %23 = zext i1 %2 to i8
  store i8 %23, ptr %6, align 1, !tbaa !11
  %24 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  store i64 0, ptr %7, align 8, !tbaa !13
  %25 = load i32, ptr %5, align 4, !tbaa !9
  %26 = icmp eq i32 -1, %25
  br i1 %26, label %27, label %49

27:                                               ; preds = %3
  %28 = getelementptr inbounds %"class.NOMAD_4_3::EvaluatorControl", ptr %24, i32 0, i32 5
  %29 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #4
  store i64 %29, ptr %7, align 8, !tbaa !13
  %30 = getelementptr inbounds %"class.NOMAD_4_3::EvaluatorControl", ptr %24, i32 0, i32 5
  call void @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %31 = getelementptr inbounds %"class.NOMAD_4_3::EvaluatorControl", ptr %24, i32 0, i32 3
  store ptr %31, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  %33 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %32) #4
  %34 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %9, i32 0, i32 0
  store ptr %33, ptr %34, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %35) #4
  %37 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %10, i32 0, i32 0
  store ptr %36, ptr %37, align 8
  br label %38

38:                                               ; preds = %46, %27
  %39 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  br i1 %39, label %41, label %40

40:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %48

41:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  %43 = load i32, ptr %42, align 4, !tbaa !9
  store i32 %43, ptr %11, align 4, !tbaa !9
  %44 = load i32, ptr %11, align 4, !tbaa !9
  %45 = call noundef nonnull align 8 dereferenceable(248) ptr @_ZNK9NOMAD_4_316EvaluatorControl17getMainThreadInfoEi(ptr noundef nonnull align 8 dereferenceable(352) %24, i32 noundef %44)
  call void @_ZN9NOMAD_4_317EvcMainThreadInfo20resetNbPointsInQueueEv(ptr noundef nonnull align 8 dereferenceable(248) %45)
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %46

46:                                               ; preds = %41
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  br label %38

48:                                               ; preds = %40
  br label %96

49:                                               ; preds = %3
  %50 = getelementptr inbounds %"class.NOMAD_4_3::EvaluatorControl", ptr %24, i32 0, i32 5
  %51 = call ptr @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %50) #4
  %52 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.107", ptr %12, i32 0, i32 0
  store ptr %51, ptr %52, align 8
  %53 = getelementptr inbounds %"class.NOMAD_4_3::EvaluatorControl", ptr %24, i32 0, i32 5
  %54 = call ptr @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %53) #4
  %55 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.107", ptr %13, i32 0, i32 0
  store ptr %54, ptr %55, align 8
  %56 = getelementptr inbounds %class.anon.141, ptr %14, i32 0, i32 0
  %57 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %57, ptr %56, align 4, !tbaa !15
  %58 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.107", ptr %12, i32 0, i32 0
  %59 = load ptr, ptr %58, align 8
  %60 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.107", ptr %13, i32 0, i32 0
  %61 = load ptr, ptr %60, align 8
  %62 = getelementptr inbounds %class.anon.141, ptr %14, i32 0, i32 0
  %63 = load i32, ptr %62, align 4
  %64 = call noundef i64 @"_ZSt8count_ifIN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESt6vectorIS5_SaIS5_EEEEZNS3_16EvaluatorControl10clearQueueEibE3$_0ENSt15iterator_traitsIT_E15difference_typeESE_SE_T0_"(ptr %59, ptr %61, i32 %63)
  store i64 %64, ptr %7, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %65 = getelementptr inbounds %"class.NOMAD_4_3::EvaluatorControl", ptr %24, i32 0, i32 5
  %66 = call ptr @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %65) #4
  %67 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.107", ptr %16, i32 0, i32 0
  store ptr %66, ptr %67, align 8
  %68 = getelementptr inbounds %"class.NOMAD_4_3::EvaluatorControl", ptr %24, i32 0, i32 5
  %69 = call ptr @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %68) #4
  %70 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.107", ptr %17, i32 0, i32 0
  store ptr %69, ptr %70, align 8
  %71 = getelementptr inbounds %class.anon.142, ptr %18, i32 0, i32 0
  %72 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %72, ptr %71, align 4, !tbaa !17
  %73 = getelementptr inbounds %class.anon.142, ptr %18, i32 0, i32 1
  %74 = load i8, ptr %6, align 1, !tbaa !11, !range !19, !noundef !20
  %75 = trunc i8 %74 to i1
  %76 = zext i1 %75 to i8
  store i8 %76, ptr %73, align 4, !tbaa !21
  %77 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.107", ptr %16, i32 0, i32 0
  %78 = load ptr, ptr %77, align 8
  %79 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.107", ptr %17, i32 0, i32 0
  %80 = load ptr, ptr %79, align 8
  %81 = load i64, ptr %18, align 4
  %82 = call ptr @"_ZSt9remove_ifIN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESt6vectorIS5_SaIS5_EEEEZNS3_16EvaluatorControl10clearQueueEibE3$_1ET_SD_SD_T0_"(ptr %78, ptr %80, i64 %81)
  %83 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.107", ptr %15, i32 0, i32 0
  store ptr %82, ptr %83, align 8
  %84 = getelementptr inbounds %"class.NOMAD_4_3::EvaluatorControl", ptr %24, i32 0, i32 5
  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) %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %85 = getelementptr inbounds %"class.NOMAD_4_3::EvaluatorControl", ptr %24, i32 0, i32 5
  %86 = call ptr @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %85) #4
  %87 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.107", ptr %21, i32 0, i32 0
  store ptr %86, ptr %87, 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) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #4
  %88 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.112", ptr %19, i32 0, i32 0
  %89 = load ptr, ptr %88, align 8
  %90 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.112", ptr %20, i32 0, i32 0
  %91 = load ptr, ptr %90, align 8
  %92 = call ptr @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS3_S5_EESA_(ptr noundef nonnull align 8 dereferenceable(24) %84, ptr %89, ptr %91)
  %93 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.107", ptr %22, i32 0, i32 0
  store ptr %92, ptr %93, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  %94 = load i32, ptr %5, align 4, !tbaa !9
  %95 = call noundef nonnull align 8 dereferenceable(248) ptr @_ZNK9NOMAD_4_316EvaluatorControl17getMainThreadInfoEi(ptr noundef nonnull align 8 dereferenceable(352) %24, i32 noundef %94)
  call void @_ZN9NOMAD_4_317EvcMainThreadInfo20resetNbPointsInQueueEv(ptr noundef nonnull align 8 dereferenceable(248) %95)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br label %96

96:                                               ; preds = %49, %48
  %97 = load i64, ptr %7, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  ret i64 %97
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS3_S5_EESA_(ptr noundef nonnull align 8 dereferenceable(24), ptr, ptr) #1 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 void @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef i64 @"_ZSt8count_ifIN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESt6vectorIS5_SaIS5_EEEEZNS3_16EvaluatorControl10clearQueueEibE3$_0ENSt15iterator_traitsIT_E15difference_typeESE_SE_T0_"(ptr, ptr, i32) #3

; Function Attrs: inlinehint mustprogress uwtable
declare hidden ptr @"_ZSt9remove_ifIN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESt6vectorIS5_SaIS5_EEEEZNS3_16EvaluatorControl10clearQueueEibE3$_1ET_SD_SD_T0_"(ptr, ptr, i64) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!16, !10, i64 0}
!16 = !{!"_ZTSZN9NOMAD_4_316EvaluatorControl10clearQueueEibE3$_0", !10, i64 0}
!17 = !{!18, !10, i64 0}
!18 = !{!"_ZTSZN9NOMAD_4_316EvaluatorControl10clearQueueEibE3$_1", !10, i64 0, !12, i64 4}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!18, !12, i64 4}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.107" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.112" = type { ptr }

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZN9NOMAD_4_316EvaluatorControl10clearQueueEib(ptr noundef nonnull align 8 dereferenceable(352) %0, i32 noundef %1, i1 noundef zeroext %2) local_unnamed_addr #1 align 2 {
  %4 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %5 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.107", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.112", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.112", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.107", align 8
  %10 = icmp eq i32 %1, -1
  %11 = getelementptr inbounds i8, ptr %0, i64 136
  br i1 %10, label %12, label %23

12:                                               ; preds = %3
  %13 = tail call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  tail call void @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  %14 = getelementptr inbounds i8, ptr %0, i64 40
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %15 = tail call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %14) #4
  store ptr %15, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %16 = tail call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %14) #4
  store ptr %16, ptr %5, align 8
  %17 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  br i1 %17, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  br label %35

.lr.ph:                                           ; preds = %12, %.lr.ph
  %18 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %19 = load i32, ptr %18, align 4, !tbaa !5
  %20 = call noundef nonnull align 8 dereferenceable(248) ptr @_ZNK9NOMAD_4_316EvaluatorControl17getMainThreadInfoEi(ptr noundef nonnull align 8 dereferenceable(352) %0, i32 noundef %19)
  call void @_ZN9NOMAD_4_317EvcMainThreadInfo20resetNbPointsInQueueEv(ptr noundef nonnull align 8 dereferenceable(248) %20)
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %22 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  br i1 %22, label %.lr.ph, label %._crit_edge

23:                                               ; preds = %3
  %24 = tail call ptr @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  %25 = tail call ptr @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  %26 = tail call noundef i64 @"_ZSt8count_ifIN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESt6vectorIS5_SaIS5_EEEEZNS3_16EvaluatorControl10clearQueueEibE3$_0ENSt15iterator_traitsIT_E15difference_typeESE_SE_T0_"(ptr %24, ptr %25, i32 %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %27 = tail call ptr @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  %28 = tail call ptr @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  %.sroa.2.0.insert.shift = select i1 %2, i64 4294967296, i64 0
  %.sroa.01.0.insert.ext = zext i32 %1 to i64
  %.sroa.01.0.insert.insert = or disjoint i64 %.sroa.2.0.insert.shift, %.sroa.01.0.insert.ext
  %29 = tail call ptr @"_ZSt9remove_ifIN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESt6vectorIS5_SaIS5_EEEEZNS3_16EvaluatorControl10clearQueueEibE3$_1ET_SD_SD_T0_"(ptr %27, ptr %28, i64 %.sroa.01.0.insert.insert)
  store ptr %29, ptr %6, 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) %7, ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  %30 = call ptr @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  store ptr %30, ptr %9, 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) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  %31 = load ptr, ptr %7, align 8
  %32 = load ptr, ptr %8, align 8
  %33 = call ptr @_ZNSt6vectorISt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESaIS3_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS3_S5_EESA_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr %31, ptr %32)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  %34 = call noundef nonnull align 8 dereferenceable(248) ptr @_ZNK9NOMAD_4_316EvaluatorControl17getMainThreadInfoEi(ptr noundef nonnull align 8 dereferenceable(352) %0, i32 noundef %1)
  call void @_ZN9NOMAD_4_317EvcMainThreadInfo20resetNbPointsInQueueEv(ptr noundef nonnull align 8 dereferenceable(248) %34)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  br label %35

35:                                               ; preds = %23, %._crit_edge
  %.0 = phi i64 [ %13, %._crit_edge ], [ %26, %23 ]
  ret i64 %.0
}

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef i64 @"_ZSt8count_ifIN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESt6vectorIS5_SaIS5_EEEEZNS3_16EvaluatorControl10clearQueueEibE3$_0ENSt15iterator_traitsIT_E15difference_typeESE_SE_T0_"(ptr, ptr, i32) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare hidden ptr @"_ZSt9remove_ifIN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN9NOMAD_4_314EvalQueuePointEESt6vectorIS5_SaIS5_EEEEZNS3_16EvaluatorControl10clearQueueEibE3$_1ET_SD_SD_T0_"(ptr, ptr, i64) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass