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

; 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.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 } }
%"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::NativeContextGroup" = type { ptr, ptr, ptr, ptr }

@.str.5 = external hidden unnamed_addr constant [90 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@.str.28 = external hidden unnamed_addr constant [32 x i8], align 1
@__PRETTY_FUNCTION__._ZN6System10Dispatcher16contextProcedureEPv = external hidden unnamed_addr constant [50 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [51 x i8], align 1
@_ZTISt9exception = external constant ptr
@.str.30 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [37 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

declare void @__cxa_throw(ptr, ptr, ptr)

declare void @__cxa_free_exception(ptr)

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

declare ptr @__cxa_begin_catch(ptr)

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

; Function Attrs: nounwind
declare i32 @swapcontext(ptr noundef, ptr noundef) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNKSt8functionIFvvEEclEv(ptr noundef nonnull align 8 dereferenceable(32)) #7 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6System10Dispatcher16contextProcedureEPv(ptr noundef nonnull align 8 dereferenceable(424) %0, ptr noundef %1) #7 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"struct.System::NativeContext", align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i1, align 1
  %12 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %13 = load ptr, ptr %3, align 8
  %14 = getelementptr inbounds %"class.System::Dispatcher", ptr %13, i32 0, i32 12
  %15 = load ptr, ptr %14, align 8, !tbaa !9
  %16 = icmp eq ptr %15, null
  br i1 %16, label %17, label %18

17:                                               ; preds = %2
  br label %20

18:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str.28, ptr noundef @.str.5, i32 noundef 433, ptr noundef @__PRETTY_FUNCTION__._ZN6System10Dispatcher16contextProcedureEPv) #9
  unreachable

19:                                               ; No predecessors!
  br label %20

20:                                               ; preds = %19, %17
  call void @llvm.lifetime.start.p0(i64 120, ptr %5) #10
  call void @_ZN6System13NativeContextC2Ev(ptr noundef nonnull align 8 dereferenceable(120) %5) #10
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 0
  store ptr %21, ptr %22, align 8, !tbaa !31
  %23 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 2
  store i8 0, ptr %23, align 8, !tbaa !32
  %24 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 4
  store ptr null, ptr %24, align 8, !tbaa !33
  %25 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 3
  store i8 0, ptr %25, align 1, !tbaa !34
  %26 = getelementptr inbounds %"class.System::Dispatcher", ptr %13, i32 0, i32 12
  store ptr %5, ptr %26, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #10
  %27 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 0
  %28 = load ptr, ptr %27, align 8, !tbaa !31
  store ptr %28, ptr %6, align 8, !tbaa !5
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = getelementptr inbounds %"class.System::Dispatcher", ptr %13, i32 0, i32 9
  %31 = load ptr, ptr %30, align 8, !tbaa !35
  %32 = getelementptr inbounds %"struct.System::NativeContext", ptr %31, i32 0, i32 0
  %33 = load ptr, ptr %32, align 8, !tbaa !31
  %34 = call i32 @swapcontext(ptr noundef %29, ptr noundef %33) #10
  %35 = icmp eq i32 %34, -1
  br i1 %35, label %36, label %58

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

38:                                               ; preds = %36
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef @.str.29, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %39 unwind label %45

39:                                               ; preds = %38
  invoke void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %37, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %40 unwind label %49

40:                                               ; preds = %39
  store i1 false, ptr %11, align 1
  invoke void @__cxa_throw(ptr %37, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #11
          to label %235 unwind label %49

41:                                               ; preds = %36
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %9, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %10, align 4
  br label %54

45:                                               ; preds = %38
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %9, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %10, align 4
  br label %53

49:                                               ; preds = %40, %39
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %9, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %10, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #10
  br label %53

53:                                               ; preds = %49, %45
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #10
  br label %54

54:                                               ; preds = %53, %41
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #10
  %55 = load i1, ptr %11, align 1
  br i1 %55, label %56, label %57

56:                                               ; preds = %54
  call void @__cxa_free_exception(ptr %37) #10
  br label %57

57:                                               ; preds = %56, %54
  br label %229

58:                                               ; preds = %20
  br label %59

59:                                               ; preds = %224, %58
  %60 = getelementptr inbounds %"class.System::Dispatcher", ptr %13, i32 0, i32 13
  %61 = load i64, ptr %60, align 8, !tbaa !36
  %62 = add i64 %61, 1
  store i64 %62, ptr %60, align 8, !tbaa !36
  %63 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 8
  invoke void @_ZNKSt8functionIFvvEEclEv(ptr noundef nonnull align 8 dereferenceable(32) %63)
          to label %64 unwind label %65

64:                                               ; preds = %59
  br label %77

65:                                               ; preds = %59
  %66 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %9, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %10, align 4
  br label %69

69:                                               ; preds = %65
  %70 = load i32, ptr %10, align 4
  %71 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #10
  %72 = icmp eq i32 %70, %71
  br i1 %72, label %73, label %229

73:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #10
  %74 = load ptr, ptr %9, align 8
  %75 = call ptr @__cxa_begin_catch(ptr %74) #10
  store ptr %75, ptr %12, align 8
  invoke void @__cxa_end_catch()
          to label %76 unwind label %93

76:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #10
  br label %77

77:                                               ; preds = %76, %64
  %78 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 5
  %79 = load ptr, ptr %78, align 8, !tbaa !37
  %80 = icmp ne ptr %79, null
  br i1 %80, label %81, label %223

81:                                               ; preds = %77
  %82 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 6
  %83 = load ptr, ptr %82, align 8, !tbaa !38
  %84 = icmp ne ptr %83, null
  br i1 %84, label %85, label %138

85:                                               ; preds = %81
  %86 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 6
  %87 = load ptr, ptr %86, align 8, !tbaa !38
  %88 = getelementptr inbounds %"struct.System::NativeContext", ptr %87, i32 0, i32 7
  %89 = load ptr, ptr %88, align 8, !tbaa !39
  %90 = icmp eq ptr %89, %5
  br i1 %90, label %91, label %92

91:                                               ; preds = %85
  br label %98

92:                                               ; preds = %85
  call void @__assert_fail(ptr noundef @.str.30, ptr noundef @.str.5, i32 noundef 454, ptr noundef @__PRETTY_FUNCTION__._ZN6System10Dispatcher16contextProcedureEPv) #9
  unreachable

93:                                               ; preds = %73
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %9, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #10
  br label %229

97:                                               ; No predecessors!
  br label %98

98:                                               ; preds = %97, %91
  %99 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 7
  %100 = load ptr, ptr %99, align 8, !tbaa !39
  %101 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 6
  %102 = load ptr, ptr %101, align 8, !tbaa !38
  %103 = getelementptr inbounds %"struct.System::NativeContext", ptr %102, i32 0, i32 7
  store ptr %100, ptr %103, align 8, !tbaa !39
  %104 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 7
  %105 = load ptr, ptr %104, align 8, !tbaa !39
  %106 = icmp ne ptr %105, null
  br i1 %106, label %107, label %122

107:                                              ; preds = %98
  %108 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 7
  %109 = load ptr, ptr %108, align 8, !tbaa !39
  %110 = getelementptr inbounds %"struct.System::NativeContext", ptr %109, i32 0, i32 6
  %111 = load ptr, ptr %110, align 8, !tbaa !38
  %112 = icmp eq ptr %111, %5
  br i1 %112, label %113, label %114

113:                                              ; preds = %107
  br label %116

114:                                              ; preds = %107
  call void @__assert_fail(ptr noundef @.str.31, ptr noundef @.str.5, i32 noundef 457, ptr noundef @__PRETTY_FUNCTION__._ZN6System10Dispatcher16contextProcedureEPv) #9
  unreachable

115:                                              ; No predecessors!
  br label %116

116:                                              ; preds = %115, %113
  %117 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 6
  %118 = load ptr, ptr %117, align 8, !tbaa !38
  %119 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 7
  %120 = load ptr, ptr %119, align 8, !tbaa !39
  %121 = getelementptr inbounds %"struct.System::NativeContext", ptr %120, i32 0, i32 6
  store ptr %118, ptr %121, align 8, !tbaa !38
  br label %137

122:                                              ; preds = %98
  %123 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 5
  %124 = load ptr, ptr %123, align 8, !tbaa !37
  %125 = getelementptr inbounds %"struct.System::NativeContextGroup", ptr %124, i32 0, i32 1
  %126 = load ptr, ptr %125, align 8, !tbaa !40
  %127 = icmp eq ptr %126, %5
  br i1 %127, label %128, label %129

128:                                              ; preds = %122
  br label %131

129:                                              ; preds = %122
  call void @__assert_fail(ptr noundef @.str.32, ptr noundef @.str.5, i32 noundef 460, ptr noundef @__PRETTY_FUNCTION__._ZN6System10Dispatcher16contextProcedureEPv) #9
  unreachable

130:                                              ; No predecessors!
  br label %131

131:                                              ; preds = %130, %128
  %132 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 6
  %133 = load ptr, ptr %132, align 8, !tbaa !38
  %134 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 5
  %135 = load ptr, ptr %134, align 8, !tbaa !37
  %136 = getelementptr inbounds %"struct.System::NativeContextGroup", ptr %135, i32 0, i32 1
  store ptr %133, ptr %136, align 8, !tbaa !40
  br label %137

137:                                              ; preds = %131, %116
  br label %222

138:                                              ; preds = %81
  %139 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 5
  %140 = load ptr, ptr %139, align 8, !tbaa !37
  %141 = getelementptr inbounds %"struct.System::NativeContextGroup", ptr %140, i32 0, i32 0
  %142 = load ptr, ptr %141, align 8, !tbaa !41
  %143 = icmp eq ptr %142, %5
  br i1 %143, label %144, label %145

144:                                              ; preds = %138
  br label %147

145:                                              ; preds = %138
  call void @__assert_fail(ptr noundef @.str.33, ptr noundef @.str.5, i32 noundef 464, ptr noundef @__PRETTY_FUNCTION__._ZN6System10Dispatcher16contextProcedureEPv) #9
  unreachable

146:                                              ; No predecessors!
  br label %147

147:                                              ; preds = %146, %144
  %148 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 7
  %149 = load ptr, ptr %148, align 8, !tbaa !39
  %150 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 5
  %151 = load ptr, ptr %150, align 8, !tbaa !37
  %152 = getelementptr inbounds %"struct.System::NativeContextGroup", ptr %151, i32 0, i32 0
  store ptr %149, ptr %152, align 8, !tbaa !41
  %153 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 7
  %154 = load ptr, ptr %153, align 8, !tbaa !39
  %155 = icmp ne ptr %154, null
  br i1 %155, label %156, label %169

156:                                              ; preds = %147
  %157 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 7
  %158 = load ptr, ptr %157, align 8, !tbaa !39
  %159 = getelementptr inbounds %"struct.System::NativeContext", ptr %158, i32 0, i32 6
  %160 = load ptr, ptr %159, align 8, !tbaa !38
  %161 = icmp eq ptr %160, %5
  br i1 %161, label %162, label %163

162:                                              ; preds = %156
  br label %165

163:                                              ; preds = %156
  call void @__assert_fail(ptr noundef @.str.31, ptr noundef @.str.5, i32 noundef 467, ptr noundef @__PRETTY_FUNCTION__._ZN6System10Dispatcher16contextProcedureEPv) #9
  unreachable

164:                                              ; No predecessors!
  br label %165

165:                                              ; preds = %164, %162
  %166 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 7
  %167 = load ptr, ptr %166, align 8, !tbaa !39
  %168 = getelementptr inbounds %"struct.System::NativeContext", ptr %167, i32 0, i32 6
  store ptr null, ptr %168, align 8, !tbaa !38
  br label %221

169:                                              ; preds = %147
  %170 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 5
  %171 = load ptr, ptr %170, align 8, !tbaa !37
  %172 = getelementptr inbounds %"struct.System::NativeContextGroup", ptr %171, i32 0, i32 1
  %173 = load ptr, ptr %172, align 8, !tbaa !40
  %174 = icmp eq ptr %173, %5
  br i1 %174, label %175, label %176

175:                                              ; preds = %169
  br label %178

176:                                              ; preds = %169
  call void @__assert_fail(ptr noundef @.str.32, ptr noundef @.str.5, i32 noundef 470, ptr noundef @__PRETTY_FUNCTION__._ZN6System10Dispatcher16contextProcedureEPv) #9
  unreachable

177:                                              ; No predecessors!
  br label %178

178:                                              ; preds = %177, %175
  %179 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 5
  %180 = load ptr, ptr %179, align 8, !tbaa !37
  %181 = getelementptr inbounds %"struct.System::NativeContextGroup", ptr %180, i32 0, i32 2
  %182 = load ptr, ptr %181, align 8, !tbaa !42
  %183 = icmp ne ptr %182, null
  br i1 %183, label %184, label %220

184:                                              ; preds = %178
  %185 = getelementptr inbounds %"class.System::Dispatcher", ptr %13, i32 0, i32 10
  %186 = load ptr, ptr %185, align 8, !tbaa !43
  %187 = icmp ne ptr %186, null
  br i1 %187, label %188, label %205

188:                                              ; preds = %184
  %189 = getelementptr inbounds %"class.System::Dispatcher", ptr %13, i32 0, i32 11
  %190 = load ptr, ptr %189, align 8, !tbaa !44
  %191 = getelementptr inbounds %"struct.System::NativeContext", ptr %190, i32 0, i32 4
  %192 = load ptr, ptr %191, align 8, !tbaa !33
  %193 = icmp eq ptr %192, null
  br i1 %193, label %194, label %195

194:                                              ; preds = %188
  br label %197

195:                                              ; preds = %188
  call void @__assert_fail(ptr noundef @.str.34, ptr noundef @.str.5, i32 noundef 473, ptr noundef @__PRETTY_FUNCTION__._ZN6System10Dispatcher16contextProcedureEPv) #9
  unreachable

196:                                              ; No predecessors!
  br label %197

197:                                              ; preds = %196, %194
  %198 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 5
  %199 = load ptr, ptr %198, align 8, !tbaa !37
  %200 = getelementptr inbounds %"struct.System::NativeContextGroup", ptr %199, i32 0, i32 2
  %201 = load ptr, ptr %200, align 8, !tbaa !42
  %202 = getelementptr inbounds %"class.System::Dispatcher", ptr %13, i32 0, i32 11
  %203 = load ptr, ptr %202, align 8, !tbaa !44
  %204 = getelementptr inbounds %"struct.System::NativeContext", ptr %203, i32 0, i32 4
  store ptr %201, ptr %204, align 8, !tbaa !33
  br label %211

205:                                              ; preds = %184
  %206 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 5
  %207 = load ptr, ptr %206, align 8, !tbaa !37
  %208 = getelementptr inbounds %"struct.System::NativeContextGroup", ptr %207, i32 0, i32 2
  %209 = load ptr, ptr %208, align 8, !tbaa !42
  %210 = getelementptr inbounds %"class.System::Dispatcher", ptr %13, i32 0, i32 10
  store ptr %209, ptr %210, align 8, !tbaa !43
  br label %211

211:                                              ; preds = %205, %197
  %212 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 5
  %213 = load ptr, ptr %212, align 8, !tbaa !37
  %214 = getelementptr inbounds %"struct.System::NativeContextGroup", ptr %213, i32 0, i32 3
  %215 = load ptr, ptr %214, align 8, !tbaa !45
  %216 = getelementptr inbounds %"class.System::Dispatcher", ptr %13, i32 0, i32 11
  store ptr %215, ptr %216, align 8, !tbaa !44
  %217 = getelementptr inbounds %"struct.System::NativeContext", ptr %5, i32 0, i32 5
  %218 = load ptr, ptr %217, align 8, !tbaa !37
  %219 = getelementptr inbounds %"struct.System::NativeContextGroup", ptr %218, i32 0, i32 2
  store ptr null, ptr %219, align 8, !tbaa !42
  br label %220

220:                                              ; preds = %211, %178
  br label %221

221:                                              ; preds = %220, %165
  br label %222

222:                                              ; preds = %221, %137
  call void @_ZN6System10Dispatcher19pushReusableContextERNS_13NativeContextE(ptr noundef nonnull align 8 dereferenceable(424) %13, ptr noundef nonnull align 8 dereferenceable(120) %5)
  br label %223

223:                                              ; preds = %222, %77
  invoke void @_ZN6System10Dispatcher8dispatchEv(ptr noundef nonnull align 8 dereferenceable(424) %13)
          to label %224 unwind label %225

224:                                              ; preds = %223
  br label %59, !llvm.loop !46

225:                                              ; preds = %223
  %226 = landingpad { ptr, i32 }
          cleanup
  %227 = extractvalue { ptr, i32 } %226, 0
  store ptr %227, ptr %9, align 8
  %228 = extractvalue { ptr, i32 } %226, 1
  store i32 %228, ptr %10, align 4
  br label %229

229:                                              ; preds = %225, %93, %69, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #10
  call void @_ZN6System13NativeContextD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %5) #10
  call void @llvm.lifetime.end.p0(i64 120, ptr %5) #10
  br label %230

230:                                              ; preds = %229
  %231 = load ptr, ptr %9, align 8
  %232 = load i32, ptr %10, align 4
  %233 = insertvalue { ptr, i32 } poison, ptr %231, 0
  %234 = insertvalue { ptr, i32 } %233, i32 %232, 1
  resume { ptr, i32 } %234

235:                                              ; preds = %40
  unreachable
}

; Function Attrs: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #8

declare void @__cxa_end_catch()

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

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

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


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

%"class.std::__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.System::NativeContext" = type { ptr, ptr, i8, i8, ptr, ptr, ptr, ptr, %"class.std::function", %"class.std::function" }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }

@.str.5 = external hidden unnamed_addr constant [90 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@.str.28 = external hidden unnamed_addr constant [32 x i8], align 1
@__PRETTY_FUNCTION__._ZN6System10Dispatcher16contextProcedureEPv = external hidden unnamed_addr constant [50 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [51 x i8], align 1
@_ZTISt9exception = external constant ptr
@.str.30 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [37 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

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

; Function Attrs: nounwind
declare i32 @swapcontext(ptr noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNKSt8functionIFvvEEclEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #7 align 2

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

; Function Attrs: mustprogress noreturn uwtable
define dso_local void @_ZN6System10Dispatcher16contextProcedureEPv(ptr noundef nonnull align 8 dereferenceable(424) %0, ptr noundef %1) local_unnamed_addr #8 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"struct.System::NativeContext", align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = getelementptr inbounds i8, ptr %0, i64 408
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %8 = icmp eq ptr %7, null
  br i1 %8, label %10, label %9

9:                                                ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.28, ptr noundef nonnull @.str.5, i32 noundef 433, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6System10Dispatcher16contextProcedureEPv) #10
  unreachable

10:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %3) #11
  call void @_ZN6System13NativeContextC2Ev(ptr noundef nonnull align 8 dereferenceable(120) %3) #11
  store ptr %1, ptr %3, align 8, !tbaa !30
  %11 = getelementptr inbounds i8, ptr %3, i64 16
  store i8 0, ptr %11, align 8, !tbaa !31
  %12 = getelementptr inbounds i8, ptr %3, i64 24
  store ptr null, ptr %12, align 8, !tbaa !32
  %13 = getelementptr inbounds i8, ptr %3, i64 17
  store i8 0, ptr %13, align 1, !tbaa !33
  store ptr %3, ptr %6, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %0, i64 384
  %15 = load ptr, ptr %14, align 8, !tbaa !34
  %16 = load ptr, ptr %15, align 8, !tbaa !30
  %17 = call i32 @swapcontext(ptr noundef %1, ptr noundef %16) #11
  %18 = icmp eq i32 %17, -1
  br i1 %18, label %26, label %.preheader

.preheader:                                       ; preds = %10
  %19 = getelementptr inbounds i8, ptr %0, i64 416
  %20 = getelementptr inbounds i8, ptr %3, i64 56
  %21 = getelementptr inbounds i8, ptr %3, i64 32
  %22 = getelementptr inbounds i8, ptr %3, i64 40
  %23 = getelementptr inbounds i8, ptr %3, i64 48
  %24 = getelementptr inbounds i8, ptr %0, i64 392
  %25 = getelementptr inbounds i8, ptr %0, i64 400
  br label %36

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

28:                                               ; preds = %26
  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.29, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %29 unwind label %.thread31

29:                                               ; preds = %28
  invoke void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %30 unwind label %33

30:                                               ; preds = %29
  invoke void @__cxa_throw(ptr nonnull %27, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #12
          to label %107 unwind label %33

.thread:                                          ; preds = %26
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #11
  br label %35

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

33:                                               ; preds = %29, %30
  %.07 = phi i1 [ false, %30 ], [ true, %29 ]
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #11
  br i1 %.07, label %35, label %.loopexit

35:                                               ; preds = %.thread31, %.thread, %33
  %.pn.pn30 = phi { ptr, i32 } [ %31, %.thread ], [ %34, %33 ], [ %32, %.thread31 ]
  call void @__cxa_free_exception(ptr %27) #11
  br label %.loopexit

36:                                               ; preds = %.preheader, %104
  %37 = load i64, ptr %19, align 8, !tbaa !35
  %38 = add i64 %37, 1
  store i64 %38, ptr %19, align 8, !tbaa !35
  invoke void @_ZNKSt8functionIFvvEEclEv(ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %47 unwind label %39

39:                                               ; preds = %36
  %40 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %41 = extractvalue { ptr, i32 } %40, 1
  %42 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9exception) #11
  %43 = icmp eq i32 %41, %42
  br i1 %43, label %44, label %.loopexit

44:                                               ; preds = %39
  %45 = extractvalue { ptr, i32 } %40, 0
  %46 = call ptr @__cxa_begin_catch(ptr %45) #11
  invoke void @__cxa_end_catch()
          to label %47 unwind label %56

47:                                               ; preds = %44, %36
  %48 = load ptr, ptr %21, align 8, !tbaa !36
  %.not = icmp eq ptr %48, null
  br i1 %.not, label %104, label %49

49:                                               ; preds = %47
  %50 = load ptr, ptr %22, align 8, !tbaa !37
  %.not21 = icmp eq ptr %50, null
  br i1 %.not21, label %72, label %51

51:                                               ; preds = %49
  %52 = getelementptr inbounds i8, ptr %50, i64 48
  %53 = load ptr, ptr %52, align 8, !tbaa !38
  %54 = icmp eq ptr %53, %3
  br i1 %54, label %58, label %55

55:                                               ; preds = %51
  call void @__assert_fail(ptr noundef nonnull @.str.30, ptr noundef nonnull @.str.5, i32 noundef 454, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6System10Dispatcher16contextProcedureEPv) #10
  unreachable

56:                                               ; preds = %44
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

58:                                               ; preds = %51
  %59 = load ptr, ptr %23, align 8, !tbaa !38
  store ptr %59, ptr %52, align 8, !tbaa !38
  %.not25 = icmp eq ptr %59, null
  br i1 %.not25, label %66, label %60

60:                                               ; preds = %58
  %61 = getelementptr inbounds i8, ptr %59, i64 40
  %62 = load ptr, ptr %61, align 8, !tbaa !37
  %63 = icmp eq ptr %62, %3
  br i1 %63, label %65, label %64

64:                                               ; preds = %60
  call void @__assert_fail(ptr noundef nonnull @.str.31, ptr noundef nonnull @.str.5, i32 noundef 457, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6System10Dispatcher16contextProcedureEPv) #10
  unreachable

65:                                               ; preds = %60
  store ptr %50, ptr %61, align 8, !tbaa !37
  br label %103

66:                                               ; preds = %58
  %67 = getelementptr inbounds i8, ptr %48, i64 8
  %68 = load ptr, ptr %67, align 8, !tbaa !39
  %69 = icmp eq ptr %68, %3
  br i1 %69, label %71, label %70

70:                                               ; preds = %66
  call void @__assert_fail(ptr noundef nonnull @.str.32, ptr noundef nonnull @.str.5, i32 noundef 460, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6System10Dispatcher16contextProcedureEPv) #10
  unreachable

71:                                               ; preds = %66
  store ptr %50, ptr %67, align 8, !tbaa !39
  br label %103

72:                                               ; preds = %49
  %73 = load ptr, ptr %48, align 8, !tbaa !40
  %74 = icmp eq ptr %73, %3
  br i1 %74, label %76, label %75

75:                                               ; preds = %72
  call void @__assert_fail(ptr noundef nonnull @.str.33, ptr noundef nonnull @.str.5, i32 noundef 464, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6System10Dispatcher16contextProcedureEPv) #10
  unreachable

76:                                               ; preds = %72
  %77 = load ptr, ptr %23, align 8, !tbaa !38
  store ptr %77, ptr %48, align 8, !tbaa !40
  %.not22 = icmp eq ptr %77, null
  br i1 %.not22, label %84, label %78

78:                                               ; preds = %76
  %79 = getelementptr inbounds i8, ptr %77, i64 40
  %80 = load ptr, ptr %79, align 8, !tbaa !37
  %81 = icmp eq ptr %80, %3
  br i1 %81, label %83, label %82

82:                                               ; preds = %78
  call void @__assert_fail(ptr noundef nonnull @.str.31, ptr noundef nonnull @.str.5, i32 noundef 467, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6System10Dispatcher16contextProcedureEPv) #10
  unreachable

83:                                               ; preds = %78
  store ptr null, ptr %79, align 8, !tbaa !37
  br label %103

84:                                               ; preds = %76
  %85 = getelementptr inbounds i8, ptr %48, i64 8
  %86 = load ptr, ptr %85, align 8, !tbaa !39
  %87 = icmp eq ptr %86, %3
  br i1 %87, label %89, label %88

88:                                               ; preds = %84
  call void @__assert_fail(ptr noundef nonnull @.str.32, ptr noundef nonnull @.str.5, i32 noundef 470, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6System10Dispatcher16contextProcedureEPv) #10
  unreachable

89:                                               ; preds = %84
  %90 = getelementptr inbounds i8, ptr %48, i64 16
  %91 = load ptr, ptr %90, align 8, !tbaa !41
  %.not23 = icmp eq ptr %91, null
  br i1 %.not23, label %103, label %92

92:                                               ; preds = %89
  %93 = load ptr, ptr %24, align 8, !tbaa !42
  %.not24 = icmp eq ptr %93, null
  br i1 %.not24, label %100, label %94

94:                                               ; preds = %92
  %95 = load ptr, ptr %25, align 8, !tbaa !43
  %96 = getelementptr inbounds i8, ptr %95, i64 24
  %97 = load ptr, ptr %96, align 8, !tbaa !32
  %98 = icmp eq ptr %97, null
  br i1 %98, label %100, label %99

99:                                               ; preds = %94
  call void @__assert_fail(ptr noundef nonnull @.str.34, ptr noundef nonnull @.str.5, i32 noundef 473, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6System10Dispatcher16contextProcedureEPv) #10
  unreachable

100:                                              ; preds = %92, %94
  %.sink = phi ptr [ %96, %94 ], [ %24, %92 ]
  store ptr %91, ptr %.sink, align 8, !tbaa !44
  %101 = getelementptr inbounds i8, ptr %48, i64 24
  %102 = load ptr, ptr %101, align 8, !tbaa !45
  store ptr %102, ptr %25, align 8, !tbaa !43
  store ptr null, ptr %90, align 8, !tbaa !41
  br label %103

103:                                              ; preds = %83, %100, %89, %65, %71
  call void @_ZN6System10Dispatcher19pushReusableContextERNS_13NativeContextE(ptr noundef nonnull align 8 dereferenceable(424) %0, ptr noundef nonnull align 8 dereferenceable(120) %3)
  br label %104

104:                                              ; preds = %103, %47
  invoke void @_ZN6System10Dispatcher8dispatchEv(ptr noundef nonnull align 8 dereferenceable(424) %0)
          to label %36 unwind label %105, !llvm.loop !46

105:                                              ; preds = %104
  %106 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

.loopexit:                                        ; preds = %39, %33, %35, %105, %56
  %.merged = phi { ptr, i32 } [ %.pn.pn30, %35 ], [ %34, %33 ], [ %106, %105 ], [ %57, %56 ], [ %40, %39 ]
  call void @_ZN6System13NativeContextD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %3) #11
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %3) #11
  resume { ptr, i32 } %.merged

107:                                              ; preds = %30
  unreachable
}

; Function Attrs: nofree nosync nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #9

declare void @__cxa_end_catch() local_unnamed_addr

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !11, i64 408}
!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 = !{!25, !11, i64 0}
!31 = !{!25, !26, i64 16}
!32 = !{!25, !11, i64 24}
!33 = !{!25, !26, i64 17}
!34 = !{!6, !11, i64 384}
!35 = !{!6, !17, i64 416}
!36 = !{!25, !11, i64 32}
!37 = !{!25, !11, i64 40}
!38 = !{!25, !11, i64 48}
!39 = !{!29, !11, i64 8}
!40 = !{!29, !11, i64 0}
!41 = !{!29, !11, i64 16}
!42 = !{!6, !11, i64 392}
!43 = !{!6, !11, i64 400}
!44 = !{!11, !11, i64 0}
!45 = !{!29, !11, i64 24}
!46 = distinct !{!46, !47}
!47 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass