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

; 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::chrono::duration" = type { i64 }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"class.std::_Bind" = type { { i64, i64 }, %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { ptr }
%"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::ContextGroup" = type { ptr, %"struct.System::NativeContextGroup" }
%"struct.System::NativeContextGroup" = type { ptr, ptr, ptr, ptr }
%"class.std::chrono::time_point" = type { %"class.std::chrono::duration" }
%"class.System::Timer" = type { ptr, i32, ptr }
%"class.System::TcpConnection" = type { ptr, i32, ptr, ptr }
%"class.System::Event" = type { ptr, i8, ptr, ptr }

; 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: mustprogress uwtable
define dso_local void @_ZN7DynexCN10P2pContextC2ERN6System10DispatcherEONS1_13TcpConnectionEbRKNS_14NetworkAddressENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEERKNS_14CORE_SYNC_DATAE(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef nonnull align 16 dereferenceable(440) %1, ptr noundef nonnull align 8 dereferenceable(32) %2, i1 noundef zeroext %3, ptr noundef nonnull align 1 dereferenceable(8) %4, i64 %5, ptr noundef nonnull align 4 dereferenceable(36) %6) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca %"class.std::chrono::duration", align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i8, align 1
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::function", align 8
  %18 = alloca %"class.std::_Bind", align 8
  %19 = alloca { i64, i64 }, align 8
  %20 = alloca ptr, align 8
  %21 = getelementptr inbounds %"class.std::chrono::duration", ptr %8, i32 0, i32 0
  store i64 %5, ptr %21, align 8
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  %22 = zext i1 %3 to i8
  store i8 %22, ptr %12, align 1, !tbaa !9
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !5
  %23 = load ptr, ptr %9, align 8
  %24 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %23, i32 0, i32 0
  store i8 0, ptr %24, align 8, !tbaa !11
  %25 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %23, i32 0, i32 1
  %26 = load i8, ptr %12, align 1, !tbaa !9, !range !24, !noundef !25
  %27 = trunc i8 %26 to i1
  %28 = zext i1 %27 to i8
  store i8 %28, ptr %25, align 1, !tbaa !26
  %29 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %23, i32 0, i32 2
  %30 = load ptr, ptr %13, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %29, ptr align 1 %30, i64 8, i1 false), !tbaa.struct !27
  %31 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %23, i32 0, i32 4
  store i64 0, ptr %31, align 8, !tbaa !29
  %32 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %23, i32 0, i32 5
  store i16 0, ptr %32, align 8, !tbaa !30
  %33 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %23, i32 0, i32 7
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %34, ptr %33, align 8, !tbaa !5
  %35 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %23, i32 0, i32 8
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN6System12ContextGroupC1ERNS_10DispatcherE(ptr noundef nonnull align 8 dereferenceable(40) %35, ptr noundef nonnull align 16 dereferenceable(440) %36)
  %37 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %23, i32 0, i32 9
  %38 = call i64 @_ZNSt6chrono3_V212steady_clock3nowEv() #7
  %39 = getelementptr inbounds %"class.std::chrono::time_point", ptr %37, i32 0, i32 0
  %40 = getelementptr inbounds %"class.std::chrono::duration", ptr %39, i32 0, i32 0
  store i64 %38, ptr %40, align 8
  %41 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %23, i32 0, i32 10
  store i8 0, ptr %41, align 8, !tbaa !31
  %42 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %23, i32 0, i32 12
  invoke void @_ZNSt6chrono10time_pointINS_3_V212steady_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %42)
          to label %43 unwind label %72

43:                                               ; preds = %7
  %44 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %23, i32 0, i32 13
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %44, ptr align 8 %8, i64 8, i1 false), !tbaa.struct !32
  %45 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %23, i32 0, i32 14
  %46 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %46, ptr %45, align 8, !tbaa !5
  %47 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %23, i32 0, i32 15
  %48 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZN6System5TimerC1ERNS_10DispatcherE(ptr noundef nonnull align 8 dereferenceable(24) %47, ptr noundef nonnull align 16 dereferenceable(440) %48)
          to label %49 unwind label %72

49:                                               ; preds = %43
  %50 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %23, i32 0, i32 16
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZN6System5EventC1ERNS_10DispatcherE(ptr noundef nonnull align 8 dereferenceable(32) %50, ptr noundef nonnull align 16 dereferenceable(440) %51)
          to label %52 unwind label %76

52:                                               ; preds = %49
  %53 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %23, i32 0, i32 17
  %54 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_ZN6System13TcpConnectionC1EOS0_(ptr noundef nonnull align 8 dereferenceable(32) %53, ptr noundef nonnull align 8 dereferenceable(32) %54)
          to label %55 unwind label %80

55:                                               ; preds = %52
  %56 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %23, i32 0, i32 18
  %57 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZN6System5EventC1ERNS_10DispatcherE(ptr noundef nonnull align 8 dereferenceable(32) %56, ptr noundef nonnull align 16 dereferenceable(440) %57)
          to label %58 unwind label %84

58:                                               ; preds = %55
  %59 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %23, i32 0, i32 19
  %60 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZN6System5EventC1ERNS_10DispatcherE(ptr noundef nonnull align 8 dereferenceable(32) %59, ptr noundef nonnull align 16 dereferenceable(440) %60)
          to label %61 unwind label %88

61:                                               ; preds = %58
  %62 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %23, i32 0, i32 18
  invoke void @_ZN6System5Event3setEv(ptr noundef nonnull align 8 dereferenceable(32) %62)
          to label %63 unwind label %92

63:                                               ; preds = %61
  %64 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %23, i32 0, i32 19
  invoke void @_ZN6System5Event3setEv(ptr noundef nonnull align 8 dereferenceable(32) %64)
          to label %65 unwind label %92

65:                                               ; preds = %63
  %66 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %23, i32 0, i32 9
  %67 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %23, i32 0, i32 12
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %67, ptr align 8 %66, i64 8, i1 false), !tbaa.struct !32
  %68 = getelementptr inbounds %"class.DynexCN::P2pContext", ptr %23, i32 0, i32 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #7
  store { i64, i64 } { i64 ptrtoint (ptr @_ZN7DynexCN10P2pContext13timedSyncLoopEv to i64), i64 0 }, ptr %19, align 8, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  store ptr %23, ptr %20, align 8, !tbaa !5
  invoke void @_ZSt4bindIMN7DynexCN10P2pContextEFvvEJPS1_EENSt12_Bind_helperIXsr15__is_socketlikeIT_EE5valueES6_JDpT0_EE4typeEOS6_DpOS7_(ptr dead_on_unwind writable sret(%"class.std::_Bind") align 8 %18, ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %69 unwind label %96

69:                                               ; preds = %65
  invoke void @_ZNSt8functionIFvvEEC2ISt5_BindIFMN7DynexCN10P2pContextEFvvEPS5_EEvEEOT_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(24) %18)
          to label %70 unwind label %96

70:                                               ; preds = %69
  invoke void @_ZN6System12ContextGroup5spawnEOSt8functionIFvvEE(ptr noundef nonnull align 8 dereferenceable(40) %68, ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %71 unwind label %100

71:                                               ; preds = %70
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #7
  ret void

72:                                               ; preds = %43, %7
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %15, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %16, align 4
  br label %110

76:                                               ; preds = %49
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %15, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %16, align 4
  br label %109

80:                                               ; preds = %52
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %15, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %16, align 4
  br label %108

84:                                               ; preds = %55
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %15, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %16, align 4
  br label %107

88:                                               ; preds = %58
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %15, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %16, align 4
  br label %106

92:                                               ; preds = %63, %61
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %15, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %16, align 4
  br label %105

96:                                               ; preds = %69, %65
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %15, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %16, align 4
  br label %104

100:                                              ; preds = %70
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %15, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %16, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  br label %104

104:                                              ; preds = %100, %96
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #7
  br label %105

105:                                              ; preds = %104, %92
  call void @_ZN6System5EventD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %59) #7
  br label %106

106:                                              ; preds = %105, %88
  call void @_ZN6System5EventD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %56) #7
  br label %107

107:                                              ; preds = %106, %84
  call void @_ZN6System13TcpConnectionD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %53) #7
  br label %108

108:                                              ; preds = %107, %80
  call void @_ZN6System5EventD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %50) #7
  br label %109

109:                                              ; preds = %108, %76
  call void @_ZN6System5TimerD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %47) #7
  br label %110

110:                                              ; preds = %109, %72
  call void @_ZN6System12ContextGroupD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %35) #7
  br label %111

111:                                              ; preds = %110
  %112 = load ptr, ptr %15, align 8
  %113 = load i32, ptr %16, align 4
  %114 = insertvalue { ptr, i32 } poison, ptr %112, 0
  %115 = insertvalue { ptr, i32 } %114, i32 %113, 1
  resume { ptr, i32 } %115
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

declare void @_ZN6System13TcpConnectionC1EOS0_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3

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

declare void @_ZN6System12ContextGroup5spawnEOSt8functionIFvvEE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(32)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4bindIMN7DynexCN10P2pContextEFvvEJPS1_EENSt12_Bind_helperIXsr15__is_socketlikeIT_EE5valueES6_JDpT0_EE4typeEOS6_DpOS7_(ptr dead_on_unwind noalias writable sret(%"class.std::_Bind") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #6

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt8functionIFvvEEC2ISt5_BindIFMN7DynexCN10P2pContextEFvvEPS5_EEvEEOT_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 #7 = { 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, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !7, i64 0}
!12 = !{!"_ZTSN7DynexCN10P2pContextE", !7, i64 0, !10, i64 1, !13, i64 2, !15, i64 16, !16, i64 24, !6, i64 32, !17, i64 40, !19, i64 80, !10, i64 88, !19, i64 96, !20, i64 104, !6, i64 112, !21, i64 120, !22, i64 144, !23, i64 176, !22, i64 208, !22, i64 240}
!13 = !{!"_ZTSN7DynexCN14NetworkAddressE", !14, i64 0, !14, i64 4}
!14 = !{!"int", !7, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!"short", !7, i64 0}
!17 = !{!"_ZTSN6System12ContextGroupE", !6, i64 0, !18, i64 8}
!18 = !{!"_ZTSN6System18NativeContextGroupE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!19 = !{!"_ZTSNSt6chrono10time_pointINS_3_V212steady_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEEEE", !20, i64 0}
!20 = !{!"_ZTSNSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE", !15, i64 0}
!21 = !{!"_ZTSN6System5TimerE", !6, i64 0, !14, i64 8, !6, i64 16}
!22 = !{!"_ZTSN6System5EventE", !6, i64 0, !10, i64 8, !6, i64 16, !6, i64 24}
!23 = !{!"_ZTSN6System13TcpConnectionE", !6, i64 0, !14, i64 8, !6, i64 16, !6, i64 24}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = !{!12, !10, i64 1}
!27 = !{i64 0, i64 4, !28, i64 4, i64 4, !28}
!28 = !{!14, !14, i64 0}
!29 = !{!12, !15, i64 16}
!30 = !{!12, !16, i64 24}
!31 = !{!12, !10, i64 88}
!32 = !{i64 0, i64 8, !33}
!33 = !{!15, !15, i64 0}
!34 = !{!7, !7, i64 0}


; 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::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"class.std::_Bind" = type { { i64, i64 }, %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { ptr }

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7DynexCN10P2pContextC2ERN6System10DispatcherEONS1_13TcpConnectionEbRKNS_14NetworkAddressENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEERKNS_14CORE_SYNC_DATAE(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef nonnull align 16 dereferenceable(440) %1, ptr noundef nonnull align 8 dereferenceable(32) %2, i1 noundef zeroext %3, ptr nocapture noundef nonnull readonly align 1 dereferenceable(8) %4, i64 %5, ptr noundef nonnull align 4 dereferenceable(36) %6) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca %"class.std::function", align 8
  %9 = alloca %"class.std::_Bind", align 8
  %10 = alloca { i64, i64 }, align 8
  %11 = alloca ptr, align 8
  %12 = zext i1 %3 to i8
  store i8 0, ptr %0, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %0, i64 1
  store i8 %12, ptr %13, align 1, !tbaa !22
  %14 = getelementptr inbounds i8, ptr %0, i64 2
  %15 = load i64, ptr %4, align 1
  store i64 %15, ptr %14, align 2
  %16 = getelementptr inbounds i8, ptr %0, i64 16
  store i64 0, ptr %16, align 8, !tbaa !23
  %17 = getelementptr inbounds i8, ptr %0, i64 24
  store i16 0, ptr %17, align 8, !tbaa !24
  %18 = getelementptr inbounds i8, ptr %0, i64 32
  store ptr %1, ptr %18, align 8, !tbaa !25
  %19 = getelementptr inbounds i8, ptr %0, i64 40
  tail call void @_ZN6System12ContextGroupC1ERNS_10DispatcherE(ptr noundef nonnull align 8 dereferenceable(40) %19, ptr noundef nonnull align 16 dereferenceable(440) %1)
  %20 = getelementptr inbounds i8, ptr %0, i64 80
  %21 = tail call i64 @_ZNSt6chrono3_V212steady_clock3nowEv() #6
  store i64 %21, ptr %20, align 8
  %22 = getelementptr inbounds i8, ptr %0, i64 88
  store i8 0, ptr %22, align 8, !tbaa !26
  %23 = getelementptr inbounds i8, ptr %0, i64 96
  tail call void @_ZNSt6chrono10time_pointINS_3_V212steady_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %23)
  %24 = getelementptr inbounds i8, ptr %0, i64 104
  store i64 %5, ptr %24, align 8, !tbaa !27
  %25 = getelementptr inbounds i8, ptr %0, i64 112
  store ptr %6, ptr %25, align 8, !tbaa !25
  %26 = getelementptr inbounds i8, ptr %0, i64 120
  invoke void @_ZN6System5TimerC1ERNS_10DispatcherE(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 16 dereferenceable(440) %1)
          to label %27 unwind label %42

27:                                               ; preds = %7
  %28 = getelementptr inbounds i8, ptr %0, i64 144
  invoke void @_ZN6System5EventC1ERNS_10DispatcherE(ptr noundef nonnull align 8 dereferenceable(32) %28, ptr noundef nonnull align 16 dereferenceable(440) %1)
          to label %29 unwind label %44

29:                                               ; preds = %27
  %30 = getelementptr inbounds i8, ptr %0, i64 176
  invoke void @_ZN6System13TcpConnectionC1EOS0_(ptr noundef nonnull align 8 dereferenceable(32) %30, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %31 unwind label %46

31:                                               ; preds = %29
  %32 = getelementptr inbounds i8, ptr %0, i64 208
  invoke void @_ZN6System5EventC1ERNS_10DispatcherE(ptr noundef nonnull align 8 dereferenceable(32) %32, ptr noundef nonnull align 16 dereferenceable(440) %1)
          to label %33 unwind label %48

33:                                               ; preds = %31
  %34 = getelementptr inbounds i8, ptr %0, i64 240
  invoke void @_ZN6System5EventC1ERNS_10DispatcherE(ptr noundef nonnull align 8 dereferenceable(32) %34, ptr noundef nonnull align 16 dereferenceable(440) %1)
          to label %35 unwind label %50

35:                                               ; preds = %33
  invoke void @_ZN6System5Event3setEv(ptr noundef nonnull align 8 dereferenceable(32) %32)
          to label %36 unwind label %52

36:                                               ; preds = %35
  invoke void @_ZN6System5Event3setEv(ptr noundef nonnull align 8 dereferenceable(32) %34)
          to label %37 unwind label %52

37:                                               ; preds = %36
  %38 = load i64, ptr %20, align 8, !tbaa !27
  store i64 %38, ptr %23, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #6
  store i64 ptrtoint (ptr @_ZN7DynexCN10P2pContext13timedSyncLoopEv to i64), ptr %10, align 8, !tbaa !28
  %.fca.1.gep = getelementptr inbounds i8, ptr %10, i64 8
  store i64 0, ptr %.fca.1.gep, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  store ptr %0, ptr %11, align 8, !tbaa !25
  invoke void @_ZSt4bindIMN7DynexCN10P2pContextEFvvEJPS1_EENSt12_Bind_helperIXsr15__is_socketlikeIT_EE5valueES6_JDpT0_EE4typeEOS6_DpOS7_(ptr dead_on_unwind nonnull writable sret(%"class.std::_Bind") align 8 %9, ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %39 unwind label %54

39:                                               ; preds = %37
  invoke void @_ZNSt8functionIFvvEEC2ISt5_BindIFMN7DynexCN10P2pContextEFvvEPS5_EEvEEOT_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %40 unwind label %54

40:                                               ; preds = %39
  invoke void @_ZN6System12ContextGroup5spawnEOSt8functionIFvvEE(ptr noundef nonnull align 8 dereferenceable(40) %19, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %41 unwind label %56

41:                                               ; preds = %40
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  ret void

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

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

46:                                               ; preds = %29
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %62

48:                                               ; preds = %31
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %61

50:                                               ; preds = %33
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %60

52:                                               ; preds = %36, %35
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %59

54:                                               ; preds = %39, %37
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %58

56:                                               ; preds = %40
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  br label %58

58:                                               ; preds = %56, %54
  %.pn = phi { ptr, i32 } [ %57, %56 ], [ %55, %54 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  br label %59

59:                                               ; preds = %58, %52
  %.pn.pn = phi { ptr, i32 } [ %.pn, %58 ], [ %53, %52 ]
  call void @_ZN6System5EventD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %34) #6
  br label %60

60:                                               ; preds = %59, %50
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %59 ], [ %51, %50 ]
  call void @_ZN6System5EventD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #6
  br label %61

61:                                               ; preds = %60, %48
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %60 ], [ %49, %48 ]
  call void @_ZN6System13TcpConnectionD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #6
  br label %62

62:                                               ; preds = %61, %46
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %61 ], [ %47, %46 ]
  call void @_ZN6System5EventD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #6
  br label %63

63:                                               ; preds = %62, %44
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %62 ], [ %45, %44 ]
  call void @_ZN6System5TimerD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #6
  br label %64

64:                                               ; preds = %63, %42
  %.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn, %63 ], [ %43, %42 ]
  call void @_ZN6System12ContextGroupD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %19) #6
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn.pn
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

declare void @_ZN6System13TcpConnectionC1EOS0_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2

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

declare void @_ZN6System12ContextGroup5spawnEOSt8functionIFvvEE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4bindIMN7DynexCN10P2pContextEFvvEJPS1_EENSt12_Bind_helperIXsr15__is_socketlikeIT_EE5valueES6_JDpT0_EE4typeEOS6_DpOS7_(ptr dead_on_unwind noalias writable sret(%"class.std::_Bind") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt8functionIFvvEEC2ISt5_BindIFMN7DynexCN10P2pContextEFvvEPS5_EEvEEOT_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

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

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

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

; Function Attrs: nounwind
declare void @_ZN6System5TimerD1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3

; Function Attrs: nounwind
declare void @_ZN6System12ContextGroupD1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { 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 = !{!"_ZTSN7DynexCN10P2pContextE", !7, i64 0, !9, i64 1, !10, i64 2, !12, i64 16, !13, i64 24, !14, i64 32, !15, i64 40, !17, i64 80, !9, i64 88, !17, i64 96, !18, i64 104, !14, i64 112, !19, i64 120, !20, i64 144, !21, i64 176, !20, i64 208, !20, i64 240}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!"bool", !7, i64 0}
!10 = !{!"_ZTSN7DynexCN14NetworkAddressE", !11, i64 0, !11, i64 4}
!11 = !{!"int", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!"short", !7, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!"_ZTSN6System12ContextGroupE", !14, i64 0, !16, i64 8}
!16 = !{!"_ZTSN6System18NativeContextGroupE", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24}
!17 = !{!"_ZTSNSt6chrono10time_pointINS_3_V212steady_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEEEE", !18, i64 0}
!18 = !{!"_ZTSNSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE", !12, i64 0}
!19 = !{!"_ZTSN6System5TimerE", !14, i64 0, !11, i64 8, !14, i64 16}
!20 = !{!"_ZTSN6System5EventE", !14, i64 0, !9, i64 8, !14, i64 16, !14, i64 24}
!21 = !{!"_ZTSN6System13TcpConnectionE", !14, i64 0, !11, i64 8, !14, i64 16, !14, i64 24}
!22 = !{!6, !9, i64 1}
!23 = !{!6, !12, i64 16}
!24 = !{!6, !13, i64 24}
!25 = !{!14, !14, i64 0}
!26 = !{!6, !9, i64 88}
!27 = !{!12, !12, i64 0}
!28 = !{!7, !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass