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

; 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.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 }

@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [90 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [37 x i8], align 1
@__PRETTY_FUNCTION__._ZN6System10DispatcherD2Ev = external hidden unnamed_addr constant [34 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [13 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare i32 @close(i32 noundef) #1

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN6System10DispatcherD2Ev(ptr noundef nonnull align 8 dereferenceable(424) %0) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %10 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #9
  %11 = getelementptr inbounds %"class.System::Dispatcher", ptr %10, i32 0, i32 8
  %12 = getelementptr inbounds %"struct.System::NativeContextGroup", ptr %11, i32 0, i32 0
  %13 = load ptr, ptr %12, align 8, !tbaa !9
  store ptr %13, ptr %3, align 8, !tbaa !5
  br label %14

14:                                               ; preds = %21, %1
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = icmp ne ptr %15, null
  br i1 %16, label %18, label %17

17:                                               ; preds = %14
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #9
  br label %25

18:                                               ; preds = %14
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  invoke void @_ZN6System10Dispatcher9interruptEPNS_13NativeContextE(ptr noundef nonnull align 8 dereferenceable(424) %10, ptr noundef %19)
          to label %20 unwind label %137

20:                                               ; preds = %18
  br label %21

21:                                               ; preds = %20
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds %"struct.System::NativeContext", ptr %22, i32 0, i32 7
  %24 = load ptr, ptr %23, align 8, !tbaa !31
  store ptr %24, ptr %3, align 8, !tbaa !5
  br label %14, !llvm.loop !32

25:                                               ; preds = %17
  invoke void @_ZN6System10Dispatcher5yieldEv(ptr noundef nonnull align 8 dereferenceable(424) %10)
          to label %26 unwind label %137

26:                                               ; preds = %25
  %27 = getelementptr inbounds %"class.System::Dispatcher", ptr %10, i32 0, i32 8
  %28 = getelementptr inbounds %"struct.System::NativeContextGroup", ptr %27, i32 0, i32 0
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  %30 = icmp eq ptr %29, null
  br i1 %30, label %31, label %32

31:                                               ; preds = %26
  br label %34

32:                                               ; preds = %26
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.5, i32 noundef 127, ptr noundef @__PRETTY_FUNCTION__._ZN6System10DispatcherD2Ev) #10
  unreachable

33:                                               ; No predecessors!
  br label %34

34:                                               ; preds = %33, %31
  %35 = getelementptr inbounds %"class.System::Dispatcher", ptr %10, i32 0, i32 8
  %36 = getelementptr inbounds %"struct.System::NativeContextGroup", ptr %35, i32 0, i32 2
  %37 = load ptr, ptr %36, align 8, !tbaa !34
  %38 = icmp eq ptr %37, null
  br i1 %38, label %39, label %40

39:                                               ; preds = %34
  br label %42

40:                                               ; preds = %34
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.5, i32 noundef 128, ptr noundef @__PRETTY_FUNCTION__._ZN6System10DispatcherD2Ev) #10
  unreachable

41:                                               ; No predecessors!
  br label %42

42:                                               ; preds = %41, %39
  %43 = getelementptr inbounds %"class.System::Dispatcher", ptr %10, i32 0, i32 10
  %44 = load ptr, ptr %43, align 8, !tbaa !35
  %45 = icmp eq ptr %44, null
  br i1 %45, label %46, label %47

46:                                               ; preds = %42
  br label %49

47:                                               ; preds = %42
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.5, i32 noundef 129, ptr noundef @__PRETTY_FUNCTION__._ZN6System10DispatcherD2Ev) #10
  unreachable

48:                                               ; No predecessors!
  br label %49

49:                                               ; preds = %48, %46
  %50 = getelementptr inbounds %"class.System::Dispatcher", ptr %10, i32 0, i32 13
  %51 = load i64, ptr %50, align 8, !tbaa !36
  %52 = icmp eq i64 %51, 0
  br i1 %52, label %53, label %54

53:                                               ; preds = %49
  br label %56

54:                                               ; preds = %49
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str.5, i32 noundef 130, ptr noundef @__PRETTY_FUNCTION__._ZN6System10DispatcherD2Ev) #10
  unreachable

55:                                               ; No predecessors!
  br label %56

56:                                               ; preds = %55, %53
  br label %57

57:                                               ; preds = %82, %56
  %58 = getelementptr inbounds %"class.System::Dispatcher", ptr %10, i32 0, i32 12
  %59 = load ptr, ptr %58, align 8, !tbaa !37
  %60 = icmp ne ptr %59, null
  br i1 %60, label %61, label %83

61:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #9
  %62 = getelementptr inbounds %"class.System::Dispatcher", ptr %10, i32 0, i32 12
  %63 = load ptr, ptr %62, align 8, !tbaa !37
  %64 = getelementptr inbounds %"struct.System::NativeContext", ptr %63, i32 0, i32 0
  %65 = load ptr, ptr %64, align 8, !tbaa !38
  store ptr %65, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #9
  %66 = getelementptr inbounds %"class.System::Dispatcher", ptr %10, i32 0, i32 12
  %67 = load ptr, ptr %66, align 8, !tbaa !37
  %68 = getelementptr inbounds %"struct.System::NativeContext", ptr %67, i32 0, i32 1
  %69 = load ptr, ptr %68, align 8, !tbaa !39
  store ptr %69, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds %"class.System::Dispatcher", ptr %10, i32 0, i32 12
  %71 = load ptr, ptr %70, align 8, !tbaa !37
  %72 = getelementptr inbounds %"struct.System::NativeContext", ptr %71, i32 0, i32 4
  %73 = load ptr, ptr %72, align 8, !tbaa !40
  %74 = getelementptr inbounds %"class.System::Dispatcher", ptr %10, i32 0, i32 12
  store ptr %73, ptr %74, align 8, !tbaa !37
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = icmp eq ptr %75, null
  br i1 %76, label %78, label %77

77:                                               ; preds = %61
  call void @_ZdaPv(ptr noundef %75) #11
  br label %78

78:                                               ; preds = %77, %61
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = icmp eq ptr %79, null
  br i1 %80, label %82, label %81

81:                                               ; preds = %78
  call void @_ZdlPvm(ptr noundef %79, i64 noundef 968) #11
  br label %82

82:                                               ; preds = %81, %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #9
  br label %57, !llvm.loop !41

83:                                               ; preds = %57
  br label %84

84:                                               ; preds = %103, %83
  %85 = getelementptr inbounds %"class.System::Dispatcher", ptr %10, i32 0, i32 6
  %86 = invoke noundef zeroext i1 @_ZNKSt5stackIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %85)
          to label %87 unwind label %137

87:                                               ; preds = %84
  %88 = xor i1 %86, true
  br i1 %88, label %89, label %104

89:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #9
  %90 = getelementptr inbounds %"class.System::Dispatcher", ptr %10, i32 0, i32 6
  %91 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIiSt5dequeIiSaIiEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %90)
          to label %92 unwind label %137

92:                                               ; preds = %89
  %93 = load i32, ptr %91, align 4, !tbaa !42
  %94 = invoke i32 @close(i32 noundef %93)
          to label %95 unwind label %137

95:                                               ; preds = %92
  store i32 %94, ptr %6, align 4, !tbaa !42
  %96 = load i32, ptr %6, align 4, !tbaa !42
  %97 = icmp eq i32 %96, 0
  br i1 %97, label %98, label %99

98:                                               ; preds = %95
  br label %101

99:                                               ; preds = %95
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.5, i32 noundef 141, ptr noundef @__PRETTY_FUNCTION__._ZN6System10DispatcherD2Ev) #10
  unreachable

100:                                              ; No predecessors!
  br label %101

101:                                              ; preds = %100, %98
  %102 = getelementptr inbounds %"class.System::Dispatcher", ptr %10, i32 0, i32 6
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %102)
          to label %103 unwind label %137

103:                                              ; preds = %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  br label %84, !llvm.loop !43

104:                                              ; preds = %87
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #9
  %105 = getelementptr inbounds %"class.System::Dispatcher", ptr %10, i32 0, i32 0
  %106 = load i32, ptr %105, align 8, !tbaa !44
  %107 = invoke i32 @close(i32 noundef %106)
          to label %108 unwind label %137

108:                                              ; preds = %104
  store i32 %107, ptr %7, align 4, !tbaa !42
  %109 = load i32, ptr %7, align 4, !tbaa !42
  %110 = icmp eq i32 %109, 0
  br i1 %110, label %111, label %112

111:                                              ; preds = %108
  br label %114

112:                                              ; preds = %108
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.5, i32 noundef 146, ptr noundef @__PRETTY_FUNCTION__._ZN6System10DispatcherD2Ev) #10
  unreachable

113:                                              ; No predecessors!
  br label %114

114:                                              ; preds = %113, %111
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  %115 = getelementptr inbounds %"class.System::Dispatcher", ptr %10, i32 0, i32 3
  %116 = load i32, ptr %115, align 8, !tbaa !45
  %117 = invoke i32 @close(i32 noundef %116)
          to label %118 unwind label %137

118:                                              ; preds = %114
  store i32 %117, ptr %8, align 4, !tbaa !42
  %119 = load i32, ptr %8, align 4, !tbaa !42
  %120 = icmp eq i32 %119, 0
  br i1 %120, label %121, label %122

121:                                              ; preds = %118
  br label %124

122:                                              ; preds = %118
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.5, i32 noundef 148, ptr noundef @__PRETTY_FUNCTION__._ZN6System10DispatcherD2Ev) #10
  unreachable

123:                                              ; No predecessors!
  br label %124

124:                                              ; preds = %123, %121
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  %125 = getelementptr inbounds %"class.System::Dispatcher", ptr %10, i32 0, i32 2
  %126 = getelementptr inbounds [40 x i8], ptr %125, i64 0, i64 0
  %127 = call i32 @pthread_mutex_destroy(ptr noundef %126) #9
  store i32 %127, ptr %9, align 4, !tbaa !42
  %128 = load i32, ptr %9, align 4, !tbaa !42
  %129 = icmp eq i32 %128, 0
  br i1 %129, label %130, label %131

130:                                              ; preds = %124
  br label %133

131:                                              ; preds = %124
  call void @__assert_fail(ptr noundef @.str.12, ptr noundef @.str.5, i32 noundef 150, ptr noundef @__PRETTY_FUNCTION__._ZN6System10DispatcherD2Ev) #10
  unreachable

132:                                              ; No predecessors!
  br label %133

133:                                              ; preds = %132, %130
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  %134 = getelementptr inbounds %"class.System::Dispatcher", ptr %10, i32 0, i32 7
  call void @_ZN6System13NativeContextD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %134) #9
  %135 = getelementptr inbounds %"class.System::Dispatcher", ptr %10, i32 0, i32 6
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %135) #9
  %136 = getelementptr inbounds %"class.System::Dispatcher", ptr %10, i32 0, i32 5
  call void @_ZNSt5queueISt8functionIFvvEESt5dequeIS2_SaIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %136) #9
  ret void

137:                                              ; preds = %114, %104, %101, %92, %89, %84, %25, %18
  %138 = landingpad { ptr, i32 }
          catch ptr null
  %139 = extractvalue { ptr, i32 } %138, 0
  call void @__clang_call_terminate(ptr %139) #10
  unreachable
}

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

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #6

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #7

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #7

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

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

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

; Function Attrs: nounwind
declare i32 @pthread_mutex_destroy(ptr noundef) #8

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 352}
!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 = !{!26, !6, i64 48}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = !{!10, !6, i64 368}
!35 = !{!10, !6, i64 392}
!36 = !{!10, !18, i64 416}
!37 = !{!10, !6, i64 408}
!38 = !{!26, !6, i64 0}
!39 = !{!26, !6, i64 8}
!40 = !{!26, !6, i64 24}
!41 = distinct !{!41, !33}
!42 = !{!11, !11, i64 0}
!43 = distinct !{!43, !33}
!44 = !{!10, !11, i64 0}
!45 = !{!10, !11, i64 48}


; 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"

@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [90 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [37 x i8], align 1
@__PRETTY_FUNCTION__._ZN6System10DispatcherD2Ev = external hidden unnamed_addr constant [34 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [13 x i8], align 1

declare i32 @__gxx_personality_v0(...)

declare i32 @close(i32 noundef) local_unnamed_addr #0

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN6System10DispatcherD2Ev(ptr noundef nonnull align 8 dereferenceable(424) %0) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 352
  %.019 = load ptr, ptr %2, align 8, !tbaa !5
  %.not20 = icmp eq ptr %.019, null
  br i1 %.not20, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %3, %1
  invoke void @_ZN6System10Dispatcher5yieldEv(ptr noundef nonnull align 8 dereferenceable(424) %0)
          to label %5 unwind label %.loopexit.split-lp.loopexit.split-lp

.lr.ph:                                           ; preds = %1, %3
  %.021 = phi ptr [ %.0, %3 ], [ %.019, %1 ]
  invoke void @_ZN6System10Dispatcher9interruptEPNS_13NativeContextE(ptr noundef nonnull align 8 dereferenceable(424) %0, ptr noundef nonnull %.021)
          to label %3 unwind label %.loopexit.split-lp.loopexit

3:                                                ; preds = %.lr.ph
  %4 = getelementptr inbounds i8, ptr %.021, i64 48
  %.0 = load ptr, ptr %4, align 8, !tbaa !5
  %.not = icmp eq ptr %.0, null
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

5:                                                ; preds = %._crit_edge
  %6 = load ptr, ptr %2, align 8, !tbaa !11
  %7 = icmp eq ptr %6, null
  br i1 %7, label %9, label %8

8:                                                ; preds = %5
  tail call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.5, i32 noundef 127, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6System10DispatcherD2Ev) #8
  unreachable

9:                                                ; preds = %5
  %10 = getelementptr inbounds i8, ptr %0, i64 368
  %11 = load ptr, ptr %10, align 8, !tbaa !33
  %12 = icmp eq ptr %11, null
  br i1 %12, label %14, label %13

13:                                               ; preds = %9
  tail call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.5, i32 noundef 128, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6System10DispatcherD2Ev) #8
  unreachable

14:                                               ; preds = %9
  %15 = getelementptr inbounds i8, ptr %0, i64 392
  %16 = load ptr, ptr %15, align 8, !tbaa !34
  %17 = icmp eq ptr %16, null
  br i1 %17, label %19, label %18

18:                                               ; preds = %14
  tail call void @__assert_fail(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.5, i32 noundef 129, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6System10DispatcherD2Ev) #8
  unreachable

19:                                               ; preds = %14
  %20 = getelementptr inbounds i8, ptr %0, i64 416
  %21 = load i64, ptr %20, align 8, !tbaa !35
  %22 = icmp eq i64 %21, 0
  br i1 %22, label %.preheader13, label %25

.preheader13:                                     ; preds = %19
  %23 = getelementptr inbounds i8, ptr %0, i64 408
  %24 = load ptr, ptr %23, align 8, !tbaa !36
  %.not1222 = icmp eq ptr %24, null
  br i1 %.not1222, label %.preheader, label %.lr.ph23

25:                                               ; preds = %19
  tail call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.5, i32 noundef 130, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6System10DispatcherD2Ev) #8
  unreachable

.preheader:                                       ; preds = %39, %.preheader13
  %26 = getelementptr inbounds i8, ptr %0, i64 152
  %27 = tail call noundef zeroext i1 @_ZNKSt5stackIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %26)
  br i1 %27, label %._crit_edge25, label %.lr.ph24

.lr.ph23:                                         ; preds = %.preheader13, %39
  %28 = phi ptr [ %40, %39 ], [ %24, %.preheader13 ]
  %29 = load ptr, ptr %28, align 8, !tbaa !37
  %30 = getelementptr inbounds i8, ptr %28, i64 8
  %31 = load ptr, ptr %30, align 8, !tbaa !38
  %32 = getelementptr inbounds i8, ptr %28, i64 24
  %33 = load ptr, ptr %32, align 8, !tbaa !39
  store ptr %33, ptr %23, align 8, !tbaa !36
  %34 = icmp eq ptr %31, null
  br i1 %34, label %36, label %35

35:                                               ; preds = %.lr.ph23
  tail call void @_ZdaPv(ptr noundef nonnull %31) #9
  br label %36

36:                                               ; preds = %35, %.lr.ph23
  %37 = icmp eq ptr %29, null
  br i1 %37, label %39, label %38

38:                                               ; preds = %36
  tail call void @_ZdlPvm(ptr noundef nonnull %29, i64 noundef 968) #9
  br label %39

39:                                               ; preds = %38, %36
  %40 = load ptr, ptr %23, align 8, !tbaa !36
  %.not12 = icmp eq ptr %40, null
  br i1 %.not12, label %.preheader, label %.lr.ph23, !llvm.loop !40

.lr.ph24:                                         ; preds = %.preheader, %47
  %41 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIiSt5dequeIiSaIiEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %26)
  %42 = load i32, ptr %41, align 4, !tbaa !41
  %43 = invoke i32 @close(i32 noundef %42)
          to label %44 unwind label %.loopexit

44:                                               ; preds = %.lr.ph24
  %45 = icmp eq i32 %43, 0
  br i1 %45, label %47, label %46

46:                                               ; preds = %44
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.5, i32 noundef 141, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6System10DispatcherD2Ev) #8
  unreachable

47:                                               ; preds = %44
  tail call void @_ZNSt5stackIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %26)
  %48 = tail call noundef zeroext i1 @_ZNKSt5stackIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %26)
  br i1 %48, label %._crit_edge25, label %.lr.ph24, !llvm.loop !42

._crit_edge25:                                    ; preds = %47, %.preheader
  %49 = load i32, ptr %0, align 8, !tbaa !43
  %50 = invoke i32 @close(i32 noundef %49)
          to label %51 unwind label %.loopexit.split-lp.loopexit.split-lp

51:                                               ; preds = %._crit_edge25
  %52 = icmp eq i32 %50, 0
  br i1 %52, label %54, label %53

53:                                               ; preds = %51
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.5, i32 noundef 146, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6System10DispatcherD2Ev) #8
  unreachable

54:                                               ; preds = %51
  %55 = getelementptr inbounds i8, ptr %0, i64 48
  %56 = load i32, ptr %55, align 8, !tbaa !44
  %57 = invoke i32 @close(i32 noundef %56)
          to label %58 unwind label %.loopexit.split-lp.loopexit.split-lp

58:                                               ; preds = %54
  %59 = icmp eq i32 %57, 0
  br i1 %59, label %61, label %60

60:                                               ; preds = %58
  tail call void @__assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.5, i32 noundef 148, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6System10DispatcherD2Ev) #8
  unreachable

61:                                               ; preds = %58
  %62 = getelementptr inbounds i8, ptr %0, i64 8
  %63 = tail call i32 @pthread_mutex_destroy(ptr noundef nonnull %62) #10
  %64 = icmp eq i32 %63, 0
  br i1 %64, label %66, label %65

65:                                               ; preds = %61
  tail call void @__assert_fail(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.5, i32 noundef 150, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6System10DispatcherD2Ev) #8
  unreachable

66:                                               ; preds = %61
  %67 = getelementptr inbounds i8, ptr %0, i64 232
  tail call void @_ZN6System13NativeContextD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %67) #10
  tail call void @_ZNSt5stackIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %26) #10
  %68 = getelementptr inbounds i8, ptr %0, i64 72
  tail call void @_ZNSt5queueISt8functionIFvvEESt5dequeIS2_SaIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %68) #10
  ret void

.loopexit:                                        ; preds = %.lr.ph24
  %lpad.loopexit = landingpad { ptr, i32 }
          catch ptr null
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit:                      ; preds = %.lr.ph
  %lpad.loopexit14 = landingpad { ptr, i32 }
          catch ptr null
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp:             ; preds = %54, %._crit_edge25, %._crit_edge
  %lpad.loopexit.split-lp15 = landingpad { ptr, i32 }
          catch ptr null
  br label %.loopexit.split-lp

.loopexit.split-lp:                               ; preds = %.loopexit.split-lp.loopexit, %.loopexit.split-lp.loopexit.split-lp, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit14, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp15, %.loopexit.split-lp.loopexit.split-lp ]
  %69 = extractvalue { ptr, i32 } %lpad.phi, 0
  tail call void @__clang_call_terminate(ptr %69) #8
  unreachable
}

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

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #5

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #6

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #6

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !6, i64 352}
!12 = !{!"_ZTSN6System10DispatcherE", !13, i64 0, !7, i64 8, !13, i64 48, !14, i64 56, !15, i64 72, !22, i64 152, !28, i64 232, !32, i64 352, !6, i64 384, !6, i64 392, !6, i64 400, !6, i64 408, !20, i64 416}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSN6System11ContextPairE", !6, i64 0, !6, i64 8}
!15 = !{!"_ZTSSt5queueISt8functionIFvvEESt5dequeIS2_SaIS2_EEE", !16, i64 0}
!16 = !{!"_ZTSSt5dequeISt8functionIFvvEESaIS2_EE", !17, i64 0}
!17 = !{!"_ZTSSt11_Deque_baseISt8functionIFvvEESaIS2_EE", !18, i64 0}
!18 = !{!"_ZTSNSt11_Deque_baseISt8functionIFvvEESaIS2_EE11_Deque_implE", !19, i64 0}
!19 = !{!"_ZTSNSt11_Deque_baseISt8functionIFvvEESaIS2_EE16_Deque_impl_dataE", !6, i64 0, !20, i64 8, !21, i64 16, !21, i64 48}
!20 = !{!"long", !7, i64 0}
!21 = !{!"_ZTSSt15_Deque_iteratorISt8functionIFvvEERS2_PS2_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!22 = !{!"_ZTSSt5stackIiSt5dequeIiSaIiEEE", !23, i64 0}
!23 = !{!"_ZTSSt5dequeIiSaIiEE", !24, i64 0}
!24 = !{!"_ZTSSt11_Deque_baseIiSaIiEE", !25, i64 0}
!25 = !{!"_ZTSNSt11_Deque_baseIiSaIiEE11_Deque_implE", !26, i64 0}
!26 = !{!"_ZTSNSt11_Deque_baseIiSaIiEE16_Deque_impl_dataE", !6, i64 0, !20, i64 8, !27, i64 16, !27, i64 48}
!27 = !{!"_ZTSSt15_Deque_iteratorIiRiPiE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!28 = !{!"_ZTSN6System13NativeContextE", !6, i64 0, !6, i64 8, !29, i64 16, !29, i64 17, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !30, i64 56, !30, i64 88}
!29 = !{!"bool", !7, i64 0}
!30 = !{!"_ZTSSt8functionIFvvEE", !31, i64 0, !6, i64 24}
!31 = !{!"_ZTSSt14_Function_base", !7, i64 0, !6, i64 16}
!32 = !{!"_ZTSN6System18NativeContextGroupE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!33 = !{!12, !6, i64 368}
!34 = !{!12, !6, i64 392}
!35 = !{!12, !20, i64 416}
!36 = !{!12, !6, i64 408}
!37 = !{!28, !6, i64 0}
!38 = !{!28, !6, i64 8}
!39 = !{!28, !6, i64 24}
!40 = distinct !{!40, !10}
!41 = !{!13, !13, i64 0}
!42 = distinct !{!42, !10}
!43 = !{!12, !13, i64 0}
!44 = !{!12, !13, i64 48}


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