; LLVM IR from microsoft/Multiverso :: src/zoo.ll (ZN10multiverso3Zoo11FinishTrainEv)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::unique_ptr.74" = type { %"struct.std::__uniq_ptr_data.75" }
%"struct.std::__uniq_ptr_data.75" = type { %"class.std::__uniq_ptr_impl.76" }
%"class.std::__uniq_ptr_impl.76" = type { %"class.std::tuple.77" }
%"class.std::tuple.77" = type { %"struct.std::_Tuple_impl.78" }
%"struct.std::_Tuple_impl.78" = type { %"struct.std::_Head_base.81" }
%"struct.std::_Head_base.81" = type { ptr }
%"class.multiverso::Zoo" = type { %"class.std::unordered_map", %"class.std::unique_ptr", ptr, %"class.std::vector", %"class.std::vector.10", %"class.std::vector.10", i32, i32 }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.6" }
%"struct.std::_Head_base.6" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<multiverso::Node, std::allocator<multiverso::Node>>::_Vector_impl" }
%"struct.std::_Vector_base<multiverso::Node, std::allocator<multiverso::Node>>::_Vector_impl" = type { %"struct.std::_Vector_base<multiverso::Node, std::allocator<multiverso::Node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<multiverso::Node, std::allocator<multiverso::Node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZN10multiverso5actorL13kCommunicatorB5cxx11E = external hidden global %"class.std::__cxx11::basic_string", align 8

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10multiverso3Zoo11FinishTrainEv(ptr noundef nonnull align 8 dereferenceable(152) %0) #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::unique_ptr.74", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %8 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %9

9:                                                ; preds = %29, %1
  %10 = load i32, ptr %3, align 4, !tbaa !9
  %11 = getelementptr inbounds %"class.multiverso::Zoo", ptr %8, i32 0, i32 7
  %12 = load i32, ptr %11, align 4, !tbaa !11
  %13 = icmp slt i32 %10, %12
  br i1 %13, label %15, label %14

14:                                               ; preds = %9
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %36

15:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  %16 = load i32, ptr %3, align 4, !tbaa !9
  %17 = call noundef i32 @_ZNK10multiverso3Zoo17server_id_to_rankEi(ptr noundef nonnull align 8 dereferenceable(152) %8, i32 noundef %16)
  store i32 %17, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %18 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 56) #7
  call void @llvm.memset.p0.i64(ptr align 16 %18, i8 0, i64 56, i1 false)
  call void @_ZN10multiverso7MessageC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %18) #6
  call void @_ZNSt10unique_ptrIN10multiverso7MessageESt14default_deleteIS1_EEC2IS3_vEEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %18) #6
  %19 = call noundef ptr @_ZNKSt10unique_ptrIN10multiverso7MessageESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %20 = invoke noundef i32 @_ZNK10multiverso3Zoo4rankEv(ptr noundef nonnull align 8 dereferenceable(152) %8)
          to label %21 unwind label %32

21:                                               ; preds = %15
  invoke void @_ZN10multiverso7Message7set_srcEi(ptr noundef nonnull align 8 dereferenceable(56) %19, i32 noundef %20)
          to label %22 unwind label %32

22:                                               ; preds = %21
  %23 = call noundef ptr @_ZNKSt10unique_ptrIN10multiverso7MessageESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %24 = load i32, ptr %4, align 4, !tbaa !9
  invoke void @_ZN10multiverso7Message7set_dstEi(ptr noundef nonnull align 8 dereferenceable(56) %23, i32 noundef %24)
          to label %25 unwind label %32

25:                                               ; preds = %22
  %26 = call noundef ptr @_ZNKSt10unique_ptrIN10multiverso7MessageESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  invoke void @_ZN10multiverso7Message8set_typeENS_7MsgTypeE(ptr noundef nonnull align 8 dereferenceable(56) %26, i32 noundef 31)
          to label %27 unwind label %32

27:                                               ; preds = %25
  invoke void @_ZN10multiverso3Zoo6SendToERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt10unique_ptrINS_7MessageESt14default_deleteISA_EE(ptr noundef nonnull align 8 dereferenceable(152) %8, ptr noundef nonnull align 8 dereferenceable(32) @_ZN10multiverso5actorL13kCommunicatorB5cxx11E, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %28 unwind label %32

28:                                               ; preds = %27
  call void @_ZNSt10unique_ptrIN10multiverso7MessageESt14default_deleteIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %29

29:                                               ; preds = %28
  %30 = load i32, ptr %3, align 4, !tbaa !9
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr %3, align 4, !tbaa !9
  br label %9, !llvm.loop !33

32:                                               ; preds = %27, %25, %22, %21, %15
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %6, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %7, align 4
  call void @_ZNSt10unique_ptrIN10multiverso7MessageESt14default_deleteIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %37

36:                                               ; preds = %14
  ret void

37:                                               ; preds = %32
  %38 = load ptr, ptr %6, align 8
  %39 = load i32, ptr %7, align 4
  %40 = insertvalue { ptr, i32 } poison, ptr %38, 0
  %41 = insertvalue { ptr, i32 } %40, i32 %39, 1
  resume { ptr, i32 } %41
}

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10multiverso7Message7set_srcEi(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10multiverso7Message7set_dstEi(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10multiverso7Message8set_typeENS_7MsgTypeE(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) #4 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK10multiverso3Zoo17server_id_to_rankEi(ptr noundef nonnull align 8 dereferenceable(152), i32 noundef) #4 align 2

attributes #0 = { 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 = { nobuiltin allocsize(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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 #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 = { nounwind }
attributes #7 = { builtin allocsize(0) }

!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 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 148}
!12 = !{!"_ZTSN10multiverso3ZooE", !13, i64 0, !19, i64 56, !6, i64 64, !25, i64 72, !29, i64 96, !29, i64 120, !10, i64 144, !10, i64 148}
!13 = !{!"_ZTSSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN10multiverso5ActorESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S8_EEE", !14, i64 0}
!14 = !{!"_ZTSSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_PN10multiverso5ActorEESaISB_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSD_18_Mod_range_hashingENSD_20_Default_ranged_hashENSD_20_Prime_rehash_policyENSD_17_Hashtable_traitsILb1ELb0ELb1EEEE", !6, i64 0, !15, i64 8, !16, i64 16, !15, i64 24, !17, i64 32, !6, i64 48}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!17 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !18, i64 0, !15, i64 8}
!18 = !{!"float", !7, i64 0}
!19 = !{!"_ZTSSt10unique_ptrIN10multiverso7MtQueueIS_INS0_7MessageESt14default_deleteIS2_EEEES3_IS6_EE", !20, i64 0}
!20 = !{!"_ZTSSt15__uniq_ptr_dataIN10multiverso7MtQueueISt10unique_ptrINS0_7MessageESt14default_deleteIS3_EEEES4_IS7_ELb1ELb1EE", !21, i64 0}
!21 = !{!"_ZTSSt15__uniq_ptr_implIN10multiverso7MtQueueISt10unique_ptrINS0_7MessageESt14default_deleteIS3_EEEES4_IS7_EE", !22, i64 0}
!22 = !{!"_ZTSSt5tupleIJPN10multiverso7MtQueueISt10unique_ptrINS0_7MessageESt14default_deleteIS3_EEEES4_IS7_EEE", !23, i64 0}
!23 = !{!"_ZTSSt11_Tuple_implILm0EJPN10multiverso7MtQueueISt10unique_ptrINS0_7MessageESt14default_deleteIS3_EEEES4_IS7_EEE", !24, i64 0}
!24 = !{!"_ZTSSt10_Head_baseILm0EPN10multiverso7MtQueueISt10unique_ptrINS0_7MessageESt14default_deleteIS3_EEEELb0EE", !6, i64 0}
!25 = !{!"_ZTSSt6vectorIN10multiverso4NodeESaIS1_EE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIN10multiverso4NodeESaIS1_EE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIN10multiverso4NodeESaIS1_EE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIN10multiverso4NodeESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!"_ZTSSt6vectorIiSaIiEE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}


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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::unique_ptr.74" = type { %"struct.std::__uniq_ptr_data.75" }
%"struct.std::__uniq_ptr_data.75" = type { %"class.std::__uniq_ptr_impl.76" }
%"class.std::__uniq_ptr_impl.76" = type { %"class.std::tuple.77" }
%"class.std::tuple.77" = type { %"struct.std::_Tuple_impl.78" }
%"struct.std::_Tuple_impl.78" = type { %"struct.std::_Head_base.81" }
%"struct.std::_Head_base.81" = type { ptr }

@_ZN10multiverso5actorL13kCommunicatorB5cxx11E = external hidden global %"class.std::__cxx11::basic_string", align 8

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10multiverso3Zoo6SendToERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt10unique_ptrINS_7MessageESt14default_deleteISA_EE(ptr noundef nonnull align 8 dereferenceable(152), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10multiverso3Zoo11FinishTrainEv(ptr noundef nonnull align 8 dereferenceable(152) %0) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::unique_ptr.74", align 8
  %3 = getelementptr inbounds i8, ptr %0, i64 148
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %13, %1
  ret void

.lr.ph:                                           ; preds = %1, %13
  %.06 = phi i32 [ %14, %13 ], [ 0, %1 ]
  %6 = call noundef i32 @_ZNK10multiverso3Zoo17server_id_to_rankEi(ptr noundef nonnull align 8 dereferenceable(152) %0, i32 noundef %.06)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %7 = call noalias noundef nonnull dereferenceable(56) ptr @_Znwm(i64 noundef 56) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(56) %7, i8 0, i64 56, i1 false)
  call void @_ZN10multiverso7MessageC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #6
  call void @_ZNSt10unique_ptrIN10multiverso7MessageESt14default_deleteIS1_EEC2IS3_vEEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull %7) #6
  %8 = call noundef ptr @_ZNKSt10unique_ptrIN10multiverso7MessageESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  %9 = invoke noundef i32 @_ZNK10multiverso3Zoo4rankEv(ptr noundef nonnull align 8 dereferenceable(152) %0)
          to label %10 unwind label %17

10:                                               ; preds = %.lr.ph
  call void @_ZN10multiverso7Message7set_srcEi(ptr noundef nonnull align 8 dereferenceable(56) %8, i32 noundef %9)
  %11 = call noundef ptr @_ZNKSt10unique_ptrIN10multiverso7MessageESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  call void @_ZN10multiverso7Message7set_dstEi(ptr noundef nonnull align 8 dereferenceable(56) %11, i32 noundef %6)
  %12 = call noundef ptr @_ZNKSt10unique_ptrIN10multiverso7MessageESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  call void @_ZN10multiverso7Message8set_typeENS_7MsgTypeE(ptr noundef nonnull align 8 dereferenceable(56) %12, i32 noundef 31)
  invoke void @_ZN10multiverso3Zoo6SendToERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt10unique_ptrINS_7MessageESt14default_deleteISA_EE(ptr noundef nonnull align 8 dereferenceable(152) %0, ptr noundef nonnull align 8 dereferenceable(32) @_ZN10multiverso5actorL13kCommunicatorB5cxx11E, ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %13 unwind label %17

13:                                               ; preds = %10
  call void @_ZNSt10unique_ptrIN10multiverso7MessageESt14default_deleteIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  %14 = add nuw nsw i32 %.06, 1
  %15 = load i32, ptr %3, align 4, !tbaa !5
  %16 = icmp slt i32 %14, %15
  br i1 %16, label %.lr.ph, label %._crit_edge, !llvm.loop !31

17:                                               ; preds = %10, %.lr.ph
  %18 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt10unique_ptrIN10multiverso7MessageESt14default_deleteIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  resume { ptr, i32 } %18
}

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10multiverso7Message7set_srcEi(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10multiverso7Message7set_dstEi(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10multiverso7Message8set_typeENS_7MsgTypeE(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) local_unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK10multiverso3Zoo17server_id_to_rankEi(ptr noundef nonnull align 8 dereferenceable(152), i32 noundef) local_unnamed_addr #4 align 2

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 = { nobuiltin allocsize(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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 #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 = { nounwind }
attributes #7 = { builtin allocsize(0) }

!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, !30, i64 148}
!6 = !{!"_ZTSN10multiverso3ZooE", !7, i64 0, !16, i64 56, !9, i64 64, !22, i64 72, !26, i64 96, !26, i64 120, !30, i64 144, !30, i64 148}
!7 = !{!"_ZTSSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN10multiverso5ActorESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S8_EEE", !8, i64 0}
!8 = !{!"_ZTSSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_PN10multiverso5ActorEESaISB_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSD_18_Mod_range_hashingENSD_20_Default_ranged_hashENSD_20_Prime_rehash_policyENSD_17_Hashtable_traitsILb1ELb0ELb1EEEE", !9, i64 0, !12, i64 8, !13, i64 16, !12, i64 24, !14, i64 32, !9, i64 48}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !9, i64 0}
!14 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !15, i64 0, !12, i64 8}
!15 = !{!"float", !10, i64 0}
!16 = !{!"_ZTSSt10unique_ptrIN10multiverso7MtQueueIS_INS0_7MessageESt14default_deleteIS2_EEEES3_IS6_EE", !17, i64 0}
!17 = !{!"_ZTSSt15__uniq_ptr_dataIN10multiverso7MtQueueISt10unique_ptrINS0_7MessageESt14default_deleteIS3_EEEES4_IS7_ELb1ELb1EE", !18, i64 0}
!18 = !{!"_ZTSSt15__uniq_ptr_implIN10multiverso7MtQueueISt10unique_ptrINS0_7MessageESt14default_deleteIS3_EEEES4_IS7_EE", !19, i64 0}
!19 = !{!"_ZTSSt5tupleIJPN10multiverso7MtQueueISt10unique_ptrINS0_7MessageESt14default_deleteIS3_EEEES4_IS7_EEE", !20, i64 0}
!20 = !{!"_ZTSSt11_Tuple_implILm0EJPN10multiverso7MtQueueISt10unique_ptrINS0_7MessageESt14default_deleteIS3_EEEES4_IS7_EEE", !21, i64 0}
!21 = !{!"_ZTSSt10_Head_baseILm0EPN10multiverso7MtQueueISt10unique_ptrINS0_7MessageESt14default_deleteIS3_EEEELb0EE", !9, i64 0}
!22 = !{!"_ZTSSt6vectorIN10multiverso4NodeESaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIN10multiverso4NodeESaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIN10multiverso4NodeESaIS1_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIN10multiverso4NodeESaIS1_EE17_Vector_impl_dataE", !9, i64 0, !9, i64 8, !9, i64 16}
!26 = !{!"_ZTSSt6vectorIiSaIiEE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !9, i64 0, !9, i64 8, !9, i64 16}
!30 = !{!"int", !10, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}


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