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

; 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"

%"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" }
%"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::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 }

; 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 @_ZNSt3mapISt4pairIiiEP7ASwitchSt4lessIS1_ESaIS0_IKS1_S3_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_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
define dso_local void @_ZN9ASNetwork5cycleEv(ptr noundef nonnull align 8 dereferenceable(460) %0) unnamed_addr #2 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca %"struct.std::pair", align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::pair", align 4
  %11 = alloca ptr, align 8
  %12 = alloca %"struct.std::pair", align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %15 = load ptr, ptr %2, align 8
  %16 = getelementptr inbounds %class.ASNetwork, ptr %15, i32 0, i32 13
  %17 = load i8, ptr %16, align 8, !tbaa !9, !range !50, !noundef !51
  %18 = trunc i8 %17 to i1
  %19 = zext i1 %18 to i32
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %21, label %27

21:                                               ; preds = %1
  %22 = getelementptr inbounds %class.ASNetwork, ptr %15, i32 0, i32 12
  %23 = load ptr, ptr %22, align 8, !tbaa !52
  %24 = load ptr, ptr %23, align 8, !tbaa !53
  %25 = getelementptr inbounds ptr, ptr %24, i64 2
  %26 = load ptr, ptr %25, align 8
  call void %26(ptr noundef nonnull align 8 dereferenceable(200) %23)
  br label %27

27:                                               ; preds = %21, %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  store i32 2, ptr %3, align 4, !tbaa !55
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  store i32 0, ptr %5, align 4, !tbaa !55
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  store i32 0, ptr %6, align 4, !tbaa !55
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %28 = getelementptr inbounds %class.ASNetwork, ptr %15, i32 0, i32 5
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIiiEP7ASwitchSt4lessIS1_ESaIS0_IKS1_S3_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %28, ptr noundef nonnull align 4 dereferenceable(8) %4)
  %30 = load ptr, ptr %29, align 8, !tbaa !5
  store ptr %30, ptr %7, align 8, !tbaa !5
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = load ptr, ptr %31, align 8, !tbaa !53
  %33 = getelementptr inbounds ptr, ptr %32, i64 2
  %34 = load ptr, ptr %33, align 8
  call void %34(ptr noundef nonnull align 8 dereferenceable(288) %31)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  store i32 1, ptr %8, align 4, !tbaa !55
  br label %35

35:                                               ; preds = %93, %27
  %36 = load i32, ptr %8, align 4, !tbaa !55
  %37 = getelementptr inbounds %class.ASNetwork, ptr %15, i32 0, i32 3
  %38 = load i32, ptr %37, align 8, !tbaa !56
  %39 = icmp slt i32 %36, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  br label %96

41:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 0, ptr %9, align 4, !tbaa !55
  br label %42

42:                                               ; preds = %89, %41
  %43 = load i32, ptr %9, align 4, !tbaa !55
  %44 = load i32, ptr %3, align 4, !tbaa !55
  %45 = icmp slt i32 %43, %44
  br i1 %45, label %46, label %90

46:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %10, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %47 = getelementptr inbounds %class.ASNetwork, ptr %15, i32 0, i32 5
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIiiEP7ASwitchSt4lessIS1_ESaIS0_IKS1_S3_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %47, ptr noundef nonnull align 4 dereferenceable(8) %10)
  %49 = load ptr, ptr %48, align 8, !tbaa !5
  store ptr %49, ptr %11, align 8, !tbaa !5
  %50 = load ptr, ptr %11, align 8, !tbaa !5
  %51 = call noundef zeroext i1 @_ZNK7ASwitch11isFwEnabledEv(ptr noundef nonnull align 8 dereferenceable(288) %50)
  br i1 %51, label %52, label %82

52:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %53 = load i32, ptr %9, align 4, !tbaa !55
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %13, align 4, !tbaa !55
  call void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %12, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %13)
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %55 = getelementptr inbounds %class.ASNetwork, ptr %15, i32 0, i32 5
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIiiEP7ASwitchSt4lessIS1_ESaIS0_IKS1_S3_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %55, ptr noundef nonnull align 4 dereferenceable(8) %12)
  %57 = load ptr, ptr %56, align 8, !tbaa !5
  store ptr %57, ptr %14, align 8, !tbaa !5
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  %59 = call noundef i32 @_ZNK7ASwitch14getFlDirectionEv(ptr noundef nonnull align 8 dereferenceable(288) %58)
  %60 = icmp eq i32 %59, 1
  br i1 %60, label %61, label %70

61:                                               ; preds = %52
  %62 = load ptr, ptr %14, align 8, !tbaa !5
  %63 = load ptr, ptr %62, align 8, !tbaa !53
  %64 = getelementptr inbounds ptr, ptr %63, i64 2
  %65 = load ptr, ptr %64, align 8
  call void %65(ptr noundef nonnull align 8 dereferenceable(288) %62)
  %66 = load ptr, ptr %11, align 8, !tbaa !5
  %67 = load ptr, ptr %66, align 8, !tbaa !53
  %68 = getelementptr inbounds ptr, ptr %67, i64 2
  %69 = load ptr, ptr %68, align 8
  call void %69(ptr noundef nonnull align 8 dereferenceable(288) %66)
  br label %79

70:                                               ; preds = %52
  %71 = load ptr, ptr %11, align 8, !tbaa !5
  %72 = load ptr, ptr %71, align 8, !tbaa !53
  %73 = getelementptr inbounds ptr, ptr %72, i64 2
  %74 = load ptr, ptr %73, align 8
  call void %74(ptr noundef nonnull align 8 dereferenceable(288) %71)
  %75 = load ptr, ptr %14, align 8, !tbaa !5
  %76 = load ptr, ptr %75, align 8, !tbaa !53
  %77 = getelementptr inbounds ptr, ptr %76, i64 2
  %78 = load ptr, ptr %77, align 8
  call void %78(ptr noundef nonnull align 8 dereferenceable(288) %75)
  br label %79

79:                                               ; preds = %70, %61
  %80 = load i32, ptr %9, align 4, !tbaa !55
  %81 = add nsw i32 %80, 2
  store i32 %81, ptr %9, align 4, !tbaa !55
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  br label %89

82:                                               ; preds = %46
  %83 = load ptr, ptr %11, align 8, !tbaa !5
  %84 = load ptr, ptr %83, align 8, !tbaa !53
  %85 = getelementptr inbounds ptr, ptr %84, i64 2
  %86 = load ptr, ptr %85, align 8
  call void %86(ptr noundef nonnull align 8 dereferenceable(288) %83)
  %87 = load i32, ptr %9, align 4, !tbaa !55
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %9, align 4, !tbaa !55
  br label %89

89:                                               ; preds = %82, %79
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  br label %42, !llvm.loop !57

90:                                               ; preds = %42
  %91 = load i32, ptr %3, align 4, !tbaa !55
  %92 = mul nsw i32 %91, 2
  store i32 %92, ptr %3, align 4, !tbaa !55
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %93

93:                                               ; preds = %90
  %94 = load i32, ptr %8, align 4, !tbaa !55
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %8, align 4, !tbaa !55
  br label %35, !llvm.loop !59

96:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(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 nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7ASwitch11isFwEnabledEv(ptr noundef nonnull align 8 dereferenceable(288)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7ASwitch14getFlDirectionEv(ptr noundef nonnull align 8 dereferenceable(288)) #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, !36, i64 296}
!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 = !{i8 0, i8 2}
!51 = !{}
!52 = !{!10, !6, i64 288}
!53 = !{!54, !54, i64 0}
!54 = !{!"vtable pointer", !8, i64 0}
!55 = !{!13, !13, i64 0}
!56 = !{!10, !13, i64 56}
!57 = distinct !{!57, !58}
!58 = !{!"llvm.loop.mustprogress"}
!59 = distinct !{!59, !58}


; 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"

%"struct.std::pair" = type { 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 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 @_ZNSt3mapISt4pairIiiEP7ASwitchSt4lessIS1_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 nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_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
define dso_local void @_ZN9ASNetwork5cycleEv(ptr noundef nonnull align 8 dereferenceable(460) %0) unnamed_addr #2 align 2 {
  %2 = alloca %"struct.std::pair", align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::pair", align 4
  %8 = alloca %"struct.std::pair", align 4
  %9 = alloca i32, align 4
  %10 = getelementptr inbounds i8, ptr %0, i64 296
  %11 = load i8, ptr %10, align 8, !tbaa !5, !range !49, !noundef !50
  %12 = trunc nuw i8 %11 to i1
  br i1 %12, label %13, label %19

13:                                               ; preds = %1
  %14 = getelementptr inbounds i8, ptr %0, i64 288
  %15 = load ptr, ptr %14, align 8, !tbaa !51
  %16 = load ptr, ptr %15, align 8, !tbaa !52
  %17 = getelementptr inbounds i8, ptr %16, i64 16
  %18 = load ptr, ptr %17, align 8
  tail call void %18(ptr noundef nonnull align 8 dereferenceable(200) %15)
  br label %19

19:                                               ; preds = %13, %1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  store i32 0, ptr %3, align 4, !tbaa !54
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #3
  store i32 0, ptr %4, align 4, !tbaa !54
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %2, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  %20 = getelementptr inbounds i8, ptr %0, i64 64
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIiiEP7ASwitchSt4lessIS1_ESaIS0_IKS1_S3_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %20, ptr noundef nonnull align 4 dereferenceable(8) %2)
  %22 = load ptr, ptr %21, align 8, !tbaa !55
  %23 = load ptr, ptr %22, align 8, !tbaa !52
  %24 = getelementptr inbounds i8, ptr %23, i64 16
  %25 = load ptr, ptr %24, align 8
  call void %25(ptr noundef nonnull align 8 dereferenceable(288) %22)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #3
  %26 = getelementptr inbounds i8, ptr %0, i64 56
  store i32 1, ptr %5, align 4, !tbaa !54
  %27 = load i32, ptr %26, align 8, !tbaa !56
  %28 = icmp sgt i32 %27, 1
  br i1 %28, label %.lr.ph12, label %._crit_edge13

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

.lr.ph12:                                         ; preds = %19, %._crit_edge
  %29 = phi i32 [ %59, %._crit_edge ], [ %27, %19 ]
  %30 = phi i32 [ %62, %._crit_edge ], [ 1, %19 ]
  %.010 = phi i32 [ %61, %._crit_edge ], [ 2, %19 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #3
  store i32 0, ptr %6, align 4, !tbaa !54
  %31 = icmp sgt i32 %.010, 0
  br i1 %31, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.lr.ph12, %56
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIiiEP7ASwitchSt4lessIS1_ESaIS0_IKS1_S3_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %20, ptr noundef nonnull align 4 dereferenceable(8) %7)
  %33 = load ptr, ptr %32, align 8, !tbaa !55
  %34 = call noundef zeroext i1 @_ZNK7ASwitch11isFwEnabledEv(ptr noundef nonnull align 8 dereferenceable(288) %33)
  br i1 %34, label %35, label %50

35:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #3
  %36 = load i32, ptr %6, align 4, !tbaa !54
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %9, align 4, !tbaa !54
  call void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_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) %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #3
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapISt4pairIiiEP7ASwitchSt4lessIS1_ESaIS0_IKS1_S3_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %20, ptr noundef nonnull align 4 dereferenceable(8) %8)
  %39 = load ptr, ptr %38, align 8, !tbaa !55
  %40 = call noundef i32 @_ZNK7ASwitch14getFlDirectionEv(ptr noundef nonnull align 8 dereferenceable(288) %33)
  %41 = icmp eq i32 %40, 1
  %. = select i1 %41, ptr %39, ptr %33
  %.24 = select i1 %41, ptr %33, ptr %39
  %42 = load ptr, ptr %., align 8, !tbaa !52
  %43 = getelementptr inbounds i8, ptr %42, i64 16
  %44 = load ptr, ptr %43, align 8
  call void %44(ptr noundef nonnull align 8 dereferenceable(288) %.)
  %45 = load ptr, ptr %.24, align 8, !tbaa !52
  %46 = getelementptr inbounds i8, ptr %45, i64 16
  %47 = load ptr, ptr %46, align 8
  call void %47(ptr noundef nonnull align 8 dereferenceable(288) %.24)
  %48 = load i32, ptr %6, align 4, !tbaa !54
  %49 = add nsw i32 %48, 2
  store i32 %49, ptr %6, align 4, !tbaa !54
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  br label %56

50:                                               ; preds = %.lr.ph
  %51 = load ptr, ptr %33, align 8, !tbaa !52
  %52 = getelementptr inbounds i8, ptr %51, i64 16
  %53 = load ptr, ptr %52, align 8
  call void %53(ptr noundef nonnull align 8 dereferenceable(288) %33)
  %54 = load i32, ptr %6, align 4, !tbaa !54
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %6, align 4, !tbaa !54
  br label %56

56:                                               ; preds = %50, %35
  %57 = phi i32 [ %55, %50 ], [ %49, %35 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  %58 = icmp slt i32 %57, %.010
  br i1 %58, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !57

._crit_edge.loopexit:                             ; preds = %56
  %.pre = load i32, ptr %5, align 4, !tbaa !54
  %.pre14 = load i32, ptr %26, align 8, !tbaa !56
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.lr.ph12
  %59 = phi i32 [ %.pre14, %._crit_edge.loopexit ], [ %29, %.lr.ph12 ]
  %60 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %30, %.lr.ph12 ]
  %61 = shl nsw i32 %.010, 1
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #3
  %62 = add nsw i32 %60, 1
  store i32 %62, ptr %5, align 4, !tbaa !54
  %63 = icmp slt i32 %62, %59
  br i1 %63, label %.lr.ph12, label %._crit_edge13, !llvm.loop !59
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(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 nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7ASwitch11isFwEnabledEv(ptr noundef nonnull align 8 dereferenceable(288)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7ASwitch14getFlDirectionEv(ptr noundef nonnull align 8 dereferenceable(288)) local_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, !35, i64 296}
!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 = !{i8 0, i8 2}
!50 = !{}
!51 = !{!6, !14, i64 288}
!52 = !{!53, !53, i64 0}
!53 = !{!"vtable pointer", !11, i64 0}
!54 = !{!9, !9, i64 0}
!55 = !{!14, !14, i64 0}
!56 = !{!6, !9, i64 56}
!57 = distinct !{!57, !58}
!58 = !{!"llvm.loop.mustprogress"}
!59 = distinct !{!59, !58}


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