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

; 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.DSNetworkStats = type <{ %class.Stats, i32, i32, i32, i32, i32, [4 x i8] }>
%class.Stats = type { ptr }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%class.DSwitchStats = type <{ %class.Stats, i32, i32, i32, i32, i32, [4 x i8] }>
%"struct.std::_Rb_tree_iterator.13" = type { ptr }
%class.ConnectionStats = type { %class.Stats, i32, i32 }
%class.DSNetwork = type { %class.Unit, i32, i32, i32, %"class.std::map", %"class.std::map.3", ptr }
%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<std::pair<int, int>, std::pair<const std::pair<int, int>, DSwitch *>, std::_Select1st<std::pair<const std::pair<int, int>, DSwitch *>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, DSwitch *>, std::_Select1st<std::pair<const std::pair<int, int>, DSwitch *>>, std::less<std::pair<int, 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<std::pair<int, int>, std::pair<const std::pair<int, int>, Connection *>, std::_Select1st<std::pair<const std::pair<int, int>, Connection *>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, Connection *>, std::_Select1st<std::pair<const std::pair<int, int>, Connection *>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::pair.11" = type { %"struct.std::pair", ptr }
%"struct.std::pair" = type { i32, i32 }
%"struct.std::pair.14" = type { %"struct.std::pair", 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 @_ZNSt3mapISt4pairIiiEP7DSwitchSt4lessIS1_ESaIS0_IKS1_S3_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapISt4pairIiiEP7DSwitchSt4lessIS1_ESaIS0_IKS1_S3_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_iteratorISt4pairIKS0_IiiEP7DSwitchEES8_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IiiEP7DSwitchEEptEv(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_iteratorISt4pairIKS0_IiiEP7DSwitchEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapISt4pairIiiEP10ConnectionSt4lessIS1_ESaIS0_IKS1_S3_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_iteratorISt4pairIKS0_IiiEP10ConnectionEES8_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IiiEP10ConnectionEEptEv(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_iteratorISt4pairIKS0_IiiEP10ConnectionEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9DSNetwork8getStatsEv(ptr dead_on_unwind noalias writable sret(%class.DSNetworkStats) align 8 %0, ptr noundef nonnull align 8 dereferenceable(168) %1) #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %6 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %7 = alloca ptr, align 8
  %8 = alloca %class.DSwitchStats, align 8
  %9 = alloca %"struct.std::_Rb_tree_iterator.13", align 8
  %10 = alloca %"struct.std::_Rb_tree_iterator.13", align 8
  %11 = alloca ptr, align 8
  %12 = alloca %class.ConnectionStats, align 8
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %13 = load ptr, ptr %4, align 8
  call void @_ZN14DSNetworkStatsC1Ev(ptr noundef nonnull align 8 dereferenceable(28) %0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %14 = getelementptr inbounds %class.DSNetwork, ptr %13, i32 0, i32 4
  %15 = call ptr @_ZNSt3mapISt4pairIiiEP7DSwitchSt4lessIS1_ESaIS0_IKS1_S3_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %14) #4
  %16 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %5, i32 0, i32 0
  store ptr %15, ptr %16, align 8
  br label %17

17:                                               ; preds = %50, %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %18 = getelementptr inbounds %class.DSNetwork, ptr %13, i32 0, i32 4
  %19 = call ptr @_ZNSt3mapISt4pairIiiEP7DSwitchSt4lessIS1_ESaIS0_IKS1_S3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %18) #4
  %20 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %6, i32 0, i32 0
  store ptr %19, ptr %20, align 8
  %21 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_IiiEP7DSwitchEES8_(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 %21, label %23, label %22

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

23:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %24 = getelementptr inbounds %class.DSNetwork, ptr %13, i32 0, i32 4
  %25 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IiiEP7DSwitchEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  %26 = getelementptr inbounds %"struct.std::pair.11", ptr %25, i32 0, i32 0
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIiiEP7DSwitchSt4lessIS1_ESaIS0_IKS1_S3_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %24, ptr noundef nonnull align 4 dereferenceable(8) %26)
  %28 = load ptr, ptr %27, align 8, !tbaa !5
  store ptr %28, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #4
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN7DSwitch8getStatsEv(ptr dead_on_unwind writable sret(%class.DSwitchStats) align 8 %8, ptr noundef nonnull align 8 dereferenceable(184) %29)
  %30 = getelementptr inbounds %class.DSwitchStats, ptr %8, i32 0, i32 2
  %31 = load i32, ptr %30, align 4, !tbaa !9
  %32 = getelementptr inbounds %class.DSNetworkStats, ptr %0, i32 0, i32 1
  %33 = load i32, ptr %32, align 8, !tbaa !13
  %34 = add i32 %33, %31
  store i32 %34, ptr %32, align 8, !tbaa !13
  %35 = getelementptr inbounds %class.DSwitchStats, ptr %8, i32 0, i32 3
  %36 = load i32, ptr %35, align 8, !tbaa !15
  %37 = getelementptr inbounds %class.DSNetworkStats, ptr %0, i32 0, i32 2
  %38 = load i32, ptr %37, align 4, !tbaa !16
  %39 = add i32 %38, %36
  store i32 %39, ptr %37, align 4, !tbaa !16
  %40 = getelementptr inbounds %class.DSwitchStats, ptr %8, i32 0, i32 5
  %41 = load i32, ptr %40, align 8, !tbaa !17
  %42 = getelementptr inbounds %class.DSNetworkStats, ptr %0, i32 0, i32 4
  %43 = load i32, ptr %42, align 4, !tbaa !18
  %44 = add i32 %43, %41
  store i32 %44, ptr %42, align 4, !tbaa !18
  %45 = getelementptr inbounds %class.DSwitchStats, ptr %8, i32 0, i32 4
  %46 = load i32, ptr %45, align 4, !tbaa !19
  %47 = getelementptr inbounds %class.DSNetworkStats, ptr %0, i32 0, i32 3
  %48 = load i32, ptr %47, align 8, !tbaa !20
  %49 = add i32 %48, %46
  store i32 %49, ptr %47, align 8, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %50

50:                                               ; preds = %23
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKS0_IiiEP7DSwitchEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  br label %17, !llvm.loop !21

52:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %53 = getelementptr inbounds %class.DSNetwork, ptr %13, i32 0, i32 5
  %54 = call ptr @_ZNSt3mapISt4pairIiiEP10ConnectionSt4lessIS1_ESaIS0_IKS1_S3_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %53) #4
  %55 = getelementptr inbounds %"struct.std::_Rb_tree_iterator.13", ptr %9, i32 0, i32 0
  store ptr %54, ptr %55, align 8
  br label %56

56:                                               ; preds = %74, %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %57 = getelementptr inbounds %class.DSNetwork, ptr %13, i32 0, i32 5
  %58 = call ptr @_ZNSt3mapISt4pairIiiEP10ConnectionSt4lessIS1_ESaIS0_IKS1_S3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %57) #4
  %59 = getelementptr inbounds %"struct.std::_Rb_tree_iterator.13", ptr %10, i32 0, i32 0
  store ptr %58, ptr %59, align 8
  %60 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_IiiEP10ConnectionEES8_(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 %10) #4
  br i1 %60, label %62, label %61

61:                                               ; preds = %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %76

62:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %63 = getelementptr inbounds %class.DSNetwork, ptr %13, i32 0, i32 5
  %64 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IiiEP10ConnectionEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  %65 = getelementptr inbounds %"struct.std::pair.14", ptr %64, i32 0, i32 0
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIiiEP10ConnectionSt4lessIS1_ESaIS0_IKS1_S3_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %63, ptr noundef nonnull align 4 dereferenceable(8) %65)
  %67 = load ptr, ptr %66, align 8, !tbaa !5
  store ptr %67, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #4
  %68 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN10Connection8getStatsEv(ptr dead_on_unwind writable sret(%class.ConnectionStats) align 8 %12, ptr noundef nonnull align 8 dereferenceable(64) %68)
  %69 = getelementptr inbounds %class.ConnectionStats, ptr %12, i32 0, i32 1
  %70 = load i32, ptr %69, align 8, !tbaa !23
  %71 = getelementptr inbounds %class.DSNetworkStats, ptr %0, i32 0, i32 5
  %72 = load i32, ptr %71, align 8, !tbaa !25
  %73 = add i32 %72, %70
  store i32 %73, ptr %71, align 8, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %74

74:                                               ; preds = %62
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKS0_IiiEP10ConnectionEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  br label %56, !llvm.loop !26

76:                                               ; preds = %61
  ret void
}

declare void @_ZN14DSNetworkStatsC1Ev(ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7DSwitch8getStatsEv(ptr dead_on_unwind noalias writable sret(%class.DSwitchStats) align 8, ptr noundef nonnull align 8 dereferenceable(184)) #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 = !{!"_ZTS12DSwitchStats", !11, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24}
!11 = !{!"_ZTS5Stats"}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 8}
!14 = !{!"_ZTS14DSNetworkStats", !11, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24}
!15 = !{!10, !12, i64 16}
!16 = !{!14, !12, i64 12}
!17 = !{!10, !12, i64 24}
!18 = !{!14, !12, i64 20}
!19 = !{!10, !12, i64 20}
!20 = !{!14, !12, i64 16}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!24, !12, i64 8}
!24 = !{!"_ZTS15ConnectionStats", !11, i64 0, !12, i64 8, !12, i64 12}
!25 = !{!14, !12, i64 24}
!26 = distinct !{!26, !22}


; 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.DSNetworkStats = type <{ %class.Stats, i32, i32, i32, i32, i32, [4 x i8] }>
%class.Stats = type { ptr }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%class.DSwitchStats = type <{ %class.Stats, i32, i32, i32, i32, i32, [4 x i8] }>
%"struct.std::_Rb_tree_iterator.13" = 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 @_ZNSt3mapISt4pairIiiEP7DSwitchSt4lessIS1_ESaIS0_IKS1_S3_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapISt4pairIiiEP7DSwitchSt4lessIS1_ESaIS0_IKS1_S3_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_iteratorISt4pairIKS0_IiiEP7DSwitchEES8_(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 @_ZNSt3mapISt4pairIiiEP7DSwitchSt4lessIS1_ESaIS0_IKS1_S3_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_iteratorISt4pairIKS0_IiiEP7DSwitchEEptEv(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_iteratorISt4pairIKS0_IiiEP7DSwitchEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapISt4pairIiiEP10ConnectionSt4lessIS1_ESaIS0_IKS1_S3_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_iteratorISt4pairIKS0_IiiEP10ConnectionEES8_(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 @_ZNSt3mapISt4pairIiiEP10ConnectionSt4lessIS1_ESaIS0_IKS1_S3_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_iteratorISt4pairIKS0_IiiEP10ConnectionEEptEv(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_iteratorISt4pairIKS0_IiiEP10ConnectionEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9DSNetwork8getStatsEv(ptr dead_on_unwind noalias nonnull writable sret(%class.DSNetworkStats) align 8 %0, ptr noundef nonnull align 8 dereferenceable(168) %1) local_unnamed_addr #1 align 2 {
  %3 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %4 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %5 = alloca %class.DSwitchStats, align 8
  %6 = alloca %"struct.std::_Rb_tree_iterator.13", align 8
  %7 = alloca %"struct.std::_Rb_tree_iterator.13", align 8
  %8 = alloca %class.ConnectionStats, align 8
  tail call void @_ZN14DSNetworkStatsC1Ev(ptr noundef nonnull align 8 dereferenceable(28) %0)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %9 = getelementptr inbounds i8, ptr %1, i64 64
  %10 = tail call ptr @_ZNSt3mapISt4pairIiiEP7DSwitchSt4lessIS1_ESaIS0_IKS1_S3_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %9) #4
  store ptr %10, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %11 = tail call ptr @_ZNSt3mapISt4pairIiiEP7DSwitchSt4lessIS1_ESaIS0_IKS1_S3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %9) #4
  store ptr %11, ptr %4, align 8
  %12 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_IiiEP7DSwitchEES8_(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 %12, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2
  %13 = getelementptr inbounds i8, ptr %5, i64 12
  %14 = getelementptr inbounds i8, ptr %0, i64 8
  br label %21

._crit_edge:                                      ; preds = %21, %2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %15 = getelementptr inbounds i8, ptr %1, i64 112
  %16 = call ptr @_ZNSt3mapISt4pairIiiEP10ConnectionSt4lessIS1_ESaIS0_IKS1_S3_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %15) #4
  store ptr %16, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %17 = call ptr @_ZNSt3mapISt4pairIiiEP10ConnectionSt4lessIS1_ESaIS0_IKS1_S3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %15) #4
  store ptr %17, ptr %7, align 8
  %18 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_IiiEP10ConnectionEES8_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  br i1 %18, label %.lr.ph4, label %._crit_edge5

.lr.ph4:                                          ; preds = %._crit_edge
  %19 = getelementptr inbounds i8, ptr %8, i64 8
  %20 = getelementptr inbounds i8, ptr %0, i64 24
  br label %31

21:                                               ; preds = %.lr.ph, %21
  %22 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IiiEP7DSwitchEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIiiEP7DSwitchSt4lessIS1_ESaIS0_IKS1_S3_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %9, ptr noundef nonnull align 4 dereferenceable(8) %22)
  %24 = load ptr, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #4
  call void @_ZN7DSwitch8getStatsEv(ptr dead_on_unwind nonnull writable sret(%class.DSwitchStats) align 8 %5, ptr noundef nonnull align 8 dereferenceable(184) %24)
  %25 = load <4 x i32>, ptr %13, align 4, !tbaa !9
  %26 = load <4 x i32>, ptr %14, align 8, !tbaa !9
  %27 = add <4 x i32> %26, %25
  store <4 x i32> %27, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKS0_IiiEP7DSwitchEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %29 = call ptr @_ZNSt3mapISt4pairIiiEP7DSwitchSt4lessIS1_ESaIS0_IKS1_S3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %9) #4
  store ptr %29, ptr %4, align 8
  %30 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_IiiEP7DSwitchEES8_(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 %30, label %21, label %._crit_edge, !llvm.loop !11

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

31:                                               ; preds = %.lr.ph4, %31
  %32 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IiiEP10ConnectionEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIiiEP10ConnectionSt4lessIS1_ESaIS0_IKS1_S3_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %15, ptr noundef nonnull align 4 dereferenceable(8) %32)
  %34 = load ptr, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #4
  call void @_ZN10Connection8getStatsEv(ptr dead_on_unwind nonnull writable sret(%class.ConnectionStats) align 8 %8, ptr noundef nonnull align 8 dereferenceable(64) %34)
  %35 = load i32, ptr %19, align 8, !tbaa !13
  %36 = load i32, ptr %20, align 8, !tbaa !16
  %37 = add i32 %36, %35
  store i32 %37, ptr %20, align 8, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #4
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKS0_IiiEP10ConnectionEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %39 = call ptr @_ZNSt3mapISt4pairIiiEP10ConnectionSt4lessIS1_ESaIS0_IKS1_S3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %15) #4
  store ptr %39, ptr %7, align 8
  %40 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_IiiEP10ConnectionEES8_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  br i1 %40, label %31, label %._crit_edge5, !llvm.loop !18
}

declare void @_ZN14DSNetworkStatsC1Ev(ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7DSwitch8getStatsEv(ptr dead_on_unwind noalias writable sret(%class.DSwitchStats) align 8, ptr noundef nonnull align 8 dereferenceable(184)) 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !10, i64 8}
!14 = !{!"_ZTS15ConnectionStats", !15, i64 0, !10, i64 8, !10, i64 12}
!15 = !{!"_ZTS5Stats"}
!16 = !{!17, !10, i64 24}
!17 = !{!"_ZTS14DSNetworkStats", !15, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24}
!18 = distinct !{!18, !12}


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