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

; 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::map.32" = type { %"class.std::_Rb_tree.33" }
%"class.std::_Rb_tree.33" = 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::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }
%class.ASNetwork = type <{ %class.ReduceNetwork, i32, i32, i32, [4 x i8], %"class.std::map", %"class.std::vector", %"class.std::vector", %"class.std::map.6", %"class.std::map.6", %"class.std::vector.11", ptr, ptr, i8, [3 x i8], %class.Config, [4 x i8] }>
%class.ReduceNetwork = 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<std::pair<int, int>, std::pair<const std::pair<int, int>, ASwitch *>, std::_Select1st<std::pair<const std::pair<int, int>, ASwitch *>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, ASwitch *>, std::_Select1st<std::pair<const std::pair<int, int>, ASwitch *>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<ASwitch *, std::allocator<ASwitch *>>::_Vector_impl" }
%"struct.std::_Vector_base<ASwitch *, std::allocator<ASwitch *>>::_Vector_impl" = type { %"struct.std::_Vector_base<ASwitch *, std::allocator<ASwitch *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ASwitch *, std::allocator<ASwitch *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map.6" = type { %"class.std::_Rb_tree.7" }
%"class.std::_Rb_tree.7" = 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" }
%"class.std::vector.11" = type { %"struct.std::_Vector_base.12" }
%"struct.std::_Vector_base.12" = type { %"struct.std::_Vector_base<Connection *, std::allocator<Connection *>>::_Vector_impl" }
%"struct.std::_Vector_base<Connection *, std::allocator<Connection *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Connection *, std::allocator<Connection *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Connection *, std::allocator<Connection *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.Config = type { i32, %class.DSNetworkConfig, %class.DSwitchConfig, %class.MSNetworkConfig, %class.MSwitchConfig, %class.ASNetworkConfig, %class.ASwitchConfig, %class.LookUpTableConfig, %class.SDMemoryConfig }
%class.DSNetworkConfig = type { i32 }
%class.DSwitchConfig = type { i32, i32, i32, i32 }
%class.MSNetworkConfig = type { i32, i32, i32, i32 }
%class.MSwitchConfig = type { i32, i32, i32, i32, i32, i32 }
%class.ASNetworkConfig = type { i32, i32 }
%class.ASwitchConfig = type { i32, i32, i32, i32, i32, i32 }
%class.LookUpTableConfig = type { i32, i32 }
%class.SDMemoryConfig = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }

declare i32 @__gxx_personality_v0(...)

; 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 nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) 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)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9ASNetwork23getLastLevelConnectionsEv(ptr dead_on_unwind noalias writable sret(%"class.std::map.32") align 8 %0, ptr noundef nonnull align 8 dereferenceable(460) %1) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i1, align 1
  %7 = alloca i32, align 4
  %8 = alloca %"struct.std::pair", align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %11 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  %12 = getelementptr inbounds %class.ASNetwork, ptr %11, i32 0, i32 3
  %13 = load i32, ptr %12, align 8, !tbaa !9
  %14 = sub nsw i32 %13, 1
  store i32 %14, ptr %5, align 4, !tbaa !50
  store i1 false, ptr %6, align 1
  call void @_ZNSt3mapIiP10ConnectionSt4lessIiESaISt4pairIKiS1_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 0, ptr %7, align 4, !tbaa !50
  br label %15

15:                                               ; preds = %29, %2
  %16 = load i32, ptr %7, align 4, !tbaa !50
  %17 = getelementptr inbounds %class.ASNetwork, ptr %11, i32 0, i32 2
  %18 = load i32, ptr %17, align 4, !tbaa !51
  %19 = icmp ult i32 %16, %18
  br i1 %19, label %21, label %20

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

21:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  invoke void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %22 unwind label %32

22:                                               ; preds = %21
  %23 = getelementptr inbounds %class.ASNetwork, ptr %11, i32 0, i32 8
  %24 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIiiEP10ConnectionSt4lessIS1_ESaIS0_IKS1_S3_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %23, ptr noundef nonnull align 4 dereferenceable(8) %8)
          to label %25 unwind label %32

25:                                               ; preds = %22
  %26 = load ptr, ptr %24, align 8, !tbaa !5
  %27 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIiP10ConnectionSt4lessIiESaISt4pairIKiS1_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %28 unwind label %32

28:                                               ; preds = %25
  store ptr %26, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  br label %29

29:                                               ; preds = %28
  %30 = load i32, ptr %7, align 4, !tbaa !50
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr %7, align 4, !tbaa !50
  br label %15, !llvm.loop !52

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

36:                                               ; preds = %20
  store i1 true, ptr %6, align 1
  %37 = load i1, ptr %6, align 1
  br i1 %37, label %39, label %38

38:                                               ; preds = %36
  call void @_ZNSt3mapIiP10ConnectionSt4lessIiESaISt4pairIKiS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #3
  br label %39

39:                                               ; preds = %38, %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  ret void

40:                                               ; preds = %32
  %41 = load ptr, ptr %9, align 8
  %42 = load i32, ptr %10, align 4
  %43 = insertvalue { ptr, i32 } poison, ptr %41, 0
  %44 = insertvalue { ptr, i32 } %43, i32 %42, 1
  resume { ptr, i32 } %44
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapIiP10ConnectionSt4lessIiESaISt4pairIKiS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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, !13, i64 56}
!10 = !{!"_ZTS9ASNetwork", !11, i64 0, !13, i64 48, !13, i64 52, !13, i64 56, !17, i64 64, !25, i64 112, !25, i64 136, !29, i64 160, !29, i64 208, !32, i64 256, !6, i64 280, !6, i64 288, !36, i64 296, !37, i64 300}
!11 = !{!"_ZTS13ReduceNetwork", !12, i64 0}
!12 = !{!"_ZTS4Unit", !13, i64 8, !14, i64 16}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !15, i64 0, !16, i64 8, !7, i64 16}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!"_ZTSSt3mapISt4pairIiiEP7ASwitchSt4lessIS1_ESaIS0_IKS1_S3_EEE", !18, i64 0}
!18 = !{!"_ZTSSt8_Rb_treeISt4pairIiiES0_IKS1_P7ASwitchESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE", !19, i64 0}
!19 = !{!"_ZTSNSt8_Rb_treeISt4pairIiiES0_IKS1_P7ASwitchESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE13_Rb_tree_implIS9_Lb1EEE", !20, i64 0, !22, i64 8}
!20 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessISt4pairIiiEEE", !21, i64 0}
!21 = !{!"_ZTSSt4lessISt4pairIiiEE"}
!22 = !{!"_ZTSSt15_Rb_tree_header", !23, i64 0, !16, i64 32}
!23 = !{!"_ZTSSt18_Rb_tree_node_base", !24, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!24 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!25 = !{!"_ZTSSt6vectorIP7ASwitchSaIS1_EE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIP7ASwitchSaIS1_EE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIP7ASwitchSaIS1_EE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIP7ASwitchSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!"_ZTSSt3mapISt4pairIiiEP10ConnectionSt4lessIS1_ESaIS0_IKS1_S3_EEE", !30, i64 0}
!30 = !{!"_ZTSSt8_Rb_treeISt4pairIiiES0_IKS1_P10ConnectionESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE", !31, i64 0}
!31 = !{!"_ZTSNSt8_Rb_treeISt4pairIiiES0_IKS1_P10ConnectionESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE13_Rb_tree_implIS9_Lb1EEE", !20, i64 0, !22, i64 8}
!32 = !{!"_ZTSSt6vectorIP10ConnectionSaIS1_EE", !33, i64 0}
!33 = !{!"_ZTSSt12_Vector_baseIP10ConnectionSaIS1_EE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIP10ConnectionSaIS1_EE12_Vector_implE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIP10ConnectionSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!36 = !{!"bool", !7, i64 0}
!37 = !{!"_ZTS6Config", !13, i64 0, !38, i64 4, !39, i64 8, !40, i64 24, !42, i64 40, !43, i64 64, !45, i64 72, !46, i64 96, !47, i64 104}
!38 = !{!"_ZTS15DSNetworkConfig", !13, i64 0}
!39 = !{!"_ZTS13DSwitchConfig", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12}
!40 = !{!"_ZTS15MSNetworkConfig", !41, i64 0, !13, i64 4, !13, i64 8, !13, i64 12}
!41 = !{!"_ZTS19MultiplierNetwork_t", !7, i64 0}
!42 = !{!"_ZTS13MSwitchConfig", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20}
!43 = !{!"_ZTS15ASNetworkConfig", !44, i64 0, !13, i64 4}
!44 = !{!"_ZTS15ReduceNetwork_t", !7, i64 0}
!45 = !{!"_ZTS13ASwitchConfig", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20}
!46 = !{!"_ZTS17LookUpTableConfig", !13, i64 0, !13, i64 4}
!47 = !{!"_ZTS14SDMemoryConfig", !48, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !49, i64 28, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !13, i64 48, !13, i64 52}
!48 = !{!"_ZTS18MemoryController_t", !7, i64 0}
!49 = !{!"_ZTS17MemoryHierarchy_t", !7, i64 0}
!50 = !{!13, !13, i64 0}
!51 = !{!10, !13, i64 52}
!52 = distinct !{!52, !53}
!53 = !{!"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::map.32" = type { %"class.std::_Rb_tree.33" }
%"class.std::_Rb_tree.33" = 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::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }

declare i32 @__gxx_personality_v0(...)

; 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 nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) 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 #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9ASNetwork23getLastLevelConnectionsEv(ptr dead_on_unwind noalias nonnull writable sret(%"class.std::map.32") align 8 %0, ptr noundef nonnull align 8 dereferenceable(460) %1) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"struct.std::pair", align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  %6 = getelementptr inbounds i8, ptr %1, i64 56
  %7 = load i32, ptr %6, align 8, !tbaa !5
  %8 = add nsw i32 %7, -1
  store i32 %8, ptr %3, align 4, !tbaa !49
  tail call void @_ZNSt3mapIiP10ConnectionSt4lessIiESaISt4pairIKiS1_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #3
  %9 = getelementptr inbounds i8, ptr %1, i64 52
  store i32 0, ptr %4, align 4, !tbaa !49
  %10 = load i32, ptr %9, align 4, !tbaa !50
  %.not = icmp eq i32 %10, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %2
  %11 = getelementptr inbounds i8, ptr %1, i64 160
  br label %12

._crit_edge:                                      ; preds = %17, %2
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  ret void

12:                                               ; preds = %.lr.ph, %17
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %13 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIiiEP10ConnectionSt4lessIS1_ESaIS0_IKS1_S3_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 4 dereferenceable(8) %5)
          to label %14 unwind label %22

14:                                               ; preds = %12
  %15 = load ptr, ptr %13, align 8, !tbaa !51
  %16 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIiP10ConnectionSt4lessIiESaISt4pairIKiS1_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %17 unwind label %22

17:                                               ; preds = %14
  store ptr %15, ptr %16, align 8, !tbaa !51
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  %18 = load i32, ptr %4, align 4, !tbaa !49
  %19 = add nsw i32 %18, 1
  store i32 %19, ptr %4, align 4, !tbaa !49
  %20 = load i32, ptr %9, align 4, !tbaa !50
  %21 = icmp ult i32 %19, %20
  br i1 %21, label %12, label %._crit_edge, !llvm.loop !52

22:                                               ; preds = %14, %12
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  call void @_ZNSt3mapIiP10ConnectionSt4lessIiESaISt4pairIKiS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  resume { ptr, i32 } %23
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapIiP10ConnectionSt4lessIiESaISt4pairIKiS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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, !9, i64 56}
!6 = !{!"_ZTS9ASNetwork", !7, i64 0, !9, i64 48, !9, i64 52, !9, i64 56, !16, i64 64, !24, i64 112, !24, i64 136, !28, i64 160, !28, i64 208, !31, i64 256, !14, i64 280, !14, i64 288, !35, i64 296, !36, i64 300}
!7 = !{!"_ZTS13ReduceNetwork", !8, i64 0}
!8 = !{!"_ZTS4Unit", !9, i64 8, !12, i64 16}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !13, i64 0, !15, i64 8, !10, i64 16}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !14, i64 0}
!14 = !{!"any pointer", !10, i64 0}
!15 = !{!"long", !10, i64 0}
!16 = !{!"_ZTSSt3mapISt4pairIiiEP7ASwitchSt4lessIS1_ESaIS0_IKS1_S3_EEE", !17, i64 0}
!17 = !{!"_ZTSSt8_Rb_treeISt4pairIiiES0_IKS1_P7ASwitchESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE", !18, i64 0}
!18 = !{!"_ZTSNSt8_Rb_treeISt4pairIiiES0_IKS1_P7ASwitchESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE13_Rb_tree_implIS9_Lb1EEE", !19, i64 0, !21, i64 8}
!19 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessISt4pairIiiEEE", !20, i64 0}
!20 = !{!"_ZTSSt4lessISt4pairIiiEE"}
!21 = !{!"_ZTSSt15_Rb_tree_header", !22, i64 0, !15, i64 32}
!22 = !{!"_ZTSSt18_Rb_tree_node_base", !23, i64 0, !14, i64 8, !14, i64 16, !14, i64 24}
!23 = !{!"_ZTSSt14_Rb_tree_color", !10, i64 0}
!24 = !{!"_ZTSSt6vectorIP7ASwitchSaIS1_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseIP7ASwitchSaIS1_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIP7ASwitchSaIS1_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIP7ASwitchSaIS1_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!28 = !{!"_ZTSSt3mapISt4pairIiiEP10ConnectionSt4lessIS1_ESaIS0_IKS1_S3_EEE", !29, i64 0}
!29 = !{!"_ZTSSt8_Rb_treeISt4pairIiiES0_IKS1_P10ConnectionESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE", !30, i64 0}
!30 = !{!"_ZTSNSt8_Rb_treeISt4pairIiiES0_IKS1_P10ConnectionESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE13_Rb_tree_implIS9_Lb1EEE", !19, i64 0, !21, i64 8}
!31 = !{!"_ZTSSt6vectorIP10ConnectionSaIS1_EE", !32, i64 0}
!32 = !{!"_ZTSSt12_Vector_baseIP10ConnectionSaIS1_EE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIP10ConnectionSaIS1_EE12_Vector_implE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIP10ConnectionSaIS1_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!35 = !{!"bool", !10, i64 0}
!36 = !{!"_ZTS6Config", !9, i64 0, !37, i64 4, !38, i64 8, !39, i64 24, !41, i64 40, !42, i64 64, !44, i64 72, !45, i64 96, !46, i64 104}
!37 = !{!"_ZTS15DSNetworkConfig", !9, i64 0}
!38 = !{!"_ZTS13DSwitchConfig", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12}
!39 = !{!"_ZTS15MSNetworkConfig", !40, i64 0, !9, i64 4, !9, i64 8, !9, i64 12}
!40 = !{!"_ZTS19MultiplierNetwork_t", !10, i64 0}
!41 = !{!"_ZTS13MSwitchConfig", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12, !9, i64 16, !9, i64 20}
!42 = !{!"_ZTS15ASNetworkConfig", !43, i64 0, !9, i64 4}
!43 = !{!"_ZTS15ReduceNetwork_t", !10, i64 0}
!44 = !{!"_ZTS13ASwitchConfig", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12, !9, i64 16, !9, i64 20}
!45 = !{!"_ZTS17LookUpTableConfig", !9, i64 0, !9, i64 4}
!46 = !{!"_ZTS14SDMemoryConfig", !47, i64 0, !9, i64 4, !9, i64 8, !9, i64 12, !9, i64 16, !9, i64 20, !9, i64 24, !48, i64 28, !9, i64 32, !9, i64 36, !9, i64 40, !9, i64 44, !9, i64 48, !9, i64 52}
!47 = !{!"_ZTS18MemoryController_t", !10, i64 0}
!48 = !{!"_ZTS17MemoryHierarchy_t", !10, i64 0}
!49 = !{!9, !9, i64 0}
!50 = !{!6, !9, i64 52}
!51 = !{!14, !14, i64 0}
!52 = distinct !{!52, !53}
!53 = !{!"llvm.loop.mustprogress"}


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