; LLVM IR from stonne-simulator/omega :: omega-code/stonne/src/MSNetwork.ll (ZN9MSNetwork8getStatsEv)

; 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.MSNetworkStats = type { %class.Stats, i32, i32, i32, i32, i32, i32, i32, i32 }
%class.Stats = type { ptr }
%"struct.std::_Rb_tree_iterator.34" = type { ptr }
%class.MSwitchStats = type { %class.Stats, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%class.FifoStats = type <{ %class.Stats, i32, i32, i32, i32, i32, [4 x i8] }>
%"struct.std::_Rb_tree_iterator" = type { ptr }
%class.ConnectionStats = type { %class.Stats, i32, i32 }
%class.MSNetwork = type <{ %class.MultiplierNetwork, %"class.std::map", %"class.std::map.3", i32, i32, i32, [4 x i8] }>
%class.MultiplierNetwork = type { %class.Unit }
%class.Unit = type { ptr, i32, %"class.std::__cxx11::basic_string" }
%"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::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, MSwitch *>, std::_Select1st<std::pair<const int, MSwitch *>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, MSwitch *>, std::_Select1st<std::pair<const int, MSwitch *>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::map.3" = type { %"class.std::_Rb_tree.4" }
%"class.std::_Rb_tree.4" = type { %"struct.std::_Rb_tree<int, std::pair<const int, Connection *>, std::_Select1st<std::pair<const int, Connection *>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, Connection *>, std::_Select1st<std::pair<const int, Connection *>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::pair.35" = type { i32, ptr }
%"struct.std::pair" = 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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9MSNetwork8getStatsEv(ptr dead_on_unwind noalias writable sret(%class.MSNetworkStats) align 8 %0, ptr noundef nonnull align 8 dereferenceable(156) %1) unnamed_addr #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"struct.std::_Rb_tree_iterator.34", align 8
  %6 = alloca %"struct.std::_Rb_tree_iterator.34", align 8
  %7 = alloca ptr, align 8
  %8 = alloca %class.MSwitchStats, align 8
  %9 = alloca %class.FifoStats, align 8
  %10 = alloca %class.FifoStats, align 8
  %11 = alloca %class.FifoStats, align 8
  %12 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %13 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %14 = alloca ptr, align 8
  %15 = alloca %class.ConnectionStats, align 8
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %16 = load ptr, ptr %4, align 8
  call void @_ZN14MSNetworkStatsC1Ev(ptr noundef nonnull align 8 dereferenceable(40) %0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %17 = getelementptr inbounds %class.MSNetwork, ptr %16, i32 0, i32 1
  %18 = call ptr @_ZNSt3mapIiP7MSwitchSt4lessIiESaISt4pairIKiS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %17) #4
  %19 = getelementptr inbounds %"struct.std::_Rb_tree_iterator.34", ptr %5, i32 0, i32 0
  store ptr %18, ptr %19, align 8
  br label %20

20:                                               ; preds = %83, %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %21 = getelementptr inbounds %class.MSNetwork, ptr %16, i32 0, i32 1
  %22 = call ptr @_ZNSt3mapIiP7MSwitchSt4lessIiESaISt4pairIKiS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %21) #4
  %23 = getelementptr inbounds %"struct.std::_Rb_tree_iterator.34", ptr %6, i32 0, i32 0
  store ptr %22, ptr %23, align 8
  %24 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiP7MSwitchEES7_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  br i1 %24, label %26, label %25

25:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %85

26:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %27 = getelementptr inbounds %class.MSNetwork, ptr %16, i32 0, i32 1
  %28 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiP7MSwitchEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  %29 = getelementptr inbounds %"struct.std::pair.35", ptr %28, i32 0, i32 0
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIiP7MSwitchSt4lessIiESaISt4pairIKiS1_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(48) %27, ptr noundef nonnull align 4 dereferenceable(4) %29)
  %31 = load ptr, ptr %30, align 8, !tbaa !5
  store ptr %31, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr %8) #4
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN7MSwitch8getStatsEv(ptr dead_on_unwind writable sret(%class.MSwitchStats) align 8 %8, ptr noundef nonnull align 8 dereferenceable(264) %32)
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #4
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = call noundef ptr @_ZN7MSwitch17getActivationFifoEv(ptr noundef nonnull align 8 dereferenceable(264) %33)
  call void @_ZN4Fifo8getStatsEv(ptr dead_on_unwind writable sret(%class.FifoStats) align 8 %9, ptr noundef nonnull align 8 dereferenceable(120) %34)
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #4
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = call noundef ptr @_ZN7MSwitch13getWeightFifoEv(ptr noundef nonnull align 8 dereferenceable(264) %35)
  call void @_ZN4Fifo8getStatsEv(ptr dead_on_unwind writable sret(%class.FifoStats) align 8 %10, ptr noundef nonnull align 8 dereferenceable(120) %36)
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #4
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = call noundef ptr @_ZN7MSwitch11getPsumFifoEv(ptr noundef nonnull align 8 dereferenceable(264) %37)
  call void @_ZN4Fifo8getStatsEv(ptr dead_on_unwind writable sret(%class.FifoStats) align 8 %11, ptr noundef nonnull align 8 dereferenceable(120) %38)
  %39 = getelementptr inbounds %class.MSwitchStats, ptr %8, i32 0, i32 2
  %40 = load i32, ptr %39, align 4, !tbaa !9
  %41 = getelementptr inbounds %class.MSNetworkStats, ptr %0, i32 0, i32 1
  %42 = load i32, ptr %41, align 8, !tbaa !13
  %43 = add i32 %42, %40
  store i32 %43, ptr %41, align 8, !tbaa !13
  %44 = getelementptr inbounds %class.FifoStats, ptr %10, i32 0, i32 1
  %45 = load i32, ptr %44, align 8, !tbaa !15
  %46 = getelementptr inbounds %class.FifoStats, ptr %10, i32 0, i32 3
  %47 = load i32, ptr %46, align 8, !tbaa !17
  %48 = add i32 %45, %47
  %49 = getelementptr inbounds %class.MSNetworkStats, ptr %0, i32 0, i32 3
  %50 = load i32, ptr %49, align 8, !tbaa !18
  %51 = add i32 %50, %48
  store i32 %51, ptr %49, align 8, !tbaa !18
  %52 = getelementptr inbounds %class.MSwitchStats, ptr %8, i32 0, i32 6
  %53 = load i32, ptr %52, align 4, !tbaa !19
  %54 = getelementptr inbounds %class.MSNetworkStats, ptr %0, i32 0, i32 4
  %55 = load i32, ptr %54, align 4, !tbaa !20
  %56 = add i32 %55, %53
  store i32 %56, ptr %54, align 4, !tbaa !20
  %57 = getelementptr inbounds %class.MSwitchStats, ptr %8, i32 0, i32 5
  %58 = load i32, ptr %57, align 8, !tbaa !21
  %59 = getelementptr inbounds %class.MSNetworkStats, ptr %0, i32 0, i32 6
  %60 = load i32, ptr %59, align 4, !tbaa !22
  %61 = add i32 %60, %58
  store i32 %61, ptr %59, align 4, !tbaa !22
  %62 = getelementptr inbounds %class.FifoStats, ptr %9, i32 0, i32 1
  %63 = load i32, ptr %62, align 8, !tbaa !15
  %64 = getelementptr inbounds %class.FifoStats, ptr %9, i32 0, i32 3
  %65 = load i32, ptr %64, align 8, !tbaa !17
  %66 = add i32 %63, %65
  %67 = getelementptr inbounds %class.MSNetworkStats, ptr %0, i32 0, i32 5
  %68 = load i32, ptr %67, align 8, !tbaa !23
  %69 = add i32 %68, %66
  store i32 %69, ptr %67, align 8, !tbaa !23
  %70 = getelementptr inbounds %class.MSwitchStats, ptr %8, i32 0, i32 8
  %71 = load i32, ptr %70, align 4, !tbaa !24
  %72 = getelementptr inbounds %class.MSNetworkStats, ptr %0, i32 0, i32 8
  %73 = load i32, ptr %72, align 4, !tbaa !25
  %74 = add i32 %73, %71
  store i32 %74, ptr %72, align 4, !tbaa !25
  %75 = getelementptr inbounds %class.FifoStats, ptr %11, i32 0, i32 1
  %76 = load i32, ptr %75, align 8, !tbaa !15
  %77 = getelementptr inbounds %class.FifoStats, ptr %11, i32 0, i32 3
  %78 = load i32, ptr %77, align 8, !tbaa !17
  %79 = add i32 %76, %78
  %80 = getelementptr inbounds %class.MSNetworkStats, ptr %0, i32 0, i32 7
  %81 = load i32, ptr %80, align 8, !tbaa !26
  %82 = add i32 %81, %79
  store i32 %82, ptr %80, align 8, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %83

83:                                               ; preds = %26
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiP7MSwitchEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  br label %20, !llvm.loop !27

85:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %86 = getelementptr inbounds %class.MSNetwork, ptr %16, i32 0, i32 2
  %87 = call ptr @_ZNSt3mapIiP10ConnectionSt4lessIiESaISt4pairIKiS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %86) #4
  %88 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %12, i32 0, i32 0
  store ptr %87, ptr %88, align 8
  br label %89

89:                                               ; preds = %107, %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %90 = getelementptr inbounds %class.MSNetwork, ptr %16, i32 0, i32 2
  %91 = call ptr @_ZNSt3mapIiP10ConnectionSt4lessIiESaISt4pairIKiS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %90) #4
  %92 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %13, i32 0, i32 0
  store ptr %91, ptr %92, align 8
  %93 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiP10ConnectionEES7_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br i1 %93, label %95, label %94

94:                                               ; preds = %89
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %109

95:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %96 = getelementptr inbounds %class.MSNetwork, ptr %16, i32 0, i32 2
  %97 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiP10ConnectionEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  %98 = getelementptr inbounds %"struct.std::pair", ptr %97, i32 0, i32 0
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIiP10ConnectionSt4lessIiESaISt4pairIKiS1_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(48) %96, ptr noundef nonnull align 4 dereferenceable(4) %98)
  %100 = load ptr, ptr %99, align 8, !tbaa !5
  store ptr %100, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #4
  %101 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN10Connection8getStatsEv(ptr dead_on_unwind writable sret(%class.ConnectionStats) align 8 %15, ptr noundef nonnull align 8 dereferenceable(64) %101)
  %102 = getelementptr inbounds %class.ConnectionStats, ptr %15, i32 0, i32 1
  %103 = load i32, ptr %102, align 8, !tbaa !29
  %104 = getelementptr inbounds %class.MSNetworkStats, ptr %0, i32 0, i32 2
  %105 = load i32, ptr %104, align 4, !tbaa !31
  %106 = add i32 %105, %103
  store i32 %106, ptr %104, align 4, !tbaa !31
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %107

107:                                              ; preds = %95
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiP10ConnectionEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  br label %89, !llvm.loop !32

109:                                              ; preds = %94
  ret void
}

declare void @_ZN14MSNetworkStatsC1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7MSwitch8getStatsEv(ptr dead_on_unwind noalias writable sret(%class.MSwitchStats) align 8, ptr noundef nonnull align 8 dereferenceable(264)) #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4Fifo8getStatsEv(ptr dead_on_unwind noalias writable sret(%class.FifoStats) align 8, ptr noundef nonnull align 8 dereferenceable(120)) #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10Connection8getStatsEv(ptr dead_on_unwind noalias writable sret(%class.ConnectionStats) align 8, ptr noundef nonnull align 8 dereferenceable(64)) #2 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 = { 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 #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 }

!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, !12, i64 12}
!10 = !{!"_ZTS12MSwitchStats", !11, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44}
!11 = !{!"_ZTS5Stats"}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 8}
!14 = !{!"_ZTS14MSNetworkStats", !11, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36}
!15 = !{!16, !12, i64 8}
!16 = !{!"_ZTS9FifoStats", !11, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24}
!17 = !{!16, !12, i64 16}
!18 = !{!14, !12, i64 16}
!19 = !{!10, !12, i64 28}
!20 = !{!14, !12, i64 20}
!21 = !{!10, !12, i64 24}
!22 = !{!14, !12, i64 28}
!23 = !{!14, !12, i64 24}
!24 = !{!10, !12, i64 36}
!25 = !{!14, !12, i64 36}
!26 = !{!14, !12, i64 32}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!30, !12, i64 8}
!30 = !{!"_ZTS15ConnectionStats", !11, i64 0, !12, i64 8, !12, i64 12}
!31 = !{!14, !12, i64 12}
!32 = distinct !{!32, !28}


; 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.MSNetworkStats = type { %class.Stats, i32, i32, i32, i32, i32, i32, i32, i32 }
%class.Stats = type { ptr }
%"struct.std::_Rb_tree_iterator.34" = type { ptr }
%class.MSwitchStats = type { %class.Stats, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%class.FifoStats = type <{ %class.Stats, i32, i32, i32, i32, i32, [4 x i8] }>
%"struct.std::_Rb_tree_iterator" = type { ptr }
%class.ConnectionStats = type { %class.Stats, i32, i32 }

; 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
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIiP7MSwitchSt4lessIiESaISt4pairIKiS1_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9MSNetwork8getStatsEv(ptr dead_on_unwind noalias nonnull writable sret(%class.MSNetworkStats) align 8 %0, ptr noundef nonnull align 8 dereferenceable(156) %1) unnamed_addr #1 align 2 {
  %3 = alloca %"struct.std::_Rb_tree_iterator.34", align 8
  %4 = alloca %"struct.std::_Rb_tree_iterator.34", align 8
  %5 = alloca %class.MSwitchStats, align 8
  %6 = alloca %class.FifoStats, align 8
  %7 = alloca %class.FifoStats, align 8
  %8 = alloca %class.FifoStats, align 8
  %9 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %10 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %11 = alloca %class.ConnectionStats, align 8
  tail call void @_ZN14MSNetworkStatsC1Ev(ptr noundef nonnull align 8 dereferenceable(40) %0)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %12 = getelementptr inbounds i8, ptr %1, i64 48
  %13 = tail call ptr @_ZNSt3mapIiP7MSwitchSt4lessIiESaISt4pairIKiS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %12) #4
  store ptr %13, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %14 = tail call ptr @_ZNSt3mapIiP7MSwitchSt4lessIiESaISt4pairIKiS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %12) #4
  store ptr %14, ptr %4, align 8
  %15 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiP7MSwitchEES7_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  br i1 %15, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2
  %16 = getelementptr inbounds i8, ptr %5, i64 12
  %17 = getelementptr inbounds i8, ptr %0, i64 8
  %18 = getelementptr inbounds i8, ptr %7, i64 8
  %19 = getelementptr inbounds i8, ptr %7, i64 16
  %20 = getelementptr inbounds i8, ptr %0, i64 16
  %21 = getelementptr inbounds i8, ptr %5, i64 28
  %22 = getelementptr inbounds i8, ptr %5, i64 24
  %23 = getelementptr inbounds i8, ptr %6, i64 8
  %24 = getelementptr inbounds i8, ptr %6, i64 16
  %25 = getelementptr inbounds i8, ptr %5, i64 36
  %26 = getelementptr inbounds i8, ptr %0, i64 36
  %27 = getelementptr inbounds i8, ptr %8, i64 8
  %28 = getelementptr inbounds i8, ptr %8, i64 16
  %29 = getelementptr inbounds i8, ptr %0, i64 32
  br label %36

._crit_edge:                                      ; preds = %36, %2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  %30 = getelementptr inbounds i8, ptr %1, i64 96
  %31 = call ptr @_ZNSt3mapIiP10ConnectionSt4lessIiESaISt4pairIKiS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %30) #4
  store ptr %31, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  %32 = call ptr @_ZNSt3mapIiP10ConnectionSt4lessIiESaISt4pairIKiS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %30) #4
  store ptr %32, ptr %10, align 8
  %33 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiP10ConnectionEES7_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  br i1 %33, label %.lr.ph7, label %._crit_edge8

.lr.ph7:                                          ; preds = %._crit_edge
  %34 = getelementptr inbounds i8, ptr %11, i64 8
  %35 = getelementptr inbounds i8, ptr %0, i64 12
  br label %71

36:                                               ; preds = %.lr.ph, %36
  %37 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiP7MSwitchEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIiP7MSwitchSt4lessIiESaISt4pairIKiS1_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(48) %12, ptr noundef nonnull align 4 dereferenceable(4) %37)
  %39 = load ptr, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #4
  call void @_ZN7MSwitch8getStatsEv(ptr dead_on_unwind nonnull writable sret(%class.MSwitchStats) align 8 %5, ptr noundef nonnull align 8 dereferenceable(264) %39)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #4
  %40 = call noundef ptr @_ZN7MSwitch17getActivationFifoEv(ptr noundef nonnull align 8 dereferenceable(264) %39)
  call void @_ZN4Fifo8getStatsEv(ptr dead_on_unwind nonnull writable sret(%class.FifoStats) align 8 %6, ptr noundef nonnull align 8 dereferenceable(120) %40)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #4
  %41 = call noundef ptr @_ZN7MSwitch13getWeightFifoEv(ptr noundef nonnull align 8 dereferenceable(264) %39)
  call void @_ZN4Fifo8getStatsEv(ptr dead_on_unwind nonnull writable sret(%class.FifoStats) align 8 %7, ptr noundef nonnull align 8 dereferenceable(120) %41)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #4
  %42 = call noundef ptr @_ZN7MSwitch11getPsumFifoEv(ptr noundef nonnull align 8 dereferenceable(264) %39)
  call void @_ZN4Fifo8getStatsEv(ptr dead_on_unwind nonnull writable sret(%class.FifoStats) align 8 %8, ptr noundef nonnull align 8 dereferenceable(120) %42)
  %43 = load i32, ptr %16, align 4, !tbaa !9
  %44 = load i32, ptr %17, align 8, !tbaa !13
  %45 = add i32 %44, %43
  store i32 %45, ptr %17, align 8, !tbaa !13
  %46 = load i32, ptr %18, align 8, !tbaa !15
  %47 = load i32, ptr %19, align 8, !tbaa !17
  %48 = add i32 %47, %46
  %49 = load i32, ptr %21, align 4, !tbaa !18
  %50 = load i32, ptr %22, align 8, !tbaa !19
  %51 = load i32, ptr %23, align 8, !tbaa !15
  %52 = load i32, ptr %24, align 8, !tbaa !17
  %53 = add i32 %52, %51
  %54 = load <4 x i32>, ptr %20, align 8, !tbaa !20
  %55 = insertelement <4 x i32> poison, i32 %48, i64 0
  %56 = insertelement <4 x i32> %55, i32 %49, i64 1
  %57 = insertelement <4 x i32> %56, i32 %53, i64 2
  %58 = insertelement <4 x i32> %57, i32 %50, i64 3
  %59 = add <4 x i32> %54, %58
  store <4 x i32> %59, ptr %20, align 8, !tbaa !20
  %60 = load i32, ptr %25, align 4, !tbaa !21
  %61 = load i32, ptr %26, align 4, !tbaa !22
  %62 = add i32 %61, %60
  store i32 %62, ptr %26, align 4, !tbaa !22
  %63 = load i32, ptr %27, align 8, !tbaa !15
  %64 = load i32, ptr %28, align 8, !tbaa !17
  %65 = add i32 %64, %63
  %66 = load i32, ptr %29, align 8, !tbaa !23
  %67 = add i32 %65, %66
  store i32 %67, ptr %29, align 8, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #4
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiP7MSwitchEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %69 = call ptr @_ZNSt3mapIiP7MSwitchSt4lessIiESaISt4pairIKiS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %12) #4
  store ptr %69, ptr %4, align 8
  %70 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiP7MSwitchEES7_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  br i1 %70, label %36, label %._crit_edge, !llvm.loop !24

._crit_edge8:                                     ; preds = %71, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  ret void

71:                                               ; preds = %.lr.ph7, %71
  %72 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiP10ConnectionEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIiP10ConnectionSt4lessIiESaISt4pairIKiS1_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(48) %30, ptr noundef nonnull align 4 dereferenceable(4) %72)
  %74 = load ptr, ptr %73, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #4
  call void @_ZN10Connection8getStatsEv(ptr dead_on_unwind nonnull writable sret(%class.ConnectionStats) align 8 %11, ptr noundef nonnull align 8 dereferenceable(64) %74)
  %75 = load i32, ptr %34, align 8, !tbaa !26
  %76 = load i32, ptr %35, align 4, !tbaa !28
  %77 = add i32 %76, %75
  store i32 %77, ptr %35, align 4, !tbaa !28
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #4
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiP10ConnectionEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  %79 = call ptr @_ZNSt3mapIiP10ConnectionSt4lessIiESaISt4pairIKiS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %30) #4
  store ptr %79, ptr %10, align 8
  %80 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiP10ConnectionEES7_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  br i1 %80, label %71, label %._crit_edge8, !llvm.loop !29
}

declare void @_ZN14MSNetworkStatsC1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7MSwitch8getStatsEv(ptr dead_on_unwind noalias writable sret(%class.MSwitchStats) align 8, ptr noundef nonnull align 8 dereferenceable(264)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4Fifo8getStatsEv(ptr dead_on_unwind noalias writable sret(%class.FifoStats) align 8, ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10Connection8getStatsEv(ptr dead_on_unwind noalias writable sret(%class.ConnectionStats) align 8, ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #2 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 = { 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 #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 }

!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, !12, i64 12}
!10 = !{!"_ZTS12MSwitchStats", !11, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44}
!11 = !{!"_ZTS5Stats"}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 8}
!14 = !{!"_ZTS14MSNetworkStats", !11, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36}
!15 = !{!16, !12, i64 8}
!16 = !{!"_ZTS9FifoStats", !11, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24}
!17 = !{!16, !12, i64 16}
!18 = !{!10, !12, i64 28}
!19 = !{!10, !12, i64 24}
!20 = !{!12, !12, i64 0}
!21 = !{!10, !12, i64 36}
!22 = !{!14, !12, i64 36}
!23 = !{!14, !12, i64 32}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!27, !12, i64 8}
!27 = !{!"_ZTS15ConnectionStats", !11, i64 0, !12, i64 8, !12, i64 12}
!28 = !{!14, !12, i64 12}
!29 = distinct !{!29, !25}


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