; LLVM IR from stivalaa/EstimNetDirected :: src (graph)

; 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.graph_s = type { i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, ptr, i32, i32, i32, ptr, ptr, i32, ptr, ptr, i32, ptr, ptr, i32, ptr, ptr, ptr, i32, i32, i32, i32, i32, ptr, i32, i32, ptr, ptr, i32, ptr, i32, ptr, ptr, i32, i32, ptr, i32, ptr }

@.str.1 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [27 x i8], align 1
@__PRETTY_FUNCTION__.removeEdge = external hidden unnamed_addr constant [43 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [23 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

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

declare ptr @safe_realloc(ptr noundef, i64 noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @removeEdge(ptr noundef %0, i32 noundef %1, i32 noundef %2) #3 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %8 = load ptr, ptr %4, align 8, !tbaa !5
  %9 = getelementptr inbounds %struct.graph_s, ptr %8, i32 0, i32 1
  %10 = load i32, ptr %9, align 4, !tbaa !11
  %11 = icmp ne i32 %10, 0
  br i1 %11, label %13, label %12

12:                                               ; preds = %3
  br label %14

13:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 1399, ptr noundef @__PRETTY_FUNCTION__.removeEdge) #5
  unreachable

14:                                               ; preds = %12
  %15 = load i32, ptr %5, align 4, !tbaa !9
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.graph_s, ptr %16, i32 0, i32 0
  %18 = load i32, ptr %17, align 8, !tbaa !13
  %19 = icmp ult i32 %15, %18
  br i1 %19, label %20, label %21

20:                                               ; preds = %14
  br label %22

21:                                               ; preds = %14
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 1401, ptr noundef @__PRETTY_FUNCTION__.removeEdge) #5
  unreachable

22:                                               ; preds = %20
  %23 = load i32, ptr %6, align 4, !tbaa !9
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.graph_s, ptr %24, i32 0, i32 0
  %26 = load i32, ptr %25, align 8, !tbaa !13
  %27 = icmp ult i32 %23, %26
  br i1 %27, label %28, label %29

28:                                               ; preds = %22
  br label %30

29:                                               ; preds = %22
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 1402, ptr noundef @__PRETTY_FUNCTION__.removeEdge) #5
  unreachable

30:                                               ; preds = %28
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.graph_s, ptr %31, i32 0, i32 9
  %33 = load i32, ptr %32, align 8, !tbaa !14
  %34 = icmp ugt i32 %33, 0
  br i1 %34, label %35, label %36

35:                                               ; preds = %30
  br label %37

36:                                               ; preds = %30
  call void @__assert_fail(ptr noundef @.str.18, ptr noundef @.str.1, i32 noundef 1403, ptr noundef @__PRETTY_FUNCTION__.removeEdge) #5
  unreachable

37:                                               ; preds = %35
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.graph_s, ptr %38, i32 0, i32 10
  %40 = load ptr, ptr %39, align 8, !tbaa !15
  %41 = load i32, ptr %5, align 4, !tbaa !9
  %42 = zext i32 %41 to i64
  %43 = getelementptr inbounds i32, ptr %40, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !9
  %45 = icmp ugt i32 %44, 0
  br i1 %45, label %46, label %47

46:                                               ; preds = %37
  br label %48

47:                                               ; preds = %37
  call void @__assert_fail(ptr noundef @.str.19, ptr noundef @.str.1, i32 noundef 1404, ptr noundef @__PRETTY_FUNCTION__.removeEdge) #5
  unreachable

48:                                               ; preds = %46
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.graph_s, ptr %49, i32 0, i32 10
  %51 = load ptr, ptr %50, align 8, !tbaa !15
  %52 = load i32, ptr %6, align 4, !tbaa !9
  %53 = zext i32 %52 to i64
  %54 = getelementptr inbounds i32, ptr %51, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !9
  %56 = icmp ugt i32 %55, 0
  br i1 %56, label %57, label %58

57:                                               ; preds = %48
  br label %59

58:                                               ; preds = %48
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str.1, i32 noundef 1405, ptr noundef @__PRETTY_FUNCTION__.removeEdge) #5
  unreachable

59:                                               ; preds = %57
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %60

60:                                               ; preds = %87, %59
  %61 = load i32, ptr %7, align 4, !tbaa !9
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.graph_s, ptr %62, i32 0, i32 10
  %64 = load ptr, ptr %63, align 8, !tbaa !15
  %65 = load i32, ptr %5, align 4, !tbaa !9
  %66 = zext i32 %65 to i64
  %67 = getelementptr inbounds i32, ptr %64, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !9
  %69 = icmp ult i32 %61, %68
  br i1 %69, label %70, label %84

70:                                               ; preds = %60
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.graph_s, ptr %71, i32 0, i32 11
  %73 = load ptr, ptr %72, align 8, !tbaa !16
  %74 = load i32, ptr %5, align 4, !tbaa !9
  %75 = zext i32 %74 to i64
  %76 = getelementptr inbounds ptr, ptr %73, i64 %75
  %77 = load ptr, ptr %76, align 8, !tbaa !5
  %78 = load i32, ptr %7, align 4, !tbaa !9
  %79 = zext i32 %78 to i64
  %80 = getelementptr inbounds i32, ptr %77, i64 %79
  %81 = load i32, ptr %80, align 4, !tbaa !9
  %82 = load i32, ptr %6, align 4, !tbaa !9
  %83 = icmp ne i32 %81, %82
  br label %84

84:                                               ; preds = %70, %60
  %85 = phi i1 [ false, %60 ], [ %83, %70 ]
  br i1 %85, label %86, label %90

86:                                               ; preds = %84
  br label %87

87:                                               ; preds = %86
  %88 = load i32, ptr %7, align 4, !tbaa !9
  %89 = add i32 %88, 1
  store i32 %89, ptr %7, align 4, !tbaa !9
  br label %60, !llvm.loop !17

90:                                               ; preds = %84
  %91 = load ptr, ptr %4, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.graph_s, ptr %91, i32 0, i32 11
  %93 = load ptr, ptr %92, align 8, !tbaa !16
  %94 = load i32, ptr %5, align 4, !tbaa !9
  %95 = zext i32 %94 to i64
  %96 = getelementptr inbounds ptr, ptr %93, i64 %95
  %97 = load ptr, ptr %96, align 8, !tbaa !5
  %98 = load i32, ptr %7, align 4, !tbaa !9
  %99 = zext i32 %98 to i64
  %100 = getelementptr inbounds i32, ptr %97, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !9
  %102 = load i32, ptr %6, align 4, !tbaa !9
  %103 = icmp eq i32 %101, %102
  br i1 %103, label %104, label %105

104:                                              ; preds = %90
  br label %106

105:                                              ; preds = %90
  call void @__assert_fail(ptr noundef @.str.21, ptr noundef @.str.1, i32 noundef 1411, ptr noundef @__PRETTY_FUNCTION__.removeEdge) #5
  unreachable

106:                                              ; preds = %104
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.graph_s, ptr %107, i32 0, i32 11
  %109 = load ptr, ptr %108, align 8, !tbaa !16
  %110 = load i32, ptr %5, align 4, !tbaa !9
  %111 = zext i32 %110 to i64
  %112 = getelementptr inbounds ptr, ptr %109, i64 %111
  %113 = load ptr, ptr %112, align 8, !tbaa !5
  %114 = load ptr, ptr %4, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.graph_s, ptr %114, i32 0, i32 10
  %116 = load ptr, ptr %115, align 8, !tbaa !15
  %117 = load i32, ptr %5, align 4, !tbaa !9
  %118 = zext i32 %117 to i64
  %119 = getelementptr inbounds i32, ptr %116, i64 %118
  %120 = load i32, ptr %119, align 4, !tbaa !9
  %121 = sub i32 %120, 1
  %122 = zext i32 %121 to i64
  %123 = getelementptr inbounds i32, ptr %113, i64 %122
  %124 = load i32, ptr %123, align 4, !tbaa !9
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.graph_s, ptr %125, i32 0, i32 11
  %127 = load ptr, ptr %126, align 8, !tbaa !16
  %128 = load i32, ptr %5, align 4, !tbaa !9
  %129 = zext i32 %128 to i64
  %130 = getelementptr inbounds ptr, ptr %127, i64 %129
  %131 = load ptr, ptr %130, align 8, !tbaa !5
  %132 = load i32, ptr %7, align 4, !tbaa !9
  %133 = zext i32 %132 to i64
  %134 = getelementptr inbounds i32, ptr %131, i64 %133
  store i32 %124, ptr %134, align 4, !tbaa !9
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %135

135:                                              ; preds = %162, %106
  %136 = load i32, ptr %7, align 4, !tbaa !9
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.graph_s, ptr %137, i32 0, i32 10
  %139 = load ptr, ptr %138, align 8, !tbaa !15
  %140 = load i32, ptr %6, align 4, !tbaa !9
  %141 = zext i32 %140 to i64
  %142 = getelementptr inbounds i32, ptr %139, i64 %141
  %143 = load i32, ptr %142, align 4, !tbaa !9
  %144 = icmp ult i32 %136, %143
  br i1 %144, label %145, label %159

145:                                              ; preds = %135
  %146 = load ptr, ptr %4, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.graph_s, ptr %146, i32 0, i32 11
  %148 = load ptr, ptr %147, align 8, !tbaa !16
  %149 = load i32, ptr %6, align 4, !tbaa !9
  %150 = zext i32 %149 to i64
  %151 = getelementptr inbounds ptr, ptr %148, i64 %150
  %152 = load ptr, ptr %151, align 8, !tbaa !5
  %153 = load i32, ptr %7, align 4, !tbaa !9
  %154 = zext i32 %153 to i64
  %155 = getelementptr inbounds i32, ptr %152, i64 %154
  %156 = load i32, ptr %155, align 4, !tbaa !9
  %157 = load i32, ptr %5, align 4, !tbaa !9
  %158 = icmp ne i32 %156, %157
  br label %159

159:                                              ; preds = %145, %135
  %160 = phi i1 [ false, %135 ], [ %158, %145 ]
  br i1 %160, label %161, label %165

161:                                              ; preds = %159
  br label %162

162:                                              ; preds = %161
  %163 = load i32, ptr %7, align 4, !tbaa !9
  %164 = add i32 %163, 1
  store i32 %164, ptr %7, align 4, !tbaa !9
  br label %135, !llvm.loop !19

165:                                              ; preds = %159
  %166 = load ptr, ptr %4, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.graph_s, ptr %166, i32 0, i32 11
  %168 = load ptr, ptr %167, align 8, !tbaa !16
  %169 = load i32, ptr %6, align 4, !tbaa !9
  %170 = zext i32 %169 to i64
  %171 = getelementptr inbounds ptr, ptr %168, i64 %170
  %172 = load ptr, ptr %171, align 8, !tbaa !5
  %173 = load i32, ptr %7, align 4, !tbaa !9
  %174 = zext i32 %173 to i64
  %175 = getelementptr inbounds i32, ptr %172, i64 %174
  %176 = load i32, ptr %175, align 4, !tbaa !9
  %177 = load i32, ptr %5, align 4, !tbaa !9
  %178 = icmp eq i32 %176, %177
  br i1 %178, label %179, label %180

179:                                              ; preds = %165
  br label %181

180:                                              ; preds = %165
  call void @__assert_fail(ptr noundef @.str.22, ptr noundef @.str.1, i32 noundef 1415, ptr noundef @__PRETTY_FUNCTION__.removeEdge) #5
  unreachable

181:                                              ; preds = %179
  %182 = load ptr, ptr %4, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.graph_s, ptr %182, i32 0, i32 11
  %184 = load ptr, ptr %183, align 8, !tbaa !16
  %185 = load i32, ptr %6, align 4, !tbaa !9
  %186 = zext i32 %185 to i64
  %187 = getelementptr inbounds ptr, ptr %184, i64 %186
  %188 = load ptr, ptr %187, align 8, !tbaa !5
  %189 = load ptr, ptr %4, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.graph_s, ptr %189, i32 0, i32 10
  %191 = load ptr, ptr %190, align 8, !tbaa !15
  %192 = load i32, ptr %6, align 4, !tbaa !9
  %193 = zext i32 %192 to i64
  %194 = getelementptr inbounds i32, ptr %191, i64 %193
  %195 = load i32, ptr %194, align 4, !tbaa !9
  %196 = sub i32 %195, 1
  %197 = zext i32 %196 to i64
  %198 = getelementptr inbounds i32, ptr %188, i64 %197
  %199 = load i32, ptr %198, align 4, !tbaa !9
  %200 = load ptr, ptr %4, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.graph_s, ptr %200, i32 0, i32 11
  %202 = load ptr, ptr %201, align 8, !tbaa !16
  %203 = load i32, ptr %6, align 4, !tbaa !9
  %204 = zext i32 %203 to i64
  %205 = getelementptr inbounds ptr, ptr %202, i64 %204
  %206 = load ptr, ptr %205, align 8, !tbaa !5
  %207 = load i32, ptr %7, align 4, !tbaa !9
  %208 = zext i32 %207 to i64
  %209 = getelementptr inbounds i32, ptr %206, i64 %208
  store i32 %199, ptr %209, align 4, !tbaa !9
  %210 = load ptr, ptr %4, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.graph_s, ptr %210, i32 0, i32 11
  %212 = load ptr, ptr %211, align 8, !tbaa !16
  %213 = load i32, ptr %5, align 4, !tbaa !9
  %214 = zext i32 %213 to i64
  %215 = getelementptr inbounds ptr, ptr %212, i64 %214
  %216 = load ptr, ptr %215, align 8, !tbaa !5
  %217 = load ptr, ptr %4, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct.graph_s, ptr %217, i32 0, i32 10
  %219 = load ptr, ptr %218, align 8, !tbaa !15
  %220 = load i32, ptr %5, align 4, !tbaa !9
  %221 = zext i32 %220 to i64
  %222 = getelementptr inbounds i32, ptr %219, i64 %221
  %223 = load i32, ptr %222, align 4, !tbaa !9
  %224 = sub i32 %223, 1
  %225 = zext i32 %224 to i64
  %226 = mul i64 %225, 4
  %227 = call ptr @safe_realloc(ptr noundef %216, i64 noundef %226)
  %228 = load ptr, ptr %4, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.graph_s, ptr %228, i32 0, i32 11
  %230 = load ptr, ptr %229, align 8, !tbaa !16
  %231 = load i32, ptr %5, align 4, !tbaa !9
  %232 = zext i32 %231 to i64
  %233 = getelementptr inbounds ptr, ptr %230, i64 %232
  store ptr %227, ptr %233, align 8, !tbaa !5
  %234 = load ptr, ptr %4, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.graph_s, ptr %234, i32 0, i32 11
  %236 = load ptr, ptr %235, align 8, !tbaa !16
  %237 = load i32, ptr %6, align 4, !tbaa !9
  %238 = zext i32 %237 to i64
  %239 = getelementptr inbounds ptr, ptr %236, i64 %238
  %240 = load ptr, ptr %239, align 8, !tbaa !5
  %241 = load ptr, ptr %4, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct.graph_s, ptr %241, i32 0, i32 10
  %243 = load ptr, ptr %242, align 8, !tbaa !15
  %244 = load i32, ptr %6, align 4, !tbaa !9
  %245 = zext i32 %244 to i64
  %246 = getelementptr inbounds i32, ptr %243, i64 %245
  %247 = load i32, ptr %246, align 4, !tbaa !9
  %248 = sub i32 %247, 1
  %249 = zext i32 %248 to i64
  %250 = mul i64 %249, 4
  %251 = call ptr @safe_realloc(ptr noundef %240, i64 noundef %250)
  %252 = load ptr, ptr %4, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.graph_s, ptr %252, i32 0, i32 11
  %254 = load ptr, ptr %253, align 8, !tbaa !16
  %255 = load i32, ptr %6, align 4, !tbaa !9
  %256 = zext i32 %255 to i64
  %257 = getelementptr inbounds ptr, ptr %254, i64 %256
  store ptr %251, ptr %257, align 8, !tbaa !5
  %258 = load ptr, ptr %4, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.graph_s, ptr %258, i32 0, i32 9
  %260 = load i32, ptr %259, align 8, !tbaa !14
  %261 = add i32 %260, -1
  store i32 %261, ptr %259, align 8, !tbaa !14
  %262 = load ptr, ptr %4, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.graph_s, ptr %262, i32 0, i32 10
  %264 = load ptr, ptr %263, align 8, !tbaa !15
  %265 = load i32, ptr %5, align 4, !tbaa !9
  %266 = zext i32 %265 to i64
  %267 = getelementptr inbounds i32, ptr %264, i64 %266
  %268 = load i32, ptr %267, align 4, !tbaa !9
  %269 = add i32 %268, -1
  store i32 %269, ptr %267, align 4, !tbaa !9
  %270 = load ptr, ptr %4, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.graph_s, ptr %270, i32 0, i32 10
  %272 = load ptr, ptr %271, align 8, !tbaa !15
  %273 = load i32, ptr %6, align 4, !tbaa !9
  %274 = zext i32 %273 to i64
  %275 = getelementptr inbounds i32, ptr %272, i64 %274
  %276 = load i32, ptr %275, align 4, !tbaa !9
  %277 = add i32 %276, -1
  store i32 %277, ptr %275, align 4, !tbaa !9
  %278 = load ptr, ptr %4, align 8, !tbaa !5
  %279 = getelementptr inbounds %struct.graph_s, ptr %278, i32 0, i32 33
  %280 = load ptr, ptr %279, align 8, !tbaa !20
  %281 = load i32, ptr %5, align 4, !tbaa !9
  %282 = zext i32 %281 to i64
  %283 = getelementptr inbounds i32, ptr %280, i64 %282
  %284 = load i32, ptr %283, align 4, !tbaa !9
  %285 = load ptr, ptr %4, align 8, !tbaa !5
  %286 = getelementptr inbounds %struct.graph_s, ptr %285, i32 0, i32 33
  %287 = load ptr, ptr %286, align 8, !tbaa !20
  %288 = load i32, ptr %6, align 4, !tbaa !9
  %289 = zext i32 %288 to i64
  %290 = getelementptr inbounds i32, ptr %287, i64 %289
  %291 = load i32, ptr %290, align 4, !tbaa !9
  %292 = icmp ugt i32 %284, %291
  br i1 %292, label %293, label %313

293:                                              ; preds = %181
  %294 = load ptr, ptr %4, align 8, !tbaa !5
  %295 = getelementptr inbounds %struct.graph_s, ptr %294, i32 0, i32 37
  %296 = load ptr, ptr %295, align 8, !tbaa !21
  %297 = load i32, ptr %5, align 4, !tbaa !9
  %298 = zext i32 %297 to i64
  %299 = getelementptr inbounds i32, ptr %296, i64 %298
  %300 = load i32, ptr %299, align 4, !tbaa !9
  %301 = icmp ugt i32 %300, 1
  br i1 %301, label %302, label %303

302:                                              ; preds = %293
  br label %304

303:                                              ; preds = %293
  call void @__assert_fail(ptr noundef @.str.16, ptr noundef @.str.1, i32 noundef 1431, ptr noundef @__PRETTY_FUNCTION__.removeEdge) #5
  unreachable

304:                                              ; preds = %302
  %305 = load ptr, ptr %4, align 8, !tbaa !5
  %306 = getelementptr inbounds %struct.graph_s, ptr %305, i32 0, i32 37
  %307 = load ptr, ptr %306, align 8, !tbaa !21
  %308 = load i32, ptr %5, align 4, !tbaa !9
  %309 = zext i32 %308 to i64
  %310 = getelementptr inbounds i32, ptr %307, i64 %309
  %311 = load i32, ptr %310, align 4, !tbaa !9
  %312 = add i32 %311, -1
  store i32 %312, ptr %310, align 4, !tbaa !9
  br label %350

313:                                              ; preds = %181
  %314 = load ptr, ptr %4, align 8, !tbaa !5
  %315 = getelementptr inbounds %struct.graph_s, ptr %314, i32 0, i32 33
  %316 = load ptr, ptr %315, align 8, !tbaa !20
  %317 = load i32, ptr %6, align 4, !tbaa !9
  %318 = zext i32 %317 to i64
  %319 = getelementptr inbounds i32, ptr %316, i64 %318
  %320 = load i32, ptr %319, align 4, !tbaa !9
  %321 = load ptr, ptr %4, align 8, !tbaa !5
  %322 = getelementptr inbounds %struct.graph_s, ptr %321, i32 0, i32 33
  %323 = load ptr, ptr %322, align 8, !tbaa !20
  %324 = load i32, ptr %5, align 4, !tbaa !9
  %325 = zext i32 %324 to i64
  %326 = getelementptr inbounds i32, ptr %323, i64 %325
  %327 = load i32, ptr %326, align 4, !tbaa !9
  %328 = icmp ugt i32 %320, %327
  br i1 %328, label %329, label %349

329:                                              ; preds = %313
  %330 = load ptr, ptr %4, align 8, !tbaa !5
  %331 = getelementptr inbounds %struct.graph_s, ptr %330, i32 0, i32 37
  %332 = load ptr, ptr %331, align 8, !tbaa !21
  %333 = load i32, ptr %6, align 4, !tbaa !9
  %334 = zext i32 %333 to i64
  %335 = getelementptr inbounds i32, ptr %332, i64 %334
  %336 = load i32, ptr %335, align 4, !tbaa !9
  %337 = icmp ugt i32 %336, 1
  br i1 %337, label %338, label %339

338:                                              ; preds = %329
  br label %340

339:                                              ; preds = %329
  call void @__assert_fail(ptr noundef @.str.17, ptr noundef @.str.1, i32 noundef 1434, ptr noundef @__PRETTY_FUNCTION__.removeEdge) #5
  unreachable

340:                                              ; preds = %338
  %341 = load ptr, ptr %4, align 8, !tbaa !5
  %342 = getelementptr inbounds %struct.graph_s, ptr %341, i32 0, i32 37
  %343 = load ptr, ptr %342, align 8, !tbaa !21
  %344 = load i32, ptr %6, align 4, !tbaa !9
  %345 = zext i32 %344 to i64
  %346 = getelementptr inbounds i32, ptr %343, i64 %345
  %347 = load i32, ptr %346, align 4, !tbaa !9
  %348 = add i32 %347, -1
  store i32 %348, ptr %346, align 4, !tbaa !9
  br label %349

349:                                              ; preds = %340, %313
  br label %350

350:                                              ; preds = %349, %304
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind 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 #4 = { nounwind }
attributes #5 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 4}
!12 = !{!"graph_s", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !10, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !10, i64 92, !10, i64 96, !6, i64 104, !6, i64 112, !10, i64 120, !6, i64 128, !6, i64 136, !10, i64 144, !6, i64 152, !6, i64 160, !10, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !10, i64 200, !10, i64 204, !10, i64 208, !10, i64 212, !10, i64 216, !6, i64 224, !10, i64 232, !10, i64 236, !6, i64 240, !6, i64 248, !10, i64 256, !6, i64 264, !10, i64 272, !6, i64 280, !6, i64 288, !10, i64 296, !10, i64 300, !6, i64 304, !10, i64 312, !6, i64 320}
!13 = !{!12, !10, i64 0}
!14 = !{!12, !10, i64 56}
!15 = !{!12, !6, i64 64}
!16 = !{!12, !6, i64 72}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = !{!12, !6, i64 224}
!21 = !{!12, !6, i64 248}


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

@.str.1 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [27 x i8], align 1
@__PRETTY_FUNCTION__.removeEdge = external hidden unnamed_addr constant [43 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [23 x i8], align 1

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

declare ptr @safe_realloc(ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @removeEdge(ptr nocapture noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #2 {
  %4 = getelementptr inbounds i8, ptr %0, i64 4
  %5 = load i32, ptr %4, align 4, !tbaa !5
  %.not = icmp eq i32 %5, 0
  br i1 %.not, label %7, label %6

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

7:                                                ; preds = %3
  %8 = load i32, ptr %0, align 8, !tbaa !11
  %9 = icmp ugt i32 %8, %1
  br i1 %9, label %11, label %10

10:                                               ; preds = %7
  tail call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 1401, ptr noundef nonnull @__PRETTY_FUNCTION__.removeEdge) #3
  unreachable

11:                                               ; preds = %7
  %12 = icmp ugt i32 %8, %2
  br i1 %12, label %14, label %13

13:                                               ; preds = %11
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 1402, ptr noundef nonnull @__PRETTY_FUNCTION__.removeEdge) #3
  unreachable

14:                                               ; preds = %11
  %15 = getelementptr inbounds i8, ptr %0, i64 56
  %16 = load i32, ptr %15, align 8, !tbaa !12
  %.not89 = icmp eq i32 %16, 0
  br i1 %.not89, label %17, label %18

17:                                               ; preds = %14
  tail call void @__assert_fail(ptr noundef nonnull @.str.18, ptr noundef nonnull @.str.1, i32 noundef 1403, ptr noundef nonnull @__PRETTY_FUNCTION__.removeEdge) #3
  unreachable

18:                                               ; preds = %14
  %19 = getelementptr inbounds i8, ptr %0, i64 64
  %20 = load ptr, ptr %19, align 8, !tbaa !13
  %21 = zext i32 %1 to i64
  %22 = getelementptr inbounds i32, ptr %20, i64 %21
  %23 = load i32, ptr %22, align 4, !tbaa !14
  %.not90 = icmp eq i32 %23, 0
  br i1 %.not90, label %24, label %25

24:                                               ; preds = %18
  tail call void @__assert_fail(ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.1, i32 noundef 1404, ptr noundef nonnull @__PRETTY_FUNCTION__.removeEdge) #3
  unreachable

25:                                               ; preds = %18
  %26 = zext i32 %2 to i64
  %27 = getelementptr inbounds i32, ptr %20, i64 %26
  %28 = load i32, ptr %27, align 4, !tbaa !14
  %.not91 = icmp eq i32 %28, 0
  br i1 %.not91, label %33, label %.preheader

.preheader:                                       ; preds = %25
  %29 = getelementptr inbounds i8, ptr %0, i64 72
  %30 = load ptr, ptr %29, align 8, !tbaa !15
  %31 = getelementptr inbounds ptr, ptr %30, i64 %21
  %32 = load ptr, ptr %31, align 8, !tbaa !16
  %wide.trip.count = zext i32 %23 to i64
  br label %34

33:                                               ; preds = %25
  tail call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.1, i32 noundef 1405, ptr noundef nonnull @__PRETTY_FUNCTION__.removeEdge) #3
  unreachable

34:                                               ; preds = %.preheader, %37
  %indvars.iv = phi i64 [ 0, %.preheader ], [ %indvars.iv.next, %37 ]
  %35 = getelementptr inbounds i32, ptr %32, i64 %indvars.iv
  %36 = load i32, ptr %35, align 4, !tbaa !14
  %.not92 = icmp eq i32 %36, %2
  br i1 %.not92, label %..critedge_crit_edge, label %37

..critedge_crit_edge:                             ; preds = %34
  %.pre107 = and i64 %indvars.iv, 4294967295
  br label %.critedge

37:                                               ; preds = %34
  %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 %.critedge, label %34, !llvm.loop !17

.critedge:                                        ; preds = %37, %..critedge_crit_edge
  %.pre-phi = phi i64 [ %.pre107, %..critedge_crit_edge ], [ %wide.trip.count, %37 ]
  %38 = getelementptr inbounds i32, ptr %32, i64 %.pre-phi
  %39 = load i32, ptr %38, align 4, !tbaa !14
  %40 = icmp eq i32 %39, %2
  br i1 %40, label %42, label %41

41:                                               ; preds = %.critedge
  tail call void @__assert_fail(ptr noundef nonnull @.str.21, ptr noundef nonnull @.str.1, i32 noundef 1411, ptr noundef nonnull @__PRETTY_FUNCTION__.removeEdge) #3
  unreachable

42:                                               ; preds = %.critedge
  %43 = add i32 %23, -1
  %44 = zext i32 %43 to i64
  %45 = getelementptr inbounds i32, ptr %32, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !14
  store i32 %46, ptr %38, align 4, !tbaa !14
  %47 = load i32, ptr %27, align 4, !tbaa !14
  %.not100 = icmp eq i32 %47, 0
  %.phi.trans.insert = getelementptr inbounds ptr, ptr %30, i64 %26
  %.pre = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !16
  br i1 %.not100, label %.critedge2, label %.lr.ph

.lr.ph:                                           ; preds = %42
  %wide.trip.count105 = zext i32 %47 to i64
  br label %48

48:                                               ; preds = %.lr.ph, %51
  %indvars.iv102 = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next103, %51 ]
  %49 = getelementptr inbounds i32, ptr %.pre, i64 %indvars.iv102
  %50 = load i32, ptr %49, align 4, !tbaa !14
  %.not93 = icmp eq i32 %50, %1
  br i1 %.not93, label %.critedge2.loopexit.split.loop.exit109, label %51

51:                                               ; preds = %48
  %indvars.iv.next103 = add nuw nsw i64 %indvars.iv102, 1
  %exitcond106.not = icmp eq i64 %indvars.iv.next103, %wide.trip.count105
  br i1 %exitcond106.not, label %.critedge2.loopexit, label %48, !llvm.loop !19

.critedge2.loopexit.split.loop.exit109:           ; preds = %48
  %52 = trunc nuw i64 %indvars.iv102 to i32
  br label %.critedge2.loopexit

.critedge2.loopexit:                              ; preds = %51, %.critedge2.loopexit.split.loop.exit109
  %.1.lcssa.ph = phi i32 [ %52, %.critedge2.loopexit.split.loop.exit109 ], [ %47, %51 ]
  %53 = zext i32 %.1.lcssa.ph to i64
  br label %.critedge2

.critedge2:                                       ; preds = %42, %.critedge2.loopexit
  %.1.lcssa = phi i64 [ %53, %.critedge2.loopexit ], [ 0, %42 ]
  %54 = getelementptr inbounds i32, ptr %.pre, i64 %.1.lcssa
  %55 = load i32, ptr %54, align 4, !tbaa !14
  %56 = icmp eq i32 %55, %1
  br i1 %56, label %58, label %57

57:                                               ; preds = %.critedge2
  tail call void @__assert_fail(ptr noundef nonnull @.str.22, ptr noundef nonnull @.str.1, i32 noundef 1415, ptr noundef nonnull @__PRETTY_FUNCTION__.removeEdge) #3
  unreachable

58:                                               ; preds = %.critedge2
  %59 = add i32 %47, -1
  %60 = zext i32 %59 to i64
  %61 = getelementptr inbounds i32, ptr %.pre, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !14
  store i32 %62, ptr %54, align 4, !tbaa !14
  %63 = load i32, ptr %22, align 4, !tbaa !14
  %64 = add i32 %63, -1
  %65 = zext i32 %64 to i64
  %66 = shl nuw nsw i64 %65, 2
  %67 = tail call ptr @safe_realloc(ptr noundef %32, i64 noundef %66) #4
  %68 = load ptr, ptr %29, align 8, !tbaa !15
  %69 = getelementptr inbounds ptr, ptr %68, i64 %21
  store ptr %67, ptr %69, align 8, !tbaa !16
  %70 = load ptr, ptr %29, align 8, !tbaa !15
  %71 = getelementptr inbounds ptr, ptr %70, i64 %26
  %72 = load ptr, ptr %71, align 8, !tbaa !16
  %73 = load ptr, ptr %19, align 8, !tbaa !13
  %74 = getelementptr inbounds i32, ptr %73, i64 %26
  %75 = load i32, ptr %74, align 4, !tbaa !14
  %76 = add i32 %75, -1
  %77 = zext i32 %76 to i64
  %78 = shl nuw nsw i64 %77, 2
  %79 = tail call ptr @safe_realloc(ptr noundef %72, i64 noundef %78) #4
  %80 = load ptr, ptr %29, align 8, !tbaa !15
  %81 = getelementptr inbounds ptr, ptr %80, i64 %26
  store ptr %79, ptr %81, align 8, !tbaa !16
  %82 = load i32, ptr %15, align 8, !tbaa !12
  %83 = add i32 %82, -1
  store i32 %83, ptr %15, align 8, !tbaa !12
  %84 = load ptr, ptr %19, align 8, !tbaa !13
  %85 = getelementptr inbounds i32, ptr %84, i64 %21
  %86 = load i32, ptr %85, align 4, !tbaa !14
  %87 = add i32 %86, -1
  store i32 %87, ptr %85, align 4, !tbaa !14
  %88 = getelementptr inbounds i32, ptr %84, i64 %26
  %89 = load i32, ptr %88, align 4, !tbaa !14
  %90 = add i32 %89, -1
  store i32 %90, ptr %88, align 4, !tbaa !14
  %91 = getelementptr inbounds i8, ptr %0, i64 224
  %92 = load ptr, ptr %91, align 8, !tbaa !20
  %93 = getelementptr inbounds i32, ptr %92, i64 %21
  %94 = load i32, ptr %93, align 4, !tbaa !14
  %95 = getelementptr inbounds i32, ptr %92, i64 %26
  %96 = load i32, ptr %95, align 4, !tbaa !14
  %97 = icmp ugt i32 %94, %96
  br i1 %97, label %98, label %105

98:                                               ; preds = %58
  %99 = getelementptr inbounds i8, ptr %0, i64 248
  %100 = load ptr, ptr %99, align 8, !tbaa !21
  %101 = getelementptr inbounds i32, ptr %100, i64 %21
  %102 = load i32, ptr %101, align 4, !tbaa !14
  %103 = icmp ugt i32 %102, 1
  br i1 %103, label %.sink.split, label %104

104:                                              ; preds = %98
  tail call void @__assert_fail(ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.1, i32 noundef 1431, ptr noundef nonnull @__PRETTY_FUNCTION__.removeEdge) #3
  unreachable

105:                                              ; preds = %58
  %106 = icmp ugt i32 %96, %94
  br i1 %106, label %107, label %115

107:                                              ; preds = %105
  %108 = getelementptr inbounds i8, ptr %0, i64 248
  %109 = load ptr, ptr %108, align 8, !tbaa !21
  %110 = getelementptr inbounds i32, ptr %109, i64 %26
  %111 = load i32, ptr %110, align 4, !tbaa !14
  %112 = icmp ugt i32 %111, 1
  br i1 %112, label %.sink.split, label %113

113:                                              ; preds = %107
  tail call void @__assert_fail(ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.1, i32 noundef 1434, ptr noundef nonnull @__PRETTY_FUNCTION__.removeEdge) #3
  unreachable

.sink.split:                                      ; preds = %107, %98
  %.sink112 = phi i32 [ %102, %98 ], [ %111, %107 ]
  %.sink111 = phi ptr [ %101, %98 ], [ %110, %107 ]
  %114 = add i32 %.sink112, -1
  store i32 %114, ptr %.sink111, align 4, !tbaa !14
  br label %115

115:                                              ; preds = %.sink.split, %105
  ret void
}

attributes #0 = { 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 #1 = { "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 = { 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 }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 4}
!6 = !{!"graph_s", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !7, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !7, i64 88, !7, i64 92, !7, i64 96, !10, i64 104, !10, i64 112, !7, i64 120, !10, i64 128, !10, i64 136, !7, i64 144, !10, i64 152, !10, i64 160, !7, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !7, i64 200, !7, i64 204, !7, i64 208, !7, i64 212, !7, i64 216, !10, i64 224, !7, i64 232, !7, i64 236, !10, i64 240, !10, i64 248, !7, i64 256, !10, i64 264, !7, i64 272, !10, i64 280, !10, i64 288, !7, i64 296, !7, i64 300, !10, i64 304, !7, i64 312, !10, i64 320}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 0}
!12 = !{!6, !7, i64 56}
!13 = !{!6, !10, i64 64}
!14 = !{!7, !7, i64 0}
!15 = !{!6, !10, i64 72}
!16 = !{!10, !10, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = !{!6, !10, i64 224}
!21 = !{!6, !10, i64 248}


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