; LLVM IR from dynexcoin/Dynex :: src/Platform/Linux/System/Dispatcher.ll (ZN6System10Dispatcher5yieldEv)

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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%struct.epoll_event = type <{ i32, %union.epoll_data }>
%union.epoll_data = type { ptr }
%"class.System::(anonymous namespace)::MutextGuard" = type { ptr }
%"class.System::Dispatcher" = type { i32, [4 x i8], [40 x i8], i32, %"struct.System::ContextPair", %"class.std::queue", %"class.std::stack", %"struct.System::NativeContext", %"struct.System::NativeContextGroup", ptr, ptr, ptr, ptr, i64 }
%"struct.System::ContextPair" = type { 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::function<void ()>, std::allocator<std::function<void ()>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::function<void ()>, std::allocator<std::function<void ()>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::function<void ()>, std::allocator<std::function<void ()>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::function<void ()>, std::allocator<std::function<void ()>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.std::stack" = type { %"class.std::deque.0" }
%"class.std::deque.0" = type { %"class.std::_Deque_base.1" }
%"class.std::_Deque_base.1" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator.5", %"struct.std::_Deque_iterator.5" }
%"struct.std::_Deque_iterator.5" = type { ptr, ptr, ptr, ptr }
%"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 } }
%"struct.System::NativeContextGroup" = type { ptr, ptr, ptr, ptr }
%"struct.System::OperationContext" = type { ptr, i8, i32 }

@_ZTISt13runtime_error = external constant ptr
@.str.14 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [58 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

declare ptr @__cxa_allocate_exception(i64)

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 #4

declare void @__cxa_throw(ptr, ptr, ptr)

declare void @__cxa_free_exception(ptr)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6System10Dispatcher5yieldEv(ptr noundef nonnull align 8 dereferenceable(424) %0) #5 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca [16 x %struct.epoll_event], align 16
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i1, align 1
  %15 = alloca %"class.System::(anonymous namespace)::MutextGuard", align 8
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca i1, align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %19 = load ptr, ptr %2, align 8
  br label %20

20:                                               ; preds = %253, %1
  call void @llvm.lifetime.start.p0(i64 192, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  %21 = getelementptr inbounds %"class.System::Dispatcher", ptr %19, i32 0, i32 0
  %22 = load i32, ptr %21, align 8, !tbaa !9
  %23 = getelementptr inbounds [16 x %struct.epoll_event], ptr %3, i64 0, i64 0
  %24 = call i32 @epoll_wait(i32 noundef %22, ptr noundef %23, i32 noundef 16, i32 noundef 0)
  store i32 %24, ptr %4, align 4, !tbaa !31
  %25 = load i32, ptr %4, align 4, !tbaa !31
  %26 = icmp eq i32 %25, 0
  br i1 %26, label %27, label %28

27:                                               ; preds = %20
  store i32 2, ptr %5, align 4
  br label %251

28:                                               ; preds = %20
  %29 = load i32, ptr %4, align 4, !tbaa !31
  %30 = icmp sgt i32 %29, 0
  br i1 %30, label %31, label %223

31:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !31
  br label %32

32:                                               ; preds = %218, %31
  %33 = load i32, ptr %6, align 4, !tbaa !31
  %34 = load i32, ptr %4, align 4, !tbaa !31
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  store i32 4, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %222

37:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %38 = load i32, ptr %6, align 4, !tbaa !31
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [16 x %struct.epoll_event], ptr %3, i64 0, i64 %39
  %41 = getelementptr inbounds %struct.epoll_event, ptr %40, i32 0, i32 1
  %42 = load ptr, ptr %41, align 4, !tbaa !32
  store ptr %42, ptr %7, align 8, !tbaa !5
  %43 = load i32, ptr %6, align 4, !tbaa !31
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [16 x %struct.epoll_event], ptr %3, i64 0, i64 %44
  %46 = getelementptr inbounds %struct.epoll_event, ptr %45, i32 0, i32 0
  %47 = load i32, ptr %46, align 4, !tbaa !33
  %48 = and i32 %47, 5
  %49 = icmp ne i32 %48, 0
  br i1 %49, label %50, label %109

50:                                               ; preds = %37
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.System::ContextPair", ptr %51, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8, !tbaa !35
  %54 = icmp eq ptr %53, null
  br i1 %54, label %55, label %109

55:                                               ; preds = %50
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = getelementptr inbounds %"struct.System::ContextPair", ptr %56, i32 0, i32 1
  %58 = load ptr, ptr %57, align 8, !tbaa !36
  %59 = icmp eq ptr %58, null
  br i1 %59, label %60, label %109

60:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %61 = getelementptr inbounds %"class.System::Dispatcher", ptr %19, i32 0, i32 3
  %62 = load i32, ptr %61, align 8, !tbaa !37
  %63 = call i64 @read(i32 noundef %62, ptr noundef %8, i64 noundef 8)
  store i64 %63, ptr %9, align 8, !tbaa !38
  %64 = load i64, ptr %9, align 8, !tbaa !38
  %65 = icmp eq i64 %64, -1
  br i1 %65, label %66, label %88

66:                                               ; preds = %60
  store i1 true, ptr %14, align 1
  %67 = call ptr @__cxa_allocate_exception(i64 16) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #7
  invoke void @_ZN6System16lastErrorMessageB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %11)
          to label %68 unwind label %71

68:                                               ; preds = %66
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef @.str.14, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %69 unwind label %75

69:                                               ; preds = %68
  invoke void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %67, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %70 unwind label %79

70:                                               ; preds = %69
  store i1 false, ptr %14, align 1
  invoke void @__cxa_throw(ptr %67, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #8
          to label %268 unwind label %79

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

75:                                               ; preds = %68
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %12, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %13, align 4
  br label %83

79:                                               ; preds = %70, %69
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %12, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %13, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  br label %83

83:                                               ; preds = %79, %75
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  br label %84

84:                                               ; preds = %83, %71
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #7
  %85 = load i1, ptr %14, align 1
  br i1 %85, label %86, label %87

86:                                               ; preds = %84
  call void @__cxa_free_exception(ptr %67) #7
  br label %87

87:                                               ; preds = %86, %84
  br label %108

88:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %89 = getelementptr inbounds %"class.System::Dispatcher", ptr %19, i32 0, i32 2
  %90 = getelementptr inbounds [40 x i8], ptr %89, i64 0, i64 0
  call void @_ZN6System12_GLOBAL__N_111MutextGuardC2ER15pthread_mutex_t(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(40) %90)
  br label %91

91:                                               ; preds = %102, %88
  %92 = getelementptr inbounds %"class.System::Dispatcher", ptr %19, i32 0, i32 5
  %93 = invoke noundef zeroext i1 @_ZNKSt5queueISt8functionIFvvEESt5dequeIS2_SaIS2_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %92)
          to label %94 unwind label %103

94:                                               ; preds = %91
  %95 = xor i1 %93, true
  br i1 %95, label %96, label %107

96:                                               ; preds = %94
  %97 = getelementptr inbounds %"class.System::Dispatcher", ptr %19, i32 0, i32 5
  %98 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt5queueISt8functionIFvvEESt5dequeIS2_SaIS2_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %97)
          to label %99 unwind label %103

99:                                               ; preds = %96
  invoke void @_ZN6System10Dispatcher5spawnEOSt8functionIFvvEE(ptr noundef nonnull align 8 dereferenceable(424) %19, ptr noundef nonnull align 8 dereferenceable(32) %98)
          to label %100 unwind label %103

100:                                              ; preds = %99
  %101 = getelementptr inbounds %"class.System::Dispatcher", ptr %19, i32 0, i32 5
  invoke void @_ZNSt5queueISt8functionIFvvEESt5dequeIS2_SaIS2_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %101)
          to label %102 unwind label %103

102:                                              ; preds = %100
  br label %91, !llvm.loop !39

103:                                              ; preds = %100, %99, %96, %91
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %12, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %13, align 4
  call void @_ZN6System12_GLOBAL__N_111MutextGuardD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %108

107:                                              ; preds = %94
  store i32 6, ptr %5, align 4
  call void @_ZN6System12_GLOBAL__N_111MutextGuardD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %215

108:                                              ; preds = %103, %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %221

109:                                              ; preds = %55, %50, %37
  %110 = load i32, ptr %6, align 4, !tbaa !31
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [16 x %struct.epoll_event], ptr %3, i64 0, i64 %111
  %113 = getelementptr inbounds %struct.epoll_event, ptr %112, i32 0, i32 0
  %114 = load i32, ptr %113, align 4, !tbaa !33
  %115 = and i32 %114, 4
  %116 = icmp ne i32 %115, 0
  br i1 %116, label %117, label %153

117:                                              ; preds = %109
  %118 = load ptr, ptr %7, align 8, !tbaa !5
  %119 = getelementptr inbounds %"struct.System::ContextPair", ptr %118, i32 0, i32 1
  %120 = load ptr, ptr %119, align 8, !tbaa !36
  %121 = icmp ne ptr %120, null
  br i1 %121, label %122, label %138

122:                                              ; preds = %117
  %123 = load ptr, ptr %7, align 8, !tbaa !5
  %124 = getelementptr inbounds %"struct.System::ContextPair", ptr %123, i32 0, i32 1
  %125 = load ptr, ptr %124, align 8, !tbaa !36
  %126 = getelementptr inbounds %"struct.System::OperationContext", ptr %125, i32 0, i32 0
  %127 = load ptr, ptr %126, align 8, !tbaa !41
  %128 = icmp ne ptr %127, null
  br i1 %128, label %129, label %137

129:                                              ; preds = %122
  %130 = load ptr, ptr %7, align 8, !tbaa !5
  %131 = getelementptr inbounds %"struct.System::ContextPair", ptr %130, i32 0, i32 1
  %132 = load ptr, ptr %131, align 8, !tbaa !36
  %133 = getelementptr inbounds %"struct.System::OperationContext", ptr %132, i32 0, i32 0
  %134 = load ptr, ptr %133, align 8, !tbaa !41
  %135 = getelementptr inbounds %"struct.System::NativeContext", ptr %134, i32 0, i32 9
  %136 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt8functionIFvvEEaSEDn(ptr noundef nonnull align 8 dereferenceable(32) %135, ptr null) #7
  br label %137

137:                                              ; preds = %129, %122
  br label %138

138:                                              ; preds = %137, %117
  %139 = load ptr, ptr %7, align 8, !tbaa !5
  %140 = getelementptr inbounds %"struct.System::ContextPair", ptr %139, i32 0, i32 1
  %141 = load ptr, ptr %140, align 8, !tbaa !36
  %142 = getelementptr inbounds %"struct.System::OperationContext", ptr %141, i32 0, i32 0
  %143 = load ptr, ptr %142, align 8, !tbaa !41
  call void @_ZN6System10Dispatcher11pushContextEPNS_13NativeContextE(ptr noundef nonnull align 8 dereferenceable(424) %19, ptr noundef %143)
  %144 = load i32, ptr %6, align 4, !tbaa !31
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [16 x %struct.epoll_event], ptr %3, i64 0, i64 %145
  %147 = getelementptr inbounds %struct.epoll_event, ptr %146, i32 0, i32 0
  %148 = load i32, ptr %147, align 4, !tbaa !33
  %149 = load ptr, ptr %7, align 8, !tbaa !5
  %150 = getelementptr inbounds %"struct.System::ContextPair", ptr %149, i32 0, i32 1
  %151 = load ptr, ptr %150, align 8, !tbaa !36
  %152 = getelementptr inbounds %"struct.System::OperationContext", ptr %151, i32 0, i32 2
  store i32 %148, ptr %152, align 4, !tbaa !43
  br label %214

153:                                              ; preds = %109
  %154 = load i32, ptr %6, align 4, !tbaa !31
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [16 x %struct.epoll_event], ptr %3, i64 0, i64 %155
  %157 = getelementptr inbounds %struct.epoll_event, ptr %156, i32 0, i32 0
  %158 = load i32, ptr %157, align 4, !tbaa !33
  %159 = and i32 %158, 1
  %160 = icmp ne i32 %159, 0
  br i1 %160, label %161, label %197

161:                                              ; preds = %153
  %162 = load ptr, ptr %7, align 8, !tbaa !5
  %163 = getelementptr inbounds %"struct.System::ContextPair", ptr %162, i32 0, i32 0
  %164 = load ptr, ptr %163, align 8, !tbaa !35
  %165 = icmp ne ptr %164, null
  br i1 %165, label %166, label %182

166:                                              ; preds = %161
  %167 = load ptr, ptr %7, align 8, !tbaa !5
  %168 = getelementptr inbounds %"struct.System::ContextPair", ptr %167, i32 0, i32 0
  %169 = load ptr, ptr %168, align 8, !tbaa !35
  %170 = getelementptr inbounds %"struct.System::OperationContext", ptr %169, i32 0, i32 0
  %171 = load ptr, ptr %170, align 8, !tbaa !41
  %172 = icmp ne ptr %171, null
  br i1 %172, label %173, label %181

173:                                              ; preds = %166
  %174 = load ptr, ptr %7, align 8, !tbaa !5
  %175 = getelementptr inbounds %"struct.System::ContextPair", ptr %174, i32 0, i32 0
  %176 = load ptr, ptr %175, align 8, !tbaa !35
  %177 = getelementptr inbounds %"struct.System::OperationContext", ptr %176, i32 0, i32 0
  %178 = load ptr, ptr %177, align 8, !tbaa !41
  %179 = getelementptr inbounds %"struct.System::NativeContext", ptr %178, i32 0, i32 9
  %180 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt8functionIFvvEEaSEDn(ptr noundef nonnull align 8 dereferenceable(32) %179, ptr null) #7
  br label %181

181:                                              ; preds = %173, %166
  br label %182

182:                                              ; preds = %181, %161
  %183 = load ptr, ptr %7, align 8, !tbaa !5
  %184 = getelementptr inbounds %"struct.System::ContextPair", ptr %183, i32 0, i32 0
  %185 = load ptr, ptr %184, align 8, !tbaa !35
  %186 = getelementptr inbounds %"struct.System::OperationContext", ptr %185, i32 0, i32 0
  %187 = load ptr, ptr %186, align 8, !tbaa !41
  call void @_ZN6System10Dispatcher11pushContextEPNS_13NativeContextE(ptr noundef nonnull align 8 dereferenceable(424) %19, ptr noundef %187)
  %188 = load i32, ptr %6, align 4, !tbaa !31
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds [16 x %struct.epoll_event], ptr %3, i64 0, i64 %189
  %191 = getelementptr inbounds %struct.epoll_event, ptr %190, i32 0, i32 0
  %192 = load i32, ptr %191, align 4, !tbaa !33
  %193 = load ptr, ptr %7, align 8, !tbaa !5
  %194 = getelementptr inbounds %"struct.System::ContextPair", ptr %193, i32 0, i32 0
  %195 = load ptr, ptr %194, align 8, !tbaa !35
  %196 = getelementptr inbounds %"struct.System::OperationContext", ptr %195, i32 0, i32 2
  store i32 %192, ptr %196, align 4, !tbaa !43
  br label %213

197:                                              ; preds = %153
  %198 = load i32, ptr %6, align 4, !tbaa !31
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [16 x %struct.epoll_event], ptr %3, i64 0, i64 %199
  %201 = getelementptr inbounds %struct.epoll_event, ptr %200, i32 0, i32 0
  %202 = load i32, ptr %201, align 4, !tbaa !33
  %203 = and i32 %202, 24
  %204 = icmp ne i32 %203, 0
  br i1 %204, label %205, label %212

205:                                              ; preds = %197
  %206 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %206, ptr noundef @.str.22)
          to label %207 unwind label %208

207:                                              ; preds = %205
  call void @__cxa_throw(ptr %206, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #8
  unreachable

208:                                              ; preds = %205
  %209 = landingpad { ptr, i32 }
          cleanup
  %210 = extractvalue { ptr, i32 } %209, 0
  store ptr %210, ptr %12, align 8
  %211 = extractvalue { ptr, i32 } %209, 1
  store i32 %211, ptr %13, align 4
  call void @__cxa_free_exception(ptr %206) #7
  br label %221

212:                                              ; preds = %197
  store i32 6, ptr %5, align 4
  br label %215

213:                                              ; preds = %182
  br label %214

214:                                              ; preds = %213, %138
  store i32 0, ptr %5, align 4
  br label %215

215:                                              ; preds = %214, %212, %107
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  %216 = load i32, ptr %5, align 4
  switch i32 %216, label %268 [
    i32 0, label %217
    i32 6, label %218
  ]

217:                                              ; preds = %215
  br label %218

218:                                              ; preds = %217, %215
  %219 = load i32, ptr %6, align 4, !tbaa !31
  %220 = add nsw i32 %219, 1
  store i32 %220, ptr %6, align 4, !tbaa !31
  br label %32, !llvm.loop !44

221:                                              ; preds = %208, %108
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %254

222:                                              ; preds = %36
  br label %250

223:                                              ; preds = %28
  %224 = call ptr @__errno_location() #9
  %225 = load i32, ptr %224, align 4, !tbaa !31
  %226 = icmp ne i32 %225, 4
  br i1 %226, label %227, label %249

227:                                              ; preds = %223
  store i1 true, ptr %18, align 1
  %228 = call ptr @__cxa_allocate_exception(i64 16) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #7
  invoke void @_ZN6System16lastErrorMessageB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %17)
          to label %229 unwind label %232

229:                                              ; preds = %227
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %16, ptr noundef @.str.16, ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %230 unwind label %236

230:                                              ; preds = %229
  invoke void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %228, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %231 unwind label %240

231:                                              ; preds = %230
  store i1 false, ptr %18, align 1
  invoke void @__cxa_throw(ptr %228, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #8
          to label %268 unwind label %240

232:                                              ; preds = %227
  %233 = landingpad { ptr, i32 }
          cleanup
  %234 = extractvalue { ptr, i32 } %233, 0
  store ptr %234, ptr %12, align 8
  %235 = extractvalue { ptr, i32 } %233, 1
  store i32 %235, ptr %13, align 4
  br label %245

236:                                              ; preds = %229
  %237 = landingpad { ptr, i32 }
          cleanup
  %238 = extractvalue { ptr, i32 } %237, 0
  store ptr %238, ptr %12, align 8
  %239 = extractvalue { ptr, i32 } %237, 1
  store i32 %239, ptr %13, align 4
  br label %244

240:                                              ; preds = %231, %230
  %241 = landingpad { ptr, i32 }
          cleanup
  %242 = extractvalue { ptr, i32 } %241, 0
  store ptr %242, ptr %12, align 8
  %243 = extractvalue { ptr, i32 } %241, 1
  store i32 %243, ptr %13, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  br label %244

244:                                              ; preds = %240, %236
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  br label %245

245:                                              ; preds = %244, %232
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #7
  %246 = load i1, ptr %18, align 1
  br i1 %246, label %247, label %248

247:                                              ; preds = %245
  call void @__cxa_free_exception(ptr %228) #7
  br label %248

248:                                              ; preds = %247, %245
  br label %254

249:                                              ; preds = %223
  br label %250

250:                                              ; preds = %249, %222
  store i32 0, ptr %5, align 4
  br label %251

251:                                              ; preds = %250, %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 192, ptr %3) #7
  %252 = load i32, ptr %5, align 4
  switch i32 %252, label %268 [
    i32 0, label %253
    i32 2, label %255
  ]

253:                                              ; preds = %251
  br label %20, !llvm.loop !45

254:                                              ; preds = %248, %221
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 192, ptr %3) #7
  br label %263

255:                                              ; preds = %251
  %256 = getelementptr inbounds %"class.System::Dispatcher", ptr %19, i32 0, i32 10
  %257 = load ptr, ptr %256, align 8, !tbaa !46
  %258 = icmp ne ptr %257, null
  br i1 %258, label %259, label %262

259:                                              ; preds = %255
  %260 = getelementptr inbounds %"class.System::Dispatcher", ptr %19, i32 0, i32 9
  %261 = load ptr, ptr %260, align 8, !tbaa !47
  call void @_ZN6System10Dispatcher11pushContextEPNS_13NativeContextE(ptr noundef nonnull align 8 dereferenceable(424) %19, ptr noundef %261)
  call void @_ZN6System10Dispatcher8dispatchEv(ptr noundef nonnull align 8 dereferenceable(424) %19)
  br label %262

262:                                              ; preds = %259, %255
  ret void

263:                                              ; preds = %254
  %264 = load ptr, ptr %12, align 8
  %265 = load i32, ptr %13, align 4
  %266 = insertvalue { ptr, i32 } poison, ptr %264, 0
  %267 = insertvalue { ptr, i32 } %266, i32 %265, 1
  resume { ptr, i32 } %267

268:                                              ; preds = %251, %231, %215, %70
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6System10Dispatcher8dispatchEv(ptr noundef nonnull align 8 dereferenceable(424)) #5 align 2

declare i32 @epoll_wait(i32 noundef, ptr noundef, i32 noundef, i32 noundef) #2

declare i64 @read(i32 noundef, ptr noundef, i64 noundef) #2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt5queueISt8functionIFvvEESt5dequeIS2_SaIS2_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80)) #3 align 2

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

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

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #6

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6System10Dispatcher11pushContextEPNS_13NativeContextE(ptr noundef nonnull align 8 dereferenceable(424), ptr noundef) #3 align 2

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

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

!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, !11, i64 0}
!10 = !{!"_ZTSN6System10DispatcherE", !11, i64 0, !7, i64 8, !11, i64 48, !12, i64 56, !13, i64 72, !20, i64 152, !26, i64 232, !30, i64 352, !6, i64 384, !6, i64 392, !6, i64 400, !6, i64 408, !18, i64 416}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSN6System11ContextPairE", !6, i64 0, !6, i64 8}
!13 = !{!"_ZTSSt5queueISt8functionIFvvEESt5dequeIS2_SaIS2_EEE", !14, i64 0}
!14 = !{!"_ZTSSt5dequeISt8functionIFvvEESaIS2_EE", !15, i64 0}
!15 = !{!"_ZTSSt11_Deque_baseISt8functionIFvvEESaIS2_EE", !16, i64 0}
!16 = !{!"_ZTSNSt11_Deque_baseISt8functionIFvvEESaIS2_EE11_Deque_implE", !17, i64 0}
!17 = !{!"_ZTSNSt11_Deque_baseISt8functionIFvvEESaIS2_EE16_Deque_impl_dataE", !6, i64 0, !18, i64 8, !19, i64 16, !19, i64 48}
!18 = !{!"long", !7, i64 0}
!19 = !{!"_ZTSSt15_Deque_iteratorISt8functionIFvvEERS2_PS2_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!20 = !{!"_ZTSSt5stackIiSt5dequeIiSaIiEEE", !21, i64 0}
!21 = !{!"_ZTSSt5dequeIiSaIiEE", !22, i64 0}
!22 = !{!"_ZTSSt11_Deque_baseIiSaIiEE", !23, i64 0}
!23 = !{!"_ZTSNSt11_Deque_baseIiSaIiEE11_Deque_implE", !24, i64 0}
!24 = !{!"_ZTSNSt11_Deque_baseIiSaIiEE16_Deque_impl_dataE", !6, i64 0, !18, i64 8, !25, i64 16, !25, i64 48}
!25 = !{!"_ZTSSt15_Deque_iteratorIiRiPiE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!26 = !{!"_ZTSN6System13NativeContextE", !6, i64 0, !6, i64 8, !27, i64 16, !27, i64 17, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !28, i64 56, !28, i64 88}
!27 = !{!"bool", !7, i64 0}
!28 = !{!"_ZTSSt8functionIFvvEE", !29, i64 0, !6, i64 24}
!29 = !{!"_ZTSSt14_Function_base", !7, i64 0, !6, i64 16}
!30 = !{!"_ZTSN6System18NativeContextGroupE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!31 = !{!11, !11, i64 0}
!32 = !{!7, !7, i64 0}
!33 = !{!34, !11, i64 0}
!34 = !{!"_ZTS11epoll_event", !11, i64 0, !7, i64 4}
!35 = !{!12, !6, i64 0}
!36 = !{!12, !6, i64 8}
!37 = !{!10, !11, i64 48}
!38 = !{!18, !18, i64 0}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}
!41 = !{!42, !6, i64 0}
!42 = !{!"_ZTSN6System16OperationContextE", !6, i64 0, !27, i64 8, !11, i64 12}
!43 = !{!42, !11, i64 12}
!44 = distinct !{!44, !40}
!45 = distinct !{!45, !40}
!46 = !{!10, !6, i64 392}
!47 = !{!10, !6, i64 384}


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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%struct.epoll_event = type <{ i32, %union.epoll_data }>
%union.epoll_data = type { ptr }
%"class.System::(anonymous namespace)::MutextGuard" = type { ptr }

@_ZTISt13runtime_error = external constant ptr
@.str.14 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [58 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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 #4

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6System10Dispatcher5yieldEv(ptr noundef nonnull align 8 dereferenceable(424) %0) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca [16 x %struct.epoll_event], align 16
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.System::(anonymous namespace)::MutextGuard", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  call void @llvm.lifetime.start.p0(i64 192, ptr nonnull %2) #8
  %9 = load i32, ptr %0, align 8, !tbaa !5
  %10 = call i32 @epoll_wait(i32 noundef %9, ptr noundef nonnull %2, i32 noundef 16, i32 noundef 0)
  %11 = icmp eq i32 %10, 0
  br i1 %11, label %._crit_edge86, label %.lr.ph85

.lr.ph85:                                         ; preds = %1
  %12 = getelementptr inbounds i8, ptr %0, i64 48
  %13 = getelementptr inbounds i8, ptr %0, i64 8
  %14 = getelementptr inbounds i8, ptr %0, i64 72
  br label %15

15:                                               ; preds = %.lr.ph85, %.loopexit
  %16 = phi i32 [ %10, %.lr.ph85 ], [ %103, %.loopexit ]
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.preheader.preheader, label %89

.preheader.preheader:                             ; preds = %15
  %wide.trip.count = zext nneg i32 %16 to i64
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %88
  %indvars.iv = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next, %88 ]
  %18 = getelementptr inbounds [16 x %struct.epoll_event], ptr %2, i64 0, i64 %indvars.iv
  %19 = getelementptr inbounds i8, ptr %18, i64 4
  %20 = load ptr, ptr %19, align 4, !tbaa !30
  %21 = load i32, ptr %18, align 4, !tbaa !31
  %22 = and i32 %21, 5
  %.not52 = icmp eq i32 %22, 0
  br i1 %.not52, label %52, label %23

23:                                               ; preds = %.preheader
  %24 = load ptr, ptr %20, align 8, !tbaa !33
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %52

26:                                               ; preds = %23
  %27 = getelementptr inbounds i8, ptr %20, i64 8
  %28 = load ptr, ptr %27, align 8, !tbaa !34
  %29 = icmp eq ptr %28, null
  br i1 %29, label %30, label %52

30:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  %31 = load i32, ptr %12, align 8, !tbaa !35
  %32 = call i64 @read(i32 noundef %31, ptr noundef nonnull %3, i64 noundef 8)
  %33 = icmp eq i64 %32, -1
  br i1 %33, label %34, label %44

34:                                               ; preds = %30
  %35 = call ptr @__cxa_allocate_exception(i64 16) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #8
  invoke void @_ZN6System16lastErrorMessageB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5)
          to label %36 unwind label %.thread

36:                                               ; preds = %34
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %4, ptr noundef nonnull @.str.14, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %37 unwind label %.thread70

37:                                               ; preds = %36
  invoke void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %38 unwind label %41

38:                                               ; preds = %37
  invoke void @__cxa_throw(ptr nonnull %35, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #9
          to label %112 unwind label %41

.thread:                                          ; preds = %34
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  br label %43

.thread70:                                        ; preds = %36
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  br label %43

41:                                               ; preds = %37, %38
  %.030 = phi i1 [ false, %38 ], [ true, %37 ]
  %42 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  br i1 %.030, label %43, label %51

43:                                               ; preds = %.thread70, %.thread, %41
  %.pn60.pn69 = phi { ptr, i32 } [ %39, %.thread ], [ %42, %41 ], [ %40, %.thread70 ]
  call void @__cxa_free_exception(ptr %35) #8
  br label %51

44:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  call void @_ZN6System12_GLOBAL__N_111MutextGuardC2ER15pthread_mutex_t(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(40) %13)
  %45 = call noundef zeroext i1 @_ZNKSt5queueISt8functionIFvvEESt5dequeIS2_SaIS2_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %14)
  br i1 %45, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %44, %47
  %46 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt5queueISt8functionIFvvEESt5dequeIS2_SaIS2_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %14)
  invoke void @_ZN6System10Dispatcher5spawnEOSt8functionIFvvEE(ptr noundef nonnull align 8 dereferenceable(424) %0, ptr noundef nonnull align 8 dereferenceable(32) %46)
          to label %47 unwind label %49

47:                                               ; preds = %.lr.ph
  call void @_ZNSt5queueISt8functionIFvvEESt5dequeIS2_SaIS2_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %14)
  %48 = call noundef zeroext i1 @_ZNKSt5queueISt8functionIFvvEESt5dequeIS2_SaIS2_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %14)
  br i1 %48, label %._crit_edge, label %.lr.ph, !llvm.loop !36

49:                                               ; preds = %.lr.ph
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6System12_GLOBAL__N_111MutextGuardD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br label %51

._crit_edge:                                      ; preds = %47, %44
  call void @_ZN6System12_GLOBAL__N_111MutextGuardD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  br label %88

51:                                               ; preds = %41, %43, %49
  %.pn60.pn.pn = phi { ptr, i32 } [ %.pn60.pn69, %43 ], [ %42, %41 ], [ %50, %49 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  br label %105

52:                                               ; preds = %26, %23, %.preheader
  %53 = and i32 %21, 4
  %.not53 = icmp eq i32 %53, 0
  br i1 %.not53, label %67, label %54

54:                                               ; preds = %52
  %55 = getelementptr inbounds i8, ptr %20, i64 8
  %56 = load ptr, ptr %55, align 8, !tbaa !34, !nonnull !38, !noundef !38
  %57 = load ptr, ptr %56, align 8, !tbaa !39
  %.not59 = icmp eq ptr %57, null
  br i1 %.not59, label %61, label %58

58:                                               ; preds = %54
  %59 = getelementptr inbounds i8, ptr %57, i64 88
  %60 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt8functionIFvvEEaSEDn(ptr noundef nonnull align 8 dereferenceable(32) %59, ptr null) #8
  %.pre = load ptr, ptr %55, align 8, !tbaa !34
  br label %61

61:                                               ; preds = %54, %58
  %62 = phi ptr [ %56, %54 ], [ %.pre, %58 ]
  %63 = load ptr, ptr %62, align 8, !tbaa !39
  call void @_ZN6System10Dispatcher11pushContextEPNS_13NativeContextE(ptr noundef nonnull align 8 dereferenceable(424) %0, ptr noundef %63)
  %64 = load i32, ptr %18, align 4, !tbaa !31
  %65 = load ptr, ptr %55, align 8, !tbaa !34
  %66 = getelementptr inbounds i8, ptr %65, i64 12
  store i32 %64, ptr %66, align 4, !tbaa !41
  br label %88

67:                                               ; preds = %52
  %68 = and i32 %21, 1
  %.not54 = icmp eq i32 %68, 0
  br i1 %.not54, label %81, label %69

69:                                               ; preds = %67
  %70 = load ptr, ptr %20, align 8, !tbaa !33, !nonnull !38, !noundef !38
  %71 = load ptr, ptr %70, align 8, !tbaa !39
  %.not57 = icmp eq ptr %71, null
  br i1 %.not57, label %75, label %72

72:                                               ; preds = %69
  %73 = getelementptr inbounds i8, ptr %71, i64 88
  %74 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt8functionIFvvEEaSEDn(ptr noundef nonnull align 8 dereferenceable(32) %73, ptr null) #8
  %.pre88 = load ptr, ptr %20, align 8, !tbaa !33
  br label %75

75:                                               ; preds = %69, %72
  %76 = phi ptr [ %70, %69 ], [ %.pre88, %72 ]
  %77 = load ptr, ptr %76, align 8, !tbaa !39
  call void @_ZN6System10Dispatcher11pushContextEPNS_13NativeContextE(ptr noundef nonnull align 8 dereferenceable(424) %0, ptr noundef %77)
  %78 = load i32, ptr %18, align 4, !tbaa !31
  %79 = load ptr, ptr %20, align 8, !tbaa !33
  %80 = getelementptr inbounds i8, ptr %79, i64 12
  store i32 %78, ptr %80, align 4, !tbaa !41
  br label %88

81:                                               ; preds = %67
  %82 = and i32 %21, 24
  %.not55 = icmp eq i32 %82, 0
  br i1 %.not55, label %88, label %83

83:                                               ; preds = %81
  %84 = call ptr @__cxa_allocate_exception(i64 16) #8
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %84, ptr noundef nonnull @.str.22)
          to label %85 unwind label %86

85:                                               ; preds = %83
  call void @__cxa_throw(ptr nonnull %84, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #9
  unreachable

86:                                               ; preds = %83
  %87 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %84) #8
  br label %105

88:                                               ; preds = %61, %75, %81, %._crit_edge
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %.preheader, !llvm.loop !42

89:                                               ; preds = %15
  %90 = tail call ptr @__errno_location() #10
  %91 = load i32, ptr %90, align 4, !tbaa !43
  %.not = icmp eq i32 %91, 4
  br i1 %.not, label %.loopexit, label %92

92:                                               ; preds = %89
  %93 = call ptr @__cxa_allocate_exception(i64 16) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #8
  invoke void @_ZN6System16lastErrorMessageB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8)
          to label %94 unwind label %.thread73

94:                                               ; preds = %92
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull @.str.16, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %95 unwind label %.thread77

95:                                               ; preds = %94
  invoke void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %93, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %96 unwind label %99

96:                                               ; preds = %95
  invoke void @__cxa_throw(ptr nonnull %93, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #9
          to label %112 unwind label %99

.thread73:                                        ; preds = %92
  %97 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #8
  br label %101

.thread77:                                        ; preds = %94
  %98 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #8
  br label %101

99:                                               ; preds = %95, %96
  %.0 = phi i1 [ false, %96 ], [ true, %95 ]
  %100 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #8
  br i1 %.0, label %101, label %105

101:                                              ; preds = %.thread77, %.thread73, %99
  %.pn.pn76 = phi { ptr, i32 } [ %97, %.thread73 ], [ %100, %99 ], [ %98, %.thread77 ]
  call void @__cxa_free_exception(ptr %93) #8
  br label %105

.loopexit:                                        ; preds = %88, %89
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 192, ptr nonnull %2) #8
  %102 = load i32, ptr %0, align 8, !tbaa !5
  %103 = call i32 @epoll_wait(i32 noundef %102, ptr noundef nonnull %2, i32 noundef 16, i32 noundef 0)
  %104 = icmp eq i32 %103, 0
  br i1 %104, label %._crit_edge86, label %15

105:                                              ; preds = %51, %86, %99, %101
  %.pn60.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn76, %101 ], [ %100, %99 ], [ %.pn60.pn.pn, %51 ], [ %87, %86 ]
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %2) #8
  resume { ptr, i32 } %.pn60.pn.pn.pn.pn

._crit_edge86:                                    ; preds = %.loopexit, %1
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %2) #8
  %106 = getelementptr inbounds i8, ptr %0, i64 392
  %107 = load ptr, ptr %106, align 8, !tbaa !44
  %.not66 = icmp eq ptr %107, null
  br i1 %.not66, label %111, label %108

108:                                              ; preds = %._crit_edge86
  %109 = getelementptr inbounds i8, ptr %0, i64 384
  %110 = load ptr, ptr %109, align 8, !tbaa !45
  call void @_ZN6System10Dispatcher11pushContextEPNS_13NativeContextE(ptr noundef nonnull align 8 dereferenceable(424) %0, ptr noundef %110)
  call void @_ZN6System10Dispatcher8dispatchEv(ptr noundef nonnull align 8 dereferenceable(424) %0)
  br label %111

111:                                              ; preds = %108, %._crit_edge86
  ret void

112:                                              ; preds = %96, %38
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6System10Dispatcher8dispatchEv(ptr noundef nonnull align 8 dereferenceable(424)) local_unnamed_addr #5 align 2

declare i32 @epoll_wait(i32 noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nofree
declare noundef i64 @read(i32 noundef, ptr nocapture noundef, i64 noundef) local_unnamed_addr #6

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt5queueISt8functionIFvvEESt5dequeIS2_SaIS2_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #7

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6System10Dispatcher11pushContextEPNS_13NativeContextE(ptr noundef nonnull align 8 dereferenceable(424), ptr noundef) local_unnamed_addr #3 align 2

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

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

!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 = !{!"_ZTSN6System10DispatcherE", !7, i64 0, !8, i64 8, !7, i64 48, !10, i64 56, !12, i64 72, !19, i64 152, !25, i64 232, !29, i64 352, !11, i64 384, !11, i64 392, !11, i64 400, !11, i64 408, !17, i64 416}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN6System11ContextPairE", !11, i64 0, !11, i64 8}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"_ZTSSt5queueISt8functionIFvvEESt5dequeIS2_SaIS2_EEE", !13, i64 0}
!13 = !{!"_ZTSSt5dequeISt8functionIFvvEESaIS2_EE", !14, i64 0}
!14 = !{!"_ZTSSt11_Deque_baseISt8functionIFvvEESaIS2_EE", !15, i64 0}
!15 = !{!"_ZTSNSt11_Deque_baseISt8functionIFvvEESaIS2_EE11_Deque_implE", !16, i64 0}
!16 = !{!"_ZTSNSt11_Deque_baseISt8functionIFvvEESaIS2_EE16_Deque_impl_dataE", !11, i64 0, !17, i64 8, !18, i64 16, !18, i64 48}
!17 = !{!"long", !8, i64 0}
!18 = !{!"_ZTSSt15_Deque_iteratorISt8functionIFvvEERS2_PS2_E", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!19 = !{!"_ZTSSt5stackIiSt5dequeIiSaIiEEE", !20, i64 0}
!20 = !{!"_ZTSSt5dequeIiSaIiEE", !21, i64 0}
!21 = !{!"_ZTSSt11_Deque_baseIiSaIiEE", !22, i64 0}
!22 = !{!"_ZTSNSt11_Deque_baseIiSaIiEE11_Deque_implE", !23, i64 0}
!23 = !{!"_ZTSNSt11_Deque_baseIiSaIiEE16_Deque_impl_dataE", !11, i64 0, !17, i64 8, !24, i64 16, !24, i64 48}
!24 = !{!"_ZTSSt15_Deque_iteratorIiRiPiE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!25 = !{!"_ZTSN6System13NativeContextE", !11, i64 0, !11, i64 8, !26, i64 16, !26, i64 17, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !27, i64 56, !27, i64 88}
!26 = !{!"bool", !8, i64 0}
!27 = !{!"_ZTSSt8functionIFvvEE", !28, i64 0, !11, i64 24}
!28 = !{!"_ZTSSt14_Function_base", !8, i64 0, !11, i64 16}
!29 = !{!"_ZTSN6System18NativeContextGroupE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!30 = !{!8, !8, i64 0}
!31 = !{!32, !7, i64 0}
!32 = !{!"_ZTS11epoll_event", !7, i64 0, !8, i64 4}
!33 = !{!10, !11, i64 0}
!34 = !{!10, !11, i64 8}
!35 = !{!6, !7, i64 48}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = !{}
!39 = !{!40, !11, i64 0}
!40 = !{!"_ZTSN6System16OperationContextE", !11, i64 0, !26, i64 8, !7, i64 12}
!41 = !{!40, !7, i64 12}
!42 = distinct !{!42, !37}
!43 = !{!7, !7, i64 0}
!44 = !{!6, !11, i64 392}
!45 = !{!6, !11, i64 384}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass