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

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

@.str.1 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [35 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@.str.7 = external hidden unnamed_addr constant [22 x i8], align 1
@__PRETTY_FUNCTION__._ZN6System13TcpConnection4readEPhm = external hidden unnamed_addr constant [54 x i8], align 1
@_ZTIN6System20InterruptedExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.8 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [22 x i8], align 1

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

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

declare i32 @__gxx_personality_v0(...)

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

declare ptr @__cxa_allocate_exception(i64)

; 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

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

declare void @__cxa_throw(ptr, ptr, ptr)

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

declare void @__cxa_free_exception(ptr)

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZN6System13TcpConnection4readEPhm(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %1, i64 noundef %2) #6 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %struct.epoll_event, align 1
  %15 = alloca %"struct.System::OperationContext", align 8
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %class.anon, align 8
  %19 = alloca %struct.epoll_event, align 1
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca i64, align 8
  %23 = alloca %"class.std::__cxx11::basic_string", align 8
  %24 = alloca %"class.std::__cxx11::basic_string", align 8
  %25 = alloca i32, align 4
  %26 = alloca %"class.std::__cxx11::basic_string", align 8
  %27 = alloca i1, align 1
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i64 %2, ptr %7, align 8, !tbaa !9
  %28 = load ptr, ptr %5, align 8
  %29 = getelementptr inbounds %"class.System::TcpConnection", ptr %28, i32 0, i32 0
  %30 = load ptr, ptr %29, align 8, !tbaa !11
  %31 = icmp ne ptr %30, null
  br i1 %31, label %32, label %33

32:                                               ; preds = %3
  br label %35

33:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 76, ptr noundef @__PRETTY_FUNCTION__._ZN6System13TcpConnection4readEPhm) #10
  unreachable

34:                                               ; No predecessors!
  br label %35

35:                                               ; preds = %34, %32
  %36 = getelementptr inbounds %"class.System::TcpConnection", ptr %28, i32 0, i32 2
  %37 = getelementptr inbounds %"struct.System::ContextPair", ptr %36, i32 0, i32 0
  %38 = load ptr, ptr %37, align 8, !tbaa !15
  %39 = icmp eq ptr %38, null
  br i1 %39, label %40, label %41

40:                                               ; preds = %35
  br label %43

41:                                               ; preds = %35
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 77, ptr noundef @__PRETTY_FUNCTION__._ZN6System13TcpConnection4readEPhm) #10
  unreachable

42:                                               ; No predecessors!
  br label %43

43:                                               ; preds = %42, %40
  %44 = getelementptr inbounds %"class.System::TcpConnection", ptr %28, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8, !tbaa !11
  %46 = call noundef zeroext i1 @_ZN6System10Dispatcher11interruptedEv(ptr noundef nonnull align 8 dereferenceable(424) %45)
  br i1 %46, label %47, label %49

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

49:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #11
  %50 = getelementptr inbounds %"class.System::TcpConnection", ptr %28, i32 0, i32 1
  %51 = load i32, ptr %50, align 8, !tbaa !16
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = load i64, ptr %7, align 8, !tbaa !9
  %54 = invoke i64 @recv(i32 noundef %51, ptr noundef %52, i64 noundef %53, i32 noundef 0)
          to label %55 unwind label %66

55:                                               ; preds = %49
  store i64 %54, ptr %9, align 8, !tbaa !9
  %56 = load i64, ptr %9, align 8, !tbaa !9
  %57 = icmp eq i64 %56, -1
  br i1 %57, label %58, label %295

58:                                               ; preds = %55
  %59 = call ptr @__errno_location() #13
  %60 = load i32, ptr %59, align 4, !tbaa !17
  %61 = icmp ne i32 %60, 11
  br i1 %61, label %62, label %79

62:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #11
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #11
  invoke void @_ZN6System16lastErrorMessageB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %13)
          to label %63 unwind label %70

63:                                               ; preds = %62
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef @.str.8, ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %64 unwind label %74

64:                                               ; preds = %63
  %65 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %12) #11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #11
  br label %279

66:                                               ; preds = %49
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %10, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %11, align 4
  br label %306

70:                                               ; preds = %62
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %10, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %11, align 4
  br label %78

74:                                               ; preds = %63
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %10, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %11, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #11
  br label %78

78:                                               ; preds = %74, %70
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #11
  br label %306

79:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 12, ptr %14) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #11
  %80 = getelementptr inbounds %"struct.System::OperationContext", ptr %15, i32 0, i32 1
  store i8 0, ptr %80, align 8, !tbaa !18
  %81 = getelementptr inbounds %"class.System::TcpConnection", ptr %28, i32 0, i32 0
  %82 = load ptr, ptr %81, align 8, !tbaa !11
  %83 = invoke noundef ptr @_ZNK6System10Dispatcher17getCurrentContextEv(ptr noundef nonnull align 8 dereferenceable(424) %82)
          to label %84 unwind label %96

84:                                               ; preds = %79
  %85 = getelementptr inbounds %"struct.System::OperationContext", ptr %15, i32 0, i32 0
  store ptr %83, ptr %85, align 8, !tbaa !21
  %86 = getelementptr inbounds %"class.System::TcpConnection", ptr %28, i32 0, i32 2
  %87 = getelementptr inbounds %"struct.System::ContextPair", ptr %86, i32 0, i32 0
  store ptr %15, ptr %87, align 8, !tbaa !15
  %88 = getelementptr inbounds %"class.System::TcpConnection", ptr %28, i32 0, i32 2
  %89 = getelementptr inbounds %struct.epoll_event, ptr %14, i32 0, i32 1
  store ptr %88, ptr %89, align 1, !tbaa !22
  %90 = getelementptr inbounds %"class.System::TcpConnection", ptr %28, i32 0, i32 2
  %91 = getelementptr inbounds %"struct.System::ContextPair", ptr %90, i32 0, i32 1
  %92 = load ptr, ptr %91, align 8, !tbaa !23
  %93 = icmp ne ptr %92, null
  br i1 %93, label %94, label %100

94:                                               ; preds = %84
  %95 = getelementptr inbounds %struct.epoll_event, ptr %14, i32 0, i32 0
  store i32 1073741829, ptr %95, align 1, !tbaa !24
  br label %102

96:                                               ; preds = %229, %174, %151, %134, %129, %102, %79
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %10, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %11, align 4
  br label %278

100:                                              ; preds = %84
  %101 = getelementptr inbounds %struct.epoll_event, ptr %14, i32 0, i32 0
  store i32 1073741825, ptr %101, align 1, !tbaa !24
  br label %102

102:                                              ; preds = %100, %94
  %103 = getelementptr inbounds %"class.System::TcpConnection", ptr %28, i32 0, i32 0
  %104 = load ptr, ptr %103, align 8, !tbaa !11
  %105 = invoke noundef i32 @_ZNK6System10Dispatcher8getEpollEv(ptr noundef nonnull align 8 dereferenceable(424) %104)
          to label %106 unwind label %96

106:                                              ; preds = %102
  %107 = getelementptr inbounds %"class.System::TcpConnection", ptr %28, i32 0, i32 1
  %108 = load i32, ptr %107, align 8, !tbaa !16
  %109 = call i32 @epoll_ctl(i32 noundef %105, i32 noundef 3, i32 noundef %108, ptr noundef %14) #11
  %110 = icmp eq i32 %109, -1
  br i1 %110, label %111, label %124

111:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #11
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #11
  invoke void @_ZN6System16lastErrorMessageB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %17)
          to label %112 unwind label %115

112:                                              ; preds = %111
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %16, ptr noundef @.str.9, ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %113 unwind label %119

113:                                              ; preds = %112
  %114 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %16) #11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #11
  br label %274

115:                                              ; preds = %111
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %10, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %11, align 4
  br label %123

119:                                              ; preds = %112
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %10, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %11, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #11
  br label %123

123:                                              ; preds = %119, %115
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #11
  br label %278

124:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #11
  %125 = getelementptr inbounds %class.anon, ptr %18, i32 0, i32 0
  store ptr %28, ptr %125, align 8, !tbaa !26
  %126 = getelementptr inbounds %"class.System::TcpConnection", ptr %28, i32 0, i32 0
  %127 = load ptr, ptr %126, align 8, !tbaa !11
  %128 = invoke noundef ptr @_ZNK6System10Dispatcher17getCurrentContextEv(ptr noundef nonnull align 8 dereferenceable(424) %127)
          to label %129 unwind label %146

129:                                              ; preds = %124
  %130 = getelementptr inbounds %"struct.System::NativeContext", ptr %128, i32 0, i32 9
  %131 = call noundef nonnull align 8 dereferenceable(32) ptr @"_ZNSt8functionIFvvEEaSIZN6System13TcpConnection4readEPhmE3$_0EENSt9enable_ifIXsrNS1_9_CallableIT_NS7_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceIS9_E4typeEE4typeES1_EE5valueESt5decayIS9_EE4type4typeESt15__invoke_resultIRSK_JEEEE5valueERS1_E4typeEOS9_"(ptr noundef nonnull align 8 dereferenceable(32) %130, ptr noundef nonnull align 8 dereferenceable(8) %18) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #11
  %132 = getelementptr inbounds %"class.System::TcpConnection", ptr %28, i32 0, i32 0
  %133 = load ptr, ptr %132, align 8, !tbaa !11
  invoke void @_ZN6System10Dispatcher8dispatchEv(ptr noundef nonnull align 8 dereferenceable(424) %133)
          to label %134 unwind label %96

134:                                              ; preds = %129
  %135 = getelementptr inbounds %"class.System::TcpConnection", ptr %28, i32 0, i32 0
  %136 = load ptr, ptr %135, align 8, !tbaa !11
  %137 = invoke noundef ptr @_ZNK6System10Dispatcher17getCurrentContextEv(ptr noundef nonnull align 8 dereferenceable(424) %136)
          to label %138 unwind label %96

138:                                              ; preds = %134
  %139 = getelementptr inbounds %"struct.System::NativeContext", ptr %137, i32 0, i32 9
  %140 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt8functionIFvvEEaSEDn(ptr noundef nonnull align 8 dereferenceable(32) %139, ptr null) #11
  %141 = getelementptr inbounds %"class.System::TcpConnection", ptr %28, i32 0, i32 0
  %142 = load ptr, ptr %141, align 8, !tbaa !11
  %143 = icmp ne ptr %142, null
  br i1 %143, label %144, label %145

144:                                              ; preds = %138
  br label %151

145:                                              ; preds = %138
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 121, ptr noundef @__PRETTY_FUNCTION__._ZN6System13TcpConnection4readEPhm) #10
  unreachable

146:                                              ; preds = %124
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %10, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #11
  br label %278

150:                                              ; No predecessors!
  br label %151

151:                                              ; preds = %150, %144
  %152 = getelementptr inbounds %"struct.System::OperationContext", ptr %15, i32 0, i32 0
  %153 = load ptr, ptr %152, align 8, !tbaa !21
  %154 = getelementptr inbounds %"class.System::TcpConnection", ptr %28, i32 0, i32 0
  %155 = load ptr, ptr %154, align 8, !tbaa !11
  %156 = invoke noundef ptr @_ZNK6System10Dispatcher17getCurrentContextEv(ptr noundef nonnull align 8 dereferenceable(424) %155)
          to label %157 unwind label %96

157:                                              ; preds = %151
  %158 = icmp eq ptr %153, %156
  br i1 %158, label %159, label %160

159:                                              ; preds = %157
  br label %162

160:                                              ; preds = %157
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str.1, i32 noundef 122, ptr noundef @__PRETTY_FUNCTION__._ZN6System13TcpConnection4readEPhm) #10
  unreachable

161:                                              ; No predecessors!
  br label %162

162:                                              ; preds = %161, %159
  %163 = getelementptr inbounds %"class.System::TcpConnection", ptr %28, i32 0, i32 2
  %164 = getelementptr inbounds %"struct.System::ContextPair", ptr %163, i32 0, i32 0
  %165 = load ptr, ptr %164, align 8, !tbaa !15
  %166 = icmp eq ptr %165, %15
  br i1 %166, label %167, label %168

167:                                              ; preds = %162
  br label %170

168:                                              ; preds = %162
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.1, i32 noundef 123, ptr noundef @__PRETTY_FUNCTION__._ZN6System13TcpConnection4readEPhm) #10
  unreachable

169:                                              ; No predecessors!
  br label %170

170:                                              ; preds = %169, %167
  %171 = getelementptr inbounds %"struct.System::OperationContext", ptr %15, i32 0, i32 1
  %172 = load i8, ptr %171, align 8, !tbaa !18, !range !28, !noundef !29
  %173 = trunc i8 %172 to i1
  br i1 %173, label %174, label %178

174:                                              ; preds = %170
  %175 = getelementptr inbounds %"class.System::TcpConnection", ptr %28, i32 0, i32 2
  %176 = getelementptr inbounds %"struct.System::ContextPair", ptr %175, i32 0, i32 0
  store ptr null, ptr %176, align 8, !tbaa !15
  %177 = call ptr @__cxa_allocate_exception(i64 8) #11
  call void @llvm.memset.p0.i64(ptr align 16 %177, i8 0, i64 8, i1 false)
  call void @_ZN6System20InterruptedExceptionC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %177) #11
  invoke void @__cxa_throw(ptr %177, ptr @_ZTIN6System20InterruptedExceptionE, ptr @_ZNSt9exceptionD2Ev) #12
          to label %312 unwind label %96

178:                                              ; preds = %170
  %179 = getelementptr inbounds %"class.System::TcpConnection", ptr %28, i32 0, i32 2
  %180 = getelementptr inbounds %"struct.System::ContextPair", ptr %179, i32 0, i32 0
  store ptr null, ptr %180, align 8, !tbaa !15
  %181 = getelementptr inbounds %"class.System::TcpConnection", ptr %28, i32 0, i32 2
  %182 = getelementptr inbounds %"struct.System::ContextPair", ptr %181, i32 0, i32 1
  %183 = load ptr, ptr %182, align 8, !tbaa !23
  %184 = icmp ne ptr %183, null
  br i1 %184, label %185, label %222

185:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #11
  %186 = getelementptr inbounds %struct.epoll_event, ptr %19, i32 0, i32 0
  store i32 1073741828, ptr %186, align 1, !tbaa !24
  %187 = getelementptr inbounds %"class.System::TcpConnection", ptr %28, i32 0, i32 2
  %188 = getelementptr inbounds %struct.epoll_event, ptr %19, i32 0, i32 1
  store ptr %187, ptr %188, align 1, !tbaa !22
  %189 = getelementptr inbounds %"class.System::TcpConnection", ptr %28, i32 0, i32 0
  %190 = load ptr, ptr %189, align 8, !tbaa !11
  %191 = invoke noundef i32 @_ZNK6System10Dispatcher8getEpollEv(ptr noundef nonnull align 8 dereferenceable(424) %190)
          to label %192 unwind label %203

192:                                              ; preds = %185
  %193 = getelementptr inbounds %"class.System::TcpConnection", ptr %28, i32 0, i32 1
  %194 = load i32, ptr %193, align 8, !tbaa !16
  %195 = call i32 @epoll_ctl(i32 noundef %191, i32 noundef 3, i32 noundef %194, ptr noundef %19) #11
  %196 = icmp eq i32 %195, -1
  br i1 %196, label %197, label %220

197:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #11
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #11
  invoke void @_ZN6System16lastErrorMessageB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %21)
          to label %198 unwind label %207

198:                                              ; preds = %197
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %20, ptr noundef @.str.9, ptr noundef nonnull align 8 dereferenceable(32) %21)
          to label %199 unwind label %211

199:                                              ; preds = %198
  %200 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %20) #11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #11
  %201 = call ptr @__cxa_allocate_exception(i64 16) #11
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %201, ptr noundef @.str.12)
          to label %202 unwind label %216

202:                                              ; preds = %199
  invoke void @__cxa_throw(ptr %201, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #12
          to label %312 unwind label %203

203:                                              ; preds = %202, %185
  %204 = landingpad { ptr, i32 }
          cleanup
  %205 = extractvalue { ptr, i32 } %204, 0
  store ptr %205, ptr %10, align 8
  %206 = extractvalue { ptr, i32 } %204, 1
  store i32 %206, ptr %11, align 4
  br label %221

207:                                              ; preds = %197
  %208 = landingpad { ptr, i32 }
          cleanup
  %209 = extractvalue { ptr, i32 } %208, 0
  store ptr %209, ptr %10, align 8
  %210 = extractvalue { ptr, i32 } %208, 1
  store i32 %210, ptr %11, align 4
  br label %215

211:                                              ; preds = %198
  %212 = landingpad { ptr, i32 }
          cleanup
  %213 = extractvalue { ptr, i32 } %212, 0
  store ptr %213, ptr %10, align 8
  %214 = extractvalue { ptr, i32 } %212, 1
  store i32 %214, ptr %11, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #11
  br label %215

215:                                              ; preds = %211, %207
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #11
  br label %221

216:                                              ; preds = %199
  %217 = landingpad { ptr, i32 }
          cleanup
  %218 = extractvalue { ptr, i32 } %217, 0
  store ptr %218, ptr %10, align 8
  %219 = extractvalue { ptr, i32 } %217, 1
  store i32 %219, ptr %11, align 4
  call void @__cxa_free_exception(ptr %201) #11
  br label %221

220:                                              ; preds = %192
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #11
  br label %222

221:                                              ; preds = %216, %215, %203
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #11
  br label %278

222:                                              ; preds = %220, %178
  %223 = getelementptr inbounds %"struct.System::OperationContext", ptr %15, i32 0, i32 2
  %224 = load i32, ptr %223, align 4, !tbaa !30
  %225 = and i32 %224, 24
  %226 = icmp ne i32 %225, 0
  br i1 %226, label %227, label %234

227:                                              ; preds = %222
  %228 = call ptr @__cxa_allocate_exception(i64 16) #11
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %228, ptr noundef @.str.12)
          to label %229 unwind label %230

229:                                              ; preds = %227
  invoke void @__cxa_throw(ptr %228, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #12
          to label %312 unwind label %96

230:                                              ; preds = %227
  %231 = landingpad { ptr, i32 }
          cleanup
  %232 = extractvalue { ptr, i32 } %231, 0
  store ptr %232, ptr %10, align 8
  %233 = extractvalue { ptr, i32 } %231, 1
  store i32 %233, ptr %11, align 4
  call void @__cxa_free_exception(ptr %228) #11
  br label %278

234:                                              ; preds = %222
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #11
  %235 = getelementptr inbounds %"class.System::TcpConnection", ptr %28, i32 0, i32 1
  %236 = load i32, ptr %235, align 8, !tbaa !16
  %237 = load ptr, ptr %6, align 8, !tbaa !5
  %238 = load i64, ptr %7, align 8, !tbaa !9
  %239 = invoke i64 @recv(i32 noundef %236, ptr noundef %237, i64 noundef %238, i32 noundef 0)
          to label %240 unwind label %247

240:                                              ; preds = %234
  store i64 %239, ptr %22, align 8, !tbaa !9
  %241 = load i64, ptr %22, align 8, !tbaa !9
  %242 = icmp eq i64 %241, -1
  br i1 %242, label %243, label %260

243:                                              ; preds = %240
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #11
  call void @llvm.lifetime.start.p0(i64 32, ptr %24) #11
  invoke void @_ZN6System16lastErrorMessageB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %24)
          to label %244 unwind label %251

244:                                              ; preds = %243
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %23, ptr noundef @.str.8, ptr noundef nonnull align 8 dereferenceable(32) %24)
          to label %245 unwind label %255

245:                                              ; preds = %244
  %246 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %23) #11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #11
  br label %269

247:                                              ; preds = %234
  %248 = landingpad { ptr, i32 }
          cleanup
  %249 = extractvalue { ptr, i32 } %248, 0
  store ptr %249, ptr %10, align 8
  %250 = extractvalue { ptr, i32 } %248, 1
  store i32 %250, ptr %11, align 4
  br label %273

251:                                              ; preds = %243
  %252 = landingpad { ptr, i32 }
          cleanup
  %253 = extractvalue { ptr, i32 } %252, 0
  store ptr %253, ptr %10, align 8
  %254 = extractvalue { ptr, i32 } %252, 1
  store i32 %254, ptr %11, align 4
  br label %259

255:                                              ; preds = %244
  %256 = landingpad { ptr, i32 }
          cleanup
  %257 = extractvalue { ptr, i32 } %256, 0
  store ptr %257, ptr %10, align 8
  %258 = extractvalue { ptr, i32 } %256, 1
  store i32 %258, ptr %11, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #11
  br label %259

259:                                              ; preds = %255, %251
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #11
  br label %273

260:                                              ; preds = %240
  %261 = load i64, ptr %22, align 8, !tbaa !9
  %262 = load i64, ptr %7, align 8, !tbaa !9
  %263 = icmp sle i64 %261, %262
  br i1 %263, label %264, label %265

264:                                              ; preds = %260
  br label %267

265:                                              ; preds = %260
  call void @__assert_fail(ptr noundef @.str.13, ptr noundef @.str.1, i32 noundef 150, ptr noundef @__PRETTY_FUNCTION__._ZN6System13TcpConnection4readEPhm) #10
  unreachable

266:                                              ; No predecessors!
  br label %267

267:                                              ; preds = %266, %264
  %268 = load i64, ptr %22, align 8, !tbaa !9
  store i64 %268, ptr %4, align 8
  store i32 1, ptr %25, align 4
  br label %270

269:                                              ; preds = %245
  store i32 0, ptr %25, align 4
  br label %270

270:                                              ; preds = %269, %267
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #11
  %271 = load i32, ptr %25, align 4
  switch i32 %271, label %275 [
    i32 0, label %272
  ]

272:                                              ; preds = %270
  br label %274

273:                                              ; preds = %259, %247
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #11
  br label %278

274:                                              ; preds = %272, %113
  store i32 0, ptr %25, align 4
  br label %275

275:                                              ; preds = %274, %270
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #11
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #11
  %276 = load i32, ptr %25, align 4
  switch i32 %276, label %304 [
    i32 0, label %277
  ]

277:                                              ; preds = %275
  br label %279

278:                                              ; preds = %273, %230, %221, %146, %123, %96
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #11
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #11
  br label %306

279:                                              ; preds = %277, %64
  store i1 true, ptr %27, align 1
  %280 = call ptr @__cxa_allocate_exception(i64 16) #11
  call void @llvm.lifetime.start.p0(i64 32, ptr %26) #11
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %26, ptr noundef @.str.14, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %281 unwind label %283

281:                                              ; preds = %279
  invoke void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %280, ptr noundef nonnull align 8 dereferenceable(32) %26)
          to label %282 unwind label %287

282:                                              ; preds = %281
  store i1 false, ptr %27, align 1
  invoke void @__cxa_throw(ptr %280, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #12
          to label %312 unwind label %287

283:                                              ; preds = %279
  %284 = landingpad { ptr, i32 }
          cleanup
  %285 = extractvalue { ptr, i32 } %284, 0
  store ptr %285, ptr %10, align 8
  %286 = extractvalue { ptr, i32 } %284, 1
  store i32 %286, ptr %11, align 4
  br label %291

287:                                              ; preds = %282, %281
  %288 = landingpad { ptr, i32 }
          cleanup
  %289 = extractvalue { ptr, i32 } %288, 0
  store ptr %289, ptr %10, align 8
  %290 = extractvalue { ptr, i32 } %288, 1
  store i32 %290, ptr %11, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #11
  br label %291

291:                                              ; preds = %287, %283
  call void @llvm.lifetime.end.p0(i64 32, ptr %26) #11
  %292 = load i1, ptr %27, align 1
  br i1 %292, label %293, label %294

293:                                              ; preds = %291
  call void @__cxa_free_exception(ptr %280) #11
  br label %294

294:                                              ; preds = %293, %291
  br label %306

295:                                              ; preds = %55
  %296 = load i64, ptr %9, align 8, !tbaa !9
  %297 = load i64, ptr %7, align 8, !tbaa !9
  %298 = icmp sle i64 %296, %297
  br i1 %298, label %299, label %300

299:                                              ; preds = %295
  br label %302

300:                                              ; preds = %295
  call void @__assert_fail(ptr noundef @.str.13, ptr noundef @.str.1, i32 noundef 159, ptr noundef @__PRETTY_FUNCTION__._ZN6System13TcpConnection4readEPhm) #10
  unreachable

301:                                              ; No predecessors!
  br label %302

302:                                              ; preds = %301, %299
  %303 = load i64, ptr %9, align 8, !tbaa !9
  store i64 %303, ptr %4, align 8
  store i32 1, ptr %25, align 4
  br label %304

304:                                              ; preds = %302, %275
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #11
  %305 = load i64, ptr %4, align 8
  ret i64 %305

306:                                              ; preds = %294, %278, %78, %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #11
  br label %307

307:                                              ; preds = %306
  %308 = load ptr, ptr %10, align 8
  %309 = load i32, ptr %11, align 4
  %310 = insertvalue { ptr, i32 } poison, ptr %308, 0
  %311 = insertvalue { ptr, i32 } %310, i32 %309, 1
  resume { ptr, i32 } %311

312:                                              ; preds = %282, %229, %202, %174
  unreachable
}

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

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

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

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

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

declare i64 @recv(i32 noundef, ptr noundef, i64 noundef, i32 noundef) #3

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

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

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

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

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

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

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTSN6System13TcpConnectionE", !6, i64 0, !13, i64 8, !14, i64 16}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSN6System11ContextPairE", !6, i64 0, !6, i64 8}
!15 = !{!12, !6, i64 16}
!16 = !{!12, !13, i64 8}
!17 = !{!13, !13, i64 0}
!18 = !{!19, !20, i64 8}
!19 = !{!"_ZTSN6System16OperationContextE", !6, i64 0, !20, i64 8, !13, i64 12}
!20 = !{!"bool", !7, i64 0}
!21 = !{!19, !6, i64 0}
!22 = !{!7, !7, i64 0}
!23 = !{!12, !6, i64 24}
!24 = !{!25, !13, i64 0}
!25 = !{!"_ZTS11epoll_event", !13, i64 0, !7, i64 4}
!26 = !{!27, !6, i64 0}
!27 = !{!"_ZTSZN6System13TcpConnection4readEPhmE3$_0", !6, i64 0}
!28 = !{i8 0, i8 2}
!29 = !{}
!30 = !{!19, !13, i64 12}


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

@.str.1 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [35 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@.str.7 = external hidden unnamed_addr constant [22 x i8], align 1
@__PRETTY_FUNCTION__._ZN6System13TcpConnection4readEPhm = external hidden unnamed_addr constant [54 x i8], align 1
@_ZTIN6System20InterruptedExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.8 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [22 x i8], align 1

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

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

declare i32 @__gxx_personality_v0(...)

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

; 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

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

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

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

19:                                               ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 76, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6System13TcpConnection4readEPhm) #9
  unreachable

20:                                               ; preds = %3
  %21 = getelementptr inbounds i8, ptr %0, i64 16
  %22 = load ptr, ptr %21, align 8, !tbaa !12
  %23 = icmp eq ptr %22, null
  br i1 %23, label %25, label %24

24:                                               ; preds = %20
  tail call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 77, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6System13TcpConnection4readEPhm) #9
  unreachable

25:                                               ; preds = %20
  %26 = tail call noundef zeroext i1 @_ZN6System10Dispatcher11interruptedEv(ptr noundef nonnull align 8 dereferenceable(424) %18)
  br i1 %26, label %27, label %29

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

29:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #10
  %30 = getelementptr inbounds i8, ptr %0, i64 8
  %31 = load i32, ptr %30, align 8, !tbaa !13
  %32 = invoke i64 @recv(i32 noundef %31, ptr noundef %1, i64 noundef %2, i32 noundef 0)
          to label %33 unwind label %42

33:                                               ; preds = %29
  %34 = icmp eq i64 %32, -1
  br i1 %34, label %35, label %173

35:                                               ; preds = %33
  %36 = tail call ptr @__errno_location() #12
  %37 = load i32, ptr %36, align 4, !tbaa !14
  %.not42 = icmp eq i32 %37, 11
  br i1 %.not42, label %49, label %38

38:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #10
  invoke void @_ZN6System16lastErrorMessageB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6)
          to label %39 unwind label %44

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

40:                                               ; preds = %39
  %41 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #10
  br label %164

42:                                               ; preds = %29
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %176

44:                                               ; preds = %38
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %48

46:                                               ; preds = %39
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #10
  br label %48

48:                                               ; preds = %46, %44
  %.pn57 = phi { ptr, i32 } [ %47, %46 ], [ %45, %44 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #10
  br label %176

49:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #10
  %50 = getelementptr inbounds i8, ptr %8, i64 8
  store i8 0, ptr %50, align 8, !tbaa !15
  %51 = load ptr, ptr %0, align 8, !tbaa !5
  %52 = invoke noundef ptr @_ZNK6System10Dispatcher17getCurrentContextEv(ptr noundef nonnull align 8 dereferenceable(424) %51)
          to label %53 unwind label %59

53:                                               ; preds = %49
  store ptr %52, ptr %8, align 8, !tbaa !18
  store ptr %8, ptr %21, align 8, !tbaa !12
  %54 = getelementptr inbounds i8, ptr %7, i64 4
  store ptr %21, ptr %54, align 4, !tbaa !19
  %55 = getelementptr inbounds i8, ptr %0, i64 24
  %56 = load ptr, ptr %55, align 8, !tbaa !20
  %.not43 = icmp eq ptr %56, null
  %. = select i1 %.not43, i32 1073741825, i32 1073741829
  store i32 %., ptr %7, align 4, !tbaa !21
  %57 = load ptr, ptr %0, align 8, !tbaa !5
  %58 = invoke noundef i32 @_ZNK6System10Dispatcher8getEpollEv(ptr noundef nonnull align 8 dereferenceable(424) %57)
          to label %61 unwind label %59

59:                                               ; preds = %.invoke, %91, %81, %77, %53, %49
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %163

61:                                               ; preds = %53
  %62 = load i32, ptr %30, align 8, !tbaa !13
  %63 = call i32 @epoll_ctl(i32 noundef %58, i32 noundef 3, i32 noundef %62, ptr noundef nonnull %7) #10
  %64 = icmp eq i32 %63, -1
  br i1 %64, label %65, label %74

65:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #10
  invoke void @_ZN6System16lastErrorMessageB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %10)
          to label %66 unwind label %69

66:                                               ; preds = %65
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef nonnull @.str.9, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %67 unwind label %71

67:                                               ; preds = %66
  %68 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %9) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #10
  br label %.thread

69:                                               ; preds = %65
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %73

71:                                               ; preds = %66
  %72 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  br label %73

73:                                               ; preds = %71, %69
  %.pn54 = phi { ptr, i32 } [ %72, %71 ], [ %70, %69 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #10
  br label %163

74:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #10
  store ptr %0, ptr %11, align 8, !tbaa !23
  %75 = load ptr, ptr %0, align 8, !tbaa !5
  %76 = invoke noundef ptr @_ZNK6System10Dispatcher17getCurrentContextEv(ptr noundef nonnull align 8 dereferenceable(424) %75)
          to label %77 unwind label %89

77:                                               ; preds = %74
  %78 = getelementptr inbounds i8, ptr %76, i64 88
  %79 = call noundef nonnull align 8 dereferenceable(32) ptr @"_ZNSt8functionIFvvEEaSIZN6System13TcpConnection4readEPhmE3$_0EENSt9enable_ifIXsrNS1_9_CallableIT_NS7_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceIS9_E4typeEE4typeES1_EE5valueESt5decayIS9_EE4type4typeESt15__invoke_resultIRSK_JEEEE5valueERS1_E4typeEOS9_"(ptr noundef nonnull align 8 dereferenceable(32) %78, ptr noundef nonnull align 8 dereferenceable(8) %11) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #10
  %80 = load ptr, ptr %0, align 8, !tbaa !5
  invoke void @_ZN6System10Dispatcher8dispatchEv(ptr noundef nonnull align 8 dereferenceable(424) %80)
          to label %81 unwind label %59

81:                                               ; preds = %77
  %82 = load ptr, ptr %0, align 8, !tbaa !5
  %83 = invoke noundef ptr @_ZNK6System10Dispatcher17getCurrentContextEv(ptr noundef nonnull align 8 dereferenceable(424) %82)
          to label %84 unwind label %59

84:                                               ; preds = %81
  %85 = getelementptr inbounds i8, ptr %83, i64 88
  %86 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt8functionIFvvEEaSEDn(ptr noundef nonnull align 8 dereferenceable(32) %85, ptr null) #10
  %87 = load ptr, ptr %0, align 8, !tbaa !5
  %.not44 = icmp eq ptr %87, null
  br i1 %.not44, label %88, label %91

88:                                               ; preds = %84
  call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 121, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6System13TcpConnection4readEPhm) #9
  unreachable

89:                                               ; preds = %74
  %90 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #10
  br label %163

91:                                               ; preds = %84
  %92 = load ptr, ptr %8, align 8, !tbaa !18
  %93 = invoke noundef ptr @_ZNK6System10Dispatcher17getCurrentContextEv(ptr noundef nonnull align 8 dereferenceable(424) %87)
          to label %94 unwind label %59

94:                                               ; preds = %91
  %95 = icmp eq ptr %92, %93
  br i1 %95, label %97, label %96

96:                                               ; preds = %94
  call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.1, i32 noundef 122, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6System13TcpConnection4readEPhm) #9
  unreachable

97:                                               ; preds = %94
  %98 = load ptr, ptr %21, align 8, !tbaa !12
  %99 = icmp eq ptr %98, %8
  br i1 %99, label %101, label %100

100:                                              ; preds = %97
  call void @__assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.1, i32 noundef 123, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6System13TcpConnection4readEPhm) #9
  unreachable

101:                                              ; preds = %97
  %102 = load i8, ptr %50, align 8, !tbaa !15, !range !25, !noundef !26
  %103 = trunc nuw i8 %102 to i1
  store ptr null, ptr %21, align 8, !tbaa !12
  br i1 %103, label %104, label %106

104:                                              ; preds = %101
  %105 = call ptr @__cxa_allocate_exception(i64 8) #10
  store i64 0, ptr %105, align 16
  call void @_ZN6System20InterruptedExceptionC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %105) #10
  br label %.invoke

106:                                              ; preds = %101
  %107 = load ptr, ptr %55, align 8, !tbaa !20
  %.not45 = icmp eq ptr %107, null
  br i1 %.not45, label %133, label %108

108:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #10
  store i32 1073741828, ptr %12, align 4, !tbaa !21
  %109 = getelementptr inbounds i8, ptr %12, i64 4
  store ptr %21, ptr %109, align 4, !tbaa !19
  %110 = load ptr, ptr %0, align 8, !tbaa !5
  %111 = invoke noundef i32 @_ZNK6System10Dispatcher8getEpollEv(ptr noundef nonnull align 8 dereferenceable(424) %110)
          to label %112 unwind label %122

112:                                              ; preds = %108
  %113 = load i32, ptr %30, align 8, !tbaa !13
  %114 = call i32 @epoll_ctl(i32 noundef %111, i32 noundef 3, i32 noundef %113, ptr noundef nonnull %12) #10
  %115 = icmp eq i32 %114, -1
  br i1 %115, label %116, label %131

116:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #10
  invoke void @_ZN6System16lastErrorMessageB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %14)
          to label %117 unwind label %124

117:                                              ; preds = %116
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %13, ptr noundef nonnull @.str.9, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %118 unwind label %126

118:                                              ; preds = %117
  %119 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %13) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #10
  %120 = call ptr @__cxa_allocate_exception(i64 16) #10
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %120, ptr noundef nonnull @.str.12)
          to label %121 unwind label %129

121:                                              ; preds = %118
  invoke void @__cxa_throw(ptr nonnull %120, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #11
          to label %177 unwind label %122

122:                                              ; preds = %121, %108
  %123 = landingpad { ptr, i32 }
          cleanup
  br label %132

124:                                              ; preds = %116
  %125 = landingpad { ptr, i32 }
          cleanup
  br label %128

126:                                              ; preds = %117
  %127 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #10
  br label %128

128:                                              ; preds = %126, %124
  %.pn50 = phi { ptr, i32 } [ %127, %126 ], [ %125, %124 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #10
  br label %132

129:                                              ; preds = %118
  %130 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %120) #10
  br label %132

131:                                              ; preds = %112
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #10
  br label %133

132:                                              ; preds = %129, %128, %122
  %.pn52 = phi { ptr, i32 } [ %123, %122 ], [ %130, %129 ], [ %.pn50, %128 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #10
  br label %163

133:                                              ; preds = %131, %106
  %134 = getelementptr inbounds i8, ptr %8, i64 12
  %135 = load i32, ptr %134, align 4, !tbaa !27
  %136 = and i32 %135, 24
  %.not46 = icmp eq i32 %136, 0
  br i1 %.not46, label %144, label %137

137:                                              ; preds = %133
  %138 = call ptr @__cxa_allocate_exception(i64 16) #10
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %138, ptr noundef nonnull @.str.12)
          to label %.invoke unwind label %142

.invoke:                                          ; preds = %137, %104
  %139 = phi ptr [ %105, %104 ], [ %138, %137 ]
  %140 = phi ptr [ @_ZTIN6System20InterruptedExceptionE, %104 ], [ @_ZTISt13runtime_error, %137 ]
  %141 = phi ptr [ @_ZNSt9exceptionD2Ev, %104 ], [ @_ZNSt13runtime_errorD1Ev, %137 ]
  invoke void @__cxa_throw(ptr nonnull %139, ptr nonnull %140, ptr nonnull %141) #11
          to label %.cont unwind label %59

.cont:                                            ; preds = %.invoke
  unreachable

142:                                              ; preds = %137
  %143 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %138) #10
  br label %163

144:                                              ; preds = %133
  %145 = load i32, ptr %30, align 8, !tbaa !13
  %146 = invoke i64 @recv(i32 noundef %145, ptr noundef %1, i64 noundef %2, i32 noundef 0)
          to label %147 unwind label %153

147:                                              ; preds = %144
  %148 = icmp eq i64 %146, -1
  br i1 %148, label %149, label %160

149:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %16) #10
  invoke void @_ZN6System16lastErrorMessageB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %16)
          to label %150 unwind label %155

150:                                              ; preds = %149
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %15, ptr noundef nonnull @.str.8, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %151 unwind label %157

151:                                              ; preds = %150
  %152 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %15) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #10
  br label %.thread

153:                                              ; preds = %144
  %154 = landingpad { ptr, i32 }
          cleanup
  br label %163

155:                                              ; preds = %149
  %156 = landingpad { ptr, i32 }
          cleanup
  br label %159

157:                                              ; preds = %150
  %158 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #10
  br label %159

159:                                              ; preds = %157, %155
  %.pn = phi { ptr, i32 } [ %158, %157 ], [ %156, %155 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #10
  br label %163

160:                                              ; preds = %147
  %.not47 = icmp sgt i64 %146, %2
  br i1 %.not47, label %161, label %162

161:                                              ; preds = %160
  call void @__assert_fail(ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.1, i32 noundef 150, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6System13TcpConnection4readEPhm) #9
  unreachable

.thread:                                          ; preds = %67, %151
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #10
  br label %164

162:                                              ; preds = %160
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #10
  br label %175

163:                                              ; preds = %153, %159, %142, %132, %89, %73, %59
  %.pn54.pn = phi { ptr, i32 } [ %.pn54, %73 ], [ %60, %59 ], [ %.pn52, %132 ], [ %143, %142 ], [ %90, %89 ], [ %.pn, %159 ], [ %154, %153 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #10
  br label %176

164:                                              ; preds = %.thread, %40
  %165 = call ptr @__cxa_allocate_exception(i64 16) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %17) #10
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %17, ptr noundef nonnull @.str.14, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %166 unwind label %.thread64

166:                                              ; preds = %164
  invoke void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %165, ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %168 unwind label %.thread68

.thread68:                                        ; preds = %166
  %167 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #10
  br label %172

168:                                              ; preds = %166
  invoke void @__cxa_throw(ptr nonnull %165, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #11
          to label %177 unwind label %170

.thread64:                                        ; preds = %164
  %169 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #10
  br label %172

170:                                              ; preds = %168
  %171 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #10
  br label %176

172:                                              ; preds = %.thread68, %.thread64
  %.pn5967 = phi { ptr, i32 } [ %169, %.thread64 ], [ %167, %.thread68 ]
  call void @__cxa_free_exception(ptr %165) #10
  br label %176

173:                                              ; preds = %33
  %.not41 = icmp sgt i64 %32, %2
  br i1 %.not41, label %174, label %175

174:                                              ; preds = %173
  call void @__assert_fail(ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.1, i32 noundef 159, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6System13TcpConnection4readEPhm) #9
  unreachable

175:                                              ; preds = %162, %173
  %.3 = phi i64 [ %146, %162 ], [ %32, %173 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #10
  ret i64 %.3

176:                                              ; preds = %170, %172, %163, %48, %42
  %.pn59.pn = phi { ptr, i32 } [ %.pn5967, %172 ], [ %171, %170 ], [ %.pn57, %48 ], [ %.pn54.pn, %163 ], [ %43, %42 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #10
  resume { ptr, i32 } %.pn59.pn

177:                                              ; preds = %168, %121
  unreachable
}

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

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

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

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

declare i64 @recv(i32 noundef, ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #3

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(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 #6

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTSN6System13TcpConnectionE", !7, i64 0, !10, i64 8, !11, i64 16}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTSN6System11ContextPairE", !7, i64 0, !7, i64 8}
!12 = !{!6, !7, i64 16}
!13 = !{!6, !10, i64 8}
!14 = !{!10, !10, i64 0}
!15 = !{!16, !17, i64 8}
!16 = !{!"_ZTSN6System16OperationContextE", !7, i64 0, !17, i64 8, !10, i64 12}
!17 = !{!"bool", !8, i64 0}
!18 = !{!16, !7, i64 0}
!19 = !{!8, !8, i64 0}
!20 = !{!6, !7, i64 24}
!21 = !{!22, !10, i64 0}
!22 = !{!"_ZTS11epoll_event", !10, i64 0, !8, i64 4}
!23 = !{!24, !7, i64 0}
!24 = !{!"_ZTSZN6System13TcpConnection4readEPhmE3$_0", !7, i64 0}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = !{!16, !10, i64 12}


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