; LLVM IR from dynexcoin/Dynex :: src/P2p/P2pContext.ll (ZN7DynexCN10P2pContext13timedSyncLoopEv)

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

%"struct.DynexCN::P2pContext::Message" = type { %"struct.DynexCN::P2pMessage", i32, i32 }
%"struct.DynexCN::P2pMessage" = type { i32, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.DynexCN::COMMAND_TIMED_SYNC::request" = type { %"struct.DynexCN::CORE_SYNC_DATA" }
%"struct.DynexCN::CORE_SYNC_DATA" = type { i32, %"struct.Crypto::Hash" }
%"struct.Crypto::Hash" = type { [32 x i8] }
%"class.std::chrono::duration" = type { i64 }
%"class.System::OperationTimeout" = type { ptr, %"class.System::ContextGroup", %"class.System::Timer" }
%"class.System::ContextGroup" = type { ptr, %"struct.System::NativeContextGroup" }
%"struct.System::NativeContextGroup" = type { ptr, ptr, ptr, ptr }
%"class.System::Timer" = type { ptr, i32, ptr }
%"class.std::chrono::time_point" = type { %"class.std::chrono::duration" }
%"class.DynexCN::P2pContext" = type <{ i8, i8, %"struct.DynexCN::NetworkAddress", [6 x i8], i64, i16, [6 x i8], ptr, %"class.System::ContextGroup", %"class.std::chrono::time_point", i8, [7 x i8], %"class.std::chrono::time_point", %"class.std::chrono::duration", ptr, %"class.System::Timer", %"class.System::Event", %"class.System::TcpConnection", %"class.System::Event", %"class.System::Event" }>
%"struct.DynexCN::NetworkAddress" = type { i32, i32 }
%"class.System::TcpConnection" = type { ptr, i32, ptr, ptr }
%"class.System::Event" = type { ptr, i8, ptr, ptr }

@_ZTISt9exception = external constant ptr
@_ZTIN6System20InterruptedExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

; Function Attrs: nounwind
declare i64 @_ZNSt6chrono3_V212steady_clock3nowEv() #2

declare i32 @__gxx_personality_v0(...)

declare void @_ZN6System5Event3setEv(ptr noundef nonnull align 8 dereferenceable(32)) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7DynexCN10P2pContext13timedSyncLoopEv(ptr noundef nonnull align 8 dereferenceable(272) %0) #4 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"struct.DynexCN::P2pContext::Message", align 8
  %4 = alloca %"struct.DynexCN::P2pMessage", align 8
  %5 = alloca %"struct.DynexCN::COMMAND_TIMED_SYNC::request", align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::chrono::duration", align 8
  %9 = alloca %"class.System::OperationTimeout", align 8
  %10 = alloca %"class.std::chrono::duration", align 8
  %11 = alloca %"class.std::chrono::time_point", align 8
  %12 = alloca %"class.std::chrono::duration", align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::chrono::time_point", align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %18 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr %3) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #9
  %19 = getelementptr inbounds %"struct.DynexCN::P2pMessage", ptr %4, i32 0, i32 0
  store i32 1002, ptr %19, align 8, !tbaa !9
  %20 = getelementptr inbounds %"struct.DynexCN::P2pMessage", ptr %4, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 36, ptr %5) #9
  %21 = getelementptr inbounds %"struct.DynexCN::COMMAND_TIMED_SYNC::request", ptr %5, i32 0, i32 0
  %22 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %18, i32 0, i32 14
  %23 = load ptr, ptr %22, align 8, !tbaa !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %23, i64 36, i1 false), !tbaa.struct !29
  call void @_ZN7DynexCN13LevinProtocol6encodeINS_18COMMAND_TIMED_SYNC7requestEEESt6vectorIhSaIhEERKT_(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %20, ptr noundef nonnull align 4 dereferenceable(36) %5)
  invoke void @_ZN7DynexCN10P2pContext7MessageC1EONS_10P2pMessageENS1_4TypeEj(ptr noundef nonnull align 8 dereferenceable(40) %3, ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef 1, i32 noundef 0)
          to label %24 unwind label %59

24:                                               ; preds = %1
  call void @_ZN7DynexCN10P2pMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #9
  call void @llvm.lifetime.end.p0(i64 36, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #9
  br label %25

25:                                               ; preds = %98, %24
  %26 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %18, i32 0, i32 10
  %27 = load i8, ptr %26, align 8, !tbaa !32, !range !33, !noundef !34
  %28 = trunc i8 %27 to i1
  %29 = xor i1 %28, true
  br i1 %29, label %30, label %121

30:                                               ; preds = %25
  %31 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %18, i32 0, i32 15
  %32 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %18, i32 0, i32 13
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %32, i64 8, i1 false), !tbaa.struct !35
  %33 = getelementptr inbounds %"class.std::chrono::duration", ptr %8, i32 0, i32 0
  %34 = load i64, ptr %33, align 8
  invoke void @_ZN6System5Timer5sleepENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE(ptr noundef nonnull align 8 dereferenceable(24) %31, i64 %34)
          to label %35 unwind label %63

35:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 72, ptr %9) #9
  %36 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %18, i32 0, i32 7
  %37 = load ptr, ptr %36, align 8, !tbaa !37
  %38 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %18, i32 0, i32 13
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 %38, i64 8, i1 false), !tbaa.struct !35
  %39 = getelementptr inbounds %"class.std::chrono::duration", ptr %10, i32 0, i32 0
  %40 = load i64, ptr %39, align 8
  invoke void @_ZN6System16OperationTimeoutIN7DynexCN10P2pContextEEC2ERNS_10DispatcherERS2_NSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE(ptr noundef nonnull align 8 dereferenceable(72) %9, ptr noundef nonnull align 16 dereferenceable(440) %37, ptr noundef nonnull align 8 dereferenceable(272) %18, i64 %40)
          to label %41 unwind label %67

41:                                               ; preds = %35
  invoke void @_ZN7DynexCN10P2pContext12writeMessageERKNS0_7MessageE(ptr noundef nonnull align 8 dereferenceable(272) %18, ptr noundef nonnull align 8 dereferenceable(40) %3)
          to label %42 unwind label %71

42:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  %43 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %18, i32 0, i32 12
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  %44 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %18, i32 0, i32 13
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  store i32 2, ptr %13, align 4, !tbaa !30
  %45 = invoke i64 @_ZNSt6chronomlIlSt5ratioILl1ELl1000000000EEiEENS_8durationINSt9enable_ifIXsr14is_convertibleIRKT1_NSt11common_typeIJT_S5_EE4typeEEE5valueESB_E4typeET0_EERKNS3_IS9_SE_EES7_(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %46 unwind label %75

46:                                               ; preds = %42
  %47 = getelementptr inbounds %"class.std::chrono::duration", ptr %12, i32 0, i32 0
  store i64 %45, ptr %47, align 8
  %48 = invoke i64 @_ZNSt6chronoplINS_3_V212steady_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEElS5_EENS_10time_pointIT_NSt11common_typeIJT0_NS3_IT1_T2_EEEE4typeEEERKNS7_IS8_SA_EERKSD_(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %49 unwind label %75

49:                                               ; preds = %46
  %50 = getelementptr inbounds %"class.std::chrono::time_point", ptr %11, i32 0, i32 0
  %51 = getelementptr inbounds %"class.std::chrono::duration", ptr %50, i32 0, i32 0
  store i64 %48, ptr %51, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  %52 = call i64 @_ZNSt6chrono3_V212steady_clock3nowEv() #9
  %53 = getelementptr inbounds %"class.std::chrono::time_point", ptr %14, i32 0, i32 0
  %54 = getelementptr inbounds %"class.std::chrono::duration", ptr %53, i32 0, i32 0
  store i64 %52, ptr %54, align 8
  %55 = invoke noundef zeroext i1 @_ZNSt6chronoltINS_3_V212steady_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEES6_EEbRKNS_10time_pointIT_T0_EERKNS7_IS8_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %56 unwind label %79

56:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  br i1 %55, label %57, label %84

57:                                               ; preds = %56
  invoke void @_ZN7DynexCN10P2pContext4stopEv(ptr noundef nonnull align 8 dereferenceable(272) %18)
          to label %58 unwind label %71

58:                                               ; preds = %57
  store i32 3, ptr %15, align 4
  br label %85

59:                                               ; preds = %1
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %6, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %7, align 4
  call void @_ZN7DynexCN10P2pMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #9
  call void @llvm.lifetime.end.p0(i64 36, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #9
  br label %129

63:                                               ; preds = %30
  %64 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6System20InterruptedExceptionE
          catch ptr @_ZTISt9exception
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %6, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %7, align 4
  br label %90

67:                                               ; preds = %35
  %68 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6System20InterruptedExceptionE
          catch ptr @_ZTISt9exception
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %6, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %7, align 4
  br label %89

71:                                               ; preds = %57, %41
  %72 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6System20InterruptedExceptionE
          catch ptr @_ZTISt9exception
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %6, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %7, align 4
  br label %88

75:                                               ; preds = %46, %42
  %76 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6System20InterruptedExceptionE
          catch ptr @_ZTISt9exception
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %6, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %7, align 4
  br label %83

79:                                               ; preds = %49
  %80 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6System20InterruptedExceptionE
          catch ptr @_ZTISt9exception
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %6, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  br label %83

83:                                               ; preds = %79, %75
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  br label %88

84:                                               ; preds = %56
  store i32 0, ptr %15, align 4
  br label %85

85:                                               ; preds = %84, %58
  call void @_ZN6System16OperationTimeoutIN7DynexCN10P2pContextEED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %9) #9
  call void @llvm.lifetime.end.p0(i64 72, ptr %9) #9
  %86 = load i32, ptr %15, align 4
  switch i32 %86, label %138 [
    i32 0, label %87
    i32 3, label %121
  ]

87:                                               ; preds = %85
  br label %98

88:                                               ; preds = %83, %71
  call void @_ZN6System16OperationTimeoutIN7DynexCN10P2pContextEED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %9) #9
  br label %89

89:                                               ; preds = %88, %67
  call void @llvm.lifetime.end.p0(i64 72, ptr %9) #9
  br label %90

90:                                               ; preds = %89, %63
  %91 = load i32, ptr %7, align 4
  %92 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTIN6System20InterruptedExceptionE) #9
  %93 = icmp eq i32 %91, %92
  br i1 %93, label %94, label %99

94:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #9
  %95 = load ptr, ptr %6, align 8
  %96 = call ptr @__cxa_begin_catch(ptr %95) #9
  store ptr %96, ptr %17, align 8
  invoke void @__cxa_end_catch()
          to label %97 unwind label %117

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

98:                                               ; preds = %97, %87
  br label %25, !llvm.loop !38

99:                                               ; preds = %90
  %100 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #9
  %101 = icmp eq i32 %91, %100
  br i1 %101, label %102, label %128

102:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  %103 = load ptr, ptr %6, align 8
  %104 = call ptr @__cxa_begin_catch(ptr %103) #9
  store ptr %104, ptr %16, align 8
  invoke void @_ZN7DynexCN10P2pContext4stopEv(ptr noundef nonnull align 8 dereferenceable(272) %18)
          to label %105 unwind label %106

105:                                              ; preds = %102
  store i32 3, ptr %15, align 4
  invoke void @__cxa_end_catch()
          to label %110 unwind label %111

106:                                              ; preds = %102
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %6, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %7, align 4
  invoke void @__cxa_end_catch()
          to label %115 unwind label %135

110:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  br label %121

111:                                              ; preds = %105
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %6, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %7, align 4
  br label %116

115:                                              ; preds = %106
  br label %116

116:                                              ; preds = %115, %111
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  br label %128

117:                                              ; preds = %94
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %6, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  br label %128

121:                                              ; preds = %110, %85, %25
  %122 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %18, i32 0, i32 16
  invoke void @_ZN6System5Event3setEv(ptr noundef nonnull align 8 dereferenceable(32) %122)
          to label %123 unwind label %124

123:                                              ; preds = %121
  call void @_ZN7DynexCN10P2pMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr %3) #9
  ret void

124:                                              ; preds = %121
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %6, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %7, align 4
  br label %128

128:                                              ; preds = %124, %117, %116, %99
  call void @_ZN7DynexCN10P2pMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #9
  br label %129

129:                                              ; preds = %128, %59
  call void @llvm.lifetime.end.p0(i64 40, ptr %3) #9
  br label %130

130:                                              ; preds = %129
  %131 = load ptr, ptr %6, align 8
  %132 = load i32, ptr %7, align 4
  %133 = insertvalue { ptr, i32 } poison, ptr %131, 0
  %134 = insertvalue { ptr, i32 } %133, i32 %132, 1
  resume { ptr, i32 } %134

135:                                              ; preds = %106
  %136 = landingpad { ptr, i32 }
          catch ptr null
  %137 = extractvalue { ptr, i32 } %136, 0
  call void @__clang_call_terminate(ptr %137) #10
  unreachable

138:                                              ; preds = %85
  unreachable
}

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

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

declare ptr @__cxa_begin_catch(ptr)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN10P2pContext12writeMessageERKNS0_7MessageE(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef nonnull align 8 dereferenceable(40)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN13LevinProtocol6encodeINS_18COMMAND_TIMED_SYNC7requestEEESt6vectorIhSaIhEERKT_(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 4 dereferenceable(36)) #4 align 2

declare void @_ZN6System5Timer5sleepENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE(ptr noundef nonnull align 8 dereferenceable(24), i64) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6System16OperationTimeoutIN7DynexCN10P2pContextEEC2ERNS_10DispatcherERS2_NSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 16 dereferenceable(440), ptr noundef nonnull align 8 dereferenceable(272), i64) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNSt6chronoltINS_3_V212steady_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEES6_EEbRKNS_10time_pointIT_T0_EERKNS7_IS8_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

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

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

declare void @__cxa_end_catch()

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

declare void @_ZN7DynexCN10P2pContext7MessageC1EONS_10P2pMessageENS1_4TypeEj(ptr, ptr, i32, i32)

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTSN7DynexCN10P2pMessageE", !11, i64 0, !12, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSSt6vectorIhSaIhEE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!16 = !{!17, !6, i64 112}
!17 = !{!"_ZTSN7DynexCN10P2pContextE", !7, i64 0, !18, i64 1, !19, i64 2, !20, i64 16, !21, i64 24, !6, i64 32, !22, i64 40, !24, i64 80, !18, i64 88, !24, i64 96, !25, i64 104, !6, i64 112, !26, i64 120, !27, i64 144, !28, i64 176, !27, i64 208, !27, i64 240}
!18 = !{!"bool", !7, i64 0}
!19 = !{!"_ZTSN7DynexCN14NetworkAddressE", !11, i64 0, !11, i64 4}
!20 = !{!"long", !7, i64 0}
!21 = !{!"short", !7, i64 0}
!22 = !{!"_ZTSN6System12ContextGroupE", !6, i64 0, !23, i64 8}
!23 = !{!"_ZTSN6System18NativeContextGroupE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!24 = !{!"_ZTSNSt6chrono10time_pointINS_3_V212steady_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEEEE", !25, i64 0}
!25 = !{!"_ZTSNSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE", !20, i64 0}
!26 = !{!"_ZTSN6System5TimerE", !6, i64 0, !11, i64 8, !6, i64 16}
!27 = !{!"_ZTSN6System5EventE", !6, i64 0, !18, i64 8, !6, i64 16, !6, i64 24}
!28 = !{!"_ZTSN6System13TcpConnectionE", !6, i64 0, !11, i64 8, !6, i64 16, !6, i64 24}
!29 = !{i64 0, i64 4, !30, i64 4, i64 32, !31}
!30 = !{!11, !11, i64 0}
!31 = !{!7, !7, i64 0}
!32 = !{!17, !18, i64 88}
!33 = !{i8 0, i8 2}
!34 = !{}
!35 = !{i64 0, i64 8, !36}
!36 = !{!20, !20, i64 0}
!37 = !{!17, !6, i64 32}
!38 = distinct !{!38, !39}
!39 = !{!"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"

%"struct.DynexCN::P2pContext::Message" = type { %"struct.DynexCN::P2pMessage", i32, i32 }
%"struct.DynexCN::P2pMessage" = type { i32, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.DynexCN::COMMAND_TIMED_SYNC::request" = type { %"struct.DynexCN::CORE_SYNC_DATA" }
%"struct.DynexCN::CORE_SYNC_DATA" = type { i32, %"struct.Crypto::Hash" }
%"struct.Crypto::Hash" = type { [32 x i8] }
%"class.System::OperationTimeout" = type { ptr, %"class.System::ContextGroup", %"class.System::Timer" }
%"class.System::ContextGroup" = type { ptr, %"struct.System::NativeContextGroup" }
%"struct.System::NativeContextGroup" = type { ptr, ptr, ptr, ptr }
%"class.System::Timer" = type { ptr, i32, ptr }
%"class.std::chrono::time_point" = type { %"class.std::chrono::duration" }
%"class.std::chrono::duration" = type { i64 }

@_ZTISt9exception = external constant ptr
@_ZTIN6System20InterruptedExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

; Function Attrs: nounwind
declare i64 @_ZNSt6chrono3_V212steady_clock3nowEv() local_unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

declare void @_ZN6System5Event3setEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7DynexCN10P2pContext13timedSyncLoopEv(ptr noundef nonnull align 8 dereferenceable(272) %0) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"struct.DynexCN::P2pContext::Message", align 8
  %3 = alloca %"struct.DynexCN::P2pMessage", align 8
  %4 = alloca %"struct.DynexCN::COMMAND_TIMED_SYNC::request", align 4
  %5 = alloca %"class.System::OperationTimeout", align 8
  %6 = alloca %"class.std::chrono::time_point", align 8
  %7 = alloca %"class.std::chrono::duration", align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::chrono::time_point", align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %2) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #9
  store i32 1002, ptr %3, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %3, i64 8
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %4) #9
  %11 = getelementptr inbounds i8, ptr %0, i64 112
  %12 = load ptr, ptr %11, align 8, !tbaa !15
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(36) %4, ptr noundef nonnull align 4 dereferenceable(36) %12, i64 36, i1 false), !tbaa.struct !28
  call void @_ZN7DynexCN13LevinProtocol6encodeINS_18COMMAND_TIMED_SYNC7requestEEESt6vectorIhSaIhEERKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %10, ptr noundef nonnull align 4 dereferenceable(36) %4)
  invoke void @_ZN7DynexCN10P2pContext7MessageC1EONS_10P2pMessageENS1_4TypeEj(ptr noundef nonnull align 8 dereferenceable(40) %2, ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef 1, i32 noundef 0)
          to label %13 unwind label %34

13:                                               ; preds = %1
  call void @_ZN7DynexCN10P2pMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #9
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #9
  %14 = getelementptr inbounds i8, ptr %0, i64 88
  %15 = load i8, ptr %14, align 8, !tbaa !31, !range !32, !noundef !33
  %16 = trunc nuw i8 %15 to i1
  br i1 %16, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %13
  %17 = getelementptr inbounds i8, ptr %0, i64 120
  %18 = getelementptr inbounds i8, ptr %0, i64 104
  %19 = getelementptr inbounds i8, ptr %0, i64 32
  %20 = getelementptr inbounds i8, ptr %0, i64 96
  br label %21

21:                                               ; preds = %.lr.ph, %57
  %.sroa.01.0.copyload = load i64, ptr %18, align 8, !tbaa !34
  invoke void @_ZN6System5Timer5sleepENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 %.sroa.01.0.copyload)
          to label %22 unwind label %38

22:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %5) #9
  %23 = load ptr, ptr %19, align 8, !tbaa !35
  %.sroa.0.0.copyload = load i64, ptr %18, align 8, !tbaa !34
  invoke void @_ZN6System16OperationTimeoutIN7DynexCN10P2pContextEEC2ERNS_10DispatcherERS2_NSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE(ptr noundef nonnull align 8 dereferenceable(72) %5, ptr noundef nonnull align 16 dereferenceable(440) %23, ptr noundef nonnull align 8 dereferenceable(272) %0, i64 %.sroa.0.0.copyload)
          to label %24 unwind label %40

24:                                               ; preds = %22
  invoke void @_ZN7DynexCN10P2pContext12writeMessageERKNS0_7MessageE(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef nonnull align 8 dereferenceable(40) %2)
          to label %25 unwind label %42

25:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #9
  store i32 2, ptr %8, align 4, !tbaa !29
  %26 = invoke i64 @_ZNSt6chronomlIlSt5ratioILl1ELl1000000000EEiEENS_8durationINSt9enable_ifIXsr14is_convertibleIRKT1_NSt11common_typeIJT_S5_EE4typeEEE5valueESB_E4typeET0_EERKNS3_IS9_SE_EES7_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %27 unwind label %44

27:                                               ; preds = %25
  store i64 %26, ptr %7, align 8
  %28 = invoke i64 @_ZNSt6chronoplINS_3_V212steady_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEElS5_EENS_10time_pointIT_NSt11common_typeIJT0_NS3_IT1_T2_EEEE4typeEEERKNS7_IS8_SA_EERKSD_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %29 unwind label %44

29:                                               ; preds = %27
  store i64 %28, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #9
  %30 = call i64 @_ZNSt6chrono3_V212steady_clock3nowEv() #9
  store i64 %30, ptr %9, align 8
  %31 = invoke noundef zeroext i1 @_ZNSt6chronoltINS_3_V212steady_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEES6_EEbRKNS_10time_pointIT_T0_EERKNS7_IS8_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %32 unwind label %46

32:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  br i1 %31, label %33, label %.thread

.thread:                                          ; preds = %32
  call void @_ZN6System16OperationTimeoutIN7DynexCN10P2pContextEED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %5) #9
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #9
  br label %57

33:                                               ; preds = %32
  invoke void @_ZN7DynexCN10P2pContext4stopEv(ptr noundef nonnull align 8 dereferenceable(272) %0)
          to label %49 unwind label %42

34:                                               ; preds = %1
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  %37 = extractvalue { ptr, i32 } %35, 1
  call void @_ZN7DynexCN10P2pMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #9
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #9
  br label %82

38:                                               ; preds = %21
  %39 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6System20InterruptedExceptionE
          catch ptr @_ZTISt9exception
  br label %52

40:                                               ; preds = %22
  %41 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6System20InterruptedExceptionE
          catch ptr @_ZTISt9exception
  br label %51

42:                                               ; preds = %33, %24
  %43 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6System20InterruptedExceptionE
          catch ptr @_ZTISt9exception
  br label %50

44:                                               ; preds = %27, %25
  %45 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6System20InterruptedExceptionE
          catch ptr @_ZTISt9exception
  br label %48

46:                                               ; preds = %29
  %47 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN6System20InterruptedExceptionE
          catch ptr @_ZTISt9exception
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #9
  br label %48

48:                                               ; preds = %46, %44
  %.pn = phi { ptr, i32 } [ %47, %46 ], [ %45, %44 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  br label %50

49:                                               ; preds = %33
  call void @_ZN6System16OperationTimeoutIN7DynexCN10P2pContextEED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %5) #9
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #9
  br label %.loopexit

50:                                               ; preds = %48, %42
  %.pn16 = phi { ptr, i32 } [ %43, %42 ], [ %.pn, %48 ]
  call void @_ZN6System16OperationTimeoutIN7DynexCN10P2pContextEED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %5) #9
  br label %51

51:                                               ; preds = %50, %40
  %.pn16.pn = phi { ptr, i32 } [ %.pn16, %50 ], [ %41, %40 ]
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #9
  br label %52

52:                                               ; preds = %51, %38
  %.pn16.pn.pn = phi { ptr, i32 } [ %.pn16.pn, %51 ], [ %39, %38 ]
  %.3 = extractvalue { ptr, i32 } %.pn16.pn.pn, 0
  %.310 = extractvalue { ptr, i32 } %.pn16.pn.pn, 1
  %53 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTIN6System20InterruptedExceptionE) #9
  %54 = icmp eq i32 %.310, %53
  br i1 %54, label %55, label %60

55:                                               ; preds = %52
  %56 = call ptr @__cxa_begin_catch(ptr %.3) #9
  invoke void @__cxa_end_catch()
          to label %57 unwind label %71

57:                                               ; preds = %.thread, %55
  %58 = load i8, ptr %14, align 8, !tbaa !31, !range !32, !noundef !33
  %59 = trunc nuw i8 %58 to i1
  br i1 %59, label %.loopexit, label %21, !llvm.loop !36

60:                                               ; preds = %52
  %61 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9exception) #9
  %62 = icmp eq i32 %.310, %61
  br i1 %62, label %63, label %81

63:                                               ; preds = %60
  %64 = call ptr @__cxa_begin_catch(ptr %.3) #9
  invoke void @_ZN7DynexCN10P2pContext4stopEv(ptr noundef nonnull align 8 dereferenceable(272) %0)
          to label %65 unwind label %66

65:                                               ; preds = %63
  invoke void @__cxa_end_catch()
          to label %.loopexit unwind label %68

66:                                               ; preds = %63
  %67 = landingpad { ptr, i32 }
          cleanup
  invoke void @__cxa_end_catch()
          to label %70 unwind label %85

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

70:                                               ; preds = %66, %68
  %.pn20 = phi { ptr, i32 } [ %69, %68 ], [ %67, %66 ]
  %.4 = extractvalue { ptr, i32 } %.pn20, 0
  %.411 = extractvalue { ptr, i32 } %.pn20, 1
  br label %81

71:                                               ; preds = %55
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  %74 = extractvalue { ptr, i32 } %72, 1
  br label %81

.loopexit:                                        ; preds = %57, %13, %49, %65
  %75 = getelementptr inbounds i8, ptr %0, i64 144
  invoke void @_ZN6System5Event3setEv(ptr noundef nonnull align 8 dereferenceable(32) %75)
          to label %76 unwind label %77

76:                                               ; preds = %.loopexit
  call void @_ZN7DynexCN10P2pMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #9
  ret void

77:                                               ; preds = %.loopexit
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  %80 = extractvalue { ptr, i32 } %78, 1
  br label %81

81:                                               ; preds = %77, %71, %70, %60
  %.512 = phi i32 [ %80, %77 ], [ %74, %71 ], [ %.411, %70 ], [ %.310, %60 ]
  %.5 = phi ptr [ %79, %77 ], [ %73, %71 ], [ %.4, %70 ], [ %.3, %60 ]
  call void @_ZN7DynexCN10P2pMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) #9
  br label %82

82:                                               ; preds = %81, %34
  %.613 = phi i32 [ %.512, %81 ], [ %37, %34 ]
  %.6 = phi ptr [ %.5, %81 ], [ %36, %34 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #9
  %83 = insertvalue { ptr, i32 } poison, ptr %.6, 0
  %84 = insertvalue { ptr, i32 } %83, i32 %.613, 1
  resume { ptr, i32 } %84

85:                                               ; preds = %66
  %86 = landingpad { ptr, i32 }
          catch ptr null
  %87 = extractvalue { ptr, i32 } %86, 0
  call void @__clang_call_terminate(ptr %87) #10
  unreachable
}

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

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

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN13LevinProtocol6encodeINS_18COMMAND_TIMED_SYNC7requestEEESt6vectorIhSaIhEERKT_(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 4 dereferenceable(36)) local_unnamed_addr #4 align 2

declare void @_ZN6System5Timer5sleepENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE(ptr noundef nonnull align 8 dereferenceable(24), i64) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6System16OperationTimeoutIN7DynexCN10P2pContextEEC2ERNS_10DispatcherERS2_NSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 16 dereferenceable(440), ptr noundef nonnull align 8 dereferenceable(272), i64) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNSt6chronoltINS_3_V212steady_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEES6_EEbRKNS_10time_pointIT_T0_EERKNS7_IS8_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

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

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

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

declare void @__cxa_end_catch() local_unnamed_addr

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

declare void @_ZN7DynexCN10P2pContext7MessageC1EONS_10P2pMessageENS1_4TypeEj(ptr, ptr, i32, i32) local_unnamed_addr

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTSN7DynexCN10P2pMessageE", !7, i64 0, !10, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt6vectorIhSaIhEE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!16, !14, i64 112}
!16 = !{!"_ZTSN7DynexCN10P2pContextE", !8, i64 0, !17, i64 1, !18, i64 2, !19, i64 16, !20, i64 24, !14, i64 32, !21, i64 40, !23, i64 80, !17, i64 88, !23, i64 96, !24, i64 104, !14, i64 112, !25, i64 120, !26, i64 144, !27, i64 176, !26, i64 208, !26, i64 240}
!17 = !{!"bool", !8, i64 0}
!18 = !{!"_ZTSN7DynexCN14NetworkAddressE", !7, i64 0, !7, i64 4}
!19 = !{!"long", !8, i64 0}
!20 = !{!"short", !8, i64 0}
!21 = !{!"_ZTSN6System12ContextGroupE", !14, i64 0, !22, i64 8}
!22 = !{!"_ZTSN6System18NativeContextGroupE", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24}
!23 = !{!"_ZTSNSt6chrono10time_pointINS_3_V212steady_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEEEE", !24, i64 0}
!24 = !{!"_ZTSNSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE", !19, i64 0}
!25 = !{!"_ZTSN6System5TimerE", !14, i64 0, !7, i64 8, !14, i64 16}
!26 = !{!"_ZTSN6System5EventE", !14, i64 0, !17, i64 8, !14, i64 16, !14, i64 24}
!27 = !{!"_ZTSN6System13TcpConnectionE", !14, i64 0, !7, i64 8, !14, i64 16, !14, i64 24}
!28 = !{i64 0, i64 4, !29, i64 4, i64 32, !30}
!29 = !{!7, !7, i64 0}
!30 = !{!8, !8, i64 0}
!31 = !{!16, !17, i64 88}
!32 = !{i8 0, i8 2}
!33 = !{}
!34 = !{!19, !19, i64 0}
!35 = !{!16, !14, i64 32}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}


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