; LLVM IR from UBIC-repo/core :: Network/Network.ll (ZN7Network20broadCastTransactionE21TransactionForNetwork)

; 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::vector.87" = type { %"struct.std::_Vector_base.88" }
%"struct.std::_Vector_base.88" = type { %"struct.std::_Vector_base<std::shared_ptr<PeerInterface>, std::allocator<std::shared_ptr<PeerInterface>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<PeerInterface>, std::allocator<std::shared_ptr<PeerInterface>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<PeerInterface>, std::allocator<std::shared_ptr<PeerInterface>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<PeerInterface>, std::allocator<std::shared_ptr<PeerInterface>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.TransmitTransactions = type { i8, %"class.std::vector.107" }
%"class.std::vector.107" = type { %"struct.std::_Vector_base.108" }
%"struct.std::_Vector_base.108" = type { %"struct.std::_Vector_base<TransactionForNetwork, std::allocator<TransactionForNetwork>>::_Vector_impl" }
%"struct.std::_Vector_base<TransactionForNetwork, std::allocator<TransactionForNetwork>>::_Vector_impl" = type { %"struct.std::_Vector_base<TransactionForNetwork, std::allocator<TransactionForNetwork>>::_Vector_impl_data" }
%"struct.std::_Vector_base<TransactionForNetwork, std::allocator<TransactionForNetwork>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.92" = type { ptr }
%class.NetworkMessage = type { i32, 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZN5Peers8InstanceEv() #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessI13PeerInterfaceLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) #1 align 2

declare void @_ZN5Peers14getRandomPeersEtb(ptr dead_on_unwind writable sret(%"class.std::vector.87") align 8, ptr noundef nonnull align 8 dereferenceable(48), i16 noundef zeroext, i1 noundef zeroext) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorISt10shared_ptrI13PeerInterfaceESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorISt10shared_ptrI13PeerInterfaceESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrI13PeerInterfaceESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrI13PeerInterfaceESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneI13PeerInterfaceEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16), ptr) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Network20broadCastTransactionE21TransactionForNetwork(ptr noundef %0) #4 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %struct.TransmitTransactions, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca %"class.std::vector.87", align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.92", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.92", align 8
  %11 = alloca ptr, align 8
  %12 = alloca %class.NetworkMessage, align 8
  %13 = alloca %struct.TransmitTransactions, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #6
  call void @_ZN20TransmitTransactionsC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  %14 = getelementptr inbounds %struct.TransmitTransactions, ptr %3, i32 0, i32 1
  %15 = invoke noundef nonnull align 8 dereferenceable(112) ptr @_ZNSt6vectorI21TransactionForNetworkSaIS0_EE12emplace_backIJRS0_EEES4_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(112) %0)
          to label %16 unwind label %30

16:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %17 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5Peers8InstanceEv()
          to label %18 unwind label %34

18:                                               ; preds = %16
  store ptr %17, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #6
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN5Peers14getRandomPeersEtb(ptr dead_on_unwind writable sret(%"class.std::vector.87") align 8 %7, ptr noundef nonnull align 8 dereferenceable(48) %19, i16 noundef zeroext 10, i1 noundef zeroext false)
          to label %20 unwind label %38

20:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store ptr %7, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  %22 = call ptr @_ZNSt6vectorISt10shared_ptrI13PeerInterfaceESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #6
  %23 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.92", ptr %9, i32 0, i32 0
  store ptr %22, ptr %23, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  %25 = call ptr @_ZNSt6vectorISt10shared_ptrI13PeerInterfaceESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #6
  %26 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.92", ptr %10, i32 0, i32 0
  store ptr %25, ptr %26, align 8
  br label %27

27:                                               ; preds = %69, %20
  %28 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrI13PeerInterfaceESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  br i1 %28, label %42, label %29

29:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %72

30:                                               ; preds = %1
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %4, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %5, align 4
  br label %75

34:                                               ; preds = %16
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %4, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %5, align 4
  br label %74

38:                                               ; preds = %18
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %4, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %5, align 4
  br label %73

42:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrI13PeerInterfaceESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  store ptr %43, ptr %11, align 8, !tbaa !5
  %44 = load ptr, ptr %11, align 8, !tbaa !5
  %45 = call noundef zeroext i1 @_ZStneI13PeerInterfaceEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %44, ptr null) #6
  br i1 %45, label %46, label %68

46:                                               ; preds = %42
  %47 = load ptr, ptr %11, align 8, !tbaa !5
  %48 = call noundef ptr @_ZNKSt19__shared_ptr_accessI13PeerInterfaceLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %47) #6
  invoke void @_ZN20TransmitTransactionsC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %49 unwind label %55

49:                                               ; preds = %46
  invoke void @_ZN20NetworkMessageHelper25serializeToNetworkMessageI20TransmitTransactionsEE14NetworkMessageT_(ptr dead_on_unwind writable sret(%class.NetworkMessage) align 8 %12, ptr noundef %13)
          to label %50 unwind label %59

50:                                               ; preds = %49
  %51 = load ptr, ptr %48, align 8, !tbaa !9
  %52 = getelementptr inbounds ptr, ptr %51, i64 1
  %53 = load ptr, ptr %52, align 8
  invoke void %53(ptr noundef nonnull align 8 dereferenceable(8) %48, ptr noundef %12)
          to label %54 unwind label %63

54:                                               ; preds = %50
  call void @_ZN14NetworkMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #6
  call void @_ZN20TransmitTransactionsD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  br label %68

55:                                               ; preds = %46
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %4, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %5, align 4
  br label %71

59:                                               ; preds = %49
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %4, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %5, align 4
  br label %67

63:                                               ; preds = %50
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %4, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %5, align 4
  call void @_ZN14NetworkMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #6
  br label %67

67:                                               ; preds = %63, %59
  call void @_ZN20TransmitTransactionsD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  br label %71

68:                                               ; preds = %54, %42
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %69

69:                                               ; preds = %68
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrI13PeerInterfaceESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  br label %27

71:                                               ; preds = %67, %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @_ZNSt6vectorISt10shared_ptrI13PeerInterfaceESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  br label %73

72:                                               ; preds = %29
  call void @_ZNSt6vectorISt10shared_ptrI13PeerInterfaceESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @_ZN20TransmitTransactionsD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #6
  ret void

73:                                               ; preds = %71, %38
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  br label %74

74:                                               ; preds = %73, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %75

75:                                               ; preds = %74, %30
  call void @_ZN20TransmitTransactionsD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #6
  br label %76

76:                                               ; preds = %75
  %77 = load ptr, ptr %4, align 8
  %78 = load i32, ptr %5, align 4
  %79 = insertvalue { ptr, i32 } poison, ptr %77, 0
  %80 = insertvalue { ptr, i32 } %79, i32 %78, 1
  resume { ptr, i32 } %80
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(112) ptr @_ZNSt6vectorI21TransactionForNetworkSaIS0_EE12emplace_backIJRS0_EEES4_DpOT_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(112)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN20NetworkMessageHelper25serializeToNetworkMessageI20TransmitTransactionsEE14NetworkMessageT_(ptr dead_on_unwind noalias writable sret(%class.NetworkMessage) align 8, ptr noundef) #4 align 2

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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, !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 = !{!"vtable pointer", !8, 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::vector.87" = type { %"struct.std::_Vector_base.88" }
%"struct.std::_Vector_base.88" = type { %"struct.std::_Vector_base<std::shared_ptr<PeerInterface>, std::allocator<std::shared_ptr<PeerInterface>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<PeerInterface>, std::allocator<std::shared_ptr<PeerInterface>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<PeerInterface>, std::allocator<std::shared_ptr<PeerInterface>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<PeerInterface>, std::allocator<std::shared_ptr<PeerInterface>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.TransmitTransactions = type { i8, %"class.std::vector.107" }
%"class.std::vector.107" = type { %"struct.std::_Vector_base.108" }
%"struct.std::_Vector_base.108" = type { %"struct.std::_Vector_base<TransactionForNetwork, std::allocator<TransactionForNetwork>>::_Vector_impl" }
%"struct.std::_Vector_base<TransactionForNetwork, std::allocator<TransactionForNetwork>>::_Vector_impl" = type { %"struct.std::_Vector_base<TransactionForNetwork, std::allocator<TransactionForNetwork>>::_Vector_impl_data" }
%"struct.std::_Vector_base<TransactionForNetwork, std::allocator<TransactionForNetwork>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.92" = type { ptr }
%class.NetworkMessage = type { i32, 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZN5Peers8InstanceEv() local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessI13PeerInterfaceLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #1 align 2

declare void @_ZN5Peers14getRandomPeersEtb(ptr dead_on_unwind writable sret(%"class.std::vector.87") align 8, ptr noundef nonnull align 8 dereferenceable(48), i16 noundef zeroext, i1 noundef zeroext) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorISt10shared_ptrI13PeerInterfaceESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorISt10shared_ptrI13PeerInterfaceESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrI13PeerInterfaceESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrI13PeerInterfaceESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrI13PeerInterfaceESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneI13PeerInterfaceEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16), ptr) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Network20broadCastTransactionE21TransactionForNetwork(ptr noundef %0) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %struct.TransmitTransactions, align 8
  %3 = alloca %"class.std::vector.87", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.92", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.92", align 8
  %6 = alloca %class.NetworkMessage, align 8
  %7 = alloca %struct.TransmitTransactions, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #6
  call void @_ZN20TransmitTransactionsC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  %8 = getelementptr inbounds i8, ptr %2, i64 8
  %9 = invoke noundef nonnull align 8 dereferenceable(112) ptr @_ZNSt6vectorI21TransactionForNetworkSaIS0_EE12emplace_backIJRS0_EEES4_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(112) %0)
          to label %10 unwind label %16

10:                                               ; preds = %1
  %11 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZN5Peers8InstanceEv()
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #6
  invoke void @_ZN5Peers14getRandomPeersEtb(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.87") align 8 %3, ptr noundef nonnull align 8 dereferenceable(48) %11, i16 noundef zeroext 10, i1 noundef zeroext false)
          to label %12 unwind label %18

12:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %13 = call ptr @_ZNSt6vectorISt10shared_ptrI13PeerInterfaceESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  store ptr %13, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %14 = call ptr @_ZNSt6vectorISt10shared_ptrI13PeerInterfaceESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  store ptr %14, ptr %5, align 8
  %15 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrI13PeerInterfaceESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  br i1 %15, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %37, %12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @_ZNSt6vectorISt10shared_ptrI13PeerInterfaceESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  call void @_ZN20TransmitTransactionsD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #6
  ret void

16:                                               ; preds = %1
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %42

18:                                               ; preds = %10
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %41

.lr.ph:                                           ; preds = %12, %37
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrI13PeerInterfaceESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %21 = call noundef zeroext i1 @_ZStneI13PeerInterfaceEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr null) #6
  br i1 %21, label %22, label %37

22:                                               ; preds = %.lr.ph
  %23 = call noundef ptr @_ZNKSt19__shared_ptr_accessI13PeerInterfaceLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %20) #6
  invoke void @_ZN20TransmitTransactionsC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %24 unwind label %30

24:                                               ; preds = %22
  invoke void @_ZN20NetworkMessageHelper25serializeToNetworkMessageI20TransmitTransactionsEE14NetworkMessageT_(ptr dead_on_unwind nonnull writable sret(%class.NetworkMessage) align 8 %6, ptr noundef nonnull %7)
          to label %25 unwind label %32

25:                                               ; preds = %24
  %26 = load ptr, ptr %23, align 8, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %26, i64 8
  %28 = load ptr, ptr %27, align 8
  invoke void %28(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull %6)
          to label %29 unwind label %34

29:                                               ; preds = %25
  call void @_ZN14NetworkMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #6
  call void @_ZN20TransmitTransactionsD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  br label %37

30:                                               ; preds = %22
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %40

32:                                               ; preds = %24
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %36

34:                                               ; preds = %25
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN14NetworkMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #6
  br label %36

36:                                               ; preds = %34, %32
  %.pn = phi { ptr, i32 } [ %35, %34 ], [ %33, %32 ]
  call void @_ZN20TransmitTransactionsD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  br label %40

37:                                               ; preds = %29, %.lr.ph
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrI13PeerInterfaceESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %39 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrI13PeerInterfaceESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  br i1 %39, label %.lr.ph, label %._crit_edge

40:                                               ; preds = %36, %30
  %.pn.pn = phi { ptr, i32 } [ %.pn, %36 ], [ %31, %30 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @_ZNSt6vectorISt10shared_ptrI13PeerInterfaceESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  br label %41

41:                                               ; preds = %40, %18
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %40 ], [ %19, %18 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  br label %42

42:                                               ; preds = %41, %16
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %41 ], [ %17, %16 ]
  call void @_ZN20TransmitTransactionsD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #6
  resume { ptr, i32 } %.pn.pn.pn.pn
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(112) ptr @_ZNSt6vectorI21TransactionForNetworkSaIS0_EE12emplace_backIJRS0_EEES4_DpOT_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(112)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN20NetworkMessageHelper25serializeToNetworkMessageI20TransmitTransactionsEE14NetworkMessageT_(ptr dead_on_unwind noalias writable sret(%class.NetworkMessage) align 8, ptr noundef) local_unnamed_addr #4 align 2

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

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

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


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