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

; 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::_Rb_tree_const_iterator" = type { ptr }
%class.MultiNetwork = type <{ %"class.std::vector", %"class.std::vector", %"class.std::vector.0", %"class.std::vector.5", %"class.std::vector.5", 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.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = 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 }
%struct.CrossNodeData = type { i32, i32, ptr }

@.str = external hidden unnamed_addr constant [19 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [73 x i8], align 1
@__PRETTY_FUNCTION__._ZN12MultiNetwork20arrangeCrossNodeDataEi = external hidden unnamed_addr constant [55 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [73 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN12MultiNetwork20arrangeCrossNodeDataEi(ptr noundef nonnull align 8 dereferenceable(132) %0, i32 noundef %1) #0 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %12 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %13 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %14 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %15 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  %19 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %20 = load i32, ptr %4, align 4, !tbaa !9
  %21 = sext i32 %20 to i64
  %22 = mul i64 16, %21
  %23 = load i32, ptr %4, align 4, !tbaa !9
  %24 = sext i32 %23 to i64
  %25 = mul i64 %22, %24
  %26 = call noalias ptr @malloc(i64 noundef %25) #6
  store ptr %26, ptr %5, align 8, !tbaa !5
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = icmp ne ptr %27, null
  br i1 %28, label %29, label %30

29:                                               ; preds = %2
  br label %32

30:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 35, ptr noundef @__PRETTY_FUNCTION__._ZN12MultiNetwork20arrangeCrossNodeDataEi) #7
  unreachable

31:                                               ; No predecessors!
  br label %32

32:                                               ; preds = %31, %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %33

33:                                               ; preds = %131, %32
  %34 = load i32, ptr %6, align 4, !tbaa !9
  %35 = getelementptr inbounds %class.MultiNetwork, ptr %19, i32 0, i32 6
  %36 = load i32, ptr %35, align 8, !tbaa !11
  %37 = icmp slt i32 %34, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %33
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %134

39:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %40

40:                                               ; preds = %127, %39
  %41 = load i32, ptr %8, align 4, !tbaa !9
  %42 = getelementptr inbounds %class.MultiNetwork, ptr %19, i32 0, i32 6
  %43 = load i32, ptr %42, align 8, !tbaa !11
  %44 = icmp slt i32 %41, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %40
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %130

46:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %47 = load i32, ptr %8, align 4, !tbaa !9
  %48 = getelementptr inbounds %class.MultiNetwork, ptr %19, i32 0, i32 6
  %49 = load i32, ptr %48, align 8, !tbaa !11
  %50 = mul nsw i32 %47, %49
  %51 = load i32, ptr %6, align 4, !tbaa !9
  %52 = add nsw i32 %50, %51
  store i32 %52, ptr %9, align 4, !tbaa !9
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = load i32, ptr %9, align 4, !tbaa !9
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds %struct.CrossNodeData, ptr %53, i64 %55
  %57 = getelementptr inbounds %struct.CrossNodeData, ptr %56, i32 0, i32 1
  store i32 0, ptr %57, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %58 = getelementptr inbounds %class.MultiNetwork, ptr %19, i32 0, i32 0
  %59 = load i32, ptr %6, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %58, i64 noundef %60) #5
  %62 = call ptr @_ZNKSt3setIP10NeuronBaseSt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %61) #5
  %63 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %11, i32 0, i32 0
  store ptr %62, ptr %63, align 8
  br label %64

64:                                               ; preds = %92, %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %65 = getelementptr inbounds %class.MultiNetwork, ptr %19, i32 0, i32 0
  %66 = load i32, ptr %6, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %65, i64 noundef %67) #5
  %69 = call ptr @_ZNKSt3setIP10NeuronBaseSt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %68) #5
  %70 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %12, i32 0, i32 0
  store ptr %69, ptr %70, align 8
  %71 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIP10NeuronBaseES4_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br i1 %71, label %73, label %72

72:                                               ; preds = %64
  store i32 8, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %95

73:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %74 = getelementptr inbounds %class.MultiNetwork, ptr %19, i32 0, i32 1
  %75 = load i32, ptr %8, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %74, i64 noundef %76) #5
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIP10NeuronBaseEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  %79 = call ptr @_ZNSt3setIP10NeuronBaseSt4lessIS1_ESaIS1_EE4findERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %77, ptr noundef nonnull align 8 dereferenceable(8) %78)
  %80 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %13, i32 0, i32 0
  store ptr %79, ptr %80, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %81 = getelementptr inbounds %class.MultiNetwork, ptr %19, i32 0, i32 1
  %82 = load i32, ptr %8, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef %83) #5
  %85 = call ptr @_ZNKSt3setIP10NeuronBaseSt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %84) #5
  %86 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %14, i32 0, i32 0
  store ptr %85, ptr %86, align 8
  %87 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIP10NeuronBaseES4_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br i1 %87, label %88, label %91

88:                                               ; preds = %73
  %89 = load i32, ptr %10, align 4, !tbaa !9
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %10, align 4, !tbaa !9
  br label %91

91:                                               ; preds = %88, %73
  br label %92

92:                                               ; preds = %91
  %93 = call ptr @_ZNSt23_Rb_tree_const_iteratorIP10NeuronBaseEppEi(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef 0) #5
  %94 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %15, i32 0, i32 0
  store ptr %93, ptr %94, align 8
  br label %64, !llvm.loop !27

95:                                               ; preds = %72
  %96 = load i32, ptr %10, align 4, !tbaa !9
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = load i32, ptr %9, align 4, !tbaa !9
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds %struct.CrossNodeData, ptr %97, i64 %99
  %101 = getelementptr inbounds %struct.CrossNodeData, ptr %100, i32 0, i32 0
  store i32 %96, ptr %101, align 8, !tbaa !29
  %102 = load i32, ptr %10, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = mul i64 4, %103
  %105 = call noalias ptr @malloc(i64 noundef %104) #6
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = load i32, ptr %9, align 4, !tbaa !9
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds %struct.CrossNodeData, ptr %106, i64 %108
  %110 = getelementptr inbounds %struct.CrossNodeData, ptr %109, i32 0, i32 2
  store ptr %105, ptr %110, align 8, !tbaa !30
  %111 = load ptr, ptr %5, align 8, !tbaa !5
  %112 = load i32, ptr %9, align 4, !tbaa !9
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds %struct.CrossNodeData, ptr %111, i64 %113
  %115 = getelementptr inbounds %struct.CrossNodeData, ptr %114, i32 0, i32 2
  %116 = load ptr, ptr %115, align 8, !tbaa !30
  %117 = icmp ne ptr %116, null
  br i1 %117, label %121, label %118

118:                                              ; preds = %95
  %119 = load i32, ptr %10, align 4, !tbaa !9
  %120 = icmp eq i32 %119, 0
  br label %121

121:                                              ; preds = %118, %95
  %122 = phi i1 [ true, %95 ], [ %120, %118 ]
  br i1 %122, label %123, label %124

123:                                              ; preds = %121
  br label %126

124:                                              ; preds = %121
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 51, ptr noundef @__PRETTY_FUNCTION__._ZN12MultiNetwork20arrangeCrossNodeDataEi) #7
  unreachable

125:                                              ; No predecessors!
  br label %126

126:                                              ; preds = %125, %123
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %127

127:                                              ; preds = %126
  %128 = load i32, ptr %8, align 4, !tbaa !9
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %8, align 4, !tbaa !9
  br label %40, !llvm.loop !31

130:                                              ; preds = %45
  br label %131

131:                                              ; preds = %130
  %132 = load i32, ptr %6, align 4, !tbaa !9
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %6, align 4, !tbaa !9
  br label %33, !llvm.loop !32

134:                                              ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %135

135:                                              ; preds = %217, %134
  %136 = load i32, ptr %16, align 4, !tbaa !9
  %137 = getelementptr inbounds %class.MultiNetwork, ptr %19, i32 0, i32 6
  %138 = load i32, ptr %137, align 8, !tbaa !11
  %139 = icmp slt i32 %136, %138
  br i1 %139, label %141, label %140

140:                                              ; preds = %135
  store i32 11, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %220

141:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %142 = load i32, ptr %16, align 4, !tbaa !9
  %143 = getelementptr inbounds %class.MultiNetwork, ptr %19, i32 0, i32 6
  %144 = load i32, ptr %143, align 8, !tbaa !11
  %145 = mul nsw i32 %142, %144
  %146 = load i32, ptr %16, align 4, !tbaa !9
  %147 = add nsw i32 %145, %146
  store i32 %147, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %148

148:                                              ; preds = %178, %141
  %149 = load i32, ptr %18, align 4, !tbaa !9
  %150 = getelementptr inbounds %class.MultiNetwork, ptr %19, i32 0, i32 6
  %151 = load i32, ptr %150, align 8, !tbaa !11
  %152 = icmp slt i32 %149, %151
  br i1 %152, label %154, label %153

153:                                              ; preds = %148
  store i32 14, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %181

154:                                              ; preds = %148
  %155 = load i32, ptr %18, align 4, !tbaa !9
  %156 = load i32, ptr %16, align 4, !tbaa !9
  %157 = icmp ne i32 %155, %156
  br i1 %157, label %158, label %177

158:                                              ; preds = %154
  %159 = load ptr, ptr %5, align 8, !tbaa !5
  %160 = load i32, ptr %16, align 4, !tbaa !9
  %161 = getelementptr inbounds %class.MultiNetwork, ptr %19, i32 0, i32 6
  %162 = load i32, ptr %161, align 8, !tbaa !11
  %163 = mul nsw i32 %160, %162
  %164 = load i32, ptr %18, align 4, !tbaa !9
  %165 = add nsw i32 %163, %164
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds %struct.CrossNodeData, ptr %159, i64 %166
  %168 = getelementptr inbounds %struct.CrossNodeData, ptr %167, i32 0, i32 0
  %169 = load i32, ptr %168, align 8, !tbaa !29
  %170 = load ptr, ptr %5, align 8, !tbaa !5
  %171 = load i32, ptr %17, align 4, !tbaa !9
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds %struct.CrossNodeData, ptr %170, i64 %172
  %174 = getelementptr inbounds %struct.CrossNodeData, ptr %173, i32 0, i32 0
  %175 = load i32, ptr %174, align 8, !tbaa !29
  %176 = add nsw i32 %175, %169
  store i32 %176, ptr %174, align 8, !tbaa !29
  br label %177

177:                                              ; preds = %158, %154
  br label %178

178:                                              ; preds = %177
  %179 = load i32, ptr %18, align 4, !tbaa !9
  %180 = add nsw i32 %179, 1
  store i32 %180, ptr %18, align 4, !tbaa !9
  br label %148, !llvm.loop !33

181:                                              ; preds = %153
  %182 = load ptr, ptr %5, align 8, !tbaa !5
  %183 = load i32, ptr %17, align 4, !tbaa !9
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds %struct.CrossNodeData, ptr %182, i64 %184
  %186 = getelementptr inbounds %struct.CrossNodeData, ptr %185, i32 0, i32 0
  %187 = load i32, ptr %186, align 8, !tbaa !29
  %188 = sext i32 %187 to i64
  %189 = mul i64 4, %188
  %190 = call noalias ptr @malloc(i64 noundef %189) #6
  %191 = load ptr, ptr %5, align 8, !tbaa !5
  %192 = load i32, ptr %17, align 4, !tbaa !9
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds %struct.CrossNodeData, ptr %191, i64 %193
  %195 = getelementptr inbounds %struct.CrossNodeData, ptr %194, i32 0, i32 2
  store ptr %190, ptr %195, align 8, !tbaa !30
  %196 = load ptr, ptr %5, align 8, !tbaa !5
  %197 = load i32, ptr %17, align 4, !tbaa !9
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds %struct.CrossNodeData, ptr %196, i64 %198
  %200 = getelementptr inbounds %struct.CrossNodeData, ptr %199, i32 0, i32 2
  %201 = load ptr, ptr %200, align 8, !tbaa !30
  %202 = icmp ne ptr %201, null
  br i1 %202, label %211, label %203

203:                                              ; preds = %181
  %204 = load ptr, ptr %5, align 8, !tbaa !5
  %205 = load i32, ptr %17, align 4, !tbaa !9
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds %struct.CrossNodeData, ptr %204, i64 %206
  %208 = getelementptr inbounds %struct.CrossNodeData, ptr %207, i32 0, i32 0
  %209 = load i32, ptr %208, align 8, !tbaa !29
  %210 = icmp eq i32 %209, 0
  br label %211

211:                                              ; preds = %203, %181
  %212 = phi i1 [ true, %181 ], [ %210, %203 ]
  br i1 %212, label %213, label %214

213:                                              ; preds = %211
  br label %216

214:                                              ; preds = %211
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 65, ptr noundef @__PRETTY_FUNCTION__._ZN12MultiNetwork20arrangeCrossNodeDataEi) #7
  unreachable

215:                                              ; No predecessors!
  br label %216

216:                                              ; preds = %215, %213
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %217

217:                                              ; preds = %216
  %218 = load i32, ptr %16, align 4, !tbaa !9
  %219 = add nsw i32 %218, 1
  store i32 %219, ptr %16, align 4, !tbaa !9
  br label %135, !llvm.loop !34

220:                                              ; preds = %140
  %221 = load ptr, ptr %5, align 8, !tbaa !5
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  ret ptr %221
}

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

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

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

; 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) #4 align 2

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

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { 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 #5 = { nounwind }
attributes #6 = { nounwind allocsize(0) }
attributes #7 = { 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 128}
!12 = !{!"_ZTS12MultiNetwork", !13, i64 0, !13, i64 24, !17, i64 48, !21, i64 72, !21, i64 96, !6, i64 120, !10, i64 128}
!13 = !{!"_ZTSSt6vectorISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!"_ZTSSt6vectorISt3mapIP10NeuronBaseiSt4lessIS2_ESaISt4pairIKS2_iEEESaIS9_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseISt3mapIP10NeuronBaseiSt4lessIS2_ESaISt4pairIKS2_iEEESaIS9_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseISt3mapIP10NeuronBaseiSt4lessIS2_ESaISt4pairIKS2_iEEESaIS9_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseISt3mapIP10NeuronBaseiSt4lessIS2_ESaISt4pairIKS2_iEEESaIS9_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"_ZTSSt6vectorISt3mapI4TypeiSt4lessIS1_ESaISt4pairIKS1_iEEESaIS8_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseISt3mapI4TypeiSt4lessIS1_ESaISt4pairIKS1_iEEESaIS8_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseISt3mapI4TypeiSt4lessIS1_ESaISt4pairIKS1_iEEESaIS8_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseISt3mapI4TypeiSt4lessIS1_ESaISt4pairIKS1_iEEESaIS8_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!26, !10, i64 4}
!26 = !{!"_ZTS13CrossNodeData", !10, i64 0, !10, i64 4, !6, i64 8}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!26, !10, i64 0}
!30 = !{!26, !6, i64 8}
!31 = distinct !{!31, !28}
!32 = distinct !{!32, !28}
!33 = distinct !{!33, !28}
!34 = distinct !{!34, !28}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%struct.CrossNodeData = type { i32, i32, ptr }

@.str = external hidden unnamed_addr constant [19 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [73 x i8], align 1
@__PRETTY_FUNCTION__._ZN12MultiNetwork20arrangeCrossNodeDataEi = external hidden unnamed_addr constant [55 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [73 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noalias noundef ptr @_ZN12MultiNetwork20arrangeCrossNodeDataEi(ptr noundef nonnull align 8 dereferenceable(132) %0, i32 noundef %1) local_unnamed_addr #0 align 2 {
  %3 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %4 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %5 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %6 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %7 = sext i32 %1 to i64
  %8 = shl nsw i64 %7, 4
  %9 = mul i64 %8, %7
  %10 = tail call noalias ptr @malloc(i64 noundef %9) #5
  %.not = icmp eq ptr %10, null
  br i1 %.not, label %15, label %.preheader59

.preheader59:                                     ; preds = %2
  %11 = getelementptr inbounds i8, ptr %0, i64 128
  %12 = load i32, ptr %11, align 8, !tbaa !5
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %.preheader58.preheader, label %._crit_edge73

.preheader58.preheader:                           ; preds = %.preheader59
  %14 = getelementptr inbounds i8, ptr %0, i64 24
  br label %.preheader58

15:                                               ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 35, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN12MultiNetwork20arrangeCrossNodeDataEi) #6
  unreachable

.preheader58:                                     ; preds = %.preheader58.preheader, %._crit_edge64
  %16 = phi i32 [ %12, %.preheader58.preheader ], [ %53, %._crit_edge64 ]
  %indvars.iv77 = phi i64 [ 0, %.preheader58.preheader ], [ %indvars.iv.next78, %._crit_edge64 ]
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph63, label %.preheader58.._crit_edge64_crit_edge

.preheader58.._crit_edge64_crit_edge:             ; preds = %.preheader58
  %.pre = sext i32 %16 to i64
  br label %._crit_edge64

.lr.ph63:                                         ; preds = %.preheader58
  %18 = trunc nuw nsw i64 %indvars.iv77 to i32
  br label %55

.preheader:                                       ; preds = %._crit_edge64
  %19 = icmp sgt i32 %53, 0
  br i1 %19, label %.lr.ph72, label %._crit_edge73

.lr.ph72:                                         ; preds = %.preheader
  %.04855 = add nuw i32 %53, 1
  %wide.trip.count86 = zext nneg i32 %53 to i64
  %xtraiter = and i64 %wide.trip.count86, 1
  %20 = icmp eq i32 %53, 1
  %unroll_iter = and i64 %wide.trip.count86, 2147483646
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.lr.ph69.us

.lr.ph69.us:                                      ; preds = %28, %.lr.ph72
  %indvars.iv83 = phi i64 [ %indvars.iv.next84, %28 ], [ 0, %.lr.ph72 ]
  %21 = trunc nuw nsw i64 %indvars.iv83 to i32
  %22 = mul i32 %.04855, %21
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds %struct.CrossNodeData, ptr %10, i64 %23
  %25 = trunc i64 %indvars.iv83 to i32
  %26 = mul i32 %53, %25
  %27 = zext i32 %26 to i64
  %invariant.gep = getelementptr inbounds %struct.CrossNodeData, ptr %10, i64 %27
  br i1 %20, label %._crit_edge70.us.unr-lcssa, label %.lr.ph69.us.new

28:                                               ; preds = %._crit_edge70.us
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %exitcond87.not = icmp eq i64 %indvars.iv.next84, %wide.trip.count86
  br i1 %exitcond87.not, label %._crit_edge73, label %.lr.ph69.us, !llvm.loop !23

.lr.ph69.us.new:                                  ; preds = %.lr.ph69.us, %38
  %indvars.iv80 = phi i64 [ %indvars.iv.next81.1, %38 ], [ 0, %.lr.ph69.us ]
  %niter = phi i64 [ %niter.next.1, %38 ], [ 0, %.lr.ph69.us ]
  %.not57.us = icmp eq i64 %indvars.iv80, %indvars.iv83
  br i1 %.not57.us, label %33, label %29

29:                                               ; preds = %.lr.ph69.us.new
  %gep = getelementptr inbounds %struct.CrossNodeData, ptr %invariant.gep, i64 %indvars.iv80
  %30 = load i32, ptr %gep, align 8, !tbaa !25
  %31 = load i32, ptr %24, align 8, !tbaa !25
  %32 = add nsw i32 %31, %30
  store i32 %32, ptr %24, align 8, !tbaa !25
  br label %33

33:                                               ; preds = %29, %.lr.ph69.us.new
  %indvars.iv.next81 = or disjoint i64 %indvars.iv80, 1
  %.not57.us.1 = icmp eq i64 %indvars.iv.next81, %indvars.iv83
  br i1 %.not57.us.1, label %38, label %34

34:                                               ; preds = %33
  %gep.1 = getelementptr inbounds %struct.CrossNodeData, ptr %invariant.gep, i64 %indvars.iv.next81
  %35 = load i32, ptr %gep.1, align 8, !tbaa !25
  %36 = load i32, ptr %24, align 8, !tbaa !25
  %37 = add nsw i32 %36, %35
  store i32 %37, ptr %24, align 8, !tbaa !25
  br label %38

38:                                               ; preds = %34, %33
  %indvars.iv.next81.1 = add nuw nsw i64 %indvars.iv80, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge70.us.unr-lcssa, label %.lr.ph69.us.new, !llvm.loop !27

._crit_edge70.us.unr-lcssa:                       ; preds = %38, %.lr.ph69.us
  %indvars.iv80.unr = phi i64 [ 0, %.lr.ph69.us ], [ %indvars.iv.next81.1, %38 ]
  %.not57.us.epil = icmp eq i64 %indvars.iv80.unr, %indvars.iv83
  %or.cond = select i1 %lcmp.mod.not, i1 true, i1 %.not57.us.epil
  br i1 %or.cond, label %._crit_edge70.us, label %39

39:                                               ; preds = %._crit_edge70.us.unr-lcssa
  %gep.epil = getelementptr inbounds %struct.CrossNodeData, ptr %invariant.gep, i64 %indvars.iv80.unr
  %40 = load i32, ptr %gep.epil, align 8, !tbaa !25
  %41 = load i32, ptr %24, align 8, !tbaa !25
  %42 = add nsw i32 %41, %40
  store i32 %42, ptr %24, align 8, !tbaa !25
  br label %._crit_edge70.us

._crit_edge70.us:                                 ; preds = %39, %._crit_edge70.us.unr-lcssa
  %43 = load i32, ptr %24, align 8, !tbaa !25
  %44 = sext i32 %43 to i64
  %45 = shl nsw i64 %44, 2
  %46 = call noalias ptr @malloc(i64 noundef %45) #5
  %47 = getelementptr inbounds i8, ptr %24, i64 8
  store ptr %46, ptr %47, align 8, !tbaa !28
  %.not56.us = icmp ne ptr %46, null
  %48 = icmp eq i32 %43, 0
  %or.cond.us = or i1 %48, %.not56.us
  br i1 %or.cond.us, label %28, label %.split.us

49:                                               ; preds = %._crit_edge
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %50 = load i32, ptr %11, align 8, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = icmp slt i64 %indvars.iv.next, %51
  br i1 %52, label %55, label %._crit_edge64, !llvm.loop !29

._crit_edge64:                                    ; preds = %49, %.preheader58.._crit_edge64_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.preheader58.._crit_edge64_crit_edge ], [ %51, %49 ]
  %53 = phi i32 [ %16, %.preheader58.._crit_edge64_crit_edge ], [ %50, %49 ]
  %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1
  %54 = icmp slt i64 %indvars.iv.next78, %.pre-phi
  br i1 %54, label %.preheader58, label %.preheader, !llvm.loop !30

55:                                               ; preds = %.lr.ph63, %49
  %indvars.iv = phi i64 [ 0, %.lr.ph63 ], [ %indvars.iv.next, %49 ]
  %56 = phi i32 [ %16, %.lr.ph63 ], [ %50, %49 ]
  %57 = trunc nuw nsw i64 %indvars.iv to i32
  %58 = mul nsw i32 %56, %57
  %59 = add nsw i32 %58, %18
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds %struct.CrossNodeData, ptr %10, i64 %60
  %62 = getelementptr inbounds i8, ptr %61, i64 4
  store i32 0, ptr %62, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %63 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv77) #7
  %64 = call ptr @_ZNKSt3setIP10NeuronBaseSt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %63) #7
  store ptr %64, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %65 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv77) #7
  %66 = call ptr @_ZNKSt3setIP10NeuronBaseSt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %65) #7
  store ptr %66, ptr %4, align 8
  %67 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIP10NeuronBaseES4_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br i1 %67, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %55
  %.049.lcssa = phi i32 [ 0, %55 ], [ %spec.select, %.lr.ph ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  store i32 %.049.lcssa, ptr %61, align 8, !tbaa !25
  %68 = sext i32 %.049.lcssa to i64
  %69 = shl nsw i64 %68, 2
  %70 = call noalias ptr @malloc(i64 noundef %69) #5
  %71 = getelementptr inbounds i8, ptr %61, i64 8
  store ptr %70, ptr %71, align 8, !tbaa !28
  %72 = icmp ne ptr %70, null
  %73 = icmp eq i32 %.049.lcssa, 0
  %74 = or i1 %72, %73
  br i1 %74, label %49, label %86

.lr.ph:                                           ; preds = %55, %.lr.ph
  %.04961 = phi i32 [ %spec.select, %.lr.ph ], [ 0, %55 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %75 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %indvars.iv) #7
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIP10NeuronBaseEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  %77 = call ptr @_ZNSt3setIP10NeuronBaseSt4lessIS1_ESaIS1_EE4findERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %75, ptr noundef nonnull align 8 dereferenceable(8) %76)
  store ptr %77, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %78 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %indvars.iv) #7
  %79 = call ptr @_ZNKSt3setIP10NeuronBaseSt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %78) #7
  store ptr %79, ptr %6, align 8
  %80 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIP10NeuronBaseES4_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  %81 = zext i1 %80 to i32
  %spec.select = add nuw nsw i32 %.04961, %81
  %82 = call ptr @_ZNSt23_Rb_tree_const_iteratorIP10NeuronBaseEppEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef 0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %83 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv77) #7
  %84 = call ptr @_ZNKSt3setIP10NeuronBaseSt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %83) #7
  store ptr %84, ptr %4, align 8
  %85 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIP10NeuronBaseES4_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br i1 %85, label %.lr.ph, label %._crit_edge, !llvm.loop !33

86:                                               ; preds = %._crit_edge
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 51, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN12MultiNetwork20arrangeCrossNodeDataEi) #6
  unreachable

._crit_edge73:                                    ; preds = %28, %.preheader59, %.preheader
  ret ptr %10

.split.us:                                        ; preds = %._crit_edge70.us
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 65, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN12MultiNetwork20arrangeCrossNodeDataEi) #6
  unreachable
}

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

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

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

; 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 #4 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt3setIP10NeuronBaseSt4lessIS1_ESaIS1_EE4findERKS1_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 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 #4 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 #4 align 2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { 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 #5 = { nounwind allocsize(0) }
attributes #6 = { noreturn nounwind }
attributes #7 = { 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, !22, i64 128}
!6 = !{!"_ZTS12MultiNetwork", !7, i64 0, !7, i64 24, !14, i64 48, !18, i64 72, !18, i64 96, !11, i64 120, !22, i64 128}
!7 = !{!"_ZTSSt6vectorISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EE", !8, i64 0}
!8 = !{!"_ZTSSt12_Vector_baseISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EE", !9, i64 0}
!9 = !{!"_ZTSNSt12_Vector_baseISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EE12_Vector_implE", !10, i64 0}
!10 = !{!"_ZTSNSt12_Vector_baseISt3setIP10NeuronBaseSt4lessIS2_ESaIS2_EESaIS6_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"_ZTSSt6vectorISt3mapIP10NeuronBaseiSt4lessIS2_ESaISt4pairIKS2_iEEESaIS9_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseISt3mapIP10NeuronBaseiSt4lessIS2_ESaISt4pairIKS2_iEEESaIS9_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseISt3mapIP10NeuronBaseiSt4lessIS2_ESaISt4pairIKS2_iEEESaIS9_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseISt3mapIP10NeuronBaseiSt4lessIS2_ESaISt4pairIKS2_iEEESaIS9_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!18 = !{!"_ZTSSt6vectorISt3mapI4TypeiSt4lessIS1_ESaISt4pairIKS1_iEEESaIS8_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseISt3mapI4TypeiSt4lessIS1_ESaISt4pairIKS1_iEEESaIS8_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseISt3mapI4TypeiSt4lessIS1_ESaISt4pairIKS1_iEEESaIS8_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseISt3mapI4TypeiSt4lessIS1_ESaISt4pairIKS1_iEEESaIS8_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!22 = !{!"int", !12, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!26, !22, i64 0}
!26 = !{!"_ZTS13CrossNodeData", !22, i64 0, !22, i64 4, !11, i64 8}
!27 = distinct !{!27, !24}
!28 = !{!26, !11, i64 8}
!29 = distinct !{!29, !24}
!30 = distinct !{!30, !24, !31}
!31 = !{!"llvm.loop.unswitch.partial.disable"}
!32 = !{!26, !22, i64 4}
!33 = distinct !{!33, !24}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass