; LLVM IR from chensoft/libsocket :: src/core/reactor.ll (ZN4chen7reactor6updateEv)

; 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::chrono::duration" = type { i64 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::chrono::time_point" = type { %"class.std::chrono::duration" }
%"class.__gnu_cxx::__normal_iterator.13" = type { ptr }
%"class.chen::reactor" = type { i32, %"class.std::unordered_set", %"class.chen::ev_event", i8, %"class.std::vector", %"class.std::vector.5", %"class.std::queue" }
%"class.std::unordered_set" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.chen::ev_event" = type { %"class.chen::ev_handle.base", i8, %"class.std::function" }
%"class.chen::ev_handle.base" = type <{ %"class.chen::ev_base", i32 }>
%"class.chen::ev_base" = type { ptr, ptr, i32, i32 }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<chen::ev_timer *, std::allocator<chen::ev_timer *>>::_Vector_impl" }
%"struct.std::_Vector_base<chen::ev_timer *, std::allocator<chen::ev_timer *>>::_Vector_impl" = type { %"struct.std::_Vector_base<chen::ev_timer *, std::allocator<chen::ev_timer *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<chen::ev_timer *, std::allocator<chen::ev_timer *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<epoll_event, std::allocator<epoll_event>>::_Vector_impl" }
%"struct.std::_Vector_base<epoll_event, std::allocator<epoll_event>>::_Vector_impl" = type { %"struct.std::_Vector_base<epoll_event, std::allocator<epoll_event>>::_Vector_impl_data" }
%"struct.std::_Vector_base<epoll_event, std::allocator<epoll_event>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::pair<chen::ev_base *, int>, std::allocator<std::pair<chen::ev_base *, int>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::pair<chen::ev_base *, int>, std::allocator<std::pair<chen::ev_base *, int>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::pair<chen::ev_base *, int>, std::allocator<std::pair<chen::ev_base *, int>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::pair<chen::ev_base *, int>, std::allocator<std::pair<chen::ev_base *, int>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }

@__const._ZN4chen7reactor6updateEv.ret = external hidden unnamed_addr constant %"class.std::chrono::duration", align 8

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9__gnu_cxx17__normal_iteratorIPKPN4chen8ev_timerESt6vectorIS3_SaIS3_EEEC2IPS3_vEERKNS0_IT_S8_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 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) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local i64 @_ZNSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE3minEv() #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local i64 @_ZN4chen7reactor6updateEv(ptr noundef nonnull align 8 dereferenceable(264) %0) #2 align 2 {
  %2 = alloca %"class.std::chrono::duration", align 8
  %3 = alloca ptr, align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.std::chrono::time_point", align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"class.std::chrono::duration", align 8
  %19 = alloca %"class.std::chrono::duration", align 8
  %20 = alloca %"class.std::chrono::time_point", align 8
  %21 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %22 = load ptr, ptr %3, align 8
  %23 = getelementptr inbounds %"class.chen::reactor", ptr %22, i32 0, i32 4
  %24 = call noundef zeroext i1 @_ZNKSt6vectorIPN4chen8ev_timerESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #6
  br i1 %24, label %25, label %28

25:                                               ; preds = %1
  %26 = call i64 @_ZNSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE3minEv() #6
  %27 = getelementptr inbounds %"class.std::chrono::duration", ptr %2, i32 0, i32 0
  store i64 %26, ptr %27, align 8
  br label %129

28:                                               ; preds = %1
  %29 = getelementptr inbounds %"class.chen::reactor", ptr %22, i32 0, i32 3
  %30 = load i8, ptr %29, align 8, !tbaa !9, !range !38, !noundef !39
  %31 = trunc i8 %30 to i1
  br i1 %31, label %43, label %32

32:                                               ; preds = %28
  %33 = getelementptr inbounds %"class.chen::reactor", ptr %22, i32 0, i32 4
  %34 = call ptr @_ZNSt6vectorIPN4chen8ev_timerESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %33) #6
  %35 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %4, i32 0, i32 0
  store ptr %34, ptr %35, align 8
  %36 = getelementptr inbounds %"class.chen::reactor", ptr %22, i32 0, i32 4
  %37 = call ptr @_ZNSt6vectorIPN4chen8ev_timerESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #6
  %38 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %5, i32 0, i32 0
  store ptr %37, ptr %38, align 8
  %39 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %4, i32 0, i32 0
  %40 = load ptr, ptr %39, align 8
  %41 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %5, i32 0, i32 0
  %42 = load ptr, ptr %41, align 8
  call void @_ZSt9make_heapIN9__gnu_cxx17__normal_iteratorIPPN4chen8ev_timerESt6vectorIS4_SaIS4_EEEEPFbPKS3_SB_EEvT_SE_T0_(ptr %40, ptr %42, ptr noundef @_ZN12_GLOBAL__N_17compareEPKN4chen8ev_timerES3_)
  br label %43

43:                                               ; preds = %32, %28
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %2, ptr align 8 @__const._ZN4chen7reactor6updateEv.ret, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %44 = call i64 @_ZNSt6chrono3_V212steady_clock3nowEv() #6
  %45 = getelementptr inbounds %"class.std::chrono::time_point", ptr %6, i32 0, i32 0
  %46 = getelementptr inbounds %"class.std::chrono::duration", ptr %45, i32 0, i32 0
  store i64 %44, ptr %46, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %47 = getelementptr inbounds %"class.chen::reactor", ptr %22, i32 0, i32 4
  %48 = call noundef i64 @_ZNKSt6vectorIPN4chen8ev_timerESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %47) #6
  store i64 %48, ptr %7, align 8, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 0, ptr %8, align 8, !tbaa !40
  br label %49

49:                                               ; preds = %122, %43
  %50 = load i64, ptr %7, align 8, !tbaa !40
  %51 = load i64, ptr %8, align 8, !tbaa !40
  %52 = icmp ugt i64 %50, %51
  br i1 %52, label %53, label %123

53:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %54 = getelementptr inbounds %"class.chen::reactor", ptr %22, i32 0, i32 4
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN4chen8ev_timerESaIS2_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %54) #6
  %56 = load ptr, ptr %55, align 8, !tbaa !5
  store ptr %56, ptr %9, align 8, !tbaa !5
  %57 = load ptr, ptr %9, align 8, !tbaa !5
  %58 = call noundef zeroext i1 @_ZNK4chen8ev_timer6expireERKNSt6chrono10time_pointINS1_3_V212steady_clockENS1_8durationIlSt5ratioILl1ELl1000000000EEEEEE(ptr noundef nonnull align 8 dereferenceable(80) %57, ptr noundef nonnull align 8 dereferenceable(8) %6)
  br i1 %58, label %59, label %108

59:                                               ; preds = %53
  %60 = getelementptr inbounds %"class.chen::reactor", ptr %22, i32 0, i32 4
  %61 = call ptr @_ZNSt6vectorIPN4chen8ev_timerESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %60) #6
  %62 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %61, ptr %62, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %63 = getelementptr inbounds %"class.chen::reactor", ptr %22, i32 0, i32 4
  %64 = call ptr @_ZNSt6vectorIPN4chen8ev_timerESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %63) #6
  %65 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %64, ptr %65, align 8
  %66 = load i64, ptr %8, align 8, !tbaa !40
  %67 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN4chen8ev_timerESt6vectorIS3_SaIS3_EEEmiEl(ptr noundef nonnull align 8 dereferenceable(8) %12, i64 noundef %66) #6
  %68 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %67, ptr %68, align 8
  %69 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  %70 = load ptr, ptr %69, align 8
  %71 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  %72 = load ptr, ptr %71, align 8
  call void @_ZSt8pop_heapIN9__gnu_cxx17__normal_iteratorIPPN4chen8ev_timerESt6vectorIS4_SaIS4_EEEEPFbPKS3_SB_EEvT_SE_T0_(ptr %70, ptr %72, ptr noundef @_ZN12_GLOBAL__N_17compareEPKN4chen8ev_timerES3_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  %73 = load ptr, ptr %9, align 8, !tbaa !5
  %74 = call noundef i32 @_ZNK4chen8ev_timer4flagEv(ptr noundef nonnull align 8 dereferenceable(80) %73)
  %75 = icmp eq i32 %74, 2
  br i1 %75, label %76, label %80

76:                                               ; preds = %59
  %77 = load i64, ptr %8, align 8, !tbaa !40
  %78 = add i64 %77, 1
  store i64 %78, ptr %8, align 8, !tbaa !40
  %79 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN4chen8ev_timer6updateERKNSt6chrono10time_pointINS1_3_V212steady_clockENS1_8durationIlSt5ratioILl1ELl1000000000EEEEEE(ptr noundef nonnull align 8 dereferenceable(80) %79, ptr noundef nonnull align 8 dereferenceable(8) %6)
  br label %100

80:                                               ; preds = %59
  %81 = load i64, ptr %7, align 8, !tbaa !40
  %82 = add i64 %81, -1
  store i64 %82, ptr %7, align 8, !tbaa !40
  %83 = load ptr, ptr %9, align 8, !tbaa !5
  %84 = load ptr, ptr %83, align 8, !tbaa !41
  %85 = getelementptr inbounds ptr, ptr %84, i64 3
  %86 = load ptr, ptr %85, align 8
  call void %86(ptr noundef nonnull align 8 dereferenceable(24) %83)
  %87 = getelementptr inbounds %"class.chen::reactor", ptr %22, i32 0, i32 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %88 = getelementptr inbounds %"class.chen::reactor", ptr %22, i32 0, i32 4
  %89 = call ptr @_ZNSt6vectorIPN4chen8ev_timerESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %88) #6
  %90 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  store ptr %89, ptr %90, align 8
  %91 = load i64, ptr %8, align 8, !tbaa !40
  %92 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN4chen8ev_timerESt6vectorIS3_SaIS3_EEEmiEl(ptr noundef nonnull align 8 dereferenceable(8) %16, i64 noundef %91) #6
  %93 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %92, ptr %93, align 8
  %94 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN4chen8ev_timerESt6vectorIS3_SaIS3_EEEmiEl(ptr noundef nonnull align 8 dereferenceable(8) %15, i64 noundef 1) #6
  %95 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %94, ptr %95, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKPN4chen8ev_timerESt6vectorIS3_SaIS3_EEEC2IPS3_vEERKNS0_IT_S8_EE(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  %96 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %13, i32 0, i32 0
  %97 = load ptr, ptr %96, align 8
  %98 = call ptr @_ZNSt6vectorIPN4chen8ev_timerESaIS2_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS2_S4_EE(ptr noundef nonnull align 8 dereferenceable(24) %87, ptr %97)
  %99 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %98, ptr %99, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %100

100:                                              ; preds = %80, %76
  %101 = call noundef i64 @_ZNKSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %102 = icmp ne i64 %101, 0
  br i1 %102, label %103, label %106

103:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %104 = call i64 @_ZNSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE4zeroEv() #6
  %105 = getelementptr inbounds %"class.std::chrono::duration", ptr %18, i32 0, i32 0
  store i64 %104, ptr %105, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %2, ptr align 8 %18, i64 8, i1 false), !tbaa.struct !43
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %106

106:                                              ; preds = %103, %100
  %107 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN4chen7reactor4postEPNS_8ev_timerE(ptr noundef nonnull align 8 dereferenceable(264) %22, ptr noundef %107)
  br label %119

108:                                              ; preds = %53
  %109 = call noundef i64 @_ZNKSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %110 = icmp ne i64 %109, 0
  br i1 %110, label %111, label %118

111:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  %113 = call i64 @_ZNK4chen8ev_timer4whenEv(ptr noundef nonnull align 8 dereferenceable(80) %112)
  %114 = getelementptr inbounds %"class.std::chrono::time_point", ptr %20, i32 0, i32 0
  %115 = getelementptr inbounds %"class.std::chrono::duration", ptr %114, i32 0, i32 0
  store i64 %113, ptr %115, align 8
  %116 = call i64 @_ZNSt6chronomiINS_3_V212steady_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEES6_EENSt11common_typeIJT0_T1_EE4typeERKNS_10time_pointIT_S8_EERKNSC_ISD_S9_EE(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %117 = getelementptr inbounds %"class.std::chrono::duration", ptr %19, i32 0, i32 0
  store i64 %116, ptr %117, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %2, ptr align 8 %19, i64 8, i1 false), !tbaa.struct !43
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %118

118:                                              ; preds = %111, %108
  store i32 3, ptr %21, align 4
  br label %120

119:                                              ; preds = %106
  store i32 0, ptr %21, align 4
  br label %120

120:                                              ; preds = %119, %118
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  %121 = load i32, ptr %21, align 4
  switch i32 %121, label %132 [
    i32 0, label %122
    i32 3, label %123
  ]

122:                                              ; preds = %120
  br label %49, !llvm.loop !44

123:                                              ; preds = %120, %49
  %124 = load i64, ptr %8, align 8, !tbaa !40
  %125 = icmp ne i64 %124, 0
  %126 = xor i1 %125, true
  %127 = getelementptr inbounds %"class.chen::reactor", ptr %22, i32 0, i32 3
  %128 = zext i1 %126 to i8
  store i8 %128, ptr %127, align 8, !tbaa !9
  store i32 1, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %129

129:                                              ; preds = %123, %25
  %130 = getelementptr inbounds %"class.std::chrono::duration", ptr %2, i32 0, i32 0
  %131 = load i64, ptr %130, align 8
  ret i64 %131

132:                                              ; preds = %120
  unreachable
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_17compareEPKN4chen8ev_timerES3_(ptr noundef, ptr noundef) #4

; Function Attrs: nounwind
declare i64 @_ZNSt6chrono3_V212steady_clock3nowEv() #5

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4chen8ev_timer6expireERKNSt6chrono10time_pointINS1_3_V212steady_clockENS1_8durationIlSt5ratioILl1ELl1000000000EEEEEE(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local i64 @_ZNSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE4zeroEv() #1 align 2

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !21, i64 128}
!10 = !{!"_ZTSN4chen7reactorE", !11, i64 0, !12, i64 8, !18, i64 64, !21, i64 128, !24, i64 136, !28, i64 160, !32, i64 184}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSSt13unordered_setIPN4chen9ev_handleESt4hashIS2_ESt8equal_toIS2_ESaIS2_EE", !13, i64 0}
!13 = !{!"_ZTSSt10_HashtableIPN4chen9ev_handleES2_SaIS2_ENSt8__detail9_IdentityESt8equal_toIS2_ESt4hashIS2_ENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb1ELb1EEEE", !6, i64 0, !14, i64 8, !15, i64 16, !14, i64 24, !16, i64 32, !6, i64 48}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!16 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !17, i64 0, !14, i64 8}
!17 = !{!"float", !7, i64 0}
!18 = !{!"_ZTSN4chen8ev_eventE", !19, i64 0, !21, i64 28, !22, i64 32}
!19 = !{!"_ZTSN4chen9ev_handleE", !20, i64 0, !11, i64 24}
!20 = !{!"_ZTSN4chen7ev_baseE", !6, i64 8, !11, i64 16, !11, i64 20}
!21 = !{!"bool", !7, i64 0}
!22 = !{!"_ZTSSt8functionIFvvEE", !23, i64 0, !6, i64 24}
!23 = !{!"_ZTSSt14_Function_base", !7, i64 0, !6, i64 16}
!24 = !{!"_ZTSSt6vectorIPN4chen8ev_timerESaIS2_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseIPN4chen8ev_timerESaIS2_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIPN4chen8ev_timerESaIS2_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIPN4chen8ev_timerESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!28 = !{!"_ZTSSt6vectorI11epoll_eventSaIS0_EE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseI11epoll_eventSaIS0_EE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseI11epoll_eventSaIS0_EE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseI11epoll_eventSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!32 = !{!"_ZTSSt5queueISt4pairIPN4chen7ev_baseEiESt5dequeIS4_SaIS4_EEE", !33, i64 0}
!33 = !{!"_ZTSSt5dequeISt4pairIPN4chen7ev_baseEiESaIS4_EE", !34, i64 0}
!34 = !{!"_ZTSSt11_Deque_baseISt4pairIPN4chen7ev_baseEiESaIS4_EE", !35, i64 0}
!35 = !{!"_ZTSNSt11_Deque_baseISt4pairIPN4chen7ev_baseEiESaIS4_EE11_Deque_implE", !36, i64 0}
!36 = !{!"_ZTSNSt11_Deque_baseISt4pairIPN4chen7ev_baseEiESaIS4_EE16_Deque_impl_dataE", !6, i64 0, !14, i64 8, !37, i64 16, !37, i64 48}
!37 = !{!"_ZTSSt15_Deque_iteratorISt4pairIPN4chen7ev_baseEiERS4_PS4_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!38 = !{i8 0, i8 2}
!39 = !{}
!40 = !{!14, !14, i64 0}
!41 = !{!42, !42, i64 0}
!42 = !{!"vtable pointer", !8, i64 0}
!43 = !{i64 0, i64 8, !40}
!44 = distinct !{!44, !45}
!45 = !{!"llvm.loop.mustprogress"}


; 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::chrono::duration" = type { i64 }
%"class.std::chrono::time_point" = type { %"class.std::chrono::duration" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.13" = type { ptr }

@__const._ZN4chen7reactor6updateEv.ret = external hidden unnamed_addr constant %"class.std::chrono::duration", align 8

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local i64 @_ZNSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE3minEv() local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local i64 @_ZN4chen7reactor6updateEv(ptr noundef nonnull align 8 dereferenceable(264) %0) local_unnamed_addr #2 align 2 {
  %2 = alloca %"class.std::chrono::duration", align 8
  %3 = alloca %"class.std::chrono::time_point", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.std::chrono::time_point", align 8
  %10 = getelementptr inbounds i8, ptr %0, i64 136
  %11 = tail call noundef zeroext i1 @_ZNKSt6vectorIPN4chen8ev_timerESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  br i1 %11, label %12, label %14

12:                                               ; preds = %1
  %13 = tail call i64 @_ZNSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE3minEv() #5
  br label %58

14:                                               ; preds = %1
  %15 = getelementptr inbounds i8, ptr %0, i64 128
  %16 = load i8, ptr %15, align 8, !tbaa !5, !range !37, !noundef !38
  %17 = trunc nuw i8 %16 to i1
  br i1 %17, label %21, label %18

18:                                               ; preds = %14
  %19 = tail call ptr @_ZNSt6vectorIPN4chen8ev_timerESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  %20 = tail call ptr @_ZNSt6vectorIPN4chen8ev_timerESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  tail call void @_ZSt9make_heapIN9__gnu_cxx17__normal_iteratorIPPN4chen8ev_timerESt6vectorIS4_SaIS4_EEEEPFbPKS3_SB_EEvT_SE_T0_(ptr %19, ptr %20, ptr noundef nonnull @_ZN12_GLOBAL__N_17compareEPKN4chen8ev_timerES3_)
  br label %21

21:                                               ; preds = %18, %14
  %22 = load i64, ptr @__const._ZN4chen7reactor6updateEv.ret, align 8
  store i64 %22, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %23 = tail call i64 @_ZNSt6chrono3_V212steady_clock3nowEv() #5
  store i64 %23, ptr %3, align 8
  %24 = tail call noundef i64 @_ZNKSt6vectorIPN4chen8ev_timerESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  %.not34 = icmp eq i64 %24, 0
  br i1 %.not34, label %.thread, label %.lr.ph

.lr.ph:                                           ; preds = %21, %55
  %.02033 = phi i64 [ %.1, %55 ], [ %24, %21 ]
  %.02132 = phi i64 [ %.122, %55 ], [ 0, %21 ]
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN4chen8ev_timerESaIS2_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  %26 = load ptr, ptr %25, align 8, !tbaa !39
  %27 = call noundef zeroext i1 @_ZNK4chen8ev_timer6expireERKNSt6chrono10time_pointINS1_3_V212steady_clockENS1_8durationIlSt5ratioILl1ELl1000000000EEEEEE(ptr noundef nonnull align 8 dereferenceable(80) %26, ptr noundef nonnull align 8 dereferenceable(8) %3)
  br i1 %27, label %28, label %50

28:                                               ; preds = %.lr.ph
  %29 = call ptr @_ZNSt6vectorIPN4chen8ev_timerESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %30 = call ptr @_ZNSt6vectorIPN4chen8ev_timerESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  store ptr %30, ptr %4, align 8
  %31 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN4chen8ev_timerESt6vectorIS3_SaIS3_EEEmiEl(ptr noundef nonnull align 8 dereferenceable(8) %4, i64 noundef %.02132) #5
  call void @_ZSt8pop_heapIN9__gnu_cxx17__normal_iteratorIPPN4chen8ev_timerESt6vectorIS4_SaIS4_EEEEPFbPKS3_SB_EEvT_SE_T0_(ptr %29, ptr %31, ptr noundef nonnull @_ZN12_GLOBAL__N_17compareEPKN4chen8ev_timerES3_)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  %32 = call noundef i32 @_ZNK4chen8ev_timer4flagEv(ptr noundef nonnull align 8 dereferenceable(80) %26)
  %33 = icmp eq i32 %32, 2
  br i1 %33, label %34, label %36

34:                                               ; preds = %28
  %35 = add nuw i64 %.02132, 1
  call void @_ZN4chen8ev_timer6updateERKNSt6chrono10time_pointINS1_3_V212steady_clockENS1_8durationIlSt5ratioILl1ELl1000000000EEEEEE(ptr noundef nonnull align 8 dereferenceable(80) %26, ptr noundef nonnull align 8 dereferenceable(8) %3)
  br label %46

36:                                               ; preds = %28
  %37 = add i64 %.02033, -1
  %38 = load ptr, ptr %26, align 8, !tbaa !40
  %39 = getelementptr inbounds i8, ptr %38, i64 24
  %40 = load ptr, ptr %39, align 8
  call void %40(ptr noundef nonnull align 8 dereferenceable(24) %26)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %41 = call ptr @_ZNSt6vectorIPN4chen8ev_timerESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  store ptr %41, ptr %8, align 8
  %42 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN4chen8ev_timerESt6vectorIS3_SaIS3_EEEmiEl(ptr noundef nonnull align 8 dereferenceable(8) %8, i64 noundef %.02132) #5
  store ptr %42, ptr %7, align 8
  %43 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN4chen8ev_timerESt6vectorIS3_SaIS3_EEEmiEl(ptr noundef nonnull align 8 dereferenceable(8) %7, i64 noundef 1) #5
  store ptr %43, ptr %6, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKPN4chen8ev_timerESt6vectorIS3_SaIS3_EEEC2IPS3_vEERKNS0_IT_S8_EE(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %44 = load ptr, ptr %5, align 8
  %45 = call ptr @_ZNSt6vectorIPN4chen8ev_timerESaIS2_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS2_S4_EE(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr %44)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %46

46:                                               ; preds = %36, %34
  %.122 = phi i64 [ %35, %34 ], [ %.02132, %36 ]
  %.1 = phi i64 [ %.02033, %34 ], [ %37, %36 ]
  %47 = call noundef i64 @_ZNKSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %.not24 = icmp eq i64 %47, 0
  br i1 %.not24, label %55, label %48

48:                                               ; preds = %46
  %49 = call i64 @_ZNSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE4zeroEv() #5
  store i64 %49, ptr %2, align 8, !tbaa !42
  br label %55

50:                                               ; preds = %.lr.ph
  %51 = call noundef i64 @_ZNKSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %.not = icmp eq i64 %51, 0
  br i1 %.not, label %.thread, label %52

52:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  %53 = call i64 @_ZNK4chen8ev_timer4whenEv(ptr noundef nonnull align 8 dereferenceable(80) %26)
  store i64 %53, ptr %9, align 8
  %54 = call i64 @_ZNSt6chronomiINS_3_V212steady_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEES6_EENSt11common_typeIJT0_T1_EE4typeERKNS_10time_pointIT_S8_EERKNSC_ISD_S9_EE(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %3)
  store i64 %54, ptr %2, align 8, !tbaa !42
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br label %.thread

55:                                               ; preds = %46, %48
  call void @_ZN4chen7reactor4postEPNS_8ev_timerE(ptr noundef nonnull align 8 dereferenceable(264) %0, ptr noundef nonnull %26)
  %56 = icmp ugt i64 %.1, %.122
  br i1 %56, label %.lr.ph, label %.thread

.thread:                                          ; preds = %55, %21, %50, %52
  %.02131 = phi i64 [ %.02132, %50 ], [ %.02132, %52 ], [ 0, %21 ], [ %.122, %55 ]
  %.not25 = icmp eq i64 %.02131, 0
  %57 = zext i1 %.not25 to i8
  store i8 %57, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  %.pre = load i64, ptr %2, align 8
  br label %58

58:                                               ; preds = %.thread, %12
  %59 = phi i64 [ %.pre, %.thread ], [ %13, %12 ]
  ret i64 %59
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4chen7reactor4postEPNS_8ev_timerE(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #2 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_17compareEPKN4chen8ev_timerES3_(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind
declare i64 @_ZNSt6chrono3_V212steady_clock3nowEv() local_unnamed_addr #4

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4chen8ev_timer6expireERKNSt6chrono10time_pointINS1_3_V212steady_clockENS1_8durationIlSt5ratioILl1ELl1000000000EEEEEE(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4chen8ev_timer6updateERKNSt6chrono10time_pointINS1_3_V212steady_clockENS1_8durationIlSt5ratioILl1ELl1000000000EEEEEE(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local i64 @_ZNSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE4zeroEv() local_unnamed_addr #1 align 2

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind "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 = { 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, !20, i64 128}
!6 = !{!"_ZTSN4chen7reactorE", !7, i64 0, !10, i64 8, !17, i64 64, !20, i64 128, !23, i64 136, !27, i64 160, !31, i64 184}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt13unordered_setIPN4chen9ev_handleESt4hashIS2_ESt8equal_toIS2_ESaIS2_EE", !11, i64 0}
!11 = !{!"_ZTSSt10_HashtableIPN4chen9ev_handleES2_SaIS2_ENSt8__detail9_IdentityESt8equal_toIS2_ESt4hashIS2_ENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb1ELb1EEEE", !12, i64 0, !13, i64 8, !14, i64 16, !13, i64 24, !15, i64 32, !12, i64 48}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!"long", !8, i64 0}
!14 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !12, i64 0}
!15 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !16, i64 0, !13, i64 8}
!16 = !{!"float", !8, i64 0}
!17 = !{!"_ZTSN4chen8ev_eventE", !18, i64 0, !20, i64 28, !21, i64 32}
!18 = !{!"_ZTSN4chen9ev_handleE", !19, i64 0, !7, i64 24}
!19 = !{!"_ZTSN4chen7ev_baseE", !12, i64 8, !7, i64 16, !7, i64 20}
!20 = !{!"bool", !8, i64 0}
!21 = !{!"_ZTSSt8functionIFvvEE", !22, i64 0, !12, i64 24}
!22 = !{!"_ZTSSt14_Function_base", !8, i64 0, !12, i64 16}
!23 = !{!"_ZTSSt6vectorIPN4chen8ev_timerESaIS2_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIPN4chen8ev_timerESaIS2_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIPN4chen8ev_timerESaIS2_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIPN4chen8ev_timerESaIS2_EE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!27 = !{!"_ZTSSt6vectorI11epoll_eventSaIS0_EE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseI11epoll_eventSaIS0_EE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseI11epoll_eventSaIS0_EE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseI11epoll_eventSaIS0_EE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!31 = !{!"_ZTSSt5queueISt4pairIPN4chen7ev_baseEiESt5dequeIS4_SaIS4_EEE", !32, i64 0}
!32 = !{!"_ZTSSt5dequeISt4pairIPN4chen7ev_baseEiESaIS4_EE", !33, i64 0}
!33 = !{!"_ZTSSt11_Deque_baseISt4pairIPN4chen7ev_baseEiESaIS4_EE", !34, i64 0}
!34 = !{!"_ZTSNSt11_Deque_baseISt4pairIPN4chen7ev_baseEiESaIS4_EE11_Deque_implE", !35, i64 0}
!35 = !{!"_ZTSNSt11_Deque_baseISt4pairIPN4chen7ev_baseEiESaIS4_EE16_Deque_impl_dataE", !12, i64 0, !13, i64 8, !36, i64 16, !36, i64 48}
!36 = !{!"_ZTSSt15_Deque_iteratorISt4pairIPN4chen7ev_baseEiERS4_PS4_E", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!37 = !{i8 0, i8 2}
!38 = !{}
!39 = !{!12, !12, i64 0}
!40 = !{!41, !41, i64 0}
!41 = !{!"vtable pointer", !9, i64 0}
!42 = !{!13, !13, i64 0}


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