; LLVM IR from dynexcoin/Dynex :: src/Platform/Linux/System (Timer)

; 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.std::chrono::duration.6" = type { i64 }
%struct.itimerspec = type { %struct.timespec, %struct.timespec }
%struct.timespec = type { i64, i64 }
%"struct.System::ContextPair" = type { ptr, ptr }
%"struct.System::OperationContext" = type { ptr, i8, i32 }
%struct.epoll_event = type <{ i32, %union.epoll_data }>
%union.epoll_data = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.10 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.10 = type { i64, [8 x i8] }
%class.anon = type { ptr }
%"class.System::Timer" = type <{ ptr, ptr, i32, [4 x i8] }>
%"struct.System::NativeContext" = type { ptr, ptr, i8, i8, ptr, ptr, ptr, ptr, %"class.std::function", %"class.std::function" }
%"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 } }

@.str.1 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [22 x i8], align 1
@__PRETTY_FUNCTION__._ZN6System5Timer5sleepENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE = external hidden unnamed_addr constant [52 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [19 x i8], align 1
@_ZTIN6System20InterruptedExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.5 = external hidden unnamed_addr constant [33 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@.str.6 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6System5Timer5sleepENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE(ptr noundef nonnull align 8 dereferenceable(20) %0, i64 %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::chrono::duration", align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::chrono::duration.6", align 8
  %6 = alloca %struct.itimerspec, align 8
  %7 = alloca %"class.std::chrono::duration", align 8
  %8 = alloca %"class.std::chrono::duration", align 8
  %9 = alloca %"struct.System::ContextPair", align 8
  %10 = alloca %"struct.System::OperationContext", align 8
  %11 = alloca %struct.epoll_event, align 1
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i1, align 1
  %17 = alloca %class.anon, align 8
  %18 = getelementptr inbounds %"class.std::chrono::duration", ptr %3, i32 0, i32 0
  store i64 %1, ptr %18, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  %19 = load ptr, ptr %4, align 8
  %20 = getelementptr inbounds %"class.System::Timer", ptr %19, i32 0, i32 0
  %21 = load ptr, ptr %20, align 8, !tbaa !9
  %22 = icmp ne ptr %21, null
  br i1 %22, label %23, label %24

23:                                               ; preds = %2
  br label %26

24:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 67, ptr noundef @__PRETTY_FUNCTION__._ZN6System5Timer5sleepENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE) #9
  unreachable

25:                                               ; No predecessors!
  br label %26

26:                                               ; preds = %25, %23
  %27 = getelementptr inbounds %"class.System::Timer", ptr %19, i32 0, i32 1
  %28 = load ptr, ptr %27, align 8, !tbaa !12
  %29 = icmp eq ptr %28, null
  br i1 %29, label %30, label %31

30:                                               ; preds = %26
  br label %33

31:                                               ; preds = %26
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 68, ptr noundef @__PRETTY_FUNCTION__._ZN6System5Timer5sleepENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE) #9
  unreachable

32:                                               ; No predecessors!
  br label %33

33:                                               ; preds = %32, %30
  %34 = getelementptr inbounds %"class.System::Timer", ptr %19, i32 0, i32 0
  %35 = load ptr, ptr %34, align 8, !tbaa !9
  %36 = call noundef zeroext i1 @_ZN6System10Dispatcher11interruptedEv(ptr noundef nonnull align 8 dereferenceable(424) %35)
  br i1 %36, label %37, label %39

37:                                               ; preds = %33
  %38 = call ptr @__cxa_allocate_exception(i64 8) #10
  call void @llvm.memset.p0.i64(ptr align 16 %38, i8 0, i64 8, i1 false)
  call void @_ZN6System20InterruptedExceptionC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %38) #10
  call void @__cxa_throw(ptr %38, ptr @_ZTIN6System20InterruptedExceptionE, ptr @_ZNSt9exceptionD2Ev) #11
  unreachable

39:                                               ; preds = %33
  %40 = call noundef i64 @_ZNKSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %41 = icmp eq i64 %40, 0
  br i1 %41, label %42, label %45

42:                                               ; preds = %39
  %43 = getelementptr inbounds %"class.System::Timer", ptr %19, i32 0, i32 0
  %44 = load ptr, ptr %43, align 8, !tbaa !9
  call void @_ZN6System10Dispatcher5yieldEv(ptr noundef nonnull align 8 dereferenceable(424) %44)
  br label %165

45:                                               ; preds = %39
  %46 = getelementptr inbounds %"class.System::Timer", ptr %19, i32 0, i32 0
  %47 = load ptr, ptr %46, align 8, !tbaa !9
  %48 = call noundef i32 @_ZN6System10Dispatcher8getTimerEv(ptr noundef nonnull align 8 dereferenceable(424) %47)
  %49 = getelementptr inbounds %"class.System::Timer", ptr %19, i32 0, i32 2
  store i32 %48, ptr %49, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #10
  %50 = call i64 @_ZNSt6chrono13duration_castINS_8durationIlSt5ratioILl1ELl1EEEElS2_ILl1ELl1000000000EEEENSt9enable_ifIXsr13__is_durationIT_EE5valueES7_E4typeERKNS1_IT0_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %51 = getelementptr inbounds %"class.std::chrono::duration.6", ptr %5, i32 0, i32 0
  store i64 %50, ptr %51, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #10
  %52 = getelementptr inbounds %struct.itimerspec, ptr %6, i32 0, i32 0
  %53 = getelementptr inbounds %struct.timespec, ptr %52, i32 0, i32 0
  store i64 0, ptr %53, align 8, !tbaa !14
  %54 = getelementptr inbounds %struct.itimerspec, ptr %6, i32 0, i32 0
  %55 = getelementptr inbounds %struct.timespec, ptr %54, i32 0, i32 1
  store i64 0, ptr %55, align 8, !tbaa !18
  %56 = call noundef i64 @_ZNKSt6chrono8durationIlSt5ratioILl1ELl1EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %57 = getelementptr inbounds %struct.itimerspec, ptr %6, i32 0, i32 1
  %58 = getelementptr inbounds %struct.timespec, ptr %57, i32 0, i32 0
  store i64 %56, ptr %58, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #10
  %59 = call i64 @_ZNSt6chronomiIlSt5ratioILl1ELl1000000000EElS1_ILl1ELl1EEEENSt11common_typeIJNS_8durationIT_T0_EENS5_IT1_T2_EEEE4typeERKS8_RKSB_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %60 = getelementptr inbounds %"class.std::chrono::duration", ptr %8, i32 0, i32 0
  store i64 %59, ptr %60, align 8
  %61 = call i64 @_ZNSt6chrono13duration_castINS_8durationIlSt5ratioILl1ELl1000000000EEEElS3_EENSt9enable_ifIXsr13__is_durationIT_EE5valueES6_E4typeERKNS1_IT0_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %8)
  %62 = getelementptr inbounds %"class.std::chrono::duration", ptr %7, i32 0, i32 0
  store i64 %61, ptr %62, align 8
  %63 = call noundef i64 @_ZNKSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %64 = getelementptr inbounds %struct.itimerspec, ptr %6, i32 0, i32 1
  %65 = getelementptr inbounds %struct.timespec, ptr %64, i32 0, i32 1
  store i64 %63, ptr %65, align 8, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #10
  %66 = getelementptr inbounds %"class.System::Timer", ptr %19, i32 0, i32 2
  %67 = load i32, ptr %66, align 8, !tbaa !13
  %68 = call i32 @timerfd_settime(i32 noundef %67, i32 noundef 0, ptr noundef %6, ptr noundef null) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #10
  %69 = getelementptr inbounds %"struct.System::OperationContext", ptr %10, i32 0, i32 1
  store i8 0, ptr %69, align 8, !tbaa !21
  %70 = getelementptr inbounds %"class.System::Timer", ptr %19, i32 0, i32 0
  %71 = load ptr, ptr %70, align 8, !tbaa !9
  %72 = call noundef ptr @_ZNK6System10Dispatcher17getCurrentContextEv(ptr noundef nonnull align 8 dereferenceable(424) %71)
  %73 = getelementptr inbounds %"struct.System::OperationContext", ptr %10, i32 0, i32 0
  store ptr %72, ptr %73, align 8, !tbaa !24
  %74 = getelementptr inbounds %"struct.System::ContextPair", ptr %9, i32 0, i32 1
  store ptr null, ptr %74, align 8, !tbaa !25
  %75 = getelementptr inbounds %"struct.System::ContextPair", ptr %9, i32 0, i32 0
  store ptr %10, ptr %75, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 12, ptr %11) #10
  %76 = getelementptr inbounds %struct.epoll_event, ptr %11, i32 0, i32 0
  store i32 1073741825, ptr %76, align 1, !tbaa !28
  %77 = getelementptr inbounds %struct.epoll_event, ptr %11, i32 0, i32 1
  store ptr %9, ptr %77, align 1, !tbaa !30
  %78 = getelementptr inbounds %"class.System::Timer", ptr %19, i32 0, i32 0
  %79 = load ptr, ptr %78, align 8, !tbaa !9
  %80 = call noundef i32 @_ZNK6System10Dispatcher8getEpollEv(ptr noundef nonnull align 8 dereferenceable(424) %79)
  %81 = getelementptr inbounds %"class.System::Timer", ptr %19, i32 0, i32 2
  %82 = load i32, ptr %81, align 8, !tbaa !13
  %83 = call i32 @epoll_ctl(i32 noundef %80, i32 noundef 3, i32 noundef %82, ptr noundef %11) #10
  %84 = icmp eq i32 %83, -1
  br i1 %84, label %85, label %107

85:                                               ; preds = %45
  store i1 true, ptr %16, align 1
  %86 = call ptr @__cxa_allocate_exception(i64 16) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #10
  invoke void @_ZN6System16lastErrorMessageB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %13)
          to label %87 unwind label %90

87:                                               ; preds = %85
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef @.str.5, ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %88 unwind label %94

88:                                               ; preds = %87
  invoke void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %86, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %89 unwind label %98

89:                                               ; preds = %88
  store i1 false, ptr %16, align 1
  invoke void @__cxa_throw(ptr %86, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #11
          to label %171 unwind label %98

90:                                               ; preds = %85
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %14, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %15, align 4
  br label %103

94:                                               ; preds = %87
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %14, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %15, align 4
  br label %102

98:                                               ; preds = %89, %88
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %14, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %15, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #10
  br label %102

102:                                              ; preds = %98, %94
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #10
  br label %103

103:                                              ; preds = %102, %90
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #10
  %104 = load i1, ptr %16, align 1
  br i1 %104, label %105, label %106

105:                                              ; preds = %103
  call void @__cxa_free_exception(ptr %86) #10
  br label %106

106:                                              ; preds = %105, %103
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #10
  br label %166

107:                                              ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #10
  %108 = getelementptr inbounds %class.anon, ptr %17, i32 0, i32 0
  store ptr %19, ptr %108, align 8, !tbaa !31
  %109 = getelementptr inbounds %"class.System::Timer", ptr %19, i32 0, i32 0
  %110 = load ptr, ptr %109, align 8, !tbaa !9
  %111 = call noundef ptr @_ZNK6System10Dispatcher17getCurrentContextEv(ptr noundef nonnull align 8 dereferenceable(424) %110)
  %112 = getelementptr inbounds %"struct.System::NativeContext", ptr %111, i32 0, i32 9
  %113 = call noundef nonnull align 8 dereferenceable(32) ptr @"_ZNSt8functionIFvvEEaSIZN6System5Timer5sleepENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEEE3$_0EENSt9enable_ifIXsrNS1_9_CallableIT_NSB_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISD_E4typeEE4typeES1_EE5valueESt5decayISD_EE4type4typeESt15__invoke_resultIRSO_JEEEE5valueERS1_E4typeEOSD_"(ptr noundef nonnull align 8 dereferenceable(32) %112, ptr noundef nonnull align 8 dereferenceable(8) %17) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #10
  %114 = getelementptr inbounds %"class.System::Timer", ptr %19, i32 0, i32 1
  store ptr %10, ptr %114, align 8, !tbaa !12
  %115 = getelementptr inbounds %"class.System::Timer", ptr %19, i32 0, i32 0
  %116 = load ptr, ptr %115, align 8, !tbaa !9
  call void @_ZN6System10Dispatcher8dispatchEv(ptr noundef nonnull align 8 dereferenceable(424) %116)
  %117 = getelementptr inbounds %"class.System::Timer", ptr %19, i32 0, i32 0
  %118 = load ptr, ptr %117, align 8, !tbaa !9
  %119 = call noundef ptr @_ZNK6System10Dispatcher17getCurrentContextEv(ptr noundef nonnull align 8 dereferenceable(424) %118)
  %120 = getelementptr inbounds %"struct.System::NativeContext", ptr %119, i32 0, i32 9
  %121 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt8functionIFvvEEaSEDn(ptr noundef nonnull align 8 dereferenceable(32) %120, ptr null) #10
  %122 = getelementptr inbounds %"class.System::Timer", ptr %19, i32 0, i32 0
  %123 = load ptr, ptr %122, align 8, !tbaa !9
  %124 = icmp ne ptr %123, null
  br i1 %124, label %125, label %126

125:                                              ; preds = %107
  br label %128

126:                                              ; preds = %107
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 130, ptr noundef @__PRETTY_FUNCTION__._ZN6System5Timer5sleepENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE) #9
  unreachable

127:                                              ; No predecessors!
  br label %128

128:                                              ; preds = %127, %125
  %129 = getelementptr inbounds %"struct.System::OperationContext", ptr %10, i32 0, i32 0
  %130 = load ptr, ptr %129, align 8, !tbaa !24
  %131 = getelementptr inbounds %"class.System::Timer", ptr %19, i32 0, i32 0
  %132 = load ptr, ptr %131, align 8, !tbaa !9
  %133 = call noundef ptr @_ZNK6System10Dispatcher17getCurrentContextEv(ptr noundef nonnull align 8 dereferenceable(424) %132)
  %134 = icmp eq ptr %130, %133
  br i1 %134, label %135, label %136

135:                                              ; preds = %128
  br label %138

136:                                              ; preds = %128
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 131, ptr noundef @__PRETTY_FUNCTION__._ZN6System5Timer5sleepENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE) #9
  unreachable

137:                                              ; No predecessors!
  br label %138

138:                                              ; preds = %137, %135
  %139 = getelementptr inbounds %"struct.System::ContextPair", ptr %9, i32 0, i32 1
  %140 = load ptr, ptr %139, align 8, !tbaa !25
  %141 = icmp eq ptr %140, null
  br i1 %141, label %142, label %143

142:                                              ; preds = %138
  br label %145

143:                                              ; preds = %138
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 132, ptr noundef @__PRETTY_FUNCTION__._ZN6System5Timer5sleepENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE) #9
  unreachable

144:                                              ; No predecessors!
  br label %145

145:                                              ; preds = %144, %142
  %146 = getelementptr inbounds %"class.System::Timer", ptr %19, i32 0, i32 1
  %147 = load ptr, ptr %146, align 8, !tbaa !12
  %148 = icmp eq ptr %147, %10
  br i1 %148, label %149, label %150

149:                                              ; preds = %145
  br label %152

150:                                              ; preds = %145
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.1, i32 noundef 133, ptr noundef @__PRETTY_FUNCTION__._ZN6System5Timer5sleepENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE) #9
  unreachable

151:                                              ; No predecessors!
  br label %152

152:                                              ; preds = %151, %149
  %153 = getelementptr inbounds %"class.System::Timer", ptr %19, i32 0, i32 1
  store ptr null, ptr %153, align 8, !tbaa !12
  %154 = getelementptr inbounds %"struct.System::OperationContext", ptr %10, i32 0, i32 0
  store ptr null, ptr %154, align 8, !tbaa !24
  %155 = getelementptr inbounds %"class.System::Timer", ptr %19, i32 0, i32 0
  %156 = load ptr, ptr %155, align 8, !tbaa !9
  %157 = getelementptr inbounds %"class.System::Timer", ptr %19, i32 0, i32 2
  %158 = load i32, ptr %157, align 8, !tbaa !13
  call void @_ZN6System10Dispatcher9pushTimerEi(ptr noundef nonnull align 8 dereferenceable(424) %156, i32 noundef %158)
  %159 = getelementptr inbounds %"struct.System::OperationContext", ptr %10, i32 0, i32 1
  %160 = load i8, ptr %159, align 8, !tbaa !21, !range !33, !noundef !34
  %161 = trunc i8 %160 to i1
  br i1 %161, label %162, label %164

162:                                              ; preds = %152
  %163 = call ptr @__cxa_allocate_exception(i64 8) #10
  call void @llvm.memset.p0.i64(ptr align 16 %163, i8 0, i64 8, i1 false)
  call void @_ZN6System20InterruptedExceptionC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %163) #10
  call void @__cxa_throw(ptr %163, ptr @_ZTIN6System20InterruptedExceptionE, ptr @_ZNSt9exceptionD2Ev) #11
  unreachable

164:                                              ; preds = %152
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #10
  br label %165

165:                                              ; preds = %164, %42
  ret void

166:                                              ; preds = %106
  %167 = load ptr, ptr %14, align 8
  %168 = load i32, ptr %15, align 4
  %169 = insertvalue { ptr, i32 } poison, ptr %167, 0
  %170 = insertvalue { ptr, i32 } %169, i32 %168, 1
  resume { ptr, i32 } %170

171:                                              ; preds = %89
  unreachable
}

declare noundef zeroext i1 @_ZN6System10Dispatcher11interruptedEv(ptr noundef nonnull align 8 dereferenceable(424)) #2

declare ptr @__cxa_allocate_exception(i64)

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

; Function Attrs: nounwind
declare void @_ZNSt9exceptionD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #5

declare void @__cxa_throw(ptr, ptr, ptr)

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

declare void @_ZN6System10Dispatcher5yieldEv(ptr noundef nonnull align 8 dereferenceable(424)) #2

declare noundef i32 @_ZN6System10Dispatcher8getTimerEv(ptr noundef nonnull align 8 dereferenceable(424)) #2

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

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

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

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

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

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

; Function Attrs: nounwind
declare i32 @timerfd_settime(i32 noundef, i32 noundef, ptr noundef, ptr noundef) #5

declare noundef ptr @_ZNK6System10Dispatcher17getCurrentContextEv(ptr noundef nonnull align 8 dereferenceable(424)) #2

; Function Attrs: nounwind
declare i32 @epoll_ctl(i32 noundef, i32 noundef, i32 noundef, ptr noundef) #5

declare noundef i32 @_ZNK6System10Dispatcher8getEpollEv(ptr noundef nonnull align 8 dereferenceable(424)) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) #8

declare void @_ZN6System16lastErrorMessageB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8) #2

declare i32 @__gxx_personality_v0(...)

declare void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #5

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

declare void @__cxa_free_exception(ptr)

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef nonnull align 8 dereferenceable(32) ptr @"_ZNSt8functionIFvvEEaSIZN6System5Timer5sleepENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEEE3$_0EENSt9enable_ifIXsrNS1_9_CallableIT_NSB_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISD_E4typeEE4typeES1_EE5valueESt5decayISD_EE4type4typeESt15__invoke_resultIRSO_JEEEE5valueERS1_E4typeEOSD_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) #6 align 2

declare void @_ZN6System10Dispatcher8dispatchEv(ptr noundef nonnull align 8 dereferenceable(424)) #2

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

declare void @_ZN6System10Dispatcher9pushTimerEi(ptr noundef nonnull align 8 dereferenceable(424), i32 noundef) #2

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

!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, !6, i64 0}
!10 = !{!"_ZTSN6System5TimerE", !6, i64 0, !6, i64 8, !11, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !6, i64 8}
!13 = !{!10, !11, i64 16}
!14 = !{!15, !17, i64 0}
!15 = !{!"_ZTS10itimerspec", !16, i64 0, !16, i64 16}
!16 = !{!"_ZTS8timespec", !17, i64 0, !17, i64 8}
!17 = !{!"long", !7, i64 0}
!18 = !{!15, !17, i64 8}
!19 = !{!15, !17, i64 16}
!20 = !{!15, !17, i64 24}
!21 = !{!22, !23, i64 8}
!22 = !{!"_ZTSN6System16OperationContextE", !6, i64 0, !23, i64 8, !11, i64 12}
!23 = !{!"bool", !7, i64 0}
!24 = !{!22, !6, i64 0}
!25 = !{!26, !6, i64 8}
!26 = !{!"_ZTSN6System11ContextPairE", !6, i64 0, !6, i64 8}
!27 = !{!26, !6, i64 0}
!28 = !{!29, !11, i64 0}
!29 = !{!"_ZTS11epoll_event", !11, i64 0, !7, i64 4}
!30 = !{!7, !7, i64 0}
!31 = !{!32, !6, i64 0}
!32 = !{!"_ZTSZN6System5Timer5sleepENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEEE3$_0", !6, i64 0}
!33 = !{i8 0, i8 2}
!34 = !{}


; 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::duration.6" = type { i64 }
%struct.itimerspec = type { %struct.timespec, %struct.timespec }
%struct.timespec = type { i64, i64 }
%"struct.System::ContextPair" = type { ptr, ptr }
%"struct.System::OperationContext" = type { ptr, i8, i32 }
%struct.epoll_event = type <{ i32, %union.epoll_data }>
%union.epoll_data = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.10 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.10 = type { i64, [8 x i8] }
%class.anon = type { ptr }

@.str.1 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [22 x i8], align 1
@__PRETTY_FUNCTION__._ZN6System5Timer5sleepENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE = external hidden unnamed_addr constant [52 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [19 x i8], align 1
@_ZTIN6System20InterruptedExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.5 = external hidden unnamed_addr constant [33 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@.str.6 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6System5Timer5sleepENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE(ptr noundef nonnull align 8 dereferenceable(20) %0, i64 %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::chrono::duration", align 8
  %4 = alloca %"class.std::chrono::duration.6", align 8
  %5 = alloca %struct.itimerspec, align 8
  %6 = alloca %"class.std::chrono::duration", align 8
  %7 = alloca %"class.std::chrono::duration", align 8
  %8 = alloca %"struct.System::ContextPair", align 8
  %9 = alloca %"struct.System::OperationContext", align 8
  %10 = alloca %struct.epoll_event, align 4
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %class.anon, align 8
  store i64 %1, ptr %3, align 8
  %14 = load ptr, ptr %0, align 8, !tbaa !5
  %.not = icmp eq ptr %14, null
  br i1 %.not, label %15, label %16

15:                                               ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 67, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6System5Timer5sleepENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE) #9
  unreachable

16:                                               ; preds = %2
  %17 = getelementptr inbounds i8, ptr %0, i64 8
  %18 = load ptr, ptr %17, align 8, !tbaa !11
  %19 = icmp eq ptr %18, null
  br i1 %19, label %21, label %20

20:                                               ; preds = %16
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 68, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6System5Timer5sleepENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE) #9
  unreachable

21:                                               ; preds = %16
  %22 = tail call noundef zeroext i1 @_ZN6System10Dispatcher11interruptedEv(ptr noundef nonnull align 8 dereferenceable(424) %14)
  br i1 %22, label %23, label %25

23:                                               ; preds = %21
  %24 = tail call ptr @__cxa_allocate_exception(i64 8) #10
  store i64 0, ptr %24, align 16
  tail call void @_ZN6System20InterruptedExceptionC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %24) #10
  tail call void @__cxa_throw(ptr nonnull %24, ptr nonnull @_ZTIN6System20InterruptedExceptionE, ptr nonnull @_ZNSt9exceptionD2Ev) #11
  unreachable

25:                                               ; preds = %21
  %26 = call noundef i64 @_ZNKSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %27 = icmp eq i64 %26, 0
  %28 = load ptr, ptr %0, align 8, !tbaa !5
  br i1 %27, label %29, label %30

29:                                               ; preds = %25
  call void @_ZN6System10Dispatcher5yieldEv(ptr noundef nonnull align 8 dereferenceable(424) %28)
  br label %96

30:                                               ; preds = %25
  %31 = call noundef i32 @_ZN6System10Dispatcher8getTimerEv(ptr noundef nonnull align 8 dereferenceable(424) %28)
  %32 = getelementptr inbounds i8, ptr %0, i64 16
  store i32 %31, ptr %32, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #10
  %33 = call i64 @_ZNSt6chrono13duration_castINS_8durationIlSt5ratioILl1ELl1EEEElS2_ILl1ELl1000000000EEEENSt9enable_ifIXsr13__is_durationIT_EE5valueES7_E4typeERKNS1_IT0_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %3)
  store i64 %33, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #10
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %5, i8 0, i64 16, i1 false)
  %34 = call noundef i64 @_ZNKSt6chrono8durationIlSt5ratioILl1ELl1EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %35 = getelementptr inbounds i8, ptr %5, i64 16
  store i64 %34, ptr %35, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #10
  %36 = call i64 @_ZNSt6chronomiIlSt5ratioILl1ELl1000000000EElS1_ILl1ELl1EEEENSt11common_typeIJNS_8durationIT_T0_EENS5_IT1_T2_EEEE4typeERKS8_RKSB_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
  store i64 %36, ptr %7, align 8
  %37 = call i64 @_ZNSt6chrono13duration_castINS_8durationIlSt5ratioILl1ELl1000000000EEEElS3_EENSt9enable_ifIXsr13__is_durationIT_EE5valueES6_E4typeERKNS1_IT0_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %7)
  store i64 %37, ptr %6, align 8
  %38 = call noundef i64 @_ZNKSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %39 = getelementptr inbounds i8, ptr %5, i64 24
  store i64 %38, ptr %39, align 8, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #10
  %40 = load i32, ptr %32, align 8, !tbaa !12
  %41 = call i32 @timerfd_settime(i32 noundef %40, i32 noundef 0, ptr noundef nonnull %5, ptr noundef null) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #10
  %42 = getelementptr inbounds i8, ptr %9, i64 8
  store i8 0, ptr %42, align 8, !tbaa !18
  %43 = load ptr, ptr %0, align 8, !tbaa !5
  %44 = call noundef ptr @_ZNK6System10Dispatcher17getCurrentContextEv(ptr noundef nonnull align 8 dereferenceable(424) %43)
  store ptr %44, ptr %9, align 8, !tbaa !21
  %45 = getelementptr inbounds i8, ptr %8, i64 8
  store ptr null, ptr %45, align 8, !tbaa !22
  store ptr %9, ptr %8, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #10
  store i32 1073741825, ptr %10, align 4, !tbaa !25
  %46 = getelementptr inbounds i8, ptr %10, i64 4
  store ptr %8, ptr %46, align 4, !tbaa !27
  %47 = load ptr, ptr %0, align 8, !tbaa !5
  %48 = call noundef i32 @_ZNK6System10Dispatcher8getEpollEv(ptr noundef nonnull align 8 dereferenceable(424) %47)
  %49 = load i32, ptr %32, align 8, !tbaa !12
  %50 = call i32 @epoll_ctl(i32 noundef %48, i32 noundef 3, i32 noundef %49, ptr noundef nonnull %10) #10
  %51 = icmp eq i32 %50, -1
  br i1 %51, label %52, label %63

52:                                               ; preds = %30
  %53 = call ptr @__cxa_allocate_exception(i64 16) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #10
  invoke void @_ZN6System16lastErrorMessageB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %12)
          to label %54 unwind label %.thread

54:                                               ; preds = %52
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %11, ptr noundef nonnull @.str.5, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %55 unwind label %.thread17

55:                                               ; preds = %54
  invoke void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %53, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %56 unwind label %59

56:                                               ; preds = %55
  invoke void @__cxa_throw(ptr nonnull %53, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #11
          to label %97 unwind label %59

.thread:                                          ; preds = %52
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #10
  br label %61

.thread17:                                        ; preds = %54
  %58 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #10
  br label %61

59:                                               ; preds = %55, %56
  %.0 = phi i1 [ false, %56 ], [ true, %55 ]
  %60 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #10
  br i1 %.0, label %61, label %62

61:                                               ; preds = %.thread17, %.thread, %59
  %.pn.pn16 = phi { ptr, i32 } [ %57, %.thread ], [ %60, %59 ], [ %58, %.thread17 ]
  call void @__cxa_free_exception(ptr %53) #10
  br label %62

62:                                               ; preds = %61, %59
  %.pn.pn15 = phi { ptr, i32 } [ %.pn.pn16, %61 ], [ %60, %59 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #10
  resume { ptr, i32 } %.pn.pn15

63:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #10
  store ptr %0, ptr %13, align 8, !tbaa !28
  %64 = load ptr, ptr %0, align 8, !tbaa !5
  %65 = call noundef ptr @_ZNK6System10Dispatcher17getCurrentContextEv(ptr noundef nonnull align 8 dereferenceable(424) %64)
  %66 = getelementptr inbounds i8, ptr %65, i64 88
  %67 = call noundef nonnull align 8 dereferenceable(32) ptr @"_ZNSt8functionIFvvEEaSIZN6System5Timer5sleepENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEEE3$_0EENSt9enable_ifIXsrNS1_9_CallableIT_NSB_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISD_E4typeEE4typeES1_EE5valueESt5decayISD_EE4type4typeESt15__invoke_resultIRSO_JEEEE5valueERS1_E4typeEOSD_"(ptr noundef nonnull align 8 dereferenceable(32) %66, ptr noundef nonnull align 8 dereferenceable(8) %13) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #10
  store ptr %9, ptr %17, align 8, !tbaa !11
  %68 = load ptr, ptr %0, align 8, !tbaa !5
  call void @_ZN6System10Dispatcher8dispatchEv(ptr noundef nonnull align 8 dereferenceable(424) %68)
  %69 = load ptr, ptr %0, align 8, !tbaa !5
  %70 = call noundef ptr @_ZNK6System10Dispatcher17getCurrentContextEv(ptr noundef nonnull align 8 dereferenceable(424) %69)
  %71 = getelementptr inbounds i8, ptr %70, i64 88
  %72 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt8functionIFvvEEaSEDn(ptr noundef nonnull align 8 dereferenceable(32) %71, ptr null) #10
  %73 = load ptr, ptr %0, align 8, !tbaa !5
  %.not10 = icmp eq ptr %73, null
  br i1 %.not10, label %74, label %75

74:                                               ; preds = %63
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 130, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6System5Timer5sleepENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE) #9
  unreachable

75:                                               ; preds = %63
  %76 = load ptr, ptr %9, align 8, !tbaa !21
  %77 = call noundef ptr @_ZNK6System10Dispatcher17getCurrentContextEv(ptr noundef nonnull align 8 dereferenceable(424) %73)
  %78 = icmp eq ptr %76, %77
  br i1 %78, label %80, label %79

79:                                               ; preds = %75
  call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 131, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6System5Timer5sleepENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE) #9
  unreachable

80:                                               ; preds = %75
  %81 = load ptr, ptr %45, align 8, !tbaa !22
  %82 = icmp eq ptr %81, null
  br i1 %82, label %84, label %83

83:                                               ; preds = %80
  call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 132, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6System5Timer5sleepENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE) #9
  unreachable

84:                                               ; preds = %80
  %85 = load ptr, ptr %17, align 8, !tbaa !11
  %86 = icmp eq ptr %85, %9
  br i1 %86, label %88, label %87

87:                                               ; preds = %84
  call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.1, i32 noundef 133, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6System5Timer5sleepENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE) #9
  unreachable

88:                                               ; preds = %84
  store ptr null, ptr %17, align 8, !tbaa !11
  store ptr null, ptr %9, align 8, !tbaa !21
  %89 = load ptr, ptr %0, align 8, !tbaa !5
  %90 = load i32, ptr %32, align 8, !tbaa !12
  call void @_ZN6System10Dispatcher9pushTimerEi(ptr noundef nonnull align 8 dereferenceable(424) %89, i32 noundef %90)
  %91 = load i8, ptr %42, align 8, !tbaa !18, !range !30, !noundef !31
  %92 = trunc nuw i8 %91 to i1
  br i1 %92, label %93, label %95

93:                                               ; preds = %88
  %94 = call ptr @__cxa_allocate_exception(i64 8) #10
  store i64 0, ptr %94, align 16
  call void @_ZN6System20InterruptedExceptionC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %94) #10
  call void @__cxa_throw(ptr nonnull %94, ptr nonnull @_ZTIN6System20InterruptedExceptionE, ptr nonnull @_ZNSt9exceptionD2Ev) #11
  unreachable

95:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #10
  br label %96

96:                                               ; preds = %95, %29
  ret void

97:                                               ; preds = %56
  unreachable
}

declare noundef zeroext i1 @_ZN6System10Dispatcher11interruptedEv(ptr noundef nonnull align 8 dereferenceable(424)) local_unnamed_addr #2

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

; Function Attrs: nounwind
declare void @_ZNSt9exceptionD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #5

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

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

declare void @_ZN6System10Dispatcher5yieldEv(ptr noundef nonnull align 8 dereferenceable(424)) local_unnamed_addr #2

declare noundef i32 @_ZN6System10Dispatcher8getTimerEv(ptr noundef nonnull align 8 dereferenceable(424)) local_unnamed_addr #2

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

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

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

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

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

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

; Function Attrs: nounwind
declare i32 @timerfd_settime(i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

declare noundef ptr @_ZNK6System10Dispatcher17getCurrentContextEv(ptr noundef nonnull align 8 dereferenceable(424)) local_unnamed_addr #2

; Function Attrs: nounwind
declare i32 @epoll_ctl(i32 noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

declare noundef i32 @_ZNK6System10Dispatcher8getEpollEv(ptr noundef nonnull align 8 dereferenceable(424)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #8

declare void @_ZN6System16lastErrorMessageB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8) local_unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

declare void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #5

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef nonnull align 8 dereferenceable(32) ptr @"_ZNSt8functionIFvvEEaSIZN6System5Timer5sleepENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEEE3$_0EENSt9enable_ifIXsrNS1_9_CallableIT_NSB_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISD_E4typeEE4typeES1_EE5valueESt5decayISD_EE4type4typeESt15__invoke_resultIRSO_JEEEE5valueERS1_E4typeEOSD_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6 align 2

declare void @_ZN6System10Dispatcher8dispatchEv(ptr noundef nonnull align 8 dereferenceable(424)) local_unnamed_addr #2

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

declare void @_ZN6System10Dispatcher9pushTimerEi(ptr noundef nonnull align 8 dereferenceable(424), i32 noundef) local_unnamed_addr #2

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

!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, !7, i64 0}
!6 = !{!"_ZTSN6System5TimerE", !7, i64 0, !7, i64 8, !10, i64 16}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !7, i64 8}
!12 = !{!6, !10, i64 16}
!13 = !{!14, !16, i64 16}
!14 = !{!"_ZTS10itimerspec", !15, i64 0, !15, i64 16}
!15 = !{!"_ZTS8timespec", !16, i64 0, !16, i64 8}
!16 = !{!"long", !8, i64 0}
!17 = !{!14, !16, i64 24}
!18 = !{!19, !20, i64 8}
!19 = !{!"_ZTSN6System16OperationContextE", !7, i64 0, !20, i64 8, !10, i64 12}
!20 = !{!"bool", !8, i64 0}
!21 = !{!19, !7, i64 0}
!22 = !{!23, !7, i64 8}
!23 = !{!"_ZTSN6System11ContextPairE", !7, i64 0, !7, i64 8}
!24 = !{!23, !7, i64 0}
!25 = !{!26, !10, i64 0}
!26 = !{!"_ZTS11epoll_event", !10, i64 0, !8, i64 4}
!27 = !{!8, !8, i64 0}
!28 = !{!29, !7, i64 0}
!29 = !{!"_ZTSZN6System5Timer5sleepENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEEE3$_0", !7, i64 0}
!30 = !{i8 0, i8 2}
!31 = !{}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,MemCpyOptPass,SROAPass,SimplifyCFGPass,TailCallElimPass