; LLVM IR from CRAFT-THU/BSim :: src/net/BuildNetworks.ll (ZN12MultiNetwork14arrangeConnectEiii)

; 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.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.40" = type { ptr }
%"struct.std::_Rb_tree_const_iterator.41" = type { ptr }
%struct.N2SConnection = type { ptr, ptr, ptr, ptr, ptr, i32, i32 }
%class.MultiNetwork = type <{ %"class.std::vector", %"class.std::vector", %"class.std::vector.2", %"class.std::vector.7", %"class.std::vector.7", ptr, i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::set<NeuronBase *>, std::allocator<std::set<NeuronBase *>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::set<NeuronBase *>, std::allocator<std::set<NeuronBase *>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::set<NeuronBase *>, std::allocator<std::set<NeuronBase *>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::set<NeuronBase *>, std::allocator<std::set<NeuronBase *>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.2" = type { %"struct.std::_Vector_base.3" }
%"struct.std::_Vector_base.3" = type { %"struct.std::_Vector_base<std::map<NeuronBase *, int>, std::allocator<std::map<NeuronBase *, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::map<NeuronBase *, int>, std::allocator<std::map<NeuronBase *, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::map<NeuronBase *, int>, std::allocator<std::map<NeuronBase *, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::map<NeuronBase *, int>, std::allocator<std::map<NeuronBase *, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.7" = type { %"struct.std::_Vector_base.8" }
%"struct.std::_Vector_base.8" = type { %"struct.std::_Vector_base<std::map<Type, int>, std::allocator<std::map<Type, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::map<Type, int>, std::allocator<std::map<Type, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::map<Type, int>, std::allocator<std::map<Type, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::map<Type, int>, std::allocator<std::map<Type, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.Network = type { %"class.std::vector.12", %"class.std::vector.17", %"class.std::vector.22", i32, i32, i32, float, float, %"class.std::vector.27", %"class.std::vector.27", i32, %"class.std::vector.32", %"class.std::vector.32", %"class.std::vector.32" }
%"class.std::vector.12" = type { %"struct.std::_Vector_base.13" }
%"struct.std::_Vector_base.13" = type { %"struct.std::_Vector_base<NeuronBase *, std::allocator<NeuronBase *>>::_Vector_impl" }
%"struct.std::_Vector_base<NeuronBase *, std::allocator<NeuronBase *>>::_Vector_impl" = type { %"struct.std::_Vector_base<NeuronBase *, std::allocator<NeuronBase *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<NeuronBase *, std::allocator<NeuronBase *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.17" = type { %"struct.std::_Vector_base.18" }
%"struct.std::_Vector_base.18" = type { %"struct.std::_Vector_base<PopulationBase *, std::allocator<PopulationBase *>>::_Vector_impl" }
%"struct.std::_Vector_base<PopulationBase *, std::allocator<PopulationBase *>>::_Vector_impl" = type { %"struct.std::_Vector_base<PopulationBase *, std::allocator<PopulationBase *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<PopulationBase *, std::allocator<PopulationBase *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.22" = type { %"struct.std::_Vector_base.23" }
%"struct.std::_Vector_base.23" = type { %"struct.std::_Vector_base<SynapseBase *, std::allocator<SynapseBase *>>::_Vector_impl" }
%"struct.std::_Vector_base<SynapseBase *, std::allocator<SynapseBase *>>::_Vector_impl" = type { %"struct.std::_Vector_base<SynapseBase *, std::allocator<SynapseBase *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<SynapseBase *, std::allocator<SynapseBase *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.27" = type { %"struct.std::_Vector_base.28" }
%"struct.std::_Vector_base.28" = type { %"struct.std::_Vector_base<Type, std::allocator<Type>>::_Vector_impl" }
%"struct.std::_Vector_base<Type, std::allocator<Type>>::_Vector_impl" = type { %"struct.std::_Vector_base<Type, std::allocator<Type>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Type, std::allocator<Type>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.32" = type { %"struct.std::_Vector_base.33" }
%"struct.std::_Vector_base.33" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [19 x i8], align 1
@__PRETTY_FUNCTION__._ZN12MultiNetwork14arrangeConnectEiii = external hidden unnamed_addr constant [59 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [13 x i8], align 1

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

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

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

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

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

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

declare noundef nonnull align 8 dereferenceable(24) ptr @_ZNK10NeuronBase11getSynapsesEv(ptr noundef nonnull align 8 dereferenceable(52)) #4

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3mapIP10NeuronBaseiSt4lessIS2_ESaISt4pairIKS2_iEEESaIS9_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN12MultiNetwork14arrangeConnectEiii(ptr noundef nonnull align 8 dereferenceable(132) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) #5 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca %"class.__gnu_cxx::__normal_iterator.40", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator.40", align 8
  %24 = alloca i32, align 4
  %25 = alloca %"class.__gnu_cxx::__normal_iterator.40", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %27 = alloca %"struct.std::_Rb_tree_const_iterator.41", align 8
  %28 = alloca %"struct.std::_Rb_tree_const_iterator.41", align 8
  %29 = alloca i32, align 4
  %30 = alloca ptr, align 8
  %31 = alloca i32, align 4
  %32 = alloca %"class.__gnu_cxx::__normal_iterator.40", align 8
  %33 = alloca %"class.__gnu_cxx::__normal_iterator.40", align 8
  %34 = alloca i32, align 4
  %35 = alloca %"class.__gnu_cxx::__normal_iterator.40", align 8
  %36 = alloca %"struct.std::_Rb_tree_const_iterator.41", align 8
  %37 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !9
  %38 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %39 = call noalias ptr @malloc(i64 noundef 48) #9
  store ptr %39, ptr %9, align 8, !tbaa !5
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  %41 = icmp ne ptr %40, null
  br i1 %41, label %42, label %43

42:                                               ; preds = %4
  br label %45

43:                                               ; preds = %4
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 182, ptr noundef @__PRETTY_FUNCTION__._ZN12MultiNetwork14arrangeConnectEiii) #10
  unreachable

44:                                               ; No predecessors!
  br label %45

45:                                               ; preds = %44, %42
  %46 = load i32, ptr %6, align 4, !tbaa !9
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.N2SConnection, ptr %47, i32 0, i32 5
  store i32 %46, ptr %48, align 8, !tbaa !11
  %49 = load i32, ptr %7, align 4, !tbaa !9
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.N2SConnection, ptr %50, i32 0, i32 6
  store i32 %49, ptr %51, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %52 = getelementptr inbounds %class.MultiNetwork, ptr %38, i32 0, i32 5
  %53 = load ptr, ptr %52, align 8, !tbaa !14
  %54 = getelementptr inbounds %class.Network, ptr %53, i32 0, i32 3
  %55 = load i32, ptr %54, align 8, !tbaa !28
  %56 = sext i32 %55 to i64
  %57 = mul i64 4, %56
  %58 = load i32, ptr %6, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %60 = mul i64 %57, %59
  %61 = call noalias ptr @malloc(i64 noundef %60) #9
  store ptr %61, ptr %10, align 8, !tbaa !5
  %62 = load ptr, ptr %10, align 8, !tbaa !5
  %63 = icmp ne ptr %62, null
  br i1 %63, label %64, label %65

64:                                               ; preds = %45
  br label %67

65:                                               ; preds = %45
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.1, i32 noundef 188, ptr noundef @__PRETTY_FUNCTION__._ZN12MultiNetwork14arrangeConnectEiii) #10
  unreachable

66:                                               ; No predecessors!
  br label %67

67:                                               ; preds = %66, %64
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %68 = getelementptr inbounds %class.MultiNetwork, ptr %38, i32 0, i32 5
  %69 = load ptr, ptr %68, align 8, !tbaa !14
  %70 = getelementptr inbounds %class.Network, ptr %69, i32 0, i32 3
  %71 = load i32, ptr %70, align 8, !tbaa !28
  %72 = sext i32 %71 to i64
  %73 = mul i64 4, %72
  %74 = load i32, ptr %6, align 4, !tbaa !9
  %75 = sext i32 %74 to i64
  %76 = mul i64 %73, %75
  %77 = call noalias ptr @malloc(i64 noundef %76) #9
  store ptr %77, ptr %11, align 8, !tbaa !5
  %78 = load ptr, ptr %11, align 8, !tbaa !5
  %79 = icmp ne ptr %78, null
  br i1 %79, label %80, label %81

80:                                               ; preds = %67
  br label %83

81:                                               ; preds = %67
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.1, i32 noundef 190, ptr noundef @__PRETTY_FUNCTION__._ZN12MultiNetwork14arrangeConnectEiii) #10
  unreachable

82:                                               ; No predecessors!
  br label %83

83:                                               ; preds = %82, %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %84 = load i32, ptr %7, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = mul i64 4, %85
  %87 = call noalias ptr @malloc(i64 noundef %86) #9
  store ptr %87, ptr %12, align 8, !tbaa !5
  %88 = load ptr, ptr %12, align 8, !tbaa !5
  %89 = icmp ne ptr %88, null
  br i1 %89, label %90, label %91

90:                                               ; preds = %83
  br label %93

91:                                               ; preds = %83
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str.1, i32 noundef 192, ptr noundef @__PRETTY_FUNCTION__._ZN12MultiNetwork14arrangeConnectEiii) #10
  unreachable

92:                                               ; No predecessors!
  br label %93

93:                                               ; preds = %92, %90
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %94 = getelementptr inbounds %class.MultiNetwork, ptr %38, i32 0, i32 5
  %95 = load ptr, ptr %94, align 8, !tbaa !14
  %96 = getelementptr inbounds %class.Network, ptr %95, i32 0, i32 1
  %97 = call ptr @_ZNSt6vectorIP14PopulationBaseSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %96) #8
  %98 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %97, ptr %98, align 8
  br label %99

99:                                               ; preds = %242, %93
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %100 = getelementptr inbounds %class.MultiNetwork, ptr %38, i32 0, i32 5
  %101 = load ptr, ptr %100, align 8, !tbaa !14
  %102 = getelementptr inbounds %class.Network, ptr %101, i32 0, i32 1
  %103 = call ptr @_ZNSt6vectorIP14PopulationBaseSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %102) #8
  %104 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %103, ptr %104, align 8
  %105 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPP14PopulationBaseSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br i1 %105, label %107, label %106

106:                                              ; preds = %99
  store i32 2, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %245

107:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP14PopulationBaseSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  %109 = load ptr, ptr %108, align 8, !tbaa !5
  store ptr %109, ptr %17, align 8, !tbaa !5
  %110 = load ptr, ptr %17, align 8, !tbaa !5
  %111 = call noundef i32 @_ZN4Base7getNodeEv(ptr noundef nonnull align 8 dereferenceable(16) %110)
  %112 = load i32, ptr %8, align 4, !tbaa !9
  %113 = icmp ne i32 %111, %112
  br i1 %113, label %114, label %115

114:                                              ; preds = %107
  store i32 4, ptr %16, align 4
  br label %239

115:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %116

116:                                              ; preds = %235, %115
  %117 = load i32, ptr %18, align 4, !tbaa !9
  %118 = load ptr, ptr %17, align 8, !tbaa !5
  %119 = load ptr, ptr %118, align 8, !tbaa !51
  %120 = getelementptr inbounds ptr, ptr %119, i64 10
  %121 = load ptr, ptr %120, align 8
  %122 = call noundef i32 %121(ptr noundef nonnull align 8 dereferenceable(17) %118)
  %123 = icmp slt i32 %117, %122
  br i1 %123, label %125, label %124

124:                                              ; preds = %116
  store i32 5, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %238

125:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  %126 = load ptr, ptr %17, align 8, !tbaa !5
  %127 = load i32, ptr %18, align 4, !tbaa !9
  %128 = load ptr, ptr %126, align 8, !tbaa !51
  %129 = getelementptr inbounds ptr, ptr %128, i64 12
  %130 = load ptr, ptr %129, align 8
  %131 = call noundef ptr %130(ptr noundef nonnull align 8 dereferenceable(17) %126, i32 noundef %127)
  %132 = call noundef i32 @_ZN4Base5getIDEv(ptr noundef nonnull align 8 dereferenceable(16) %131)
  store i32 %132, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %133 = load ptr, ptr %17, align 8, !tbaa !5
  %134 = load i32, ptr %18, align 4, !tbaa !9
  %135 = load ptr, ptr %133, align 8, !tbaa !51
  %136 = getelementptr inbounds ptr, ptr %135, i64 12
  %137 = load ptr, ptr %136, align 8
  %138 = call noundef ptr %137(ptr noundef nonnull align 8 dereferenceable(17) %133, i32 noundef %134)
  %139 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK10NeuronBase11getSynapsesEv(ptr noundef nonnull align 8 dereferenceable(52) %138)
  store ptr %139, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %140

140:                                              ; preds = %231, %125
  %141 = load i32, ptr %21, align 4, !tbaa !9
  %142 = getelementptr inbounds %class.MultiNetwork, ptr %38, i32 0, i32 5
  %143 = load ptr, ptr %142, align 8, !tbaa !14
  %144 = getelementptr inbounds %class.Network, ptr %143, i32 0, i32 3
  %145 = load i32, ptr %144, align 8, !tbaa !28
  %146 = icmp slt i32 %141, %145
  br i1 %146, label %148, label %147

147:                                              ; preds = %140
  store i32 8, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %234

148:                                              ; preds = %140
  %149 = load i32, ptr %13, align 4, !tbaa !9
  %150 = load ptr, ptr %11, align 8, !tbaa !5
  %151 = load i32, ptr %21, align 4, !tbaa !9
  %152 = getelementptr inbounds %class.MultiNetwork, ptr %38, i32 0, i32 5
  %153 = load ptr, ptr %152, align 8, !tbaa !14
  %154 = getelementptr inbounds %class.Network, ptr %153, i32 0, i32 3
  %155 = load i32, ptr %154, align 8, !tbaa !28
  %156 = load i32, ptr %19, align 4, !tbaa !9
  %157 = mul nsw i32 %155, %156
  %158 = add nsw i32 %151, %157
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds i32, ptr %150, i64 %159
  store i32 %149, ptr %160, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %161 = load ptr, ptr %20, align 8, !tbaa !5
  %162 = call ptr @_ZNKSt6vectorIP11SynapseBaseSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %161) #8
  %163 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.40", ptr %22, i32 0, i32 0
  store ptr %162, ptr %163, align 8
  br label %164

164:                                              ; preds = %202, %148
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %165 = load ptr, ptr %20, align 8, !tbaa !5
  %166 = call ptr @_ZNKSt6vectorIP11SynapseBaseSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %165) #8
  %167 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.40", ptr %23, i32 0, i32 0
  store ptr %166, ptr %167, align 8
  %168 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKP11SynapseBaseSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  br i1 %168, label %170, label %169

169:                                              ; preds = %164
  store i32 11, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %205

170:                                              ; preds = %164
  %171 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKP11SynapseBaseSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #8
  %172 = load ptr, ptr %171, align 8, !tbaa !5
  %173 = call noundef i32 @_ZN4Base7getNodeEv(ptr noundef nonnull align 8 dereferenceable(16) %172)
  %174 = load i32, ptr %8, align 4, !tbaa !9
  %175 = icmp eq i32 %173, %174
  br i1 %175, label %176, label %201

176:                                              ; preds = %170
  %177 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKP11SynapseBaseSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #8
  %178 = load ptr, ptr %177, align 8, !tbaa !5
  %179 = call noundef i32 @_ZN11SynapseBase8getDelayEv(ptr noundef nonnull align 8 dereferenceable(33) %178)
  %180 = load i32, ptr %21, align 4, !tbaa !9
  %181 = add nsw i32 %180, 1
  %182 = icmp eq i32 %179, %181
  br i1 %182, label %183, label %201

183:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  %184 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKP11SynapseBaseSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #8
  %185 = load ptr, ptr %184, align 8, !tbaa !5
  %186 = call noundef i32 @_ZN4Base5getIDEv(ptr noundef nonnull align 8 dereferenceable(16) %185)
  store i32 %186, ptr %24, align 4, !tbaa !9
  %187 = load i32, ptr %13, align 4, !tbaa !9
  %188 = load i32, ptr %7, align 4, !tbaa !9
  %189 = icmp slt i32 %187, %188
  br i1 %189, label %190, label %191

190:                                              ; preds = %183
  br label %193

191:                                              ; preds = %183
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.1, i32 noundef 209, ptr noundef @__PRETTY_FUNCTION__._ZN12MultiNetwork14arrangeConnectEiii) #10
  unreachable

192:                                              ; No predecessors!
  br label %193

193:                                              ; preds = %192, %190
  %194 = load i32, ptr %24, align 4, !tbaa !9
  %195 = load ptr, ptr %12, align 8, !tbaa !5
  %196 = load i32, ptr %13, align 4, !tbaa !9
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds i32, ptr %195, i64 %197
  store i32 %194, ptr %198, align 4, !tbaa !9
  %199 = load i32, ptr %13, align 4, !tbaa !9
  %200 = add nsw i32 %199, 1
  store i32 %200, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %201

201:                                              ; preds = %193, %176, %170
  br label %202

202:                                              ; preds = %201
  %203 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPKP11SynapseBaseSt6vectorIS2_SaIS2_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %22, i32 noundef 0) #8
  %204 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.40", ptr %25, i32 0, i32 0
  store ptr %203, ptr %204, align 8
  br label %164, !llvm.loop !53

205:                                              ; preds = %169
  %206 = load i32, ptr %13, align 4, !tbaa !9
  %207 = load ptr, ptr %11, align 8, !tbaa !5
  %208 = load i32, ptr %21, align 4, !tbaa !9
  %209 = getelementptr inbounds %class.MultiNetwork, ptr %38, i32 0, i32 5
  %210 = load ptr, ptr %209, align 8, !tbaa !14
  %211 = getelementptr inbounds %class.Network, ptr %210, i32 0, i32 3
  %212 = load i32, ptr %211, align 8, !tbaa !28
  %213 = load i32, ptr %19, align 4, !tbaa !9
  %214 = mul nsw i32 %212, %213
  %215 = add nsw i32 %208, %214
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds i32, ptr %207, i64 %216
  %218 = load i32, ptr %217, align 4, !tbaa !9
  %219 = sub nsw i32 %206, %218
  %220 = load ptr, ptr %10, align 8, !tbaa !5
  %221 = load i32, ptr %21, align 4, !tbaa !9
  %222 = getelementptr inbounds %class.MultiNetwork, ptr %38, i32 0, i32 5
  %223 = load ptr, ptr %222, align 8, !tbaa !14
  %224 = getelementptr inbounds %class.Network, ptr %223, i32 0, i32 3
  %225 = load i32, ptr %224, align 8, !tbaa !28
  %226 = load i32, ptr %19, align 4, !tbaa !9
  %227 = mul nsw i32 %225, %226
  %228 = add nsw i32 %221, %227
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds i32, ptr %220, i64 %229
  store i32 %219, ptr %230, align 4, !tbaa !9
  br label %231

231:                                              ; preds = %205
  %232 = load i32, ptr %21, align 4, !tbaa !9
  %233 = add nsw i32 %232, 1
  store i32 %233, ptr %21, align 4, !tbaa !9
  br label %140, !llvm.loop !55

234:                                              ; preds = %147
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %235

235:                                              ; preds = %234
  %236 = load i32, ptr %18, align 4, !tbaa !9
  %237 = add nsw i32 %236, 1
  store i32 %237, ptr %18, align 4, !tbaa !9
  br label %116, !llvm.loop !56

238:                                              ; preds = %124
  store i32 0, ptr %16, align 4
  br label %239

239:                                              ; preds = %238, %114
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  %240 = load i32, ptr %16, align 4
  switch i32 %240, label %400 [
    i32 0, label %241
    i32 4, label %242
  ]

241:                                              ; preds = %239
  br label %242

242:                                              ; preds = %241, %239
  %243 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPP14PopulationBaseSt6vectorIS2_SaIS2_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %14, i32 noundef 0) #8
  %244 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %26, i32 0, i32 0
  store ptr %243, ptr %244, align 8
  br label %99, !llvm.loop !57

245:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  %246 = getelementptr inbounds %class.MultiNetwork, ptr %38, i32 0, i32 1
  %247 = load i32, ptr %8, align 4, !tbaa !9
  %248 = sext i32 %247 to i64
  %249 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %246, i64 noundef %248) #8
  %250 = call ptr @_ZNKSt3setIP10NeuronBaseSt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %249) #8
  %251 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator.41", ptr %27, i32 0, i32 0
  store ptr %250, ptr %251, align 8
  br label %252

252:                                              ; preds = %367, %245
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  %253 = getelementptr inbounds %class.MultiNetwork, ptr %38, i32 0, i32 1
  %254 = load i32, ptr %8, align 4, !tbaa !9
  %255 = sext i32 %254 to i64
  %256 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %253, i64 noundef %255) #8
  %257 = call ptr @_ZNKSt3setIP10NeuronBaseSt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %256) #8
  %258 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator.41", ptr %28, i32 0, i32 0
  store ptr %257, ptr %258, align 8
  %259 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIP10NeuronBaseES4_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  br i1 %259, label %261, label %260

260:                                              ; preds = %252
  store i32 14, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  br label %370

261:                                              ; preds = %252
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  %262 = getelementptr inbounds %class.MultiNetwork, ptr %38, i32 0, i32 2
  %263 = load i32, ptr %8, align 4, !tbaa !9
  %264 = sext i32 %263 to i64
  %265 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3mapIP10NeuronBaseiSt4lessIS2_ESaISt4pairIKS2_iEEESaIS9_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %262, i64 noundef %264) #8
  %266 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIP10NeuronBaseEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #8
  %267 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIP10NeuronBaseiSt4lessIS1_ESaISt4pairIKS1_iEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(48) %265, ptr noundef nonnull align 8 dereferenceable(8) %266)
  %268 = load i32, ptr %267, align 4, !tbaa !9
  store i32 %268, ptr %29, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  %269 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIP10NeuronBaseEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #8
  %270 = load ptr, ptr %269, align 8, !tbaa !5
  %271 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK10NeuronBase11getSynapsesEv(ptr noundef nonnull align 8 dereferenceable(52) %270)
  store ptr %271, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  store i32 0, ptr %31, align 4, !tbaa !9
  br label %272

272:                                              ; preds = %363, %261
  %273 = load i32, ptr %31, align 4, !tbaa !9
  %274 = getelementptr inbounds %class.MultiNetwork, ptr %38, i32 0, i32 5
  %275 = load ptr, ptr %274, align 8, !tbaa !14
  %276 = getelementptr inbounds %class.Network, ptr %275, i32 0, i32 3
  %277 = load i32, ptr %276, align 8, !tbaa !28
  %278 = icmp slt i32 %273, %277
  br i1 %278, label %280, label %279

279:                                              ; preds = %272
  store i32 17, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  br label %366

280:                                              ; preds = %272
  %281 = load i32, ptr %13, align 4, !tbaa !9
  %282 = load ptr, ptr %11, align 8, !tbaa !5
  %283 = load i32, ptr %31, align 4, !tbaa !9
  %284 = getelementptr inbounds %class.MultiNetwork, ptr %38, i32 0, i32 5
  %285 = load ptr, ptr %284, align 8, !tbaa !14
  %286 = getelementptr inbounds %class.Network, ptr %285, i32 0, i32 3
  %287 = load i32, ptr %286, align 8, !tbaa !28
  %288 = load i32, ptr %29, align 4, !tbaa !9
  %289 = mul nsw i32 %287, %288
  %290 = add nsw i32 %283, %289
  %291 = sext i32 %290 to i64
  %292 = getelementptr inbounds i32, ptr %282, i64 %291
  store i32 %281, ptr %292, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #8
  %293 = load ptr, ptr %30, align 8, !tbaa !5
  %294 = call ptr @_ZNKSt6vectorIP11SynapseBaseSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %293) #8
  %295 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.40", ptr %32, i32 0, i32 0
  store ptr %294, ptr %295, align 8
  br label %296

296:                                              ; preds = %334, %280
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #8
  %297 = load ptr, ptr %30, align 8, !tbaa !5
  %298 = call ptr @_ZNKSt6vectorIP11SynapseBaseSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %297) #8
  %299 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.40", ptr %33, i32 0, i32 0
  store ptr %298, ptr %299, align 8
  %300 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKP11SynapseBaseSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(8) %33) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #8
  br i1 %300, label %302, label %301

301:                                              ; preds = %296
  store i32 20, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  br label %337

302:                                              ; preds = %296
  %303 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKP11SynapseBaseSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %32) #8
  %304 = load ptr, ptr %303, align 8, !tbaa !5
  %305 = call noundef i32 @_ZN4Base7getNodeEv(ptr noundef nonnull align 8 dereferenceable(16) %304)
  %306 = load i32, ptr %8, align 4, !tbaa !9
  %307 = icmp eq i32 %305, %306
  br i1 %307, label %308, label %333

308:                                              ; preds = %302
  %309 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKP11SynapseBaseSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %32) #8
  %310 = load ptr, ptr %309, align 8, !tbaa !5
  %311 = call noundef i32 @_ZN11SynapseBase8getDelayEv(ptr noundef nonnull align 8 dereferenceable(33) %310)
  %312 = load i32, ptr %31, align 4, !tbaa !9
  %313 = add nsw i32 %312, 1
  %314 = icmp eq i32 %311, %313
  br i1 %314, label %315, label %333

315:                                              ; preds = %308
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #8
  %316 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKP11SynapseBaseSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %32) #8
  %317 = load ptr, ptr %316, align 8, !tbaa !5
  %318 = call noundef i32 @_ZN4Base5getIDEv(ptr noundef nonnull align 8 dereferenceable(16) %317)
  store i32 %318, ptr %34, align 4, !tbaa !9
  %319 = load i32, ptr %13, align 4, !tbaa !9
  %320 = load i32, ptr %7, align 4, !tbaa !9
  %321 = icmp slt i32 %319, %320
  br i1 %321, label %322, label %323

322:                                              ; preds = %315
  br label %325

323:                                              ; preds = %315
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.1, i32 noundef 228, ptr noundef @__PRETTY_FUNCTION__._ZN12MultiNetwork14arrangeConnectEiii) #10
  unreachable

324:                                              ; No predecessors!
  br label %325

325:                                              ; preds = %324, %322
  %326 = load i32, ptr %34, align 4, !tbaa !9
  %327 = load ptr, ptr %12, align 8, !tbaa !5
  %328 = load i32, ptr %13, align 4, !tbaa !9
  %329 = sext i32 %328 to i64
  %330 = getelementptr inbounds i32, ptr %327, i64 %329
  store i32 %326, ptr %330, align 4, !tbaa !9
  %331 = load i32, ptr %13, align 4, !tbaa !9
  %332 = add nsw i32 %331, 1
  store i32 %332, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  br label %333

333:                                              ; preds = %325, %308, %302
  br label %334

334:                                              ; preds = %333
  %335 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPKP11SynapseBaseSt6vectorIS2_SaIS2_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %32, i32 noundef 0) #8
  %336 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.40", ptr %35, i32 0, i32 0
  store ptr %335, ptr %336, align 8
  br label %296, !llvm.loop !58

337:                                              ; preds = %301
  %338 = load i32, ptr %13, align 4, !tbaa !9
  %339 = load ptr, ptr %11, align 8, !tbaa !5
  %340 = load i32, ptr %31, align 4, !tbaa !9
  %341 = getelementptr inbounds %class.MultiNetwork, ptr %38, i32 0, i32 5
  %342 = load ptr, ptr %341, align 8, !tbaa !14
  %343 = getelementptr inbounds %class.Network, ptr %342, i32 0, i32 3
  %344 = load i32, ptr %343, align 8, !tbaa !28
  %345 = load i32, ptr %29, align 4, !tbaa !9
  %346 = mul nsw i32 %344, %345
  %347 = add nsw i32 %340, %346
  %348 = sext i32 %347 to i64
  %349 = getelementptr inbounds i32, ptr %339, i64 %348
  %350 = load i32, ptr %349, align 4, !tbaa !9
  %351 = sub nsw i32 %338, %350
  %352 = load ptr, ptr %10, align 8, !tbaa !5
  %353 = load i32, ptr %31, align 4, !tbaa !9
  %354 = getelementptr inbounds %class.MultiNetwork, ptr %38, i32 0, i32 5
  %355 = load ptr, ptr %354, align 8, !tbaa !14
  %356 = getelementptr inbounds %class.Network, ptr %355, i32 0, i32 3
  %357 = load i32, ptr %356, align 8, !tbaa !28
  %358 = load i32, ptr %29, align 4, !tbaa !9
  %359 = mul nsw i32 %357, %358
  %360 = add nsw i32 %353, %359
  %361 = sext i32 %360 to i64
  %362 = getelementptr inbounds i32, ptr %352, i64 %361
  store i32 %351, ptr %362, align 4, !tbaa !9
  br label %363

363:                                              ; preds = %337
  %364 = load i32, ptr %31, align 4, !tbaa !9
  %365 = add nsw i32 %364, 1
  store i32 %365, ptr %31, align 4, !tbaa !9
  br label %272, !llvm.loop !59

366:                                              ; preds = %279
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  br label %367

367:                                              ; preds = %366
  %368 = call ptr @_ZNSt23_Rb_tree_const_iteratorIP10NeuronBaseEppEi(ptr noundef nonnull align 8 dereferenceable(8) %27, i32 noundef 0) #8
  %369 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator.41", ptr %36, i32 0, i32 0
  store ptr %368, ptr %369, align 8
  br label %252, !llvm.loop !60

370:                                              ; preds = %260
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #8
  store i32 0, ptr %37, align 4, !tbaa !9
  br label %371

371:                                              ; preds = %388, %370
  %372 = load i32, ptr %37, align 4, !tbaa !9
  %373 = load i32, ptr %7, align 4, !tbaa !9
  %374 = icmp slt i32 %372, %373
  br i1 %374, label %376, label %375

375:                                              ; preds = %371
  store i32 23, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #8
  br label %391

376:                                              ; preds = %371
  %377 = load i32, ptr %37, align 4, !tbaa !9
  %378 = load ptr, ptr %12, align 8, !tbaa !5
  %379 = load i32, ptr %37, align 4, !tbaa !9
  %380 = sext i32 %379 to i64
  %381 = getelementptr inbounds i32, ptr %378, i64 %380
  %382 = load i32, ptr %381, align 4, !tbaa !9
  %383 = icmp eq i32 %377, %382
  br i1 %383, label %384, label %385

384:                                              ; preds = %376
  br label %387

385:                                              ; preds = %376
  call void @__assert_fail(ptr noundef @.str.12, ptr noundef @.str.1, i32 noundef 238, ptr noundef @__PRETTY_FUNCTION__._ZN12MultiNetwork14arrangeConnectEiii) #10
  unreachable

386:                                              ; No predecessors!
  br label %387

387:                                              ; preds = %386, %384
  br label %388

388:                                              ; preds = %387
  %389 = load i32, ptr %37, align 4, !tbaa !9
  %390 = add nsw i32 %389, 1
  store i32 %390, ptr %37, align 4, !tbaa !9
  br label %371, !llvm.loop !61

391:                                              ; preds = %375
  %392 = load ptr, ptr %12, align 8, !tbaa !5
  call void @free(ptr noundef %392) #8
  %393 = load ptr, ptr %11, align 8, !tbaa !5
  %394 = load ptr, ptr %9, align 8, !tbaa !5
  %395 = getelementptr inbounds %struct.N2SConnection, ptr %394, i32 0, i32 0
  store ptr %393, ptr %395, align 8, !tbaa !62
  %396 = load ptr, ptr %10, align 8, !tbaa !5
  %397 = load ptr, ptr %9, align 8, !tbaa !5
  %398 = getelementptr inbounds %struct.N2SConnection, ptr %397, i32 0, i32 1
  store ptr %396, ptr %398, align 8, !tbaa !63
  %399 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 1, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  ret ptr %399

400:                                              ; preds = %239
  unreachable
}

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #6

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #7

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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn nounwind "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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind "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 #8 = { nounwind }
attributes #9 = { nounwind allocsize(0) }
attributes #10 = { noreturn 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 = !{!12, !10, i64 40}
!12 = !{!"_ZTS13N2SConnection", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !10, i64 40, !10, i64 44}
!13 = !{!12, !10, i64 44}
!14 = !{!15, !6, i64 120}
!15 = !{!"_ZTS12MultiNetwork", !16, i64 0, !16, i64 24, !20, i64 48, !24, i64 72, !24, i64 96, !6, i64 120, !10, i64 128}
!16 = !{!"_ZTSSt6vectorISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"_ZTSSt6vectorISt3mapIP10NeuronBaseiSt4lessIS2_ESaISt4pairIKS2_iEEESaIS9_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseISt3mapIP10NeuronBaseiSt4lessIS2_ESaISt4pairIKS2_iEEESaIS9_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseISt3mapIP10NeuronBaseiSt4lessIS2_ESaISt4pairIKS2_iEEESaIS9_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseISt3mapIP10NeuronBaseiSt4lessIS2_ESaISt4pairIKS2_iEEESaIS9_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!"_ZTSSt6vectorISt3mapI4TypeiSt4lessIS1_ESaISt4pairIKS1_iEEESaIS8_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseISt3mapI4TypeiSt4lessIS1_ESaISt4pairIKS1_iEEESaIS8_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseISt3mapI4TypeiSt4lessIS1_ESaISt4pairIKS1_iEEESaIS8_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseISt3mapI4TypeiSt4lessIS1_ESaISt4pairIKS1_iEEESaIS8_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!28 = !{!29, !10, i64 72}
!29 = !{!"_ZTS7Network", !30, i64 0, !34, i64 24, !38, i64 48, !10, i64 72, !10, i64 76, !10, i64 80, !42, i64 84, !42, i64 88, !43, i64 96, !43, i64 120, !10, i64 144, !47, i64 152, !47, i64 176, !47, i64 200}
!30 = !{!"_ZTSSt6vectorIP10NeuronBaseSaIS1_EE", !31, i64 0}
!31 = !{!"_ZTSSt12_Vector_baseIP10NeuronBaseSaIS1_EE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIP10NeuronBaseSaIS1_EE12_Vector_implE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIP10NeuronBaseSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!34 = !{!"_ZTSSt6vectorIP14PopulationBaseSaIS1_EE", !35, i64 0}
!35 = !{!"_ZTSSt12_Vector_baseIP14PopulationBaseSaIS1_EE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIP14PopulationBaseSaIS1_EE12_Vector_implE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseIP14PopulationBaseSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!38 = !{!"_ZTSSt6vectorIP11SynapseBaseSaIS1_EE", !39, i64 0}
!39 = !{!"_ZTSSt12_Vector_baseIP11SynapseBaseSaIS1_EE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseIP11SynapseBaseSaIS1_EE12_Vector_implE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseIP11SynapseBaseSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!42 = !{!"float", !7, i64 0}
!43 = !{!"_ZTSSt6vectorI4TypeSaIS0_EE", !44, i64 0}
!44 = !{!"_ZTSSt12_Vector_baseI4TypeSaIS0_EE", !45, i64 0}
!45 = !{!"_ZTSNSt12_Vector_baseI4TypeSaIS0_EE12_Vector_implE", !46, i64 0}
!46 = !{!"_ZTSNSt12_Vector_baseI4TypeSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!47 = !{!"_ZTSSt6vectorIiSaIiEE", !48, i64 0}
!48 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !49, i64 0}
!49 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !50, i64 0}
!50 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!51 = !{!52, !52, i64 0}
!52 = !{!"vtable pointer", !8, i64 0}
!53 = distinct !{!53, !54}
!54 = !{!"llvm.loop.mustprogress"}
!55 = distinct !{!55, !54}
!56 = distinct !{!56, !54}
!57 = distinct !{!57, !54}
!58 = distinct !{!58, !54}
!59 = distinct !{!59, !54}
!60 = distinct !{!60, !54}
!61 = distinct !{!61, !54}
!62 = !{!12, !6, i64 0}
!63 = !{!12, !6, i64 8}


; 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.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.40" = type { ptr }
%"struct.std::_Rb_tree_const_iterator.41" = type { ptr }

@.str.1 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [19 x i8], align 1
@__PRETTY_FUNCTION__._ZN12MultiNetwork14arrangeConnectEiii = external hidden unnamed_addr constant [59 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [13 x i8], align 1

; 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 nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIP14PopulationBaseSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

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

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

declare noundef nonnull align 8 dereferenceable(24) ptr @_ZNK10NeuronBase11getSynapsesEv(ptr noundef nonnull align 8 dereferenceable(52)) local_unnamed_addr #4

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3mapIP10NeuronBaseiSt4lessIS2_ESaISt4pairIKS2_iEEESaIS9_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN12MultiNetwork14arrangeConnectEiii(ptr noundef nonnull align 8 dereferenceable(132) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #5 align 2 {
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.40", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.40", align 8
  %9 = alloca %"struct.std::_Rb_tree_const_iterator.41", align 8
  %10 = alloca %"struct.std::_Rb_tree_const_iterator.41", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.40", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.40", align 8
  %13 = tail call noalias dereferenceable_or_null(48) ptr @malloc(i64 noundef 48) #8
  %.not = icmp eq ptr %13, null
  br i1 %.not, label %14, label %15

14:                                               ; preds = %4
  tail call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 182, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN12MultiNetwork14arrangeConnectEiii) #9
  unreachable

15:                                               ; preds = %4
  %16 = getelementptr inbounds i8, ptr %13, i64 40
  store i32 %1, ptr %16, align 8, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %13, i64 44
  store i32 %2, ptr %17, align 4, !tbaa !11
  %18 = getelementptr inbounds i8, ptr %0, i64 120
  %19 = load ptr, ptr %18, align 8, !tbaa !12
  %20 = getelementptr inbounds i8, ptr %19, i64 72
  %21 = load i32, ptr %20, align 8, !tbaa !26
  %22 = sext i32 %21 to i64
  %23 = shl nsw i64 %22, 2
  %24 = sext i32 %1 to i64
  %25 = mul i64 %23, %24
  %26 = tail call noalias ptr @malloc(i64 noundef %25) #8
  %.not95 = icmp eq ptr %26, null
  br i1 %.not95, label %27, label %28

27:                                               ; preds = %15
  tail call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.1, i32 noundef 188, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN12MultiNetwork14arrangeConnectEiii) #9
  unreachable

28:                                               ; preds = %15
  %29 = tail call noalias ptr @malloc(i64 noundef %25) #8
  %.not96 = icmp eq ptr %29, null
  br i1 %.not96, label %30, label %31

30:                                               ; preds = %28
  tail call void @__assert_fail(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.1, i32 noundef 190, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN12MultiNetwork14arrangeConnectEiii) #9
  unreachable

31:                                               ; preds = %28
  %32 = sext i32 %2 to i64
  %33 = shl nsw i64 %32, 2
  %34 = tail call noalias ptr @malloc(i64 noundef %33) #8
  %.not97 = icmp eq ptr %34, null
  br i1 %.not97, label %35, label %36

35:                                               ; preds = %31
  tail call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.1, i32 noundef 192, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN12MultiNetwork14arrangeConnectEiii) #9
  unreachable

36:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #10
  %37 = getelementptr inbounds i8, ptr %19, i64 24
  %38 = tail call ptr @_ZNSt6vectorIP14PopulationBaseSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #10
  store ptr %38, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #10
  %39 = load ptr, ptr %18, align 8, !tbaa !12
  %40 = getelementptr inbounds i8, ptr %39, i64 24
  %41 = tail call ptr @_ZNSt6vectorIP14PopulationBaseSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #10
  store ptr %41, ptr %6, align 8
  %42 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPP14PopulationBaseSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #10
  br i1 %42, label %.lr.ph118, label %._crit_edge119

._crit_edge119:                                   ; preds = %.loopexit, %36
  %.084.lcssa = phi i32 [ 0, %36 ], [ %.5, %.loopexit ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #10
  %43 = getelementptr inbounds i8, ptr %0, i64 24
  %44 = sext i32 %3 to i64
  %45 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %44) #10
  %46 = call ptr @_ZNKSt3setIP10NeuronBaseSt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %45) #10
  store ptr %46, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #10
  %47 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %44) #10
  %48 = call ptr @_ZNKSt3setIP10NeuronBaseSt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %47) #10
  store ptr %48, ptr %10, align 8
  %49 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIP10NeuronBaseES4_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #10
  br i1 %49, label %.lr.ph134, label %._crit_edge135

.lr.ph134:                                        ; preds = %._crit_edge119
  %50 = getelementptr inbounds i8, ptr %0, i64 48
  br label %128

.lr.ph118:                                        ; preds = %36, %.loopexit
  %.084116 = phi i32 [ %.5, %.loopexit ], [ 0, %36 ]
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP14PopulationBaseSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #10
  %52 = load ptr, ptr %51, align 8, !tbaa !49
  %53 = call noundef i32 @_ZN4Base7getNodeEv(ptr noundef nonnull align 8 dereferenceable(16) %52)
  %.not98 = icmp eq i32 %53, %3
  br i1 %.not98, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %.lr.ph118
  %54 = load ptr, ptr %52, align 8, !tbaa !50
  %55 = getelementptr inbounds i8, ptr %54, i64 80
  %56 = load ptr, ptr %55, align 8
  %57 = call noundef i32 %56(ptr noundef nonnull align 8 dereferenceable(17) %52)
  %58 = icmp sgt i32 %57, 0
  br i1 %58, label %.lr.ph114, label %.loopexit

.lr.ph114:                                        ; preds = %.preheader, %._crit_edge110
  %.1113 = phi i32 [ %.2.lcssa, %._crit_edge110 ], [ %.084116, %.preheader ]
  %.085112 = phi i32 [ %73, %._crit_edge110 ], [ 0, %.preheader ]
  %59 = load ptr, ptr %52, align 8, !tbaa !50
  %60 = getelementptr inbounds i8, ptr %59, i64 96
  %61 = load ptr, ptr %60, align 8
  %62 = call noundef ptr %61(ptr noundef nonnull align 8 dereferenceable(17) %52, i32 noundef %.085112)
  %63 = call noundef i32 @_ZN4Base5getIDEv(ptr noundef nonnull align 8 dereferenceable(16) %62)
  %64 = load ptr, ptr %52, align 8, !tbaa !50
  %65 = getelementptr inbounds i8, ptr %64, i64 96
  %66 = load ptr, ptr %65, align 8
  %67 = call noundef ptr %66(ptr noundef nonnull align 8 dereferenceable(17) %52, i32 noundef %.085112)
  %68 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK10NeuronBase11getSynapsesEv(ptr noundef nonnull align 8 dereferenceable(52) %67)
  %69 = load ptr, ptr %18, align 8, !tbaa !12
  %70 = getelementptr inbounds i8, ptr %69, i64 72
  %71 = load i32, ptr %70, align 8, !tbaa !26
  %72 = icmp sgt i32 %71, 0
  br i1 %72, label %.lr.ph109, label %._crit_edge110

._crit_edge110:                                   ; preds = %._crit_edge, %.lr.ph114
  %.2.lcssa = phi i32 [ %.1113, %.lr.ph114 ], [ %.3.lcssa, %._crit_edge ]
  %73 = add nuw nsw i32 %.085112, 1
  %74 = load ptr, ptr %52, align 8, !tbaa !50
  %75 = getelementptr inbounds i8, ptr %74, i64 80
  %76 = load ptr, ptr %75, align 8
  %77 = call noundef i32 %76(ptr noundef nonnull align 8 dereferenceable(17) %52)
  %78 = icmp slt i32 %73, %77
  br i1 %78, label %.lr.ph114, label %.loopexit, !llvm.loop !52

.lr.ph109:                                        ; preds = %.lr.ph114, %._crit_edge
  %79 = phi i32 [ %90, %._crit_edge ], [ %71, %.lr.ph114 ]
  %.2107 = phi i32 [ %.3.lcssa, %._crit_edge ], [ %.1113, %.lr.ph114 ]
  %.087106 = phi i32 [ %87, %._crit_edge ], [ 0, %.lr.ph114 ]
  %80 = mul nsw i32 %79, %63
  %81 = add nsw i32 %80, %.087106
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds i32, ptr %29, i64 %82
  store i32 %.2107, ptr %83, align 4, !tbaa !54
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #10
  %84 = call ptr @_ZNKSt6vectorIP11SynapseBaseSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %68) #10
  store ptr %84, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #10
  %85 = call ptr @_ZNKSt6vectorIP11SynapseBaseSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %68) #10
  store ptr %85, ptr %8, align 8
  %86 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKP11SynapseBaseSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #10
  %87 = add nuw nsw i32 %.087106, 1
  br i1 %86, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %118, %.lr.ph109
  %.3.lcssa = phi i32 [ %.2107, %.lr.ph109 ], [ %.4, %118 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #10
  %88 = load ptr, ptr %18, align 8, !tbaa !12
  %89 = getelementptr inbounds i8, ptr %88, i64 72
  %90 = load i32, ptr %89, align 8, !tbaa !26
  %91 = mul nsw i32 %90, %63
  %92 = add nsw i32 %91, %.087106
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds i32, ptr %29, i64 %93
  %95 = load i32, ptr %94, align 4, !tbaa !54
  %96 = sub nsw i32 %.3.lcssa, %95
  %97 = getelementptr inbounds i32, ptr %26, i64 %93
  store i32 %96, ptr %97, align 4, !tbaa !54
  %98 = icmp slt i32 %87, %90
  br i1 %98, label %.lr.ph109, label %._crit_edge110, !llvm.loop !55

.lr.ph:                                           ; preds = %.lr.ph109, %118
  %.3105 = phi i32 [ %.4, %118 ], [ %.2107, %.lr.ph109 ]
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKP11SynapseBaseSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #10
  %100 = load ptr, ptr %99, align 8, !tbaa !49
  %101 = call noundef i32 @_ZN4Base7getNodeEv(ptr noundef nonnull align 8 dereferenceable(16) %100)
  %102 = icmp eq i32 %101, %3
  br i1 %102, label %103, label %118

103:                                              ; preds = %.lr.ph
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKP11SynapseBaseSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #10
  %105 = load ptr, ptr %104, align 8, !tbaa !49
  %106 = call noundef i32 @_ZN11SynapseBase8getDelayEv(ptr noundef nonnull align 8 dereferenceable(33) %105)
  %107 = icmp eq i32 %106, %87
  br i1 %107, label %108, label %118

108:                                              ; preds = %103
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKP11SynapseBaseSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #10
  %110 = load ptr, ptr %109, align 8, !tbaa !49
  %111 = call noundef i32 @_ZN4Base5getIDEv(ptr noundef nonnull align 8 dereferenceable(16) %110)
  %112 = icmp slt i32 %.3105, %2
  br i1 %112, label %114, label %113

113:                                              ; preds = %108
  call void @__assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.1, i32 noundef 209, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN12MultiNetwork14arrangeConnectEiii) #9
  unreachable

114:                                              ; preds = %108
  %115 = sext i32 %.3105 to i64
  %116 = getelementptr inbounds i32, ptr %34, i64 %115
  store i32 %111, ptr %116, align 4, !tbaa !54
  %117 = add nsw i32 %.3105, 1
  br label %118

118:                                              ; preds = %.lr.ph, %103, %114
  %.4 = phi i32 [ %117, %114 ], [ %.3105, %103 ], [ %.3105, %.lr.ph ]
  %119 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPKP11SynapseBaseSt6vectorIS2_SaIS2_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %7, i32 noundef 0) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #10
  %120 = call ptr @_ZNKSt6vectorIP11SynapseBaseSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %68) #10
  store ptr %120, ptr %8, align 8
  %121 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKP11SynapseBaseSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #10
  br i1 %121, label %.lr.ph, label %._crit_edge, !llvm.loop !56

.loopexit:                                        ; preds = %._crit_edge110, %.preheader, %.lr.ph118
  %.5 = phi i32 [ %.084116, %.lr.ph118 ], [ %.084116, %.preheader ], [ %.2.lcssa, %._crit_edge110 ]
  %122 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPP14PopulationBaseSt6vectorIS2_SaIS2_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef 0) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #10
  %123 = load ptr, ptr %18, align 8, !tbaa !12
  %124 = getelementptr inbounds i8, ptr %123, i64 24
  %125 = call ptr @_ZNSt6vectorIP14PopulationBaseSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %124) #10
  store ptr %125, ptr %6, align 8
  %126 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPP14PopulationBaseSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #10
  br i1 %126, label %.lr.ph118, label %._crit_edge119, !llvm.loop !57

._crit_edge135:                                   ; preds = %._crit_edge130, %._crit_edge119
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #10
  %127 = icmp sgt i32 %2, 0
  br i1 %127, label %.lr.ph138.preheader, label %._crit_edge139

.lr.ph138.preheader:                              ; preds = %._crit_edge135
  %wide.trip.count = zext nneg i32 %2 to i64
  br label %.lr.ph138

128:                                              ; preds = %.lr.ph134, %._crit_edge130
  %.6132 = phi i32 [ %.084.lcssa, %.lr.ph134 ], [ %.7.lcssa, %._crit_edge130 ]
  %129 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3mapIP10NeuronBaseiSt4lessIS2_ESaISt4pairIKS2_iEEESaIS9_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %50, i64 noundef %44) #10
  %130 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIP10NeuronBaseEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #10
  %131 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIP10NeuronBaseiSt4lessIS1_ESaISt4pairIKS1_iEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(48) %129, ptr noundef nonnull align 8 dereferenceable(8) %130)
  %132 = load i32, ptr %131, align 4, !tbaa !54
  %133 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIP10NeuronBaseEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #10
  %134 = load ptr, ptr %133, align 8, !tbaa !49
  %135 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK10NeuronBase11getSynapsesEv(ptr noundef nonnull align 8 dereferenceable(52) %134)
  %136 = load ptr, ptr %18, align 8, !tbaa !12
  %137 = getelementptr inbounds i8, ptr %136, i64 72
  %138 = load i32, ptr %137, align 8, !tbaa !26
  %139 = icmp sgt i32 %138, 0
  br i1 %139, label %.lr.ph129, label %._crit_edge130

._crit_edge130:                                   ; preds = %._crit_edge124, %128
  %.7.lcssa = phi i32 [ %.6132, %128 ], [ %.8.lcssa, %._crit_edge124 ]
  %140 = call ptr @_ZNSt23_Rb_tree_const_iteratorIP10NeuronBaseEppEi(ptr noundef nonnull align 8 dereferenceable(8) %9, i32 noundef 0) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #10
  %141 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %44) #10
  %142 = call ptr @_ZNKSt3setIP10NeuronBaseSt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %141) #10
  store ptr %142, ptr %10, align 8
  %143 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIP10NeuronBaseES4_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #10
  br i1 %143, label %128, label %._crit_edge135, !llvm.loop !58

.lr.ph129:                                        ; preds = %128, %._crit_edge124
  %144 = phi i32 [ %155, %._crit_edge124 ], [ %138, %128 ]
  %.7127 = phi i32 [ %.8.lcssa, %._crit_edge124 ], [ %.6132, %128 ]
  %.086126 = phi i32 [ %152, %._crit_edge124 ], [ 0, %128 ]
  %145 = mul nsw i32 %144, %132
  %146 = add nsw i32 %145, %.086126
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds i32, ptr %29, i64 %147
  store i32 %.7127, ptr %148, align 4, !tbaa !54
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #10
  %149 = call ptr @_ZNKSt6vectorIP11SynapseBaseSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %135) #10
  store ptr %149, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #10
  %150 = call ptr @_ZNKSt6vectorIP11SynapseBaseSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %135) #10
  store ptr %150, ptr %12, align 8
  %151 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKP11SynapseBaseSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #10
  %152 = add nuw nsw i32 %.086126, 1
  br i1 %151, label %.lr.ph123, label %._crit_edge124

._crit_edge124:                                   ; preds = %183, %.lr.ph129
  %.8.lcssa = phi i32 [ %.7127, %.lr.ph129 ], [ %.9, %183 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #10
  %153 = load ptr, ptr %18, align 8, !tbaa !12
  %154 = getelementptr inbounds i8, ptr %153, i64 72
  %155 = load i32, ptr %154, align 8, !tbaa !26
  %156 = mul nsw i32 %155, %132
  %157 = add nsw i32 %156, %.086126
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds i32, ptr %29, i64 %158
  %160 = load i32, ptr %159, align 4, !tbaa !54
  %161 = sub nsw i32 %.8.lcssa, %160
  %162 = getelementptr inbounds i32, ptr %26, i64 %158
  store i32 %161, ptr %162, align 4, !tbaa !54
  %163 = icmp slt i32 %152, %155
  br i1 %163, label %.lr.ph129, label %._crit_edge130, !llvm.loop !59

.lr.ph123:                                        ; preds = %.lr.ph129, %183
  %.8121 = phi i32 [ %.9, %183 ], [ %.7127, %.lr.ph129 ]
  %164 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKP11SynapseBaseSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #10
  %165 = load ptr, ptr %164, align 8, !tbaa !49
  %166 = call noundef i32 @_ZN4Base7getNodeEv(ptr noundef nonnull align 8 dereferenceable(16) %165)
  %167 = icmp eq i32 %166, %3
  br i1 %167, label %168, label %183

168:                                              ; preds = %.lr.ph123
  %169 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKP11SynapseBaseSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #10
  %170 = load ptr, ptr %169, align 8, !tbaa !49
  %171 = call noundef i32 @_ZN11SynapseBase8getDelayEv(ptr noundef nonnull align 8 dereferenceable(33) %170)
  %172 = icmp eq i32 %171, %152
  br i1 %172, label %173, label %183

173:                                              ; preds = %168
  %174 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKP11SynapseBaseSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #10
  %175 = load ptr, ptr %174, align 8, !tbaa !49
  %176 = call noundef i32 @_ZN4Base5getIDEv(ptr noundef nonnull align 8 dereferenceable(16) %175)
  %177 = icmp slt i32 %.8121, %2
  br i1 %177, label %179, label %178

178:                                              ; preds = %173
  call void @__assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.1, i32 noundef 228, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN12MultiNetwork14arrangeConnectEiii) #9
  unreachable

179:                                              ; preds = %173
  %180 = sext i32 %.8121 to i64
  %181 = getelementptr inbounds i32, ptr %34, i64 %180
  store i32 %176, ptr %181, align 4, !tbaa !54
  %182 = add nsw i32 %.8121, 1
  br label %183

183:                                              ; preds = %.lr.ph123, %168, %179
  %.9 = phi i32 [ %182, %179 ], [ %.8121, %168 ], [ %.8121, %.lr.ph123 ]
  %184 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPKP11SynapseBaseSt6vectorIS2_SaIS2_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef 0) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #10
  %185 = call ptr @_ZNKSt6vectorIP11SynapseBaseSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %135) #10
  store ptr %185, ptr %12, align 8
  %186 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKP11SynapseBaseSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #10
  br i1 %186, label %.lr.ph123, label %._crit_edge124, !llvm.loop !60

187:                                              ; preds = %.lr.ph138
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge139, label %.lr.ph138, !llvm.loop !61

._crit_edge139:                                   ; preds = %187, %._crit_edge135
  call void @free(ptr noundef %34) #10
  store ptr %29, ptr %13, align 8, !tbaa !62
  %188 = getelementptr inbounds i8, ptr %13, i64 8
  store ptr %26, ptr %188, align 8, !tbaa !63
  ret ptr %13

.lr.ph138:                                        ; preds = %.lr.ph138.preheader, %187
  %indvars.iv = phi i64 [ 0, %.lr.ph138.preheader ], [ %indvars.iv.next, %187 ]
  %189 = getelementptr inbounds i32, ptr %34, i64 %indvars.iv
  %190 = load i32, ptr %189, align 4, !tbaa !54
  %191 = zext i32 %190 to i64
  %192 = icmp eq i64 %indvars.iv, %191
  br i1 %192, label %187, label %193

193:                                              ; preds = %.lr.ph138
  call void @__assert_fail(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.1, i32 noundef 238, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN12MultiNetwork14arrangeConnectEiii) #9
  unreachable
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #6

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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #7

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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn nounwind "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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #7 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #8 = { nounwind allocsize(0) }
attributes #9 = { noreturn nounwind }
attributes #10 = { 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, !10, i64 40}
!6 = !{!"_ZTS13N2SConnection", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !10, i64 40, !10, i64 44}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !10, i64 44}
!12 = !{!13, !7, i64 120}
!13 = !{!"_ZTS12MultiNetwork", !14, i64 0, !14, i64 24, !18, i64 48, !22, i64 72, !22, i64 96, !7, i64 120, !10, i64 128}
!14 = !{!"_ZTSSt6vectorISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!18 = !{!"_ZTSSt6vectorISt3mapIP10NeuronBaseiSt4lessIS2_ESaISt4pairIKS2_iEEESaIS9_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseISt3mapIP10NeuronBaseiSt4lessIS2_ESaISt4pairIKS2_iEEESaIS9_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseISt3mapIP10NeuronBaseiSt4lessIS2_ESaISt4pairIKS2_iEEESaIS9_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseISt3mapIP10NeuronBaseiSt4lessIS2_ESaISt4pairIKS2_iEEESaIS9_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!22 = !{!"_ZTSSt6vectorISt3mapI4TypeiSt4lessIS1_ESaISt4pairIKS1_iEEESaIS8_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseISt3mapI4TypeiSt4lessIS1_ESaISt4pairIKS1_iEEESaIS8_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseISt3mapI4TypeiSt4lessIS1_ESaISt4pairIKS1_iEEESaIS8_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseISt3mapI4TypeiSt4lessIS1_ESaISt4pairIKS1_iEEESaIS8_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!26 = !{!27, !10, i64 72}
!27 = !{!"_ZTS7Network", !28, i64 0, !32, i64 24, !36, i64 48, !10, i64 72, !10, i64 76, !10, i64 80, !40, i64 84, !40, i64 88, !41, i64 96, !41, i64 120, !10, i64 144, !45, i64 152, !45, i64 176, !45, i64 200}
!28 = !{!"_ZTSSt6vectorIP10NeuronBaseSaIS1_EE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseIP10NeuronBaseSaIS1_EE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIP10NeuronBaseSaIS1_EE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIP10NeuronBaseSaIS1_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!32 = !{!"_ZTSSt6vectorIP14PopulationBaseSaIS1_EE", !33, i64 0}
!33 = !{!"_ZTSSt12_Vector_baseIP14PopulationBaseSaIS1_EE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIP14PopulationBaseSaIS1_EE12_Vector_implE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIP14PopulationBaseSaIS1_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!36 = !{!"_ZTSSt6vectorIP11SynapseBaseSaIS1_EE", !37, i64 0}
!37 = !{!"_ZTSSt12_Vector_baseIP11SynapseBaseSaIS1_EE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseIP11SynapseBaseSaIS1_EE12_Vector_implE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseIP11SynapseBaseSaIS1_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!40 = !{!"float", !8, i64 0}
!41 = !{!"_ZTSSt6vectorI4TypeSaIS0_EE", !42, i64 0}
!42 = !{!"_ZTSSt12_Vector_baseI4TypeSaIS0_EE", !43, i64 0}
!43 = !{!"_ZTSNSt12_Vector_baseI4TypeSaIS0_EE12_Vector_implE", !44, i64 0}
!44 = !{!"_ZTSNSt12_Vector_baseI4TypeSaIS0_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!45 = !{!"_ZTSSt6vectorIiSaIiEE", !46, i64 0}
!46 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !47, i64 0}
!47 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !48, i64 0}
!48 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!49 = !{!7, !7, i64 0}
!50 = !{!51, !51, i64 0}
!51 = !{!"vtable pointer", !9, i64 0}
!52 = distinct !{!52, !53}
!53 = !{!"llvm.loop.mustprogress"}
!54 = !{!10, !10, i64 0}
!55 = distinct !{!55, !53}
!56 = distinct !{!56, !53}
!57 = distinct !{!57, !53}
!58 = distinct !{!58, !53}
!59 = distinct !{!59, !53}
!60 = distinct !{!60, !53}
!61 = distinct !{!61, !53}
!62 = !{!6, !7, i64 0}
!63 = !{!6, !7, i64 8}


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