; LLVM IR from GGiecold-zz/Cluster_Ensembles :: src/Cluster_Ensembles/Hypergraph_Partitioning/metis-5.1.0/libmetis (kwayrefine)

; 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.ctrl_t = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, i32, i32, float, ptr, ptr, ptr, float, double, double, double, double, double, double, double, double, double, double, double, double, ptr, i64, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.graph_t = type { i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, ptr, ptr, i32, i32, ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.vkrinfo_t = type { i32, i32, i32, i32, i32 }
%struct.vnbr_t = type { i32, i32, i32 }

@.str.1 = external hidden unnamed_addr constant [143 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [19 x i8], align 1
@__PRETTY_FUNCTION__.libmetis__ComputeKWayVolGains = external hidden unnamed_addr constant [56 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

declare i32 @printf(ptr noundef, ...) #1

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

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

declare ptr @libmetis__iset(i64 noundef, i32 noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__ComputeKWayVolGains(ptr noundef %0, ptr noundef %1) #3 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %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 i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  call void @libmetis__wspacepush(ptr noundef %27)
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.ctrl_t, ptr %28, i32 0, i32 21
  %30 = load i32, ptr %29, align 4, !tbaa !9
  store i32 %30, ptr %11, align 4, !tbaa !15
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.graph_t, ptr %31, i32 0, i32 0
  %33 = load i32, ptr %32, align 8, !tbaa !16
  store i32 %33, ptr %10, align 4, !tbaa !15
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.graph_t, ptr %34, i32 0, i32 3
  %36 = load ptr, ptr %35, align 8, !tbaa !18
  store ptr %36, ptr %15, align 8, !tbaa !5
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.graph_t, ptr %37, i32 0, i32 5
  %39 = load ptr, ptr %38, align 8, !tbaa !19
  store ptr %39, ptr %16, align 8, !tbaa !5
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.graph_t, ptr %40, i32 0, i32 6
  %42 = load ptr, ptr %41, align 8, !tbaa !20
  store ptr %42, ptr %17, align 8, !tbaa !5
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.graph_t, ptr %43, i32 0, i32 7
  %45 = load ptr, ptr %44, align 8, !tbaa !21
  store ptr %45, ptr %18, align 8, !tbaa !5
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.graph_t, ptr %46, i32 0, i32 19
  %48 = load ptr, ptr %47, align 8, !tbaa !22
  store ptr %48, ptr %19, align 8, !tbaa !5
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.graph_t, ptr %49, i32 0, i32 23
  %51 = load ptr, ptr %50, align 8, !tbaa !23
  store ptr %51, ptr %20, align 8, !tbaa !5
  %52 = load i32, ptr %10, align 4, !tbaa !15
  %53 = sext i32 %52 to i64
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.graph_t, ptr %54, i32 0, i32 22
  %56 = load ptr, ptr %55, align 8, !tbaa !24
  %57 = call ptr @libmetis__iset(i64 noundef %53, i32 noundef -1, ptr noundef %56)
  store ptr %57, ptr %21, align 8, !tbaa !5
  %58 = load i32, ptr %11, align 4, !tbaa !15
  %59 = sext i32 %58 to i64
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = load i32, ptr %11, align 4, !tbaa !15
  %62 = call ptr @libmetis__iwspacemalloc(ptr noundef %60, i32 noundef %61)
  %63 = call ptr @libmetis__iset(i64 noundef %59, i32 noundef -1, ptr noundef %62)
  store ptr %63, ptr %22, align 8, !tbaa !5
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.graph_t, ptr %64, i32 0, i32 21
  store i32 0, ptr %65, align 8, !tbaa !25
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.graph_t, ptr %66, i32 0, i32 18
  store i32 0, ptr %67, align 4, !tbaa !26
  store i32 0, ptr %5, align 4, !tbaa !15
  br label %68

68:                                               ; preds = %444, %2
  %69 = load i32, ptr %5, align 4, !tbaa !15
  %70 = load i32, ptr %10, align 4, !tbaa !15
  %71 = icmp slt i32 %69, %70
  br i1 %71, label %72, label %447

72:                                               ; preds = %68
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.graph_t, ptr %73, i32 0, i32 27
  %75 = load ptr, ptr %74, align 8, !tbaa !27
  %76 = load i32, ptr %5, align 4, !tbaa !15
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds %struct.vkrinfo_t, ptr %75, i64 %77
  store ptr %78, ptr %23, align 8, !tbaa !5
  %79 = load ptr, ptr %23, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.vkrinfo_t, ptr %79, i32 0, i32 2
  store i32 -2147483648, ptr %80, align 4, !tbaa !28
  %81 = load ptr, ptr %23, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.vkrinfo_t, ptr %81, i32 0, i32 3
  %83 = load i32, ptr %82, align 4, !tbaa !30
  %84 = icmp sgt i32 %83, 0
  br i1 %84, label %85, label %401

85:                                               ; preds = %72
  %86 = load ptr, ptr %19, align 8, !tbaa !5
  %87 = load i32, ptr %5, align 4, !tbaa !15
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds i32, ptr %86, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !15
  store i32 %90, ptr %12, align 4, !tbaa !15
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.ctrl_t, ptr %91, i32 0, i32 44
  %93 = load ptr, ptr %92, align 8, !tbaa !31
  %94 = load ptr, ptr %23, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.vkrinfo_t, ptr %94, i32 0, i32 4
  %96 = load i32, ptr %95, align 4, !tbaa !32
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds %struct.vnbr_t, ptr %93, i64 %97
  store ptr %98, ptr %25, align 8, !tbaa !5
  %99 = load ptr, ptr %23, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.vkrinfo_t, ptr %99, i32 0, i32 3
  %101 = load i32, ptr %100, align 4, !tbaa !30
  %102 = load ptr, ptr %16, align 8, !tbaa !5
  %103 = load i32, ptr %5, align 4, !tbaa !15
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds i32, ptr %102, i64 %104
  %106 = load i32, ptr %105, align 4, !tbaa !15
  %107 = mul nsw i32 %101, %106
  %108 = load ptr, ptr %4, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.graph_t, ptr %108, i32 0, i32 18
  %110 = load i32, ptr %109, align 4, !tbaa !26
  %111 = add nsw i32 %110, %107
  store i32 %111, ptr %109, align 4, !tbaa !26
  %112 = load ptr, ptr %15, align 8, !tbaa !5
  %113 = load i32, ptr %5, align 4, !tbaa !15
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds i32, ptr %112, i64 %114
  %116 = load i32, ptr %115, align 4, !tbaa !15
  store i32 %116, ptr %7, align 4, !tbaa !15
  br label %117

117:                                              ; preds = %346, %85
  %118 = load i32, ptr %7, align 4, !tbaa !15
  %119 = load ptr, ptr %15, align 8, !tbaa !5
  %120 = load i32, ptr %5, align 4, !tbaa !15
  %121 = add nsw i32 %120, 1
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds i32, ptr %119, i64 %122
  %124 = load i32, ptr %123, align 4, !tbaa !15
  %125 = icmp slt i32 %118, %124
  br i1 %125, label %126, label %349

126:                                              ; preds = %117
  %127 = load ptr, ptr %17, align 8, !tbaa !5
  %128 = load i32, ptr %7, align 4, !tbaa !15
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds i32, ptr %127, i64 %129
  %131 = load i32, ptr %130, align 4, !tbaa !15
  store i32 %131, ptr %6, align 4, !tbaa !15
  %132 = load ptr, ptr %19, align 8, !tbaa !5
  %133 = load i32, ptr %6, align 4, !tbaa !15
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds i32, ptr %132, i64 %134
  %136 = load i32, ptr %135, align 4, !tbaa !15
  store i32 %136, ptr %13, align 4, !tbaa !15
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.graph_t, ptr %137, i32 0, i32 27
  %139 = load ptr, ptr %138, align 8, !tbaa !27
  %140 = load i32, ptr %6, align 4, !tbaa !15
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds %struct.vkrinfo_t, ptr %139, i64 %141
  store ptr %142, ptr %24, align 8, !tbaa !5
  %143 = load ptr, ptr %3, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.ctrl_t, ptr %143, i32 0, i32 44
  %145 = load ptr, ptr %144, align 8, !tbaa !31
  %146 = load ptr, ptr %24, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.vkrinfo_t, ptr %146, i32 0, i32 4
  %148 = load i32, ptr %147, align 4, !tbaa !32
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds %struct.vnbr_t, ptr %145, i64 %149
  store ptr %150, ptr %26, align 8, !tbaa !5
  store i32 0, ptr %8, align 4, !tbaa !15
  br label %151

151:                                              ; preds = %168, %126
  %152 = load i32, ptr %8, align 4, !tbaa !15
  %153 = load ptr, ptr %24, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.vkrinfo_t, ptr %153, i32 0, i32 3
  %155 = load i32, ptr %154, align 4, !tbaa !30
  %156 = icmp slt i32 %152, %155
  br i1 %156, label %157, label %171

157:                                              ; preds = %151
  %158 = load i32, ptr %8, align 4, !tbaa !15
  %159 = load ptr, ptr %22, align 8, !tbaa !5
  %160 = load ptr, ptr %26, align 8, !tbaa !5
  %161 = load i32, ptr %8, align 4, !tbaa !15
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds %struct.vnbr_t, ptr %160, i64 %162
  %164 = getelementptr inbounds %struct.vnbr_t, ptr %163, i32 0, i32 0
  %165 = load i32, ptr %164, align 4, !tbaa !33
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds i32, ptr %159, i64 %166
  store i32 %158, ptr %167, align 4, !tbaa !15
  br label %168

168:                                              ; preds = %157
  %169 = load i32, ptr %8, align 4, !tbaa !15
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %8, align 4, !tbaa !15
  br label %151, !llvm.loop !35

171:                                              ; preds = %151
  %172 = load ptr, ptr %22, align 8, !tbaa !5
  %173 = load i32, ptr %13, align 4, !tbaa !15
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds i32, ptr %172, i64 %174
  store i32 1, ptr %175, align 4, !tbaa !15
  %176 = load i32, ptr %12, align 4, !tbaa !15
  %177 = load i32, ptr %13, align 4, !tbaa !15
  %178 = icmp eq i32 %176, %177
  br i1 %178, label %179, label %216

179:                                              ; preds = %171
  store i32 0, ptr %8, align 4, !tbaa !15
  br label %180

180:                                              ; preds = %212, %179
  %181 = load i32, ptr %8, align 4, !tbaa !15
  %182 = load ptr, ptr %23, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.vkrinfo_t, ptr %182, i32 0, i32 3
  %184 = load i32, ptr %183, align 4, !tbaa !30
  %185 = icmp slt i32 %181, %184
  br i1 %185, label %186, label %215

186:                                              ; preds = %180
  %187 = load ptr, ptr %22, align 8, !tbaa !5
  %188 = load ptr, ptr %25, align 8, !tbaa !5
  %189 = load i32, ptr %8, align 4, !tbaa !15
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds %struct.vnbr_t, ptr %188, i64 %190
  %192 = getelementptr inbounds %struct.vnbr_t, ptr %191, i32 0, i32 0
  %193 = load i32, ptr %192, align 4, !tbaa !33
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds i32, ptr %187, i64 %194
  %196 = load i32, ptr %195, align 4, !tbaa !15
  %197 = icmp eq i32 %196, -1
  br i1 %197, label %198, label %211

198:                                              ; preds = %186
  %199 = load ptr, ptr %16, align 8, !tbaa !5
  %200 = load i32, ptr %6, align 4, !tbaa !15
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds i32, ptr %199, i64 %201
  %203 = load i32, ptr %202, align 4, !tbaa !15
  %204 = load ptr, ptr %25, align 8, !tbaa !5
  %205 = load i32, ptr %8, align 4, !tbaa !15
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds %struct.vnbr_t, ptr %204, i64 %206
  %208 = getelementptr inbounds %struct.vnbr_t, ptr %207, i32 0, i32 2
  %209 = load i32, ptr %208, align 4, !tbaa !37
  %210 = sub nsw i32 %209, %203
  store i32 %210, ptr %208, align 4, !tbaa !37
  br label %211

211:                                              ; preds = %198, %186
  br label %212

212:                                              ; preds = %211
  %213 = load i32, ptr %8, align 4, !tbaa !15
  %214 = add nsw i32 %213, 1
  store i32 %214, ptr %8, align 4, !tbaa !15
  br label %180, !llvm.loop !38

215:                                              ; preds = %180
  br label %321

216:                                              ; preds = %171
  %217 = load ptr, ptr %22, align 8, !tbaa !5
  %218 = load i32, ptr %12, align 4, !tbaa !15
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds i32, ptr %217, i64 %219
  %221 = load i32, ptr %220, align 4, !tbaa !15
  %222 = icmp ne i32 %221, -1
  br i1 %222, label %234, label %223

223:                                              ; preds = %216
  %224 = call i32 (ptr, ...) @printf(ptr noundef @.str.26, i32 noundef 617, ptr noundef @.str.1)
  %225 = load ptr, ptr %22, align 8, !tbaa !5
  %226 = load i32, ptr %12, align 4, !tbaa !15
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds i32, ptr %225, i64 %227
  %229 = load i32, ptr %228, align 4, !tbaa !15
  %230 = icmp ne i32 %229, -1
  br i1 %230, label %231, label %232

231:                                              ; preds = %223
  br label %233

232:                                              ; preds = %223
  call void @__assert_fail(ptr noundef @.str.27, ptr noundef @.str.1, i32 noundef 617, ptr noundef @__PRETTY_FUNCTION__.libmetis__ComputeKWayVolGains) #5
  unreachable

233:                                              ; preds = %231
  br label %234

234:                                              ; preds = %233, %216
  %235 = load ptr, ptr %26, align 8, !tbaa !5
  %236 = load ptr, ptr %22, align 8, !tbaa !5
  %237 = load i32, ptr %12, align 4, !tbaa !15
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds i32, ptr %236, i64 %238
  %240 = load i32, ptr %239, align 4, !tbaa !15
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds %struct.vnbr_t, ptr %235, i64 %241
  %243 = getelementptr inbounds %struct.vnbr_t, ptr %242, i32 0, i32 1
  %244 = load i32, ptr %243, align 4, !tbaa !39
  %245 = icmp eq i32 %244, 1
  br i1 %245, label %246, label %283

246:                                              ; preds = %234
  store i32 0, ptr %8, align 4, !tbaa !15
  br label %247

247:                                              ; preds = %279, %246
  %248 = load i32, ptr %8, align 4, !tbaa !15
  %249 = load ptr, ptr %23, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.vkrinfo_t, ptr %249, i32 0, i32 3
  %251 = load i32, ptr %250, align 4, !tbaa !30
  %252 = icmp slt i32 %248, %251
  br i1 %252, label %253, label %282

253:                                              ; preds = %247
  %254 = load ptr, ptr %22, align 8, !tbaa !5
  %255 = load ptr, ptr %25, align 8, !tbaa !5
  %256 = load i32, ptr %8, align 4, !tbaa !15
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds %struct.vnbr_t, ptr %255, i64 %257
  %259 = getelementptr inbounds %struct.vnbr_t, ptr %258, i32 0, i32 0
  %260 = load i32, ptr %259, align 4, !tbaa !33
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds i32, ptr %254, i64 %261
  %263 = load i32, ptr %262, align 4, !tbaa !15
  %264 = icmp ne i32 %263, -1
  br i1 %264, label %265, label %278

265:                                              ; preds = %253
  %266 = load ptr, ptr %16, align 8, !tbaa !5
  %267 = load i32, ptr %6, align 4, !tbaa !15
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds i32, ptr %266, i64 %268
  %270 = load i32, ptr %269, align 4, !tbaa !15
  %271 = load ptr, ptr %25, align 8, !tbaa !5
  %272 = load i32, ptr %8, align 4, !tbaa !15
  %273 = sext i32 %272 to i64
  %274 = getelementptr inbounds %struct.vnbr_t, ptr %271, i64 %273
  %275 = getelementptr inbounds %struct.vnbr_t, ptr %274, i32 0, i32 2
  %276 = load i32, ptr %275, align 4, !tbaa !37
  %277 = add nsw i32 %276, %270
  store i32 %277, ptr %275, align 4, !tbaa !37
  br label %278

278:                                              ; preds = %265, %253
  br label %279

279:                                              ; preds = %278
  %280 = load i32, ptr %8, align 4, !tbaa !15
  %281 = add nsw i32 %280, 1
  store i32 %281, ptr %8, align 4, !tbaa !15
  br label %247, !llvm.loop !40

282:                                              ; preds = %247
  br label %320

283:                                              ; preds = %234
  store i32 0, ptr %8, align 4, !tbaa !15
  br label %284

284:                                              ; preds = %316, %283
  %285 = load i32, ptr %8, align 4, !tbaa !15
  %286 = load ptr, ptr %23, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.vkrinfo_t, ptr %286, i32 0, i32 3
  %288 = load i32, ptr %287, align 4, !tbaa !30
  %289 = icmp slt i32 %285, %288
  br i1 %289, label %290, label %319

290:                                              ; preds = %284
  %291 = load ptr, ptr %22, align 8, !tbaa !5
  %292 = load ptr, ptr %25, align 8, !tbaa !5
  %293 = load i32, ptr %8, align 4, !tbaa !15
  %294 = sext i32 %293 to i64
  %295 = getelementptr inbounds %struct.vnbr_t, ptr %292, i64 %294
  %296 = getelementptr inbounds %struct.vnbr_t, ptr %295, i32 0, i32 0
  %297 = load i32, ptr %296, align 4, !tbaa !33
  %298 = sext i32 %297 to i64
  %299 = getelementptr inbounds i32, ptr %291, i64 %298
  %300 = load i32, ptr %299, align 4, !tbaa !15
  %301 = icmp eq i32 %300, -1
  br i1 %301, label %302, label %315

302:                                              ; preds = %290
  %303 = load ptr, ptr %16, align 8, !tbaa !5
  %304 = load i32, ptr %6, align 4, !tbaa !15
  %305 = sext i32 %304 to i64
  %306 = getelementptr inbounds i32, ptr %303, i64 %305
  %307 = load i32, ptr %306, align 4, !tbaa !15
  %308 = load ptr, ptr %25, align 8, !tbaa !5
  %309 = load i32, ptr %8, align 4, !tbaa !15
  %310 = sext i32 %309 to i64
  %311 = getelementptr inbounds %struct.vnbr_t, ptr %308, i64 %310
  %312 = getelementptr inbounds %struct.vnbr_t, ptr %311, i32 0, i32 2
  %313 = load i32, ptr %312, align 4, !tbaa !37
  %314 = sub nsw i32 %313, %307
  store i32 %314, ptr %312, align 4, !tbaa !37
  br label %315

315:                                              ; preds = %302, %290
  br label %316

316:                                              ; preds = %315
  %317 = load i32, ptr %8, align 4, !tbaa !15
  %318 = add nsw i32 %317, 1
  store i32 %318, ptr %8, align 4, !tbaa !15
  br label %284, !llvm.loop !41

319:                                              ; preds = %284
  br label %320

320:                                              ; preds = %319, %282
  br label %321

321:                                              ; preds = %320, %215
  store i32 0, ptr %8, align 4, !tbaa !15
  br label %322

322:                                              ; preds = %338, %321
  %323 = load i32, ptr %8, align 4, !tbaa !15
  %324 = load ptr, ptr %24, align 8, !tbaa !5
  %325 = getelementptr inbounds %struct.vkrinfo_t, ptr %324, i32 0, i32 3
  %326 = load i32, ptr %325, align 4, !tbaa !30
  %327 = icmp slt i32 %323, %326
  br i1 %327, label %328, label %341

328:                                              ; preds = %322
  %329 = load ptr, ptr %22, align 8, !tbaa !5
  %330 = load ptr, ptr %26, align 8, !tbaa !5
  %331 = load i32, ptr %8, align 4, !tbaa !15
  %332 = sext i32 %331 to i64
  %333 = getelementptr inbounds %struct.vnbr_t, ptr %330, i64 %332
  %334 = getelementptr inbounds %struct.vnbr_t, ptr %333, i32 0, i32 0
  %335 = load i32, ptr %334, align 4, !tbaa !33
  %336 = sext i32 %335 to i64
  %337 = getelementptr inbounds i32, ptr %329, i64 %336
  store i32 -1, ptr %337, align 4, !tbaa !15
  br label %338

338:                                              ; preds = %328
  %339 = load i32, ptr %8, align 4, !tbaa !15
  %340 = add nsw i32 %339, 1
  store i32 %340, ptr %8, align 4, !tbaa !15
  br label %322, !llvm.loop !42

341:                                              ; preds = %322
  %342 = load ptr, ptr %22, align 8, !tbaa !5
  %343 = load i32, ptr %13, align 4, !tbaa !15
  %344 = sext i32 %343 to i64
  %345 = getelementptr inbounds i32, ptr %342, i64 %344
  store i32 -1, ptr %345, align 4, !tbaa !15
  br label %346

346:                                              ; preds = %341
  %347 = load i32, ptr %7, align 4, !tbaa !15
  %348 = add nsw i32 %347, 1
  store i32 %348, ptr %7, align 4, !tbaa !15
  br label %117, !llvm.loop !43

349:                                              ; preds = %117
  store i32 0, ptr %8, align 4, !tbaa !15
  br label %350

350:                                              ; preds = %377, %349
  %351 = load i32, ptr %8, align 4, !tbaa !15
  %352 = load ptr, ptr %23, align 8, !tbaa !5
  %353 = getelementptr inbounds %struct.vkrinfo_t, ptr %352, i32 0, i32 3
  %354 = load i32, ptr %353, align 4, !tbaa !30
  %355 = icmp slt i32 %351, %354
  br i1 %355, label %356, label %380

356:                                              ; preds = %350
  %357 = load ptr, ptr %25, align 8, !tbaa !5
  %358 = load i32, ptr %8, align 4, !tbaa !15
  %359 = sext i32 %358 to i64
  %360 = getelementptr inbounds %struct.vnbr_t, ptr %357, i64 %359
  %361 = getelementptr inbounds %struct.vnbr_t, ptr %360, i32 0, i32 2
  %362 = load i32, ptr %361, align 4, !tbaa !37
  %363 = load ptr, ptr %23, align 8, !tbaa !5
  %364 = getelementptr inbounds %struct.vkrinfo_t, ptr %363, i32 0, i32 2
  %365 = load i32, ptr %364, align 4, !tbaa !28
  %366 = icmp sgt i32 %362, %365
  br i1 %366, label %367, label %376

367:                                              ; preds = %356
  %368 = load ptr, ptr %25, align 8, !tbaa !5
  %369 = load i32, ptr %8, align 4, !tbaa !15
  %370 = sext i32 %369 to i64
  %371 = getelementptr inbounds %struct.vnbr_t, ptr %368, i64 %370
  %372 = getelementptr inbounds %struct.vnbr_t, ptr %371, i32 0, i32 2
  %373 = load i32, ptr %372, align 4, !tbaa !37
  %374 = load ptr, ptr %23, align 8, !tbaa !5
  %375 = getelementptr inbounds %struct.vkrinfo_t, ptr %374, i32 0, i32 2
  store i32 %373, ptr %375, align 4, !tbaa !28
  br label %376

376:                                              ; preds = %367, %356
  br label %377

377:                                              ; preds = %376
  %378 = load i32, ptr %8, align 4, !tbaa !15
  %379 = add nsw i32 %378, 1
  store i32 %379, ptr %8, align 4, !tbaa !15
  br label %350, !llvm.loop !44

380:                                              ; preds = %350
  %381 = load ptr, ptr %23, align 8, !tbaa !5
  %382 = getelementptr inbounds %struct.vkrinfo_t, ptr %381, i32 0, i32 1
  %383 = load i32, ptr %382, align 4, !tbaa !45
  %384 = icmp sgt i32 %383, 0
  br i1 %384, label %385, label %400

385:                                              ; preds = %380
  %386 = load ptr, ptr %23, align 8, !tbaa !5
  %387 = getelementptr inbounds %struct.vkrinfo_t, ptr %386, i32 0, i32 0
  %388 = load i32, ptr %387, align 4, !tbaa !46
  %389 = icmp eq i32 %388, 0
  br i1 %389, label %390, label %400

390:                                              ; preds = %385
  %391 = load ptr, ptr %16, align 8, !tbaa !5
  %392 = load i32, ptr %5, align 4, !tbaa !15
  %393 = sext i32 %392 to i64
  %394 = getelementptr inbounds i32, ptr %391, i64 %393
  %395 = load i32, ptr %394, align 4, !tbaa !15
  %396 = load ptr, ptr %23, align 8, !tbaa !5
  %397 = getelementptr inbounds %struct.vkrinfo_t, ptr %396, i32 0, i32 2
  %398 = load i32, ptr %397, align 4, !tbaa !28
  %399 = add nsw i32 %398, %395
  store i32 %399, ptr %397, align 4, !tbaa !28
  br label %400

400:                                              ; preds = %390, %385, %380
  br label %401

401:                                              ; preds = %400, %72
  %402 = load ptr, ptr %23, align 8, !tbaa !5
  %403 = getelementptr inbounds %struct.vkrinfo_t, ptr %402, i32 0, i32 2
  %404 = load i32, ptr %403, align 4, !tbaa !28
  %405 = icmp sge i32 %404, 0
  br i1 %405, label %406, label %443

406:                                              ; preds = %401
  br label %407

407:                                              ; preds = %406
  %408 = load ptr, ptr %21, align 8, !tbaa !5
  %409 = load i32, ptr %5, align 4, !tbaa !15
  %410 = sext i32 %409 to i64
  %411 = getelementptr inbounds i32, ptr %408, i64 %410
  %412 = load i32, ptr %411, align 4, !tbaa !15
  %413 = icmp eq i32 %412, -1
  br i1 %413, label %425, label %414

414:                                              ; preds = %407
  %415 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, i32 noundef 655, ptr noundef @.str.1)
  %416 = load ptr, ptr %21, align 8, !tbaa !5
  %417 = load i32, ptr %5, align 4, !tbaa !15
  %418 = sext i32 %417 to i64
  %419 = getelementptr inbounds i32, ptr %416, i64 %418
  %420 = load i32, ptr %419, align 4, !tbaa !15
  %421 = icmp eq i32 %420, -1
  br i1 %421, label %422, label %423

422:                                              ; preds = %414
  br label %424

423:                                              ; preds = %414
  call void @__assert_fail(ptr noundef @.str.17, ptr noundef @.str.1, i32 noundef 655, ptr noundef @__PRETTY_FUNCTION__.libmetis__ComputeKWayVolGains) #5
  unreachable

424:                                              ; preds = %422
  br label %425

425:                                              ; preds = %424, %407
  %426 = load i32, ptr %5, align 4, !tbaa !15
  %427 = load ptr, ptr %20, align 8, !tbaa !5
  %428 = load ptr, ptr %4, align 8, !tbaa !5
  %429 = getelementptr inbounds %struct.graph_t, ptr %428, i32 0, i32 21
  %430 = load i32, ptr %429, align 8, !tbaa !25
  %431 = sext i32 %430 to i64
  %432 = getelementptr inbounds i32, ptr %427, i64 %431
  store i32 %426, ptr %432, align 4, !tbaa !15
  %433 = load ptr, ptr %4, align 8, !tbaa !5
  %434 = getelementptr inbounds %struct.graph_t, ptr %433, i32 0, i32 21
  %435 = load i32, ptr %434, align 8, !tbaa !25
  %436 = add nsw i32 %435, 1
  store i32 %436, ptr %434, align 8, !tbaa !25
  %437 = load ptr, ptr %21, align 8, !tbaa !5
  %438 = load i32, ptr %5, align 4, !tbaa !15
  %439 = sext i32 %438 to i64
  %440 = getelementptr inbounds i32, ptr %437, i64 %439
  store i32 %435, ptr %440, align 4, !tbaa !15
  br label %441

441:                                              ; preds = %425
  br label %442

442:                                              ; preds = %441
  br label %443

443:                                              ; preds = %442, %401
  br label %444

444:                                              ; preds = %443
  %445 = load i32, ptr %5, align 4, !tbaa !15
  %446 = add nsw i32 %445, 1
  store i32 %446, ptr %5, align 4, !tbaa !15
  br label %68, !llvm.loop !47

447:                                              ; preds = %68
  %448 = load ptr, ptr %3, align 8, !tbaa !5
  call void @libmetis__wspacepop(ptr noundef %448)
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  ret void
}

declare void @libmetis__wspacepush(ptr noundef) #1

declare ptr @libmetis__iwspacemalloc(ptr noundef, i32 noundef) #1

declare void @libmetis__wspacepop(ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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, !11, i64 92}
!10 = !{!"ctrl_t", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !6, i64 80, !11, i64 88, !11, i64 92, !12, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !12, i64 128, !13, i64 136, !13, i64 144, !13, i64 152, !13, i64 160, !13, i64 168, !13, i64 176, !13, i64 184, !13, i64 192, !13, i64 200, !13, i64 208, !13, i64 216, !13, i64 224, !6, i64 232, !14, i64 240, !14, i64 248, !14, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !6, i64 320}
!11 = !{!"int", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!11, !11, i64 0}
!16 = !{!17, !11, i64 0}
!17 = !{!"graph_t", !11, i64 0, !11, i64 4, !11, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !11, i64 72, !11, i64 76, !11, i64 80, !11, i64 84, !11, i64 88, !6, i64 96, !6, i64 104, !11, i64 112, !11, i64 116, !6, i64 120, !6, i64 128, !11, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208}
!18 = !{!17, !6, i64 16}
!19 = !{!17, !6, i64 32}
!20 = !{!17, !6, i64 40}
!21 = !{!17, !6, i64 48}
!22 = !{!17, !6, i64 120}
!23 = !{!17, !6, i64 152}
!24 = !{!17, !6, i64 144}
!25 = !{!17, !11, i64 136}
!26 = !{!17, !11, i64 116}
!27 = !{!17, !6, i64 184}
!28 = !{!29, !11, i64 8}
!29 = !{!"vkrinfo_t", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16}
!30 = !{!29, !11, i64 12}
!31 = !{!10, !6, i64 272}
!32 = !{!29, !11, i64 16}
!33 = !{!34, !11, i64 0}
!34 = !{!"vnbr_t", !11, i64 0, !11, i64 4, !11, i64 8}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = !{!34, !11, i64 8}
!38 = distinct !{!38, !36}
!39 = !{!34, !11, i64 4}
!40 = distinct !{!40, !36}
!41 = distinct !{!41, !36}
!42 = distinct !{!42, !36}
!43 = distinct !{!43, !36}
!44 = distinct !{!44, !36}
!45 = !{!29, !11, i64 4}
!46 = !{!29, !11, i64 0}
!47 = distinct !{!47, !36}


; 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.vkrinfo_t = type { i32, i32, i32, i32, i32 }
%struct.vnbr_t = type { i32, i32, i32 }

@.str.1 = external hidden unnamed_addr constant [143 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [19 x i8], align 1
@__PRETTY_FUNCTION__.libmetis__ComputeKWayVolGains = external hidden unnamed_addr constant [56 x i8], align 1

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #0

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

declare ptr @libmetis__iset(i64 noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__ComputeKWayVolGains(ptr noundef %0, ptr nocapture noundef %1) local_unnamed_addr #3 {
  tail call void @libmetis__wspacepush(ptr noundef %0) #4
  %3 = getelementptr inbounds i8, ptr %0, i64 92
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %5 = load i32, ptr %1, align 8, !tbaa !14
  %6 = getelementptr inbounds i8, ptr %1, i64 16
  %7 = load ptr, ptr %6, align 8, !tbaa !16
  %8 = getelementptr inbounds i8, ptr %1, i64 32
  %9 = load ptr, ptr %8, align 8, !tbaa !17
  %10 = getelementptr inbounds i8, ptr %1, i64 40
  %11 = load ptr, ptr %10, align 8, !tbaa !18
  %12 = getelementptr inbounds i8, ptr %1, i64 120
  %13 = load ptr, ptr %12, align 8, !tbaa !19
  %14 = getelementptr inbounds i8, ptr %1, i64 152
  %15 = load ptr, ptr %14, align 8, !tbaa !20
  %16 = sext i32 %5 to i64
  %17 = getelementptr inbounds i8, ptr %1, i64 144
  %18 = load ptr, ptr %17, align 8, !tbaa !21
  %19 = tail call ptr @libmetis__iset(i64 noundef %16, i32 noundef -1, ptr noundef %18) #4
  %20 = sext i32 %4 to i64
  %21 = tail call ptr @libmetis__iwspacemalloc(ptr noundef %0, i32 noundef %4) #4
  %22 = tail call ptr @libmetis__iset(i64 noundef %20, i32 noundef -1, ptr noundef %21) #4
  %23 = getelementptr inbounds i8, ptr %1, i64 136
  store i32 0, ptr %23, align 8, !tbaa !22
  %24 = getelementptr inbounds i8, ptr %1, i64 116
  store i32 0, ptr %24, align 4, !tbaa !23
  %25 = icmp sgt i32 %5, 0
  br i1 %25, label %.lr.ph157, label %._crit_edge158

.lr.ph157:                                        ; preds = %2
  %26 = getelementptr inbounds i8, ptr %1, i64 184
  %27 = getelementptr inbounds i8, ptr %0, i64 272
  %wide.trip.count189 = zext nneg i32 %5 to i64
  br label %28

28:                                               ; preds = %.lr.ph157, %.thread
  %indvars.iv186 = phi i64 [ 0, %.lr.ph157 ], [ %indvars.iv.next187, %.thread ]
  %29 = load ptr, ptr %26, align 8, !tbaa !24
  %30 = getelementptr inbounds %struct.vkrinfo_t, ptr %29, i64 %indvars.iv186
  %31 = getelementptr inbounds i8, ptr %30, i64 8
  store i32 -2147483648, ptr %31, align 4, !tbaa !25
  %32 = getelementptr inbounds i8, ptr %30, i64 12
  %33 = load i32, ptr %32, align 4, !tbaa !27
  %34 = icmp sgt i32 %33, 0
  br i1 %34, label %35, label %.thread

35:                                               ; preds = %28
  %36 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv186
  %37 = load i32, ptr %36, align 4, !tbaa !28
  %38 = load ptr, ptr %27, align 8, !tbaa !29
  %39 = getelementptr inbounds i8, ptr %30, i64 16
  %40 = load i32, ptr %39, align 4, !tbaa !30
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds %struct.vnbr_t, ptr %38, i64 %41
  %43 = getelementptr inbounds i32, ptr %9, i64 %indvars.iv186
  %44 = load i32, ptr %43, align 4, !tbaa !28
  %45 = mul nsw i32 %44, %33
  %46 = load i32, ptr %24, align 4, !tbaa !23
  %47 = add nsw i32 %46, %45
  store i32 %47, ptr %24, align 4, !tbaa !23
  %48 = getelementptr inbounds i32, ptr %7, i64 %indvars.iv186
  %49 = load i32, ptr %48, align 4, !tbaa !28
  %50 = getelementptr inbounds i8, ptr %48, i64 4
  %51 = load i32, ptr %50, align 4, !tbaa !28
  %52 = icmp slt i32 %49, %51
  br i1 %52, label %.lr.ph151, label %.lr.ph153

.lr.ph151:                                        ; preds = %35
  %53 = sext i32 %37 to i64
  %54 = getelementptr inbounds i32, ptr %22, i64 %53
  %55 = sext i32 %49 to i64
  br label %59

.preheader137:                                    ; preds = %._crit_edge148
  %.pre = load i32, ptr %32, align 4, !tbaa !27
  %56 = icmp sgt i32 %.pre, 0
  br i1 %56, label %.lr.ph153, label %._crit_edge154

.lr.ph153:                                        ; preds = %35, %.preheader137
  %57 = phi i32 [ %.pre, %.preheader137 ], [ %33, %35 ]
  %.promoted = load i32, ptr %31, align 4, !tbaa !25
  %wide.trip.count184 = zext nneg i32 %57 to i64
  %xtraiter210 = and i64 %wide.trip.count184, 1
  %58 = icmp eq i32 %57, 1
  br i1 %58, label %._crit_edge154.loopexit.unr-lcssa, label %.lr.ph153.new

.lr.ph153.new:                                    ; preds = %.lr.ph153
  %unroll_iter212 = and i64 %wide.trip.count184, 2147483646
  br label %225

59:                                               ; preds = %.lr.ph151, %._crit_edge148
  %indvars.iv178 = phi i64 [ %55, %.lr.ph151 ], [ %indvars.iv.next179, %._crit_edge148 ]
  %60 = getelementptr inbounds i32, ptr %11, i64 %indvars.iv178
  %61 = load i32, ptr %60, align 4, !tbaa !28
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds i32, ptr %13, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !28
  %65 = load ptr, ptr %26, align 8, !tbaa !24
  %66 = getelementptr inbounds %struct.vkrinfo_t, ptr %65, i64 %62
  %67 = load ptr, ptr %27, align 8, !tbaa !29
  %68 = getelementptr inbounds i8, ptr %66, i64 16
  %69 = load i32, ptr %68, align 4, !tbaa !30
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds %struct.vnbr_t, ptr %67, i64 %70
  %72 = getelementptr inbounds i8, ptr %66, i64 12
  %73 = load i32, ptr %72, align 4, !tbaa !27
  %74 = icmp sgt i32 %73, 0
  br i1 %74, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %59, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %59 ]
  %75 = getelementptr inbounds %struct.vnbr_t, ptr %71, i64 %indvars.iv
  %76 = load i32, ptr %75, align 4, !tbaa !31
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds i32, ptr %22, i64 %77
  %79 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %79, ptr %78, align 4, !tbaa !28
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %80 = load i32, ptr %72, align 4, !tbaa !27
  %81 = sext i32 %80 to i64
  %82 = icmp slt i64 %indvars.iv.next, %81
  br i1 %82, label %.lr.ph, label %._crit_edge, !llvm.loop !33

._crit_edge:                                      ; preds = %.lr.ph, %59
  %83 = sext i32 %64 to i64
  %84 = getelementptr inbounds i32, ptr %22, i64 %83
  store i32 1, ptr %84, align 4, !tbaa !28
  %85 = icmp eq i32 %37, %64
  br i1 %85, label %.preheader, label %115

.preheader:                                       ; preds = %._crit_edge
  %86 = load i32, ptr %32, align 4, !tbaa !27
  %87 = icmp sgt i32 %86, 0
  br i1 %87, label %.lr.ph144, label %.loopexit

.lr.ph144:                                        ; preds = %.preheader
  %88 = getelementptr inbounds i32, ptr %9, i64 %62
  %wide.trip.count173 = zext nneg i32 %86 to i64
  %xtraiter205 = and i64 %wide.trip.count173, 1
  %89 = icmp eq i32 %86, 1
  br i1 %89, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph144.new

.lr.ph144.new:                                    ; preds = %.lr.ph144
  %unroll_iter207 = and i64 %wide.trip.count173, 2147483646
  br label %90

90:                                               ; preds = %114, %.lr.ph144.new
  %indvars.iv170 = phi i64 [ 0, %.lr.ph144.new ], [ %indvars.iv.next171.1, %114 ]
  %niter208 = phi i64 [ 0, %.lr.ph144.new ], [ %niter208.next.1, %114 ]
  %91 = getelementptr inbounds %struct.vnbr_t, ptr %42, i64 %indvars.iv170
  %92 = load i32, ptr %91, align 4, !tbaa !31
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds i32, ptr %22, i64 %93
  %95 = load i32, ptr %94, align 4, !tbaa !28
  %96 = icmp eq i32 %95, -1
  br i1 %96, label %97, label %102

97:                                               ; preds = %90
  %98 = load i32, ptr %88, align 4, !tbaa !28
  %99 = getelementptr inbounds i8, ptr %91, i64 8
  %100 = load i32, ptr %99, align 4, !tbaa !35
  %101 = sub nsw i32 %100, %98
  store i32 %101, ptr %99, align 4, !tbaa !35
  br label %102

102:                                              ; preds = %90, %97
  %indvars.iv.next171 = or disjoint i64 %indvars.iv170, 1
  %103 = getelementptr inbounds %struct.vnbr_t, ptr %42, i64 %indvars.iv.next171
  %104 = load i32, ptr %103, align 4, !tbaa !31
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds i32, ptr %22, i64 %105
  %107 = load i32, ptr %106, align 4, !tbaa !28
  %108 = icmp eq i32 %107, -1
  br i1 %108, label %109, label %114

109:                                              ; preds = %102
  %110 = load i32, ptr %88, align 4, !tbaa !28
  %111 = getelementptr inbounds i8, ptr %103, i64 8
  %112 = load i32, ptr %111, align 4, !tbaa !35
  %113 = sub nsw i32 %112, %110
  store i32 %113, ptr %111, align 4, !tbaa !35
  br label %114

114:                                              ; preds = %109, %102
  %indvars.iv.next171.1 = add nuw nsw i64 %indvars.iv170, 2
  %niter208.next.1 = add i64 %niter208, 2
  %niter208.ncmp.1 = icmp eq i64 %niter208.next.1, %unroll_iter207
  br i1 %niter208.ncmp.1, label %.loopexit.loopexit.unr-lcssa, label %90, !llvm.loop !36

115:                                              ; preds = %._crit_edge
  %116 = load i32, ptr %54, align 4, !tbaa !28
  %.not = icmp eq i32 %116, -1
  br i1 %.not, label %117, label %121

117:                                              ; preds = %115
  %118 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.26, i32 noundef 617, ptr noundef nonnull @.str.1)
  %119 = load i32, ptr %54, align 4, !tbaa !28
  %.not131 = icmp eq i32 %119, -1
  br i1 %.not131, label %120, label %121

120:                                              ; preds = %117
  tail call void @__assert_fail(ptr noundef nonnull @.str.27, ptr noundef nonnull @.str.1, i32 noundef 617, ptr noundef nonnull @__PRETTY_FUNCTION__.libmetis__ComputeKWayVolGains) #5
  unreachable

121:                                              ; preds = %117, %115
  %122 = phi i32 [ %119, %117 ], [ %116, %115 ]
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds %struct.vnbr_t, ptr %71, i64 %123, i32 1
  %125 = load i32, ptr %124, align 4, !tbaa !37
  %126 = icmp eq i32 %125, 1
  %127 = load i32, ptr %32, align 4, !tbaa !27
  %128 = icmp sgt i32 %127, 0
  br i1 %126, label %.preheader133, label %.preheader135

.preheader135:                                    ; preds = %121
  br i1 %128, label %.lr.ph140, label %.loopexit

.lr.ph140:                                        ; preds = %.preheader135
  %129 = getelementptr inbounds i32, ptr %9, i64 %62
  %wide.trip.count = zext nneg i32 %127 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %130 = icmp eq i32 %127, 1
  br i1 %130, label %.loopexit.loopexit198.unr-lcssa, label %.lr.ph140.new

.lr.ph140.new:                                    ; preds = %.lr.ph140
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %156

.preheader133:                                    ; preds = %121
  br i1 %128, label %.lr.ph142, label %.loopexit

.lr.ph142:                                        ; preds = %.preheader133
  %131 = getelementptr inbounds i32, ptr %9, i64 %62
  %wide.trip.count168 = zext nneg i32 %127 to i64
  %xtraiter200 = and i64 %wide.trip.count168, 1
  %132 = icmp eq i32 %127, 1
  br i1 %132, label %.loopexit.loopexit197.unr-lcssa, label %.lr.ph142.new

.lr.ph142.new:                                    ; preds = %.lr.ph142
  %unroll_iter202 = and i64 %wide.trip.count168, 2147483646
  br label %133

133:                                              ; preds = %155, %.lr.ph142.new
  %indvars.iv165 = phi i64 [ 0, %.lr.ph142.new ], [ %indvars.iv.next166.1, %155 ]
  %niter203 = phi i64 [ 0, %.lr.ph142.new ], [ %niter203.next.1, %155 ]
  %134 = getelementptr inbounds %struct.vnbr_t, ptr %42, i64 %indvars.iv165
  %135 = load i32, ptr %134, align 4, !tbaa !31
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds i32, ptr %22, i64 %136
  %138 = load i32, ptr %137, align 4, !tbaa !28
  %.not132 = icmp eq i32 %138, -1
  br i1 %.not132, label %144, label %139

139:                                              ; preds = %133
  %140 = load i32, ptr %131, align 4, !tbaa !28
  %141 = getelementptr inbounds i8, ptr %134, i64 8
  %142 = load i32, ptr %141, align 4, !tbaa !35
  %143 = add nsw i32 %142, %140
  store i32 %143, ptr %141, align 4, !tbaa !35
  br label %144

144:                                              ; preds = %133, %139
  %indvars.iv.next166 = or disjoint i64 %indvars.iv165, 1
  %145 = getelementptr inbounds %struct.vnbr_t, ptr %42, i64 %indvars.iv.next166
  %146 = load i32, ptr %145, align 4, !tbaa !31
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds i32, ptr %22, i64 %147
  %149 = load i32, ptr %148, align 4, !tbaa !28
  %.not132.1 = icmp eq i32 %149, -1
  br i1 %.not132.1, label %155, label %150

150:                                              ; preds = %144
  %151 = load i32, ptr %131, align 4, !tbaa !28
  %152 = getelementptr inbounds i8, ptr %145, i64 8
  %153 = load i32, ptr %152, align 4, !tbaa !35
  %154 = add nsw i32 %153, %151
  store i32 %154, ptr %152, align 4, !tbaa !35
  br label %155

155:                                              ; preds = %150, %144
  %indvars.iv.next166.1 = add nuw nsw i64 %indvars.iv165, 2
  %niter203.next.1 = add i64 %niter203, 2
  %niter203.ncmp.1 = icmp eq i64 %niter203.next.1, %unroll_iter202
  br i1 %niter203.ncmp.1, label %.loopexit.loopexit197.unr-lcssa, label %133, !llvm.loop !38

156:                                              ; preds = %180, %.lr.ph140.new
  %indvars.iv162 = phi i64 [ 0, %.lr.ph140.new ], [ %indvars.iv.next163.1, %180 ]
  %niter = phi i64 [ 0, %.lr.ph140.new ], [ %niter.next.1, %180 ]
  %157 = getelementptr inbounds %struct.vnbr_t, ptr %42, i64 %indvars.iv162
  %158 = load i32, ptr %157, align 4, !tbaa !31
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds i32, ptr %22, i64 %159
  %161 = load i32, ptr %160, align 4, !tbaa !28
  %162 = icmp eq i32 %161, -1
  br i1 %162, label %163, label %168

163:                                              ; preds = %156
  %164 = load i32, ptr %129, align 4, !tbaa !28
  %165 = getelementptr inbounds i8, ptr %157, i64 8
  %166 = load i32, ptr %165, align 4, !tbaa !35
  %167 = sub nsw i32 %166, %164
  store i32 %167, ptr %165, align 4, !tbaa !35
  br label %168

168:                                              ; preds = %156, %163
  %indvars.iv.next163 = or disjoint i64 %indvars.iv162, 1
  %169 = getelementptr inbounds %struct.vnbr_t, ptr %42, i64 %indvars.iv.next163
  %170 = load i32, ptr %169, align 4, !tbaa !31
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds i32, ptr %22, i64 %171
  %173 = load i32, ptr %172, align 4, !tbaa !28
  %174 = icmp eq i32 %173, -1
  br i1 %174, label %175, label %180

175:                                              ; preds = %168
  %176 = load i32, ptr %129, align 4, !tbaa !28
  %177 = getelementptr inbounds i8, ptr %169, i64 8
  %178 = load i32, ptr %177, align 4, !tbaa !35
  %179 = sub nsw i32 %178, %176
  store i32 %179, ptr %177, align 4, !tbaa !35
  br label %180

180:                                              ; preds = %175, %168
  %indvars.iv.next163.1 = add nuw nsw i64 %indvars.iv162, 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 %.loopexit.loopexit198.unr-lcssa, label %156, !llvm.loop !39

.loopexit.loopexit.unr-lcssa:                     ; preds = %114, %.lr.ph144
  %indvars.iv170.unr = phi i64 [ 0, %.lr.ph144 ], [ %indvars.iv.next171.1, %114 ]
  %lcmp.mod206.not = icmp eq i64 %xtraiter205, 0
  br i1 %lcmp.mod206.not, label %.loopexit, label %.epil.preheader204

.epil.preheader204:                               ; preds = %.loopexit.loopexit.unr-lcssa
  %181 = getelementptr inbounds %struct.vnbr_t, ptr %42, i64 %indvars.iv170.unr
  %182 = load i32, ptr %181, align 4, !tbaa !31
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds i32, ptr %22, i64 %183
  %185 = load i32, ptr %184, align 4, !tbaa !28
  %186 = icmp eq i32 %185, -1
  br i1 %186, label %187, label %.loopexit

187:                                              ; preds = %.epil.preheader204
  %188 = load i32, ptr %88, align 4, !tbaa !28
  %189 = getelementptr inbounds i8, ptr %181, i64 8
  %190 = load i32, ptr %189, align 4, !tbaa !35
  %191 = sub nsw i32 %190, %188
  store i32 %191, ptr %189, align 4, !tbaa !35
  br label %.loopexit

.loopexit.loopexit197.unr-lcssa:                  ; preds = %155, %.lr.ph142
  %indvars.iv165.unr = phi i64 [ 0, %.lr.ph142 ], [ %indvars.iv.next166.1, %155 ]
  %lcmp.mod201.not = icmp eq i64 %xtraiter200, 0
  br i1 %lcmp.mod201.not, label %.loopexit, label %.epil.preheader199

.epil.preheader199:                               ; preds = %.loopexit.loopexit197.unr-lcssa
  %192 = getelementptr inbounds %struct.vnbr_t, ptr %42, i64 %indvars.iv165.unr
  %193 = load i32, ptr %192, align 4, !tbaa !31
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds i32, ptr %22, i64 %194
  %196 = load i32, ptr %195, align 4, !tbaa !28
  %.not132.epil = icmp eq i32 %196, -1
  br i1 %.not132.epil, label %.loopexit, label %197

197:                                              ; preds = %.epil.preheader199
  %198 = load i32, ptr %131, align 4, !tbaa !28
  %199 = getelementptr inbounds i8, ptr %192, i64 8
  %200 = load i32, ptr %199, align 4, !tbaa !35
  %201 = add nsw i32 %200, %198
  store i32 %201, ptr %199, align 4, !tbaa !35
  br label %.loopexit

.loopexit.loopexit198.unr-lcssa:                  ; preds = %180, %.lr.ph140
  %indvars.iv162.unr = phi i64 [ 0, %.lr.ph140 ], [ %indvars.iv.next163.1, %180 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit, label %.epil.preheader

.epil.preheader:                                  ; preds = %.loopexit.loopexit198.unr-lcssa
  %202 = getelementptr inbounds %struct.vnbr_t, ptr %42, i64 %indvars.iv162.unr
  %203 = load i32, ptr %202, align 4, !tbaa !31
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds i32, ptr %22, i64 %204
  %206 = load i32, ptr %205, align 4, !tbaa !28
  %207 = icmp eq i32 %206, -1
  br i1 %207, label %208, label %.loopexit

208:                                              ; preds = %.epil.preheader
  %209 = load i32, ptr %129, align 4, !tbaa !28
  %210 = getelementptr inbounds i8, ptr %202, i64 8
  %211 = load i32, ptr %210, align 4, !tbaa !35
  %212 = sub nsw i32 %211, %209
  store i32 %212, ptr %210, align 4, !tbaa !35
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit198.unr-lcssa, %208, %.epil.preheader, %.loopexit.loopexit197.unr-lcssa, %197, %.epil.preheader199, %.loopexit.loopexit.unr-lcssa, %187, %.epil.preheader204, %.preheader135, %.preheader133, %.preheader
  %213 = load i32, ptr %72, align 4, !tbaa !27
  %214 = icmp sgt i32 %213, 0
  br i1 %214, label %.lr.ph147, label %._crit_edge148

.lr.ph147:                                        ; preds = %.loopexit, %.lr.ph147
  %indvars.iv175 = phi i64 [ %indvars.iv.next176, %.lr.ph147 ], [ 0, %.loopexit ]
  %215 = getelementptr inbounds %struct.vnbr_t, ptr %71, i64 %indvars.iv175
  %216 = load i32, ptr %215, align 4, !tbaa !31
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds i32, ptr %22, i64 %217
  store i32 -1, ptr %218, align 4, !tbaa !28
  %indvars.iv.next176 = add nuw nsw i64 %indvars.iv175, 1
  %219 = load i32, ptr %72, align 4, !tbaa !27
  %220 = sext i32 %219 to i64
  %221 = icmp slt i64 %indvars.iv.next176, %220
  br i1 %221, label %.lr.ph147, label %._crit_edge148, !llvm.loop !40

._crit_edge148:                                   ; preds = %.lr.ph147, %.loopexit
  store i32 -1, ptr %84, align 4, !tbaa !28
  %indvars.iv.next179 = add nsw i64 %indvars.iv178, 1
  %222 = load i32, ptr %50, align 4, !tbaa !28
  %223 = sext i32 %222 to i64
  %224 = icmp slt i64 %indvars.iv.next179, %223
  br i1 %224, label %59, label %.preheader137, !llvm.loop !41

225:                                              ; preds = %237, %.lr.ph153.new
  %indvars.iv181 = phi i64 [ 0, %.lr.ph153.new ], [ %indvars.iv.next182.1, %237 ]
  %226 = phi i32 [ %.promoted, %.lr.ph153.new ], [ %238, %237 ]
  %niter213 = phi i64 [ 0, %.lr.ph153.new ], [ %niter213.next.1, %237 ]
  %227 = getelementptr inbounds %struct.vnbr_t, ptr %42, i64 %indvars.iv181, i32 2
  %228 = load i32, ptr %227, align 4, !tbaa !35
  %229 = icmp sgt i32 %228, %226
  br i1 %229, label %230, label %231

230:                                              ; preds = %225
  store i32 %228, ptr %31, align 4, !tbaa !25
  br label %231

231:                                              ; preds = %225, %230
  %232 = phi i32 [ %226, %225 ], [ %228, %230 ]
  %indvars.iv.next182 = or disjoint i64 %indvars.iv181, 1
  %233 = getelementptr inbounds %struct.vnbr_t, ptr %42, i64 %indvars.iv.next182, i32 2
  %234 = load i32, ptr %233, align 4, !tbaa !35
  %235 = icmp sgt i32 %234, %232
  br i1 %235, label %236, label %237

236:                                              ; preds = %231
  store i32 %234, ptr %31, align 4, !tbaa !25
  br label %237

237:                                              ; preds = %236, %231
  %238 = phi i32 [ %232, %231 ], [ %234, %236 ]
  %indvars.iv.next182.1 = add nuw nsw i64 %indvars.iv181, 2
  %niter213.next.1 = add i64 %niter213, 2
  %niter213.ncmp.1 = icmp eq i64 %niter213.next.1, %unroll_iter212
  br i1 %niter213.ncmp.1, label %._crit_edge154.loopexit.unr-lcssa, label %225, !llvm.loop !42

._crit_edge154.loopexit.unr-lcssa:                ; preds = %237, %.lr.ph153
  %indvars.iv181.unr = phi i64 [ 0, %.lr.ph153 ], [ %indvars.iv.next182.1, %237 ]
  %.unr = phi i32 [ %.promoted, %.lr.ph153 ], [ %238, %237 ]
  %lcmp.mod211.not = icmp eq i64 %xtraiter210, 0
  br i1 %lcmp.mod211.not, label %._crit_edge154, label %.epil.preheader209

.epil.preheader209:                               ; preds = %._crit_edge154.loopexit.unr-lcssa
  %239 = getelementptr inbounds %struct.vnbr_t, ptr %42, i64 %indvars.iv181.unr, i32 2
  %240 = load i32, ptr %239, align 4, !tbaa !35
  %241 = icmp sgt i32 %240, %.unr
  br i1 %241, label %242, label %._crit_edge154

242:                                              ; preds = %.epil.preheader209
  store i32 %240, ptr %31, align 4, !tbaa !25
  br label %._crit_edge154

._crit_edge154:                                   ; preds = %._crit_edge154.loopexit.unr-lcssa, %242, %.epil.preheader209, %.preheader137
  %243 = getelementptr inbounds i8, ptr %30, i64 4
  %244 = load i32, ptr %243, align 4, !tbaa !43
  %245 = icmp sgt i32 %244, 0
  br i1 %245, label %246, label %._crit_edge154.thread-pre-split_crit_edge

._crit_edge154.thread-pre-split_crit_edge:        ; preds = %._crit_edge154
  %.pr.pre = load i32, ptr %31, align 4, !tbaa !25
  br label %thread-pre-split

246:                                              ; preds = %._crit_edge154
  %247 = load i32, ptr %30, align 4, !tbaa !44
  %248 = icmp eq i32 %247, 0
  %.pr.pre191 = load i32, ptr %31, align 4, !tbaa !25
  br i1 %248, label %249, label %thread-pre-split

249:                                              ; preds = %246
  %250 = load i32, ptr %43, align 4, !tbaa !28
  %251 = add nsw i32 %.pr.pre191, %250
  store i32 %251, ptr %31, align 4, !tbaa !25
  br label %thread-pre-split

thread-pre-split:                                 ; preds = %246, %._crit_edge154.thread-pre-split_crit_edge, %249
  %252 = phi i32 [ %251, %249 ], [ %.pr.pre, %._crit_edge154.thread-pre-split_crit_edge ], [ %.pr.pre191, %246 ]
  %253 = icmp sgt i32 %252, -1
  br i1 %253, label %254, label %.thread

254:                                              ; preds = %thread-pre-split
  %255 = getelementptr inbounds i32, ptr %19, i64 %indvars.iv186
  %256 = load i32, ptr %255, align 4, !tbaa !28
  %257 = icmp eq i32 %256, -1
  br i1 %257, label %263, label %258

258:                                              ; preds = %254
  %259 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, i32 noundef 655, ptr noundef nonnull @.str.1)
  %260 = load i32, ptr %255, align 4, !tbaa !28
  %261 = icmp eq i32 %260, -1
  br i1 %261, label %263, label %262

262:                                              ; preds = %258
  tail call void @__assert_fail(ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.1, i32 noundef 655, ptr noundef nonnull @__PRETTY_FUNCTION__.libmetis__ComputeKWayVolGains) #5
  unreachable

263:                                              ; preds = %258, %254
  %264 = load i32, ptr %23, align 8, !tbaa !22
  %265 = sext i32 %264 to i64
  %266 = getelementptr inbounds i32, ptr %15, i64 %265
  %267 = trunc nuw nsw i64 %indvars.iv186 to i32
  store i32 %267, ptr %266, align 4, !tbaa !28
  %268 = load i32, ptr %23, align 8, !tbaa !22
  %269 = add nsw i32 %268, 1
  store i32 %269, ptr %23, align 8, !tbaa !22
  store i32 %268, ptr %255, align 4, !tbaa !28
  br label %.thread

.thread:                                          ; preds = %28, %thread-pre-split, %263
  %indvars.iv.next187 = add nuw nsw i64 %indvars.iv186, 1
  %exitcond190.not = icmp eq i64 %indvars.iv.next187, %wide.trip.count189
  br i1 %exitcond190.not, label %._crit_edge158, label %28, !llvm.loop !45

._crit_edge158:                                   ; preds = %.thread, %2
  tail call void @libmetis__wspacepop(ptr noundef %0) #4
  ret void
}

declare void @libmetis__wspacepush(ptr noundef) local_unnamed_addr #2

declare ptr @libmetis__iwspacemalloc(ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @libmetis__wspacepop(ptr noundef) local_unnamed_addr #2

attributes #0 = { nofree 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 = { 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, !7, i64 92}
!6 = !{!"ctrl_t", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !7, i64 64, !7, i64 68, !7, i64 72, !10, i64 80, !7, i64 88, !7, i64 92, !11, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !11, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !12, i64 176, !12, i64 184, !12, i64 192, !12, i64 200, !12, i64 208, !12, i64 216, !12, i64 224, !10, i64 232, !13, i64 240, !13, i64 248, !13, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !10, 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 = !{!"float", !8, i64 0}
!12 = !{!"double", !8, i64 0}
!13 = !{!"long", !8, i64 0}
!14 = !{!15, !7, i64 0}
!15 = !{!"graph_t", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !7, i64 72, !7, i64 76, !7, i64 80, !7, i64 84, !7, i64 88, !10, i64 96, !10, i64 104, !7, i64 112, !7, i64 116, !10, i64 120, !10, i64 128, !7, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208}
!16 = !{!15, !10, i64 16}
!17 = !{!15, !10, i64 32}
!18 = !{!15, !10, i64 40}
!19 = !{!15, !10, i64 120}
!20 = !{!15, !10, i64 152}
!21 = !{!15, !10, i64 144}
!22 = !{!15, !7, i64 136}
!23 = !{!15, !7, i64 116}
!24 = !{!15, !10, i64 184}
!25 = !{!26, !7, i64 8}
!26 = !{!"vkrinfo_t", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16}
!27 = !{!26, !7, i64 12}
!28 = !{!7, !7, i64 0}
!29 = !{!6, !10, i64 272}
!30 = !{!26, !7, i64 16}
!31 = !{!32, !7, i64 0}
!32 = !{!"vnbr_t", !7, i64 0, !7, i64 4, !7, i64 8}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = !{!32, !7, i64 8}
!36 = distinct !{!36, !34}
!37 = !{!32, !7, i64 4}
!38 = distinct !{!38, !34}
!39 = distinct !{!39, !34}
!40 = distinct !{!40, !34}
!41 = distinct !{!41, !34}
!42 = distinct !{!42, !34}
!43 = !{!26, !7, i64 4}
!44 = !{!26, !7, i64 0}
!45 = distinct !{!45, !34}


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