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

; 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::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" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%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] }
%struct.timespec = type { i64, i64 }
%"struct.std::_List_iterator.41" = type { ptr }

@_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.21 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [14 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: 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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10ClientInfo6RecordEd(ptr noundef nonnull align 8 dereferenceable(160), double noundef) #4 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; 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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z16select_candidatev(ptr dead_on_unwind noalias writable sret(%struct.candidate_t) align 8) #4

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN11candidate_tD2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #3 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 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)) #4 align 2

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

; 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: nounwind
declare i32 @pthread_mutex_lock(ptr noundef) #7

; Function Attrs: nounwind
declare i32 @pthread_mutex_unlock(ptr noundef) #7

declare noundef i64 @_Z16prepare_responsePc14comm_request_tiz(ptr noundef, i32 noundef, i32 noundef, ...) #5

declare i64 @send(i32 noundef, ptr noundef, i64 noundef, i32 noundef) #5

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_Z20schedule_daemon_funcPv(ptr noundef %0) #4 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca double, align 8
  %4 = alloca %struct.candidate_t, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca [40 x i8], align 16
  %8 = alloca %struct.timespec, align 8
  %9 = alloca i8, align 1
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca %"struct.std::_List_iterator.41", align 8
  %13 = alloca %"struct.std::_List_iterator.41", align 8
  %14 = alloca i32, align 4
  %15 = alloca %struct.candidate_t, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #8
  br label %16

16:                                               ; preds = %122, %1
  br label %17

17:                                               ; preds = %16
  %18 = call i32 @pthread_mutex_lock(ptr noundef @candidate_mutex) #8
  %19 = call noundef i64 @_ZNKSt7__cxx114listI11candidate_tSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z10candidatesB5cxx11) #8
  %20 = icmp ne i64 %19, 0
  br i1 %20, label %21, label %119

21:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 56, ptr %4) #8
  call void @_Z16select_candidatev(ptr dead_on_unwind writable sret(%struct.candidate_t) align 8 %4)
  %22 = getelementptr inbounds %struct.candidate_t, ptr %4, i32 0, i32 1
  %23 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %22) #8
  %24 = invoke noundef double @_Z14ms_since_startv()
          to label %25 unwind label %74

25:                                               ; preds = %21
  %26 = getelementptr inbounds %struct.candidate_t, ptr %4, i32 0, i32 3
  %27 = load double, ptr %26, align 8, !tbaa !9
  %28 = fsub double %24, %27
  invoke void (ptr, ...) @_Z5DEBUGPKcz(ptr noundef @.str.21, ptr noundef %23, double noundef %28)
          to label %29 unwind label %74

29:                                               ; preds = %25
  %30 = getelementptr inbounds %struct.candidate_t, ptr %4, i32 0, i32 1
  %31 = 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) %30)
          to label %32 unwind label %74

32:                                               ; preds = %29
  %33 = load ptr, ptr %31, align 8, !tbaa !5
  %34 = invoke noundef double @_ZN10ClientInfo9get_quotaEv(ptr noundef nonnull align 8 dereferenceable(160) %33)
          to label %35 unwind label %74

35:                                               ; preds = %32
  store double %34, ptr %3, align 8, !tbaa !16
  %36 = getelementptr inbounds %struct.candidate_t, ptr %4, i32 0, i32 1
  %37 = 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) %36)
          to label %38 unwind label %74

38:                                               ; preds = %35
  %39 = load ptr, ptr %37, align 8, !tbaa !5
  %40 = load double, ptr %3, align 8, !tbaa !16
  invoke void @_ZN10ClientInfo6RecordEd(ptr noundef nonnull align 8 dereferenceable(160) %39, double noundef %40)
          to label %41 unwind label %74

41:                                               ; preds = %38
  %42 = call i32 @pthread_mutex_unlock(ptr noundef @candidate_mutex) #8
  call void @llvm.lifetime.start.p0(i64 40, ptr %7) #8
  %43 = getelementptr inbounds [40 x i8], ptr %7, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %43, i8 0, i64 40, i1 false)
  %44 = getelementptr inbounds [40 x i8], ptr %7, i64 0, i64 0
  %45 = getelementptr inbounds %struct.candidate_t, ptr %4, i32 0, i32 2
  %46 = load i32, ptr %45, align 8, !tbaa !17
  %47 = load double, ptr %3, align 8, !tbaa !16
  %48 = invoke noundef i64 (ptr, i32, i32, ...) @_Z16prepare_responsePc14comm_request_tiz(ptr noundef %44, i32 noundef 0, i32 noundef %46, double noundef %47)
          to label %49 unwind label %78

49:                                               ; preds = %41
  %50 = getelementptr inbounds %struct.candidate_t, ptr %4, i32 0, i32 0
  %51 = load i32, ptr %50, align 8, !tbaa !18
  %52 = getelementptr inbounds [40 x i8], ptr %7, i64 0, i64 0
  %53 = invoke i64 @send(i32 noundef %51, ptr noundef %52, i64 noundef 40, i32 noundef 0)
          to label %54 unwind label %78

54:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #8
  %55 = load double, ptr %3, align 8, !tbaa !16
  %56 = call { i64, i64 } @_Z18get_timespec_afterd(double noundef %55)
  %57 = getelementptr inbounds { i64, i64 }, ptr %8, i32 0, i32 0
  %58 = extractvalue { i64, i64 } %56, 0
  store i64 %58, ptr %57, align 8
  %59 = getelementptr inbounds { i64, i64 }, ptr %8, i32 0, i32 1
  %60 = extractvalue { i64, i64 } %56, 1
  store i64 %60, ptr %59, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #8
  store i8 1, ptr %9, align 1, !tbaa !19
  %61 = call i32 @pthread_mutex_lock(ptr noundef @candidate_mutex) #8
  br label %62

62:                                               ; preds = %113, %54
  %63 = load i8, ptr %9, align 1, !tbaa !19, !range !21, !noundef !22
  %64 = trunc i8 %63 to i1
  br i1 %64, label %65, label %115

65:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  %66 = invoke i32 @pthread_cond_timedwait(ptr noundef @candidate_cond, ptr noundef @candidate_mutex, ptr noundef %8)
          to label %67 unwind label %82

67:                                               ; preds = %65
  store i32 %66, ptr %10, align 4, !tbaa !23
  %68 = load i32, ptr %10, align 4, !tbaa !23
  %69 = icmp eq i32 %68, 110
  br i1 %69, label %70, label %86

70:                                               ; preds = %67
  %71 = getelementptr inbounds %struct.candidate_t, ptr %4, i32 0, i32 1
  %72 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %71) #8
  invoke void (ptr, ...) @_Z5DEBUGPKcz(ptr noundef @.str.22, ptr noundef %72)
          to label %73 unwind label %82

73:                                               ; preds = %70
  store i8 0, ptr %9, align 1, !tbaa !19
  br label %113

74:                                               ; preds = %38, %35, %32, %29, %25, %21
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %5, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %6, align 4
  br label %118

78:                                               ; preds = %49, %41
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %5, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %6, align 4
  br label %117

82:                                               ; preds = %70, %65
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %5, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %6, align 4
  br label %114

86:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  store ptr @_Z10candidatesB5cxx11, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %87 = call ptr @_ZNSt7__cxx114listI11candidate_tSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z10candidatesB5cxx11) #8
  %88 = getelementptr inbounds %"struct.std::_List_iterator.41", ptr %12, i32 0, i32 0
  store ptr %87, ptr %88, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %89 = call ptr @_ZNSt7__cxx114listI11candidate_tSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z10candidatesB5cxx11) #8
  %90 = getelementptr inbounds %"struct.std::_List_iterator.41", ptr %13, i32 0, i32 0
  store ptr %89, ptr %90, align 8
  br label %91

91:                                               ; preds = %109, %86
  %92 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorI11candidate_tES3_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #8
  br i1 %92, label %94, label %93

93:                                               ; preds = %91
  store i32 6, ptr %14, align 4
  br label %111

94:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 56, ptr %15) #8
  %95 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNKSt14_List_iteratorI11candidate_tEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  invoke void @_ZN11candidate_tC2ERKS_(ptr noundef nonnull align 8 dereferenceable(56) %15, ptr noundef nonnull align 8 dereferenceable(56) %95)
          to label %96 unwind label %101

96:                                               ; preds = %94
  %97 = getelementptr inbounds %struct.candidate_t, ptr %15, i32 0, i32 1
  %98 = getelementptr inbounds %struct.candidate_t, ptr %4, i32 0, i32 1
  %99 = 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) %97, ptr noundef nonnull align 8 dereferenceable(32) %98) #8
  br i1 %99, label %100, label %105

100:                                              ; preds = %96
  store i8 0, ptr %9, align 1, !tbaa !19
  store i32 6, ptr %14, align 4
  br label %106

101:                                              ; preds = %94
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %5, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 56, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %114

105:                                              ; preds = %96
  store i32 0, ptr %14, align 4
  br label %106

106:                                              ; preds = %105, %100
  call void @_ZN11candidate_tD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %15) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %15) #8
  %107 = load i32, ptr %14, align 4
  switch i32 %107, label %111 [
    i32 0, label %108
  ]

108:                                              ; preds = %106
  br label %109

109:                                              ; preds = %108
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorI11candidate_tEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  br label %91

111:                                              ; preds = %106, %93
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %112

112:                                              ; preds = %111
  br label %113

113:                                              ; preds = %112, %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %62, !llvm.loop !24

114:                                              ; preds = %101, %82
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #8
  br label %117

115:                                              ; preds = %62
  %116 = call i32 @pthread_mutex_unlock(ptr noundef @candidate_mutex) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #8
  call void @_ZN11candidate_tD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %4) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %4) #8
  br label %122

117:                                              ; preds = %114, %78
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #8
  br label %118

118:                                              ; preds = %117, %74
  call void @_ZN11candidate_tD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %4) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  br label %123

119:                                              ; preds = %17
  call void (ptr, ...) @_Z5DEBUGPKcz(ptr noundef @.str.23)
  %120 = call i32 @pthread_cond_wait(ptr noundef @candidate_cond, ptr noundef @candidate_mutex)
  %121 = call i32 @pthread_mutex_unlock(ptr noundef @candidate_mutex) #8
  br label %122

122:                                              ; preds = %119, %115
  br label %16, !llvm.loop !26

123:                                              ; preds = %118
  %124 = load ptr, ptr %5, align 8
  %125 = load i32, ptr %6, align 4
  %126 = insertvalue { ptr, i32 } poison, ptr %124, 0
  %127 = insertvalue { ptr, i32 } %126, i32 %125, 1
  resume { ptr, i32 } %127
}

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

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

declare i32 @pthread_cond_wait(ptr noundef, ptr noundef) #5

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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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: write) }
attributes #7 = { 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 #8 = { nounwind }

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

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


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

%"class.std::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" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%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] }
%struct.timespec = type { i64, i64 }
%"struct.std::_List_iterator.41" = type { ptr }

@_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.21 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [14 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: 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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10ClientInfo6RecordEd(ptr noundef nonnull align 8 dereferenceable(160), double noundef) local_unnamed_addr #4 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; 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 nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z16select_candidatev(ptr dead_on_unwind noalias writable sret(%struct.candidate_t) align 8) local_unnamed_addr #4

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN11candidate_tD2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #3 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 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 #4 align 2

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

; 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: nounwind
declare i32 @pthread_mutex_lock(ptr noundef) local_unnamed_addr #7

; Function Attrs: nounwind
declare i32 @pthread_mutex_unlock(ptr noundef) local_unnamed_addr #7

declare noundef i64 @_Z16prepare_responsePc14comm_request_tiz(ptr noundef, i32 noundef, i32 noundef, ...) local_unnamed_addr #5

declare i64 @send(i32 noundef, ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress noreturn uwtable
define dso_local noalias noundef nonnull ptr @_Z20schedule_daemon_funcPv(ptr nocapture noundef readnone %0) local_unnamed_addr #8 personality ptr @__gxx_personality_v0 {
  %2 = alloca %struct.candidate_t, align 8
  %3 = alloca [40 x i8], align 16
  %4 = alloca %struct.timespec, align 8
  %5 = alloca %"struct.std::_List_iterator.41", align 8
  %6 = alloca %"struct.std::_List_iterator.41", align 8
  %7 = alloca %struct.candidate_t, align 8
  %8 = getelementptr inbounds i8, ptr %2, i64 8
  %9 = getelementptr inbounds i8, ptr %2, i64 48
  %10 = getelementptr inbounds i8, ptr %2, i64 40
  %11 = getelementptr inbounds i8, ptr %4, i64 8
  %12 = getelementptr inbounds i8, ptr %7, i64 8
  br label %13

13:                                               ; preds = %.backedge22, %1
  %14 = call i32 @pthread_mutex_lock(ptr noundef nonnull @candidate_mutex) #9
  %15 = call noundef i64 @_ZNKSt7__cxx114listI11candidate_tSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z10candidatesB5cxx11) #9
  %.not = icmp eq i64 %15, 0
  br i1 %.not, label %69, label %16

16:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %2) #9
  call void @_Z16select_candidatev(ptr dead_on_unwind nonnull writable sret(%struct.candidate_t) align 8 %2)
  %17 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %8) #9
  %18 = invoke noundef double @_Z14ms_since_startv()
          to label %19 unwind label %48

19:                                               ; preds = %16
  %20 = load double, ptr %9, align 8, !tbaa !5
  %21 = fsub double %18, %20
  invoke void (ptr, ...) @_Z5DEBUGPKcz(ptr noundef nonnull @.str.21, ptr noundef %17, double noundef %21)
          to label %22 unwind label %48

22:                                               ; preds = %19
  %23 = 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) %8)
          to label %24 unwind label %48

24:                                               ; preds = %22
  %25 = load ptr, ptr %23, align 8, !tbaa !15
  %26 = invoke noundef double @_ZN10ClientInfo9get_quotaEv(ptr noundef nonnull align 8 dereferenceable(160) %25)
          to label %27 unwind label %48

27:                                               ; preds = %24
  %28 = 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) %8)
          to label %29 unwind label %48

29:                                               ; preds = %27
  %30 = load ptr, ptr %28, align 8, !tbaa !15
  invoke void @_ZN10ClientInfo6RecordEd(ptr noundef nonnull align 8 dereferenceable(160) %30, double noundef %26)
          to label %31 unwind label %48

31:                                               ; preds = %29
  %32 = call i32 @pthread_mutex_unlock(ptr noundef nonnull @candidate_mutex) #9
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %3) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %3, i8 0, i64 40, i1 false)
  %33 = load i32, ptr %10, align 8, !tbaa !16
  %34 = invoke noundef i64 (ptr, i32, i32, ...) @_Z16prepare_responsePc14comm_request_tiz(ptr noundef nonnull %3, i32 noundef 0, i32 noundef %33, double noundef %26)
          to label %35 unwind label %50

35:                                               ; preds = %31
  %36 = load i32, ptr %2, align 8, !tbaa !17
  %37 = invoke i64 @send(i32 noundef %36, ptr noundef nonnull %3, i64 noundef 40, i32 noundef 0)
          to label %38 unwind label %50

38:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #9
  %39 = call { i64, i64 } @_Z18get_timespec_afterd(double noundef %26)
  %40 = extractvalue { i64, i64 } %39, 0
  store i64 %40, ptr %4, align 8
  %41 = extractvalue { i64, i64 } %39, 1
  store i64 %41, ptr %11, align 8
  %42 = call i32 @pthread_mutex_lock(ptr noundef nonnull @candidate_mutex) #9
  br label %.backedge

.backedge:                                        ; preds = %.backedge.backedge, %38
  %43 = invoke i32 @pthread_cond_timedwait(ptr noundef nonnull @candidate_cond, ptr noundef nonnull @candidate_mutex, ptr noundef nonnull %4)
          to label %44 unwind label %.loopexit

44:                                               ; preds = %.backedge
  %45 = icmp eq i32 %43, 110
  br i1 %45, label %46, label %52

46:                                               ; preds = %44
  %47 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %8) #9
  invoke void (ptr, ...) @_Z5DEBUGPKcz(ptr noundef nonnull @.str.22, ptr noundef %47)
          to label %.thread unwind label %.loopexit.split-lp

48:                                               ; preds = %29, %27, %24, %22, %19, %16
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %68

50:                                               ; preds = %35, %31
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %67

.loopexit:                                        ; preds = %.backedge
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %65

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

52:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #9
  %53 = call ptr @_ZNSt7__cxx114listI11candidate_tSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z10candidatesB5cxx11) #9
  store ptr %53, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  %54 = call ptr @_ZNSt7__cxx114listI11candidate_tSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z10candidatesB5cxx11) #9
  store ptr %54, ptr %6, align 8
  %55 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorI11candidate_tES3_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #9
  br i1 %55, label %.lr.ph, label %64

.lr.ph:                                           ; preds = %52, %61
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %7) #9
  %56 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNKSt14_List_iteratorI11candidate_tEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #9
  invoke void @_ZN11candidate_tC2ERKS_(ptr noundef nonnull align 8 dereferenceable(56) %7, ptr noundef nonnull align 8 dereferenceable(56) %56)
          to label %57 unwind label %59

57:                                               ; preds = %.lr.ph
  %58 = 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) %12, ptr noundef nonnull align 8 dereferenceable(32) %8) #9
  call void @_ZN11candidate_tD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %7) #9
  br i1 %58, label %._crit_edge.loopexit.thread, label %61

._crit_edge.loopexit.thread:                      ; preds = %57
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  br label %.thread

59:                                               ; preds = %.lr.ph
  %60 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  br label %65

61:                                               ; preds = %57
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorI11candidate_tEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #9
  %63 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorI11candidate_tES3_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #9
  br i1 %63, label %.lr.ph, label %._crit_edge.loopexit

._crit_edge.loopexit:                             ; preds = %61
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  br label %.backedge.backedge

64:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  br label %.backedge.backedge

.backedge.backedge:                               ; preds = %64, %._crit_edge.loopexit
  br label %.backedge, !llvm.loop !18

65:                                               ; preds = %.loopexit, %.loopexit.split-lp, %59
  %.pn = phi { ptr, i32 } [ %60, %59 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #9
  br label %67

.thread:                                          ; preds = %._crit_edge.loopexit.thread, %46
  %66 = call i32 @pthread_mutex_unlock(ptr noundef nonnull @candidate_mutex) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #9
  call void @_ZN11candidate_tD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #9
  br label %.backedge22

67:                                               ; preds = %65, %50
  %.pn.pn = phi { ptr, i32 } [ %.pn, %65 ], [ %51, %50 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #9
  br label %68

68:                                               ; preds = %67, %48
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %67 ], [ %49, %48 ]
  call void @_ZN11candidate_tD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #9
  resume { ptr, i32 } %.pn.pn.pn

69:                                               ; preds = %13
  call void (ptr, ...) @_Z5DEBUGPKcz(ptr noundef nonnull @.str.23)
  %70 = call i32 @pthread_cond_wait(ptr noundef nonnull @candidate_cond, ptr noundef nonnull @candidate_mutex)
  %71 = call i32 @pthread_mutex_unlock(ptr noundef nonnull @candidate_mutex) #9
  br label %.backedge22

.backedge22:                                      ; preds = %69, %.thread
  br label %13, !llvm.loop !20
}

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

declare i32 @pthread_cond_wait(ptr noundef, ptr noundef) local_unnamed_addr #5

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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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 #8 = { mustprogress noreturn 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 #9 = { 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, !14, i64 48}
!6 = !{!"_ZTS11candidate_t", !7, i64 0, !10, i64 8, !7, i64 40, !14, i64 48}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !11, i64 0, !13, i64 8, !8, i64 16}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !12, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!"long", !8, i64 0}
!14 = !{!"double", !8, i64 0}
!15 = !{!12, !12, i64 0}
!16 = !{!6, !7, i64 40}
!17 = !{!6, !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass