; LLVM IR from NTHU-LSALAB/Gemini :: src/scheduler.ll (Z16select_candidatev)

; 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::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<History, std::allocator<History>>::_List_impl" }
%"struct.std::__cxx11::_List_base<History, std::allocator<History>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"class.std::map.6" = type { %"class.std::_Rb_tree.7" }
%"class.std::_Rb_tree.7" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, ClientInfo *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, ClientInfo *>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, ClientInfo *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, ClientInfo *>>, std::less<std::__cxx11::basic_string<char>>>::_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::__cxx11::list.12" = type { %"class.std::__cxx11::_List_base.13" }
%"class.std::__cxx11::_List_base.13" = type { %"struct.std::__cxx11::_List_base<candidate_t, std::allocator<candidate_t>>::_List_impl" }
%"struct.std::__cxx11::_List_base<candidate_t, std::allocator<candidate_t>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%union.pthread_cond_t = type { %struct.__pthread_cond_s }
%struct.__pthread_cond_s = type { %union.__atomic_wide_counter, %union.__atomic_wide_counter, [2 x i32], [2 x i32], i32, i32, [2 x i32] }
%union.__atomic_wide_counter = type { i64 }
%struct.candidate_t = type { i32, %"class.std::__cxx11::basic_string", i32, double }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::map.18" = type { %"class.std::_Rb_tree.19" }
%"class.std::_Rb_tree.19" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, double>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, double>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, double>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, double>>, std::less<std::__cxx11::basic_string<char>>>::_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<container_timestamp, std::allocator<container_timestamp>>::_Vector_impl" }
%"struct.std::_Vector_base<container_timestamp, std::allocator<container_timestamp>>::_Vector_impl" = type { %"struct.std::_Vector_base<container_timestamp, std::allocator<container_timestamp>>::_Vector_impl_data" }
%"struct.std::_Vector_base<container_timestamp, std::allocator<container_timestamp>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.26" = type { %"struct.std::_Vector_base.27" }
%"struct.std::_Vector_base.27" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.anon = type { double }
%"struct.std::_List_iterator" = type { ptr }
%struct.History = type { %"class.std::__cxx11::basic_string", double, double }
%struct.container_timestamp = type { %"class.std::__cxx11::basic_string", double }
%class.anon.31 = type { i8 }
%class.anon.32 = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.35" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.34" = type { ptr }
%"class.std::vector.36" = type { %"struct.std::_Vector_base.37" }
%"struct.std::_Vector_base.37" = type { %"struct.std::_Vector_base<valid_candidate_t, std::allocator<valid_candidate_t>>::_Vector_impl" }
%"struct.std::_Vector_base<valid_candidate_t, std::allocator<valid_candidate_t>>::_Vector_impl" = type { %"struct.std::_Vector_base<valid_candidate_t, std::allocator<valid_candidate_t>>::_Vector_impl_data" }
%"struct.std::_Vector_base<valid_candidate_t, std::allocator<valid_candidate_t>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::_List_iterator.41" = type { ptr }
%struct.valid_candidate_t = type { double, double, double, double, %"struct.std::_List_iterator.41" }
%struct.timespec = type { i64, i64 }
%"class.__gnu_cxx::__normal_iterator.42" = type { ptr }
%"struct.std::_List_const_iterator" = type { ptr }

@WINDOW_SIZE = external dso_local global double, align 8
@verbosity = external dso_local global i32, align 4
@_Z12history_listB5cxx11 = external dso_local global %"class.std::__cxx11::list", align 8
@_Z15client_info_mapB5cxx11 = external dso_local global %"class.std::map.6", align 8
@_Z10candidatesB5cxx11 = external dso_local global %"class.std::__cxx11::list.12", align 8
@candidate_mutex = external dso_local global %union.pthread_mutex_t, align 8
@candidate_cond = external dso_local global %union.pthread_cond_t, align 8
@.str.16 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [22 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, i64 } @_Z18get_timespec_afterd(double noundef) #0

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_Z14ms_since_startv() #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #3

declare i32 @__gxx_personality_v0(...)

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

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

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

declare void @_Z5DEBUGPKcz(ptr noundef, ...) #4

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z16select_candidatev(ptr dead_on_unwind noalias writable sret(%struct.candidate_t) align 8 %0) #5 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca double, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::map.18", align 8
  %9 = alloca %"class.std::vector", align 8
  %10 = alloca %"class.std::vector.26", align 8
  %11 = alloca double, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca %class.anon, align 8
  %17 = alloca %class.anon, align 8
  %18 = alloca ptr, align 8
  %19 = alloca %"struct.std::_List_iterator", align 8
  %20 = alloca %"struct.std::_List_iterator", align 8
  %21 = alloca %struct.History, align 8
  %22 = alloca %struct.container_timestamp, align 8
  %23 = alloca %struct.container_timestamp, align 8
  %24 = alloca %class.anon.31, align 1
  %25 = alloca %"struct.std::_List_iterator", align 8
  %26 = alloca %"struct.std::_List_iterator", align 8
  %27 = alloca %"struct.std::_List_iterator", align 8
  %28 = alloca %class.anon.31, align 1
  %29 = alloca %"struct.std::_List_iterator", align 8
  %30 = alloca i1, align 1
  %31 = alloca i32, align 4
  %32 = alloca %class.anon.32, align 1
  %33 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %34 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %35 = alloca %class.anon.32, align 1
  %36 = alloca %"class.__gnu_cxx::__normal_iterator.35", align 8
  %37 = alloca %"class.__gnu_cxx::__normal_iterator.34", align 8
  %38 = alloca %"class.__gnu_cxx::__normal_iterator.34", align 8
  %39 = alloca %"class.__gnu_cxx::__normal_iterator.34", align 8
  %40 = alloca %"class.std::vector.36", align 8
  %41 = alloca %"struct.std::_List_iterator.41", align 8
  %42 = alloca %"struct.std::_List_iterator.41", align 8
  %43 = alloca %"class.std::__cxx11::basic_string", align 8
  %44 = alloca double, align 8
  %45 = alloca double, align 8
  %46 = alloca double, align 8
  %47 = alloca double, align 8
  %48 = alloca %struct.valid_candidate_t, align 8
  %49 = alloca %"struct.std::_List_iterator.41", align 8
  %50 = alloca %struct.timespec, align 8
  %51 = alloca %"struct.std::_List_iterator", align 8
  %52 = alloca %"class.__gnu_cxx::__normal_iterator.42", align 8
  %53 = alloca %"class.__gnu_cxx::__normal_iterator.42", align 8
  %54 = alloca %"struct.std::_List_iterator.41", align 8
  %55 = alloca %"class.__gnu_cxx::__normal_iterator.42", align 8
  %56 = alloca i1, align 1
  %57 = alloca %"struct.std::_List_const_iterator", align 8
  %58 = alloca %"struct.std::_List_iterator.41", align 8
  store ptr %0, ptr %2, align 8
  br label %59

59:                                               ; preds = %461, %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  %60 = load double, ptr @WINDOW_SIZE, align 8, !tbaa !5
  store double %60, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr %8) #7
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEdSt4lessIS5_ESaISt4pairIKS5_dEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #7
  call void @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #7
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %61 = invoke noundef double @_Z14ms_since_startv()
          to label %62 unwind label %70

62:                                               ; preds = %59
  store double %61, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %63 = load double, ptr %11, align 8, !tbaa !5
  %64 = load double, ptr @WINDOW_SIZE, align 8, !tbaa !5
  %65 = fsub double %63, %64
  store double %65, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %66 = load double, ptr %14, align 8, !tbaa !5
  %67 = fcmp olt double %66, 0.000000e+00
  br i1 %67, label %68, label %74

68:                                               ; preds = %62
  %69 = load double, ptr %11, align 8, !tbaa !5
  store double %69, ptr %3, align 8, !tbaa !5
  br label %74

70:                                               ; preds = %59
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %12, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %13, align 4
  br label %465

74:                                               ; preds = %68, %62
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %75 = getelementptr inbounds %class.anon, ptr %16, i32 0, i32 0
  %76 = load double, ptr %14, align 8, !tbaa !5
  store double %76, ptr %75, align 8, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 %16, i64 8, i1 false), !tbaa.struct !13
  %77 = getelementptr inbounds %class.anon, ptr %17, i32 0, i32 0
  %78 = load double, ptr %77, align 8
  invoke void @"_ZNSt7__cxx114listI7HistorySaIS1_EE9remove_ifIZ16select_candidatevE3$_0EEvT_"(ptr noundef nonnull align 8 dereferenceable(24) @_Z12history_listB5cxx11, double %78)
          to label %79 unwind label %87

79:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  store ptr @_Z12history_listB5cxx11, ptr %18, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %80 = call ptr @_ZNSt7__cxx114listI7HistorySaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z12history_listB5cxx11) #7
  %81 = getelementptr inbounds %"struct.std::_List_iterator", ptr %19, i32 0, i32 0
  store ptr %80, ptr %81, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %82 = call ptr @_ZNSt7__cxx114listI7HistorySaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z12history_listB5cxx11) #7
  %83 = getelementptr inbounds %"struct.std::_List_iterator", ptr %20, i32 0, i32 0
  store ptr %82, ptr %83, align 8
  br label %84

84:                                               ; preds = %152, %79
  %85 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorI7HistoryES3_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #7
  br i1 %85, label %91, label %86

86:                                               ; preds = %84
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %156

87:                                               ; preds = %74
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %12, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %13, align 4
  br label %464

91:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 48, ptr %21) #7
  %92 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt14_List_iteratorI7HistoryEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  invoke void @_ZN7HistoryC2ERKS_(ptr noundef nonnull align 8 dereferenceable(48) %21, ptr noundef nonnull align 8 dereferenceable(48) %92)
          to label %93 unwind label %125

93:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 40, ptr %22) #7
  %94 = getelementptr inbounds %struct.container_timestamp, ptr %22, i32 0, i32 0
  %95 = getelementptr inbounds %struct.History, ptr %21, i32 0, i32 0
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %94, ptr noundef nonnull align 8 dereferenceable(32) %95)
          to label %96 unwind label %129

96:                                               ; preds = %93
  %97 = getelementptr inbounds %struct.container_timestamp, ptr %22, i32 0, i32 1
  %98 = getelementptr inbounds %struct.History, ptr %21, i32 0, i32 1
  %99 = load double, ptr %98, align 8, !tbaa !16
  %100 = fneg double %99
  store double %100, ptr %97, align 8, !tbaa !21
  invoke void @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(40) %22)
          to label %101 unwind label %133

101:                                              ; preds = %96
  call void @_ZZ16select_candidatevEN19container_timestampD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %22) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr %23) #7
  %102 = getelementptr inbounds %struct.container_timestamp, ptr %23, i32 0, i32 0
  %103 = getelementptr inbounds %struct.History, ptr %21, i32 0, i32 0
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %102, ptr noundef nonnull align 8 dereferenceable(32) %103)
          to label %104 unwind label %138

104:                                              ; preds = %101
  %105 = getelementptr inbounds %struct.container_timestamp, ptr %23, i32 0, i32 1
  %106 = getelementptr inbounds %struct.History, ptr %21, i32 0, i32 2
  %107 = load double, ptr %106, align 8, !tbaa !23
  store double %107, ptr %105, align 8, !tbaa !21
  invoke void @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(40) %23)
          to label %108 unwind label %142

108:                                              ; preds = %104
  call void @_ZZ16select_candidatevEN19container_timestampD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %23) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %23) #7
  %109 = getelementptr inbounds %struct.History, ptr %21, i32 0, i32 0
  %110 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEdSt4lessIS5_ESaISt4pairIKS5_dEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(32) %109)
          to label %111 unwind label %147

111:                                              ; preds = %108
  store double 0.000000e+00, ptr %110, align 8, !tbaa !5
  %112 = load i32, ptr @verbosity, align 4, !tbaa !9
  %113 = icmp sgt i32 %112, 1
  br i1 %113, label %114, label %151

114:                                              ; preds = %111
  %115 = getelementptr inbounds %struct.History, ptr %21, i32 0, i32 0
  %116 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %115) #7
  %117 = getelementptr inbounds %struct.History, ptr %21, i32 0, i32 1
  %118 = load double, ptr %117, align 8, !tbaa !16
  %119 = fdiv double %118, 1.000000e+03
  %120 = getelementptr inbounds %struct.History, ptr %21, i32 0, i32 2
  %121 = load double, ptr %120, align 8, !tbaa !23
  %122 = fdiv double %121, 1.000000e+03
  %123 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.16, ptr noundef %116, double noundef %119, double noundef %122)
          to label %124 unwind label %147

124:                                              ; preds = %114
  br label %151

125:                                              ; preds = %91
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %12, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %13, align 4
  br label %155

129:                                              ; preds = %93
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %12, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %13, align 4
  br label %137

133:                                              ; preds = %96
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %12, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %13, align 4
  call void @_ZZ16select_candidatevEN19container_timestampD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %22) #7
  br label %137

137:                                              ; preds = %133, %129
  call void @llvm.lifetime.end.p0(i64 40, ptr %22) #7
  br label %154

138:                                              ; preds = %101
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %12, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %13, align 4
  br label %146

142:                                              ; preds = %104
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %12, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %13, align 4
  call void @_ZZ16select_candidatevEN19container_timestampD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %23) #7
  br label %146

146:                                              ; preds = %142, %138
  call void @llvm.lifetime.end.p0(i64 40, ptr %23) #7
  br label %154

147:                                              ; preds = %114, %108
  %148 = landingpad { ptr, i32 }
          cleanup
  %149 = extractvalue { ptr, i32 } %148, 0
  store ptr %149, ptr %12, align 8
  %150 = extractvalue { ptr, i32 } %148, 1
  store i32 %150, ptr %13, align 4
  br label %154

151:                                              ; preds = %124, %111
  call void @_ZN7HistoryD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %21) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %21) #7
  br label %152

152:                                              ; preds = %151
  %153 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorI7HistoryEppEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  br label %84

154:                                              ; preds = %147, %146, %137
  call void @_ZN7HistoryD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %21) #7
  br label %155

155:                                              ; preds = %154, %125
  call void @llvm.lifetime.end.p0(i64 48, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %464

156:                                              ; preds = %86
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %157 = call ptr @_ZNSt7__cxx114listI7HistorySaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z12history_listB5cxx11) #7
  %158 = getelementptr inbounds %"struct.std::_List_iterator", ptr %26, i32 0, i32 0
  store ptr %157, ptr %158, align 8
  %159 = call ptr @_ZNSt7__cxx114listI7HistorySaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z12history_listB5cxx11) #7
  %160 = getelementptr inbounds %"struct.std::_List_iterator", ptr %27, i32 0, i32 0
  store ptr %159, ptr %160, align 8
  %161 = getelementptr inbounds %"struct.std::_List_iterator", ptr %26, i32 0, i32 0
  %162 = load ptr, ptr %161, align 8
  %163 = getelementptr inbounds %"struct.std::_List_iterator", ptr %27, i32 0, i32 0
  %164 = load ptr, ptr %163, align 8
  %165 = invoke ptr @"_ZSt7find_ifISt14_List_iteratorI7HistoryEZ16select_candidatevE3$_1ET_S4_S4_T0_"(ptr %162, ptr %164)
          to label %166 unwind label %175

166:                                              ; preds = %156
  %167 = getelementptr inbounds %"struct.std::_List_iterator", ptr %25, i32 0, i32 0
  store ptr %165, ptr %167, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  %168 = call ptr @_ZNSt7__cxx114listI7HistorySaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z12history_listB5cxx11) #7
  %169 = getelementptr inbounds %"struct.std::_List_iterator", ptr %29, i32 0, i32 0
  store ptr %168, ptr %169, align 8
  %170 = call noundef zeroext i1 @_ZSteqRKSt14_List_iteratorI7HistoryES3_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br i1 %170, label %171, label %185

171:                                              ; preds = %166
  store i1 false, ptr %30, align 1
  %172 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt7__cxx114listI11candidate_tSaIS1_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z10candidatesB5cxx11) #7
  invoke void @_ZN11candidate_tC2ERKS_(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(56) %172)
          to label %173 unwind label %179

173:                                              ; preds = %171
  call void @_ZNSt7__cxx114listI11candidate_tSaIS1_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z10candidatesB5cxx11) #7
  store i1 true, ptr %30, align 1
  store i32 1, ptr %31, align 4
  %174 = load i1, ptr %30, align 1
  br i1 %174, label %184, label %183

175:                                              ; preds = %156
  %176 = landingpad { ptr, i32 }
          cleanup
  %177 = extractvalue { ptr, i32 } %176, 0
  store ptr %177, ptr %12, align 8
  %178 = extractvalue { ptr, i32 } %176, 1
  store i32 %178, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %463

179:                                              ; preds = %171
  %180 = landingpad { ptr, i32 }
          cleanup
  %181 = extractvalue { ptr, i32 } %180, 0
  store ptr %181, ptr %12, align 8
  %182 = extractvalue { ptr, i32 } %180, 1
  store i32 %182, ptr %13, align 4
  br label %463

183:                                              ; preds = %173
  call void @_ZN11candidate_tD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %0) #7
  br label %184

184:                                              ; preds = %183, %173
  br label %461

185:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 1, ptr %32) #7
  %186 = call ptr @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  %187 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %33, i32 0, i32 0
  store ptr %186, ptr %187, align 8
  %188 = call ptr @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  %189 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %34, i32 0, i32 0
  store ptr %188, ptr %189, align 8
  %190 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %33, i32 0, i32 0
  %191 = load ptr, ptr %190, align 8
  %192 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %34, i32 0, i32 0
  %193 = load ptr, ptr %192, align 8
  invoke void @"_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPZ16select_candidatevE19container_timestampSt6vectorIS2_SaIS2_EEEEZ16select_candidatevE3$_2EvT_S9_T0_"(ptr %191, ptr %193)
          to label %194 unwind label %219

194:                                              ; preds = %185
  %195 = load double, ptr %14, align 8, !tbaa !5
  store double %195, ptr %15, align 8, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %196

196:                                              ; preds = %225, %194
  %197 = load i32, ptr %7, align 4, !tbaa !9
  %198 = sext i32 %197 to i64
  %199 = call noundef i64 @_ZNKSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  %200 = icmp ult i64 %198, %199
  br i1 %200, label %201, label %228

201:                                              ; preds = %196
  %202 = load i32, ptr %7, align 4, !tbaa !9
  %203 = sext i32 %202 to i64
  %204 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %203) #7
  %205 = getelementptr inbounds %struct.container_timestamp, ptr %204, i32 0, i32 1
  %206 = load double, ptr %205, align 8, !tbaa !21
  %207 = invoke noundef double @_ZSt3absd(double noundef %206)
          to label %208 unwind label %219

208:                                              ; preds = %201
  %209 = load double, ptr %14, align 8, !tbaa !5
  %210 = fcmp ole double %207, %209
  br i1 %210, label %211, label %223

211:                                              ; preds = %208
  %212 = load i32, ptr %4, align 4, !tbaa !9
  %213 = add nsw i32 %212, 1
  store i32 %213, ptr %4, align 4, !tbaa !9
  %214 = load i32, ptr %7, align 4, !tbaa !9
  %215 = sext i32 %214 to i64
  %216 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %215) #7
  %217 = getelementptr inbounds %struct.container_timestamp, ptr %216, i32 0, i32 0
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(32) %217)
          to label %218 unwind label %219

218:                                              ; preds = %211
  br label %224

219:                                              ; preds = %317, %271, %248, %241, %211, %201, %185
  %220 = landingpad { ptr, i32 }
          cleanup
  %221 = extractvalue { ptr, i32 } %220, 0
  store ptr %221, ptr %12, align 8
  %222 = extractvalue { ptr, i32 } %220, 1
  store i32 %222, ptr %13, align 4
  br label %460

223:                                              ; preds = %208
  br label %228

224:                                              ; preds = %218
  br label %225

225:                                              ; preds = %224
  %226 = load i32, ptr %7, align 4, !tbaa !9
  %227 = add nsw i32 %226, 1
  store i32 %227, ptr %7, align 4, !tbaa !9
  br label %196, !llvm.loop !24

228:                                              ; preds = %223, %196
  %229 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %229, ptr %5, align 4, !tbaa !9
  br label %230

230:                                              ; preds = %325, %228
  %231 = load i32, ptr %5, align 4, !tbaa !9
  %232 = sext i32 %231 to i64
  %233 = call noundef i64 @_ZNKSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  %234 = icmp ult i64 %232, %233
  br i1 %234, label %235, label %328

235:                                              ; preds = %230
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %236

236:                                              ; preds = %261, %235
  %237 = load i32, ptr %6, align 4, !tbaa !9
  %238 = sext i32 %237 to i64
  %239 = call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  %240 = icmp ult i64 %238, %239
  br i1 %240, label %241, label %264

241:                                              ; preds = %236
  %242 = load i32, ptr %5, align 4, !tbaa !9
  %243 = sext i32 %242 to i64
  %244 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %243) #7
  %245 = getelementptr inbounds %struct.container_timestamp, ptr %244, i32 0, i32 1
  %246 = load double, ptr %245, align 8, !tbaa !21
  %247 = invoke noundef double @_ZSt3absd(double noundef %246)
          to label %248 unwind label %219

248:                                              ; preds = %241
  %249 = load double, ptr %15, align 8, !tbaa !5
  %250 = fsub double %247, %249
  %251 = load i32, ptr %4, align 4, !tbaa !9
  %252 = sitofp i32 %251 to double
  %253 = fdiv double %250, %252
  %254 = load i32, ptr %6, align 4, !tbaa !9
  %255 = sext i32 %254 to i64
  %256 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %255) #7
  %257 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEdSt4lessIS5_ESaISt4pairIKS5_dEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(32) %256)
          to label %258 unwind label %219

258:                                              ; preds = %248
  %259 = load double, ptr %257, align 8, !tbaa !5
  %260 = fadd double %259, %253
  store double %260, ptr %257, align 8, !tbaa !5
  br label %261

261:                                              ; preds = %258
  %262 = load i32, ptr %6, align 4, !tbaa !9
  %263 = add nsw i32 %262, 1
  store i32 %263, ptr %6, align 4, !tbaa !9
  br label %236, !llvm.loop !26

264:                                              ; preds = %236
  %265 = load i32, ptr %5, align 4, !tbaa !9
  %266 = sext i32 %265 to i64
  %267 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %266) #7
  %268 = getelementptr inbounds %struct.container_timestamp, ptr %267, i32 0, i32 1
  %269 = load double, ptr %268, align 8, !tbaa !21
  %270 = fcmp olt double %269, 0.000000e+00
  br i1 %270, label %271, label %279

271:                                              ; preds = %264
  %272 = load i32, ptr %5, align 4, !tbaa !9
  %273 = sext i32 %272 to i64
  %274 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %273) #7
  %275 = getelementptr inbounds %struct.container_timestamp, ptr %274, i32 0, i32 0
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(32) %275)
          to label %276 unwind label %219

276:                                              ; preds = %271
  %277 = load i32, ptr %4, align 4, !tbaa !9
  %278 = add nsw i32 %277, 1
  store i32 %278, ptr %4, align 4, !tbaa !9
  br label %317

279:                                              ; preds = %264
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %280

280:                                              ; preds = %311, %279
  %281 = load i32, ptr %6, align 4, !tbaa !9
  %282 = sext i32 %281 to i64
  %283 = call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  %284 = icmp ult i64 %282, %283
  br i1 %284, label %285, label %314

285:                                              ; preds = %280
  %286 = load i32, ptr %6, align 4, !tbaa !9
  %287 = sext i32 %286 to i64
  %288 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %287) #7
  %289 = load i32, ptr %5, align 4, !tbaa !9
  %290 = sext i32 %289 to i64
  %291 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %290) #7
  %292 = getelementptr inbounds %struct.container_timestamp, ptr %291, i32 0, i32 0
  %293 = call noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32) %288, ptr noundef nonnull align 8 dereferenceable(32) %292) #7
  br i1 %293, label %294, label %310

294:                                              ; preds = %285
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #7
  %295 = call ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  %296 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.34", ptr %38, i32 0, i32 0
  store ptr %295, ptr %296, align 8
  %297 = load i32, ptr %6, align 4, !tbaa !9
  %298 = sext i32 %297 to i64
  %299 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %38, i64 noundef %298) #7
  %300 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.34", ptr %37, i32 0, i32 0
  store ptr %299, ptr %300, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEC2IPS6_vEERKNS0_IT_SB_EE(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull align 8 dereferenceable(8) %37) #7
  %301 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.35", ptr %36, i32 0, i32 0
  %302 = load ptr, ptr %301, align 8
  %303 = invoke ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS5_S7_EE(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr %302)
          to label %304 unwind label %306

304:                                              ; preds = %294
  %305 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.34", ptr %39, i32 0, i32 0
  store ptr %303, ptr %305, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #7
  br label %314

306:                                              ; preds = %294
  %307 = landingpad { ptr, i32 }
          cleanup
  %308 = extractvalue { ptr, i32 } %307, 0
  store ptr %308, ptr %12, align 8
  %309 = extractvalue { ptr, i32 } %307, 1
  store i32 %309, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #7
  br label %460

310:                                              ; preds = %285
  br label %311

311:                                              ; preds = %310
  %312 = load i32, ptr %6, align 4, !tbaa !9
  %313 = add nsw i32 %312, 1
  store i32 %313, ptr %6, align 4, !tbaa !9
  br label %280, !llvm.loop !27

314:                                              ; preds = %304, %280
  %315 = load i32, ptr %4, align 4, !tbaa !9
  %316 = add nsw i32 %315, -1
  store i32 %316, ptr %4, align 4, !tbaa !9
  br label %317

317:                                              ; preds = %314, %276
  %318 = load i32, ptr %5, align 4, !tbaa !9
  %319 = sext i32 %318 to i64
  %320 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %319) #7
  %321 = getelementptr inbounds %struct.container_timestamp, ptr %320, i32 0, i32 1
  %322 = load double, ptr %321, align 8, !tbaa !21
  %323 = invoke noundef double @_ZSt3absd(double noundef %322)
          to label %324 unwind label %219

324:                                              ; preds = %317
  store double %323, ptr %15, align 8, !tbaa !5
  br label %325

325:                                              ; preds = %324
  %326 = load i32, ptr %5, align 4, !tbaa !9
  %327 = add nsw i32 %326, 1
  store i32 %327, ptr %5, align 4, !tbaa !9
  br label %230, !llvm.loop !28

328:                                              ; preds = %230
  call void @llvm.lifetime.start.p0(i64 24, ptr %40) #7
  call void @_ZNSt6vectorI17valid_candidate_tSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %40) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #7
  %329 = call ptr @_ZNSt7__cxx114listI11candidate_tSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z10candidatesB5cxx11) #7
  %330 = getelementptr inbounds %"struct.std::_List_iterator.41", ptr %41, i32 0, i32 0
  store ptr %329, ptr %330, align 8
  br label %331

331:                                              ; preds = %394, %328
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #7
  %332 = call ptr @_ZNSt7__cxx114listI11candidate_tSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z10candidatesB5cxx11) #7
  %333 = getelementptr inbounds %"struct.std::_List_iterator.41", ptr %42, i32 0, i32 0
  store ptr %332, ptr %333, align 8
  %334 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorI11candidate_tES3_(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull align 8 dereferenceable(8) %42) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #7
  br i1 %334, label %336, label %335

335:                                              ; preds = %331
  store i32 18, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #7
  br label %399

336:                                              ; preds = %331
  call void @llvm.lifetime.start.p0(i64 32, ptr %43) #7
  %337 = call noundef ptr @_ZNKSt14_List_iteratorI11candidate_tEptEv(ptr noundef nonnull align 8 dereferenceable(8) %41) #7
  %338 = getelementptr inbounds %struct.candidate_t, ptr %337, i32 0, i32 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %43, ptr noundef nonnull align 8 dereferenceable(32) %338)
          to label %339 unwind label %381

339:                                              ; preds = %336
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #7
  %340 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP10ClientInfoSt4lessIS5_ESaISt4pairIKS5_S7_EEEixERSB_(ptr noundef nonnull align 8 dereferenceable(48) @_Z15client_info_mapB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %43)
          to label %341 unwind label %385

341:                                              ; preds = %339
  %342 = load ptr, ptr %340, align 8, !tbaa !14
  %343 = call noundef double @_ZN10ClientInfo16get_max_fractionEv(ptr noundef nonnull align 8 dereferenceable(160) %342)
  %344 = load double, ptr %3, align 8, !tbaa !5
  %345 = fmul double %343, %344
  store double %345, ptr %44, align 8, !tbaa !5
  %346 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP10ClientInfoSt4lessIS5_ESaISt4pairIKS5_S7_EEEixERSB_(ptr noundef nonnull align 8 dereferenceable(48) @_Z15client_info_mapB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %43)
          to label %347 unwind label %385

347:                                              ; preds = %341
  %348 = load ptr, ptr %346, align 8, !tbaa !14
  %349 = call noundef double @_ZN10ClientInfo16get_min_fractionEv(ptr noundef nonnull align 8 dereferenceable(160) %348)
  %350 = load double, ptr %3, align 8, !tbaa !5
  %351 = fmul double %349, %350
  store double %351, ptr %45, align 8, !tbaa !5
  %352 = load double, ptr %45, align 8, !tbaa !5
  %353 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEdSt4lessIS5_ESaISt4pairIKS5_dEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(32) %43)
          to label %354 unwind label %385

354:                                              ; preds = %347
  %355 = load double, ptr %353, align 8, !tbaa !5
  %356 = fsub double %352, %355
  store double %356, ptr %46, align 8, !tbaa !5
  %357 = load double, ptr %44, align 8, !tbaa !5
  %358 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEdSt4lessIS5_ESaISt4pairIKS5_dEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(32) %43)
          to label %359 unwind label %385

359:                                              ; preds = %354
  %360 = load double, ptr %358, align 8, !tbaa !5
  %361 = fsub double %357, %360
  store double %361, ptr %47, align 8, !tbaa !5
  %362 = load double, ptr %47, align 8, !tbaa !5
  %363 = fcmp ogt double %362, 0.000000e+00
  br i1 %363, label %364, label %393

364:                                              ; preds = %359
  call void @llvm.lifetime.start.p0(i64 40, ptr %48) #7
  %365 = getelementptr inbounds %struct.valid_candidate_t, ptr %48, i32 0, i32 0
  %366 = load double, ptr %46, align 8, !tbaa !5
  store double %366, ptr %365, align 8, !tbaa !29
  %367 = getelementptr inbounds %struct.valid_candidate_t, ptr %48, i32 0, i32 1
  %368 = load double, ptr %47, align 8, !tbaa !5
  store double %368, ptr %367, align 8, !tbaa !32
  %369 = getelementptr inbounds %struct.valid_candidate_t, ptr %48, i32 0, i32 2
  %370 = call noundef ptr @_ZNKSt14_List_iteratorI11candidate_tEptEv(ptr noundef nonnull align 8 dereferenceable(8) %41) #7
  %371 = getelementptr inbounds %struct.candidate_t, ptr %370, i32 0, i32 1
  %372 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEdSt4lessIS5_ESaISt4pairIKS5_dEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(32) %371)
          to label %373 unwind label %389

373:                                              ; preds = %364
  %374 = load double, ptr %372, align 8, !tbaa !5
  store double %374, ptr %369, align 8, !tbaa !33
  %375 = getelementptr inbounds %struct.valid_candidate_t, ptr %48, i32 0, i32 3
  %376 = call noundef ptr @_ZNKSt14_List_iteratorI11candidate_tEptEv(ptr noundef nonnull align 8 dereferenceable(8) %41) #7
  %377 = getelementptr inbounds %struct.candidate_t, ptr %376, i32 0, i32 3
  %378 = load double, ptr %377, align 8, !tbaa !34
  store double %378, ptr %375, align 8, !tbaa !36
  %379 = getelementptr inbounds %struct.valid_candidate_t, ptr %48, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %379, ptr align 8 %41, i64 8, i1 false), !tbaa.struct !37
  invoke void @_ZNSt6vectorI17valid_candidate_tSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %40, ptr noundef nonnull align 8 dereferenceable(40) %48)
          to label %380 unwind label %389

380:                                              ; preds = %373
  call void @llvm.lifetime.end.p0(i64 40, ptr %48) #7
  br label %393

381:                                              ; preds = %336
  %382 = landingpad { ptr, i32 }
          cleanup
  %383 = extractvalue { ptr, i32 } %382, 0
  store ptr %383, ptr %12, align 8
  %384 = extractvalue { ptr, i32 } %382, 1
  store i32 %384, ptr %13, align 4
  br label %398

385:                                              ; preds = %354, %347, %341, %339
  %386 = landingpad { ptr, i32 }
          cleanup
  %387 = extractvalue { ptr, i32 } %386, 0
  store ptr %387, ptr %12, align 8
  %388 = extractvalue { ptr, i32 } %386, 1
  store i32 %388, ptr %13, align 4
  br label %397

389:                                              ; preds = %373, %364
  %390 = landingpad { ptr, i32 }
          cleanup
  %391 = extractvalue { ptr, i32 } %390, 0
  store ptr %391, ptr %12, align 8
  %392 = extractvalue { ptr, i32 } %390, 1
  store i32 %392, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 40, ptr %48) #7
  br label %397

393:                                              ; preds = %380, %359
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %43) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %43) #7
  br label %394

394:                                              ; preds = %393
  %395 = call ptr @_ZNSt14_List_iteratorI11candidate_tEppEi(ptr noundef nonnull align 8 dereferenceable(8) %41, i32 noundef 0) #7
  %396 = getelementptr inbounds %"struct.std::_List_iterator.41", ptr %49, i32 0, i32 0
  store ptr %395, ptr %396, align 8
  br label %331, !llvm.loop !38

397:                                              ; preds = %389, %385
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %43) #7
  br label %398

398:                                              ; preds = %397, %381
  call void @llvm.lifetime.end.p0(i64 32, ptr %43) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #7
  br label %459

399:                                              ; preds = %335
  %400 = call noundef i64 @_ZNKSt6vectorI17valid_candidate_tSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #7
  %401 = icmp eq i64 %400, 0
  br i1 %401, label %402, label %427

402:                                              ; preds = %399
  call void @llvm.lifetime.start.p0(i64 16, ptr %50) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #7
  %403 = call ptr @_ZNSt7__cxx114listI7HistorySaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z12history_listB5cxx11) #7
  %404 = getelementptr inbounds %"struct.std::_List_iterator", ptr %51, i32 0, i32 0
  store ptr %403, ptr %404, align 8
  %405 = call noundef ptr @_ZNKSt14_List_iteratorI7HistoryEptEv(ptr noundef nonnull align 8 dereferenceable(8) %51) #7
  %406 = getelementptr inbounds %struct.History, ptr %405, i32 0, i32 2
  %407 = load double, ptr %406, align 8, !tbaa !23
  %408 = load double, ptr %14, align 8, !tbaa !5
  %409 = fsub double %407, %408
  %410 = call { i64, i64 } @_Z18get_timespec_afterd(double noundef %409)
  %411 = getelementptr inbounds { i64, i64 }, ptr %50, i32 0, i32 0
  %412 = extractvalue { i64, i64 } %410, 0
  store i64 %412, ptr %411, align 8
  %413 = getelementptr inbounds { i64, i64 }, ptr %50, i32 0, i32 1
  %414 = extractvalue { i64, i64 } %410, 1
  store i64 %414, ptr %413, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #7
  %415 = getelementptr inbounds %struct.timespec, ptr %50, i32 0, i32 0
  %416 = load i64, ptr %415, align 8, !tbaa !39
  %417 = getelementptr inbounds %struct.timespec, ptr %50, i32 0, i32 1
  %418 = load i64, ptr %417, align 8, !tbaa !41
  %419 = sdiv i64 %418, 1000000
  invoke void (ptr, ...) @_Z5DEBUGPKcz(ptr noundef @.str.17, i64 noundef %416, i64 noundef %419)
          to label %420 unwind label %423

420:                                              ; preds = %402
  %421 = invoke i32 @pthread_cond_timedwait(ptr noundef @candidate_cond, ptr noundef @candidate_mutex, ptr noundef %50)
          to label %422 unwind label %423

422:                                              ; preds = %420
  store i32 2, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %50) #7
  br label %458

423:                                              ; preds = %420, %402
  %424 = landingpad { ptr, i32 }
          cleanup
  %425 = extractvalue { ptr, i32 } %424, 0
  store ptr %425, ptr %12, align 8
  %426 = extractvalue { ptr, i32 } %424, 1
  store i32 %426, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %50) #7
  br label %459

427:                                              ; preds = %399
  %428 = call ptr @_ZNSt6vectorI17valid_candidate_tSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #7
  %429 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.42", ptr %52, i32 0, i32 0
  store ptr %428, ptr %429, align 8
  %430 = call ptr @_ZNSt6vectorI17valid_candidate_tSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #7
  %431 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.42", ptr %53, i32 0, i32 0
  store ptr %430, ptr %431, align 8
  %432 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.42", ptr %52, i32 0, i32 0
  %433 = load ptr, ptr %432, align 8
  %434 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.42", ptr %53, i32 0, i32 0
  %435 = load ptr, ptr %434, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP17valid_candidate_tSt6vectorIS2_SaIS2_EEEEPFbRKS2_S9_EEvT_SC_T0_(ptr %433, ptr %435, ptr noundef @_Z13schd_priorityRK17valid_candidate_tS1_)
          to label %436 unwind label %448

436:                                              ; preds = %427
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %55) #7
  %437 = call ptr @_ZNSt6vectorI17valid_candidate_tSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #7
  %438 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.42", ptr %55, i32 0, i32 0
  store ptr %437, ptr %438, align 8
  %439 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP17valid_candidate_tSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %55) #7
  %440 = getelementptr inbounds %struct.valid_candidate_t, ptr %439, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %54, ptr align 8 %440, i64 8, i1 false), !tbaa.struct !37
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #7
  store i1 false, ptr %56, align 1
  %441 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNKSt14_List_iteratorI11candidate_tEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %54) #7
  invoke void @_ZN11candidate_tC2ERKS_(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(56) %441)
          to label %442 unwind label %452

442:                                              ; preds = %436
  call void @_ZNSt20_List_const_iteratorI11candidate_tEC2ERKSt14_List_iteratorIS0_E(ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef nonnull align 8 dereferenceable(8) %54) #7
  %443 = getelementptr inbounds %"struct.std::_List_const_iterator", ptr %57, i32 0, i32 0
  %444 = load ptr, ptr %443, align 8
  %445 = call ptr @_ZNSt7__cxx114listI11candidate_tSaIS1_EE5eraseESt20_List_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(24) @_Z10candidatesB5cxx11, ptr %444) #7
  %446 = getelementptr inbounds %"struct.std::_List_iterator.41", ptr %58, i32 0, i32 0
  store ptr %445, ptr %446, align 8
  store i1 true, ptr %56, align 1
  store i32 1, ptr %31, align 4
  %447 = load i1, ptr %56, align 1
  br i1 %447, label %457, label %456

448:                                              ; preds = %427
  %449 = landingpad { ptr, i32 }
          cleanup
  %450 = extractvalue { ptr, i32 } %449, 0
  store ptr %450, ptr %12, align 8
  %451 = extractvalue { ptr, i32 } %449, 1
  store i32 %451, ptr %13, align 4
  br label %459

452:                                              ; preds = %436
  %453 = landingpad { ptr, i32 }
          cleanup
  %454 = extractvalue { ptr, i32 } %453, 0
  store ptr %454, ptr %12, align 8
  %455 = extractvalue { ptr, i32 } %453, 1
  store i32 %455, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #7
  br label %459

456:                                              ; preds = %442
  call void @_ZN11candidate_tD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %0) #7
  br label %457

457:                                              ; preds = %456, %442
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #7
  br label %458

458:                                              ; preds = %457, %422
  call void @_ZNSt6vectorI17valid_candidate_tSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %40) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %40) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #7
  br label %461

459:                                              ; preds = %452, %448, %423, %398
  call void @_ZNSt6vectorI17valid_candidate_tSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %40) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %40) #7
  br label %460

460:                                              ; preds = %459, %306, %219
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #7
  br label %463

461:                                              ; preds = %458, %184
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  call void @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #7
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEdSt4lessIS5_ESaISt4pairIKS5_dEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  %462 = load i32, ptr %31, align 4
  switch i32 %462, label %472 [
    i32 1, label %466
    i32 2, label %59
  ]

463:                                              ; preds = %460, %179, %175
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #7
  br label %464

464:                                              ; preds = %463, %155, %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %465

465:                                              ; preds = %464, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  call void @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #7
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEdSt4lessIS5_ESaISt4pairIKS5_dEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  br label %467

466:                                              ; preds = %461
  ret void

467:                                              ; preds = %465
  %468 = load ptr, ptr %12, align 8
  %469 = load i32, ptr %13, align 4
  %470 = insertvalue { ptr, i32 } poison, ptr %468, 0
  %471 = insertvalue { ptr, i32 } %470, i32 %469, 1
  resume { ptr, i32 } %471

472:                                              ; preds = %461
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt7__cxx114listI7HistorySaIS1_EE9remove_ifIZ16select_candidatevE3$_0EEvT_"(ptr noundef nonnull align 8 dereferenceable(24), double) #5 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(40)) #5 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZZ16select_candidatevEN19container_timestampD2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3 align 2

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

declare i32 @printf(ptr noundef, ...) #4

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden ptr @"_ZSt7find_ifISt14_List_iteratorI7HistoryEZ16select_candidatevE3$_1ET_S4_S4_T0_"(ptr, ptr) #2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN11candidate_tD2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPZ16select_candidatevE19container_timestampSt6vectorIS2_SaIS2_EEEEZ16select_candidatevE3$_2EvT_S9_T0_"(ptr, ptr) #2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3absd(double noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32)) #5 align 2

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI17valid_candidate_tSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(40)) #5 align 2

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

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

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

declare i32 @pthread_cond_timedwait(ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP17valid_candidate_tSt6vectorIS2_SaIS2_EEEEPFbRKS2_S9_EEvT_SC_T0_(ptr, ptr, ptr noundef) #2

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

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

declare noundef zeroext i1 @_Z13schd_priorityRK17valid_candidate_tS1_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) #4

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { inlinehint 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 #4 = { "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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !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, !6, i64 0}
!12 = !{!"_ZTSZ16select_candidatevE3$_0", !6, i64 0}
!13 = !{i64 0, i64 8, !5}
!14 = !{!15, !15, i64 0}
!15 = !{!"any pointer", !7, i64 0}
!16 = !{!17, !6, i64 32}
!17 = !{!"_ZTS7History", !18, i64 0, !6, i64 32, !6, i64 40}
!18 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !19, i64 0, !20, i64 8, !7, i64 16}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !15, i64 0}
!20 = !{!"long", !7, i64 0}
!21 = !{!22, !6, i64 32}
!22 = !{!"_ZTSZ16select_candidatevE19container_timestamp", !18, i64 0, !6, i64 32}
!23 = !{!17, !6, i64 40}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = distinct !{!27, !25}
!28 = distinct !{!28, !25}
!29 = !{!30, !6, i64 0}
!30 = !{!"_ZTS17valid_candidate_t", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !31, i64 32}
!31 = !{!"_ZTSSt14_List_iteratorI11candidate_tE", !15, i64 0}
!32 = !{!30, !6, i64 8}
!33 = !{!30, !6, i64 16}
!34 = !{!35, !6, i64 48}
!35 = !{!"_ZTS11candidate_t", !10, i64 0, !18, i64 8, !10, i64 40, !6, i64 48}
!36 = !{!30, !6, i64 24}
!37 = !{i64 0, i64 8, !14}
!38 = distinct !{!38, !25}
!39 = !{!40, !20, i64 0}
!40 = !{!"_ZTS8timespec", !20, i64 0, !20, i64 8}
!41 = !{!40, !20, i64 8}


; 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::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<History, std::allocator<History>>::_List_impl" }
%"struct.std::__cxx11::_List_base<History, std::allocator<History>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"class.std::map.6" = type { %"class.std::_Rb_tree.7" }
%"class.std::_Rb_tree.7" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, ClientInfo *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, ClientInfo *>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, ClientInfo *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, ClientInfo *>>, std::less<std::__cxx11::basic_string<char>>>::_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::__cxx11::list.12" = type { %"class.std::__cxx11::_List_base.13" }
%"class.std::__cxx11::_List_base.13" = type { %"struct.std::__cxx11::_List_base<candidate_t, std::allocator<candidate_t>>::_List_impl" }
%"struct.std::__cxx11::_List_base<candidate_t, std::allocator<candidate_t>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%union.pthread_cond_t = type { %struct.__pthread_cond_s }
%struct.__pthread_cond_s = type { %union.__atomic_wide_counter, %union.__atomic_wide_counter, [2 x i32], [2 x i32], i32, i32, [2 x i32] }
%union.__atomic_wide_counter = type { i64 }
%struct.candidate_t = type { i32, %"class.std::__cxx11::basic_string", i32, double }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::map.18" = type { %"class.std::_Rb_tree.19" }
%"class.std::_Rb_tree.19" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, double>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, double>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, double>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, double>>, std::less<std::__cxx11::basic_string<char>>>::_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<container_timestamp, std::allocator<container_timestamp>>::_Vector_impl" }
%"struct.std::_Vector_base<container_timestamp, std::allocator<container_timestamp>>::_Vector_impl" = type { %"struct.std::_Vector_base<container_timestamp, std::allocator<container_timestamp>>::_Vector_impl_data" }
%"struct.std::_Vector_base<container_timestamp, std::allocator<container_timestamp>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.26" = type { %"struct.std::_Vector_base.27" }
%"struct.std::_Vector_base.27" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::_List_iterator" = type { ptr }
%struct.History = type { %"class.std::__cxx11::basic_string", double, double }
%struct.container_timestamp = type { %"class.std::__cxx11::basic_string", double }
%"class.__gnu_cxx::__normal_iterator.35" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.34" = type { ptr }
%"class.std::vector.36" = type { %"struct.std::_Vector_base.37" }
%"struct.std::_Vector_base.37" = type { %"struct.std::_Vector_base<valid_candidate_t, std::allocator<valid_candidate_t>>::_Vector_impl" }
%"struct.std::_Vector_base<valid_candidate_t, std::allocator<valid_candidate_t>>::_Vector_impl" = type { %"struct.std::_Vector_base<valid_candidate_t, std::allocator<valid_candidate_t>>::_Vector_impl_data" }
%"struct.std::_Vector_base<valid_candidate_t, std::allocator<valid_candidate_t>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::_List_iterator.41" = type { ptr }
%struct.valid_candidate_t = type { double, double, double, double, %"struct.std::_List_iterator.41" }
%struct.timespec = type { i64, i64 }
%"class.__gnu_cxx::__normal_iterator.42" = type { ptr }
%"struct.std::_List_const_iterator" = type { ptr }

@WINDOW_SIZE = external dso_local local_unnamed_addr global double, align 8
@verbosity = external dso_local local_unnamed_addr global i32, align 4
@_Z12history_listB5cxx11 = external dso_local global %"class.std::__cxx11::list", align 8
@_Z15client_info_mapB5cxx11 = external dso_local global %"class.std::map.6", align 8
@_Z10candidatesB5cxx11 = external dso_local global %"class.std::__cxx11::list.12", align 8
@candidate_mutex = external dso_local global %union.pthread_mutex_t, align 8
@candidate_cond = external dso_local global %union.pthread_cond_t, align 8
@.str.16 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [22 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, i64 } @_Z18get_timespec_afterd(double noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_Z14ms_since_startv() local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

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

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

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

declare void @_Z5DEBUGPKcz(ptr noundef, ...) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z16select_candidatev(ptr dead_on_unwind noalias writable sret(%struct.candidate_t) align 8 %0) local_unnamed_addr #5 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::map.18", align 8
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::vector.26", align 8
  %5 = alloca %"struct.std::_List_iterator", align 8
  %6 = alloca %"struct.std::_List_iterator", align 8
  %7 = alloca %struct.History, align 8
  %8 = alloca %struct.container_timestamp, align 8
  %9 = alloca %struct.container_timestamp, align 8
  %10 = alloca %"struct.std::_List_iterator", align 8
  %11 = alloca %"struct.std::_List_iterator", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.35", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator.34", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator.34", align 8
  %15 = alloca %"class.std::vector.36", align 8
  %16 = alloca %"struct.std::_List_iterator.41", align 8
  %17 = alloca %"struct.std::_List_iterator.41", align 8
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %struct.valid_candidate_t, align 8
  %20 = alloca %struct.timespec, align 8
  %21 = alloca %"struct.std::_List_iterator", align 8
  %22 = alloca %"struct.std::_List_iterator.41", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator.42", align 8
  %24 = alloca %"struct.std::_List_const_iterator", align 8
  %25 = getelementptr inbounds i8, ptr %8, i64 32
  %26 = getelementptr inbounds i8, ptr %7, i64 32
  %27 = getelementptr inbounds i8, ptr %9, i64 32
  %28 = getelementptr inbounds i8, ptr %7, i64 40
  %29 = getelementptr inbounds i8, ptr %19, i64 8
  %30 = getelementptr inbounds i8, ptr %19, i64 16
  %31 = getelementptr inbounds i8, ptr %19, i64 24
  %32 = getelementptr inbounds i8, ptr %19, i64 32
  %33 = getelementptr inbounds i8, ptr %20, i64 8
  br label %34

34:                                               ; preds = %245, %1
  %35 = load double, ptr @WINDOW_SIZE, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %2) #7
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEdSt4lessIS5_ESaISt4pairIKS5_dEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #7
  call void @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %36 = invoke noundef double @_Z14ms_since_startv()
          to label %37 unwind label %41

37:                                               ; preds = %34
  %38 = load double, ptr @WINDOW_SIZE, align 8, !tbaa !5
  %39 = fsub double %36, %38
  %40 = fcmp olt double %39, 0.000000e+00
  %.0 = select i1 %40, double %36, double %35
  invoke void @"_ZNSt7__cxx114listI7HistorySaIS1_EE9remove_ifIZ16select_candidatevE3$_0EEvT_"(ptr noundef nonnull align 8 dereferenceable(24) @_Z12history_listB5cxx11, double %39)
          to label %43 unwind label %50

41:                                               ; preds = %34
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

43:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %44 = call ptr @_ZNSt7__cxx114listI7HistorySaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z12history_listB5cxx11) #7
  store ptr %44, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %45 = call ptr @_ZNSt7__cxx114listI7HistorySaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z12history_listB5cxx11) #7
  store ptr %45, ptr %6, align 8
  %46 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorI7HistoryES3_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  br i1 %46, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %86, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %47 = call ptr @_ZNSt7__cxx114listI7HistorySaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z12history_listB5cxx11) #7
  %48 = call ptr @_ZNSt7__cxx114listI7HistorySaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z12history_listB5cxx11) #7
  %49 = invoke ptr @"_ZSt7find_ifISt14_List_iteratorI7HistoryEZ16select_candidatevE3$_1ET_S4_S4_T0_"(ptr %47, ptr %48)
          to label %91 unwind label %97

50:                                               ; preds = %37
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.lr.ph:                                           ; preds = %43, %86
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %7) #7
  %52 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt14_List_iteratorI7HistoryEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  invoke void @_ZN7HistoryC2ERKS_(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 8 dereferenceable(48) %52)
          to label %53 unwind label %72

53:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %8) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %54 unwind label %74

54:                                               ; preds = %53
  %55 = load double, ptr %26, align 8, !tbaa !9
  %56 = fneg double %55
  store double %56, ptr %25, align 8, !tbaa !15
  invoke void @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(40) %8)
          to label %57 unwind label %76

57:                                               ; preds = %54
  call void @_ZZ16select_candidatevEN19container_timestampD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %9) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %58 unwind label %79

58:                                               ; preds = %57
  %59 = load double, ptr %28, align 8, !tbaa !17
  store double %59, ptr %27, align 8, !tbaa !15
  invoke void @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(40) %9)
          to label %60 unwind label %81

60:                                               ; preds = %58
  call void @_ZZ16select_candidatevEN19container_timestampD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #7
  %61 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEdSt4lessIS5_ESaISt4pairIKS5_dEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %62 unwind label %84

62:                                               ; preds = %60
  store double 0.000000e+00, ptr %61, align 8, !tbaa !5
  %63 = load i32, ptr @verbosity, align 4, !tbaa !18
  %64 = icmp sgt i32 %63, 1
  br i1 %64, label %65, label %86

65:                                               ; preds = %62
  %66 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  %67 = load double, ptr %26, align 8, !tbaa !9
  %68 = fdiv double %67, 1.000000e+03
  %69 = load double, ptr %28, align 8, !tbaa !17
  %70 = fdiv double %69, 1.000000e+03
  %71 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, ptr noundef %66, double noundef %68, double noundef %70)
  br label %86

72:                                               ; preds = %.lr.ph
  %73 = landingpad { ptr, i32 }
          cleanup
  br label %90

74:                                               ; preds = %53
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %78

76:                                               ; preds = %54
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @_ZZ16select_candidatevEN19container_timestampD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #7
  br label %78

78:                                               ; preds = %76, %74
  %.pn88 = phi { ptr, i32 } [ %77, %76 ], [ %75, %74 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #7
  br label %89

79:                                               ; preds = %57
  %80 = landingpad { ptr, i32 }
          cleanup
  br label %83

81:                                               ; preds = %58
  %82 = landingpad { ptr, i32 }
          cleanup
  call void @_ZZ16select_candidatevEN19container_timestampD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #7
  br label %83

83:                                               ; preds = %81, %79
  %.pn90 = phi { ptr, i32 } [ %82, %81 ], [ %80, %79 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #7
  br label %89

84:                                               ; preds = %60
  %85 = landingpad { ptr, i32 }
          cleanup
  br label %89

86:                                               ; preds = %65, %62
  call void @_ZN7HistoryD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #7
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorI7HistoryEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  %88 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorI7HistoryES3_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  br i1 %88, label %.lr.ph, label %._crit_edge

89:                                               ; preds = %84, %83, %78
  %.pn92 = phi { ptr, i32 } [ %85, %84 ], [ %.pn90, %83 ], [ %.pn88, %78 ]
  call void @_ZN7HistoryD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #7
  br label %90

90:                                               ; preds = %89, %72
  %.pn92.pn = phi { ptr, i32 } [ %.pn92, %89 ], [ %73, %72 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %.loopexit.split-lp

91:                                               ; preds = %._crit_edge
  store ptr %49, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  %92 = call ptr @_ZNSt7__cxx114listI7HistorySaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z12history_listB5cxx11) #7
  store ptr %92, ptr %11, align 8
  %93 = call noundef zeroext i1 @_ZSteqRKSt14_List_iteratorI7HistoryES3_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br i1 %93, label %94, label %101

94:                                               ; preds = %91
  %95 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt7__cxx114listI11candidate_tSaIS1_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z10candidatesB5cxx11) #7
  invoke void @_ZN11candidate_tC2ERKS_(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(56) %95)
          to label %96 unwind label %99

96:                                               ; preds = %94
  call void @_ZNSt7__cxx114listI11candidate_tSaIS1_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z10candidatesB5cxx11) #7
  br label %245

97:                                               ; preds = %._crit_edge
  %98 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br label %.loopexit.split-lp

99:                                               ; preds = %94
  %100 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

101:                                              ; preds = %91
  %102 = call ptr @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %103 = call ptr @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  invoke void @"_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPZ16select_candidatevE19container_timestampSt6vectorIS2_SaIS2_EEEEZ16select_candidatevE3$_2EvT_S9_T0_"(ptr %102, ptr %103)
          to label %.preheader102 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp

.preheader102:                                    ; preds = %101
  %104 = call noundef i64 @_ZNKSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %.not = icmp eq i64 %104, 0
  br i1 %.not, label %._crit_edge111, label %.lr.ph110

.lr.ph110:                                        ; preds = %.preheader102, %112
  %indvars.iv = phi i64 [ %indvars.iv.next, %112 ], [ 0, %.preheader102 ]
  %105 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #7
  %106 = getelementptr inbounds i8, ptr %105, i64 32
  %107 = load double, ptr %106, align 8, !tbaa !15
  %108 = call noundef double @_ZSt3absd(double noundef %107)
  %109 = fcmp ugt double %108, %39
  br i1 %109, label %._crit_edge111.loopexit, label %110

110:                                              ; preds = %.lr.ph110
  %111 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #7
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(32) %111)
          to label %112 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit

.loopexit98:                                      ; preds = %120
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit:                      ; preds = %139
  %lpad.loopexit99 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp.loopexit:    ; preds = %110
  %lpad.loopexit103 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp: ; preds = %101
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

112:                                              ; preds = %110
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %113 = call noundef i64 @_ZNKSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %114 = icmp ugt i64 %113, %indvars.iv.next
  br i1 %114, label %.lr.ph110, label %._crit_edge111.loopexit, !llvm.loop !20

._crit_edge111.loopexit:                          ; preds = %.lr.ph110, %112
  %.058.lcssa.ph.in = phi i64 [ %indvars.iv.next, %112 ], [ %indvars.iv, %.lr.ph110 ]
  %.058.lcssa.ph = trunc i64 %.058.lcssa.ph.in to i32
  br label %._crit_edge111

._crit_edge111:                                   ; preds = %._crit_edge111.loopexit, %.preheader102
  %.058.lcssa = phi i32 [ 0, %.preheader102 ], [ %.058.lcssa.ph, %._crit_edge111.loopexit ]
  %115 = zext i32 %.058.lcssa to i64
  %116 = call noundef i64 @_ZNKSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %117 = icmp ugt i64 %116, %115
  br i1 %117, label %.preheader97, label %._crit_edge124

.preheader97:                                     ; preds = %._crit_edge111, %.loopexit
  %indvars.iv142 = phi i64 [ %indvars.iv.next143, %.loopexit ], [ %115, %._crit_edge111 ]
  %.1123 = phi i32 [ %155, %.loopexit ], [ %.058.lcssa, %._crit_edge111 ]
  %.073121 = phi double [ %159, %.loopexit ], [ %39, %._crit_edge111 ]
  %118 = call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %.not128 = icmp eq i64 %118, 0
  br i1 %.not128, label %._crit_edge118, label %.lr.ph117

.lr.ph117:                                        ; preds = %.preheader97
  %119 = sitofp i32 %.1123 to double
  br label %120

120:                                              ; preds = %.lr.ph117, %127
  %indvars.iv134 = phi i64 [ 0, %.lr.ph117 ], [ %indvars.iv.next135, %127 ]
  %121 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv142) #7
  %122 = getelementptr inbounds i8, ptr %121, i64 32
  %123 = load double, ptr %122, align 8, !tbaa !15
  %124 = call noundef double @_ZSt3absd(double noundef %123)
  %125 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv134) #7
  %126 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEdSt4lessIS5_ESaISt4pairIKS5_dEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(32) %125)
          to label %127 unwind label %.loopexit98

127:                                              ; preds = %120
  %128 = fsub double %124, %.073121
  %129 = fdiv double %128, %119
  %130 = load double, ptr %126, align 8, !tbaa !5
  %131 = fadd double %129, %130
  store double %131, ptr %126, align 8, !tbaa !5
  %indvars.iv.next135 = add nuw nsw i64 %indvars.iv134, 1
  %132 = call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %133 = icmp ugt i64 %132, %indvars.iv.next135
  br i1 %133, label %120, label %._crit_edge118, !llvm.loop !22

._crit_edge118:                                   ; preds = %127, %.preheader97
  %134 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv142) #7
  %135 = getelementptr inbounds i8, ptr %134, i64 32
  %136 = load double, ptr %135, align 8, !tbaa !15
  %137 = fcmp olt double %136, 0.000000e+00
  br i1 %137, label %139, label %.preheader

.preheader:                                       ; preds = %._crit_edge118
  %138 = call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %.not129 = icmp eq i64 %138, 0
  br i1 %.not129, label %.loopexit, label %.lr.ph120

139:                                              ; preds = %._crit_edge118
  %140 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv142) #7
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(32) %140)
          to label %.loopexit unwind label %.loopexit.split-lp.loopexit

141:                                              ; preds = %.lr.ph120
  %indvars.iv.next139 = add nuw nsw i64 %indvars.iv138, 1
  %142 = call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %143 = icmp ugt i64 %142, %indvars.iv.next139
  br i1 %143, label %.lr.ph120, label %.loopexit, !llvm.loop !23

.lr.ph120:                                        ; preds = %.preheader, %141
  %indvars.iv138 = phi i64 [ %indvars.iv.next139, %141 ], [ 0, %.preheader ]
  %144 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv138) #7
  %145 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv142) #7
  %146 = call noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32) %144, ptr noundef nonnull align 8 dereferenceable(32) %145) #7
  br i1 %146, label %147, label %141

147:                                              ; preds = %.lr.ph120
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  %148 = call ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  store ptr %148, ptr %14, align 8
  %149 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %14, i64 noundef %indvars.iv138) #7
  store ptr %149, ptr %13, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEC2IPS6_vEERKNS0_IT_SB_EE(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  %150 = load ptr, ptr %12, align 8
  %151 = invoke ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS5_S7_EE(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr %150)
          to label %152 unwind label %153

152:                                              ; preds = %147
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  br label %.loopexit

153:                                              ; preds = %147
  %154 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  br label %.loopexit.split-lp

.loopexit:                                        ; preds = %141, %152, %.preheader, %139
  %.sink = phi i32 [ 1, %139 ], [ -1, %.preheader ], [ -1, %152 ], [ -1, %141 ]
  %155 = add nsw i32 %.1123, %.sink
  %156 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv142) #7
  %157 = getelementptr inbounds i8, ptr %156, i64 32
  %158 = load double, ptr %157, align 8, !tbaa !15
  %159 = call noundef double @_ZSt3absd(double noundef %158)
  %indvars.iv.next143 = add nuw nsw i64 %indvars.iv142, 1
  %160 = call noundef i64 @_ZNKSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %161 = icmp ugt i64 %160, %indvars.iv.next143
  br i1 %161, label %.preheader97, label %._crit_edge124, !llvm.loop !24

._crit_edge124:                                   ; preds = %.loopexit, %._crit_edge111
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #7
  call void @_ZNSt6vectorI17valid_candidate_tSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #7
  %162 = call ptr @_ZNSt7__cxx114listI11candidate_tSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z10candidatesB5cxx11) #7
  store ptr %162, ptr %16, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #7
  %163 = call ptr @_ZNSt7__cxx114listI11candidate_tSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z10candidatesB5cxx11) #7
  store ptr %163, ptr %17, align 8
  %164 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorI11candidate_tES3_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  br i1 %164, label %.lr.ph126, label %._crit_edge127

._crit_edge127:                                   ; preds = %206, %._crit_edge124
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  %165 = call noundef i64 @_ZNKSt6vectorI17valid_candidate_tSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #7
  %166 = icmp eq i64 %165, 0
  br i1 %166, label %212, label %227

.lr.ph126:                                        ; preds = %._crit_edge124, %206
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %18) #7
  %167 = call noundef ptr @_ZNKSt14_List_iteratorI11candidate_tEptEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  %168 = getelementptr inbounds i8, ptr %167, i64 8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull align 8 dereferenceable(32) %168)
          to label %169 unwind label %200

169:                                              ; preds = %.lr.ph126
  %170 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP10ClientInfoSt4lessIS5_ESaISt4pairIKS5_S7_EEEixERSB_(ptr noundef nonnull align 8 dereferenceable(48) @_Z15client_info_mapB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %18)
          to label %171 unwind label %202

171:                                              ; preds = %169
  %172 = load ptr, ptr %170, align 8, !tbaa !25
  %173 = call noundef double @_ZN10ClientInfo16get_max_fractionEv(ptr noundef nonnull align 8 dereferenceable(160) %172)
  %174 = fmul double %.0, %173
  %175 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP10ClientInfoSt4lessIS5_ESaISt4pairIKS5_S7_EEEixERSB_(ptr noundef nonnull align 8 dereferenceable(48) @_Z15client_info_mapB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %18)
          to label %176 unwind label %202

176:                                              ; preds = %171
  %177 = load ptr, ptr %175, align 8, !tbaa !25
  %178 = call noundef double @_ZN10ClientInfo16get_min_fractionEv(ptr noundef nonnull align 8 dereferenceable(160) %177)
  %179 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEdSt4lessIS5_ESaISt4pairIKS5_dEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(32) %18)
          to label %180 unwind label %202

180:                                              ; preds = %176
  %181 = fmul double %.0, %178
  %182 = load double, ptr %179, align 8, !tbaa !5
  %183 = fsub double %181, %182
  %184 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEdSt4lessIS5_ESaISt4pairIKS5_dEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(32) %18)
          to label %185 unwind label %202

185:                                              ; preds = %180
  %186 = load double, ptr %184, align 8, !tbaa !5
  %187 = fsub double %174, %186
  %188 = fcmp ogt double %187, 0.000000e+00
  br i1 %188, label %189, label %206

189:                                              ; preds = %185
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %19) #7
  store double %183, ptr %19, align 8, !tbaa !26
  store double %187, ptr %29, align 8, !tbaa !29
  %190 = call noundef ptr @_ZNKSt14_List_iteratorI11candidate_tEptEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  %191 = getelementptr inbounds i8, ptr %190, i64 8
  %192 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEdSt4lessIS5_ESaISt4pairIKS5_dEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(32) %191)
          to label %193 unwind label %204

193:                                              ; preds = %189
  %194 = load double, ptr %192, align 8, !tbaa !5
  store double %194, ptr %30, align 8, !tbaa !30
  %195 = call noundef ptr @_ZNKSt14_List_iteratorI11candidate_tEptEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  %196 = getelementptr inbounds i8, ptr %195, i64 48
  %197 = load double, ptr %196, align 8, !tbaa !31
  store double %197, ptr %31, align 8, !tbaa !33
  %198 = load i64, ptr %16, align 8, !tbaa !25
  store i64 %198, ptr %32, align 8, !tbaa !25
  invoke void @_ZNSt6vectorI17valid_candidate_tSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(40) %19)
          to label %199 unwind label %204

199:                                              ; preds = %193
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %19) #7
  br label %206

200:                                              ; preds = %.lr.ph126
  %201 = landingpad { ptr, i32 }
          cleanup
  br label %211

202:                                              ; preds = %180, %176, %171, %169
  %203 = landingpad { ptr, i32 }
          cleanup
  br label %210

204:                                              ; preds = %193, %189
  %205 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %19) #7
  br label %210

206:                                              ; preds = %199, %185
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %18) #7
  %207 = call ptr @_ZNSt14_List_iteratorI11candidate_tEppEi(ptr noundef nonnull align 8 dereferenceable(8) %16, i32 noundef 0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #7
  %208 = call ptr @_ZNSt7__cxx114listI11candidate_tSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z10candidatesB5cxx11) #7
  store ptr %208, ptr %17, align 8
  %209 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorI11candidate_tES3_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  br i1 %209, label %.lr.ph126, label %._crit_edge127, !llvm.loop !34

210:                                              ; preds = %204, %202
  %.pn = phi { ptr, i32 } [ %205, %204 ], [ %203, %202 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  br label %211

211:                                              ; preds = %210, %200
  %.pn.pn = phi { ptr, i32 } [ %.pn, %210 ], [ %201, %200 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  br label %244

212:                                              ; preds = %._crit_edge127
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #7
  %213 = call ptr @_ZNSt7__cxx114listI7HistorySaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z12history_listB5cxx11) #7
  store ptr %213, ptr %21, align 8
  %214 = call noundef ptr @_ZNKSt14_List_iteratorI7HistoryEptEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #7
  %215 = getelementptr inbounds i8, ptr %214, i64 40
  %216 = load double, ptr %215, align 8, !tbaa !17
  %217 = fsub double %216, %39
  %218 = call { i64, i64 } @_Z18get_timespec_afterd(double noundef %217)
  %219 = extractvalue { i64, i64 } %218, 0
  store i64 %219, ptr %20, align 8
  %220 = extractvalue { i64, i64 } %218, 1
  store i64 %220, ptr %33, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #7
  %221 = sdiv i64 %220, 1000000
  invoke void (ptr, ...) @_Z5DEBUGPKcz(ptr noundef nonnull @.str.17, i64 noundef %219, i64 noundef %221)
          to label %222 unwind label %225

222:                                              ; preds = %212
  %223 = invoke i32 @pthread_cond_timedwait(ptr noundef nonnull @candidate_cond, ptr noundef nonnull @candidate_mutex, ptr noundef nonnull %20)
          to label %224 unwind label %225

224:                                              ; preds = %222
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #7
  br label %243

225:                                              ; preds = %222, %212
  %226 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #7
  br label %244

227:                                              ; preds = %._crit_edge127
  %228 = call ptr @_ZNSt6vectorI17valid_candidate_tSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #7
  %229 = call ptr @_ZNSt6vectorI17valid_candidate_tSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #7
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP17valid_candidate_tSt6vectorIS2_SaIS2_EEEEPFbRKS2_S9_EEvT_SC_T0_(ptr %228, ptr %229, ptr noundef nonnull @_Z13schd_priorityRK17valid_candidate_tS1_)
          to label %230 unwind label %239

230:                                              ; preds = %227
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #7
  %231 = call ptr @_ZNSt6vectorI17valid_candidate_tSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #7
  store ptr %231, ptr %23, align 8
  %232 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP17valid_candidate_tSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #7
  %233 = getelementptr inbounds i8, ptr %232, i64 32
  %234 = load i64, ptr %233, align 8, !tbaa !25
  store i64 %234, ptr %22, align 8, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #7
  %235 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNKSt14_List_iteratorI11candidate_tEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  invoke void @_ZN11candidate_tC2ERKS_(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(56) %235)
          to label %236 unwind label %241

236:                                              ; preds = %230
  call void @_ZNSt20_List_const_iteratorI11candidate_tEC2ERKSt14_List_iteratorIS0_E(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  %237 = load ptr, ptr %24, align 8
  %238 = call ptr @_ZNSt7__cxx114listI11candidate_tSaIS1_EE5eraseESt20_List_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(24) @_Z10candidatesB5cxx11, ptr %237) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #7
  br label %243

239:                                              ; preds = %227
  %240 = landingpad { ptr, i32 }
          cleanup
  br label %244

241:                                              ; preds = %230
  %242 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #7
  br label %244

243:                                              ; preds = %236, %224
  %.074 = phi i32 [ 2, %224 ], [ 1, %236 ]
  call void @_ZNSt6vectorI17valid_candidate_tSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #7
  br label %245

244:                                              ; preds = %241, %239, %225, %211
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %211 ], [ %226, %225 ], [ %242, %241 ], [ %240, %239 ]
  call void @_ZNSt6vectorI17valid_candidate_tSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #7
  br label %.loopexit.split-lp

245:                                              ; preds = %96, %243
  %.175 = phi i32 [ 1, %96 ], [ %.074, %243 ]
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  call void @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEdSt4lessIS5_ESaISt4pairIKS5_dEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #7
  %switch = icmp eq i32 %.175, 1
  br i1 %switch, label %246, label %34

.loopexit.split-lp:                               ; preds = %.loopexit98, %.loopexit.split-lp.loopexit.split-lp.loopexit, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp.loopexit, %50, %90, %153, %244, %99, %97, %41
  %.pn92.pn.pn.pn = phi { ptr, i32 } [ %42, %41 ], [ %.pn92.pn, %90 ], [ %51, %50 ], [ %100, %99 ], [ %98, %97 ], [ %154, %153 ], [ %.pn.pn.pn, %244 ], [ %lpad.loopexit, %.loopexit98 ], [ %lpad.loopexit99, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit103, %.loopexit.split-lp.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp ]
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  call void @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEdSt4lessIS5_ESaISt4pairIKS5_dEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #7
  resume { ptr, i32 } %.pn92.pn.pn.pn

246:                                              ; preds = %245
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt7__cxx114listI7HistorySaIS1_EE9remove_ifIZ16select_candidatevE3$_0EEvT_"(ptr noundef nonnull align 8 dereferenceable(24), double) local_unnamed_addr #5 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #5 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZZ16select_candidatevEN19container_timestampD2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEdSt4lessIS5_ESaISt4pairIKS5_dEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5 align 2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #6

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden ptr @"_ZSt7find_ifISt14_List_iteratorI7HistoryEZ16select_candidatevE3$_1ET_S4_S4_T0_"(ptr, ptr) local_unnamed_addr #2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPZ16select_candidatevE19container_timestampSt6vectorIS2_SaIS2_EEEEZ16select_candidatevE3$_2EvT_S9_T0_"(ptr, ptr) local_unnamed_addr #2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3absd(double noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5 align 2

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP10ClientInfoSt4lessIS5_ESaISt4pairIKS5_S7_EEEixERSB_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI17valid_candidate_tSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #5 align 2

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

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

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

declare i32 @pthread_cond_timedwait(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP17valid_candidate_tSt6vectorIS2_SaIS2_EEEEPFbRKS2_S9_EEvT_SC_T0_(ptr, ptr, ptr noundef) local_unnamed_addr #2

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

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

declare noundef zeroext i1 @_Z13schd_priorityRK17valid_candidate_tS1_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) #4

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZNSt6vectorIZ16select_candidatevE19container_timestampSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { inlinehint 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 #4 = { "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 = { 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 = { nofree 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 #7 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 32}
!10 = !{!"_ZTS7History", !11, i64 0, !6, i64 32, !6, i64 40}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !12, i64 0, !14, i64 8, !7, i64 16}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !13, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!16, !6, i64 32}
!16 = !{!"_ZTSZ16select_candidatevE19container_timestamp", !11, i64 0, !6, i64 32}
!17 = !{!10, !6, i64 40}
!18 = !{!19, !19, i64 0}
!19 = !{!"int", !7, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = distinct !{!23, !21}
!24 = distinct !{!24, !21}
!25 = !{!13, !13, i64 0}
!26 = !{!27, !6, i64 0}
!27 = !{!"_ZTS17valid_candidate_t", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !28, i64 32}
!28 = !{!"_ZTSSt14_List_iteratorI11candidate_tE", !13, i64 0}
!29 = !{!27, !6, i64 8}
!30 = !{!27, !6, i64 16}
!31 = !{!32, !6, i64 48}
!32 = !{!"_ZTS11candidate_t", !19, i64 0, !11, i64 8, !19, i64 40, !6, i64 48}
!33 = !{!27, !6, i64 24}
!34 = distinct !{!34, !21}


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