; 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.ckrinfo_t = type { i32, i32, i32, i32 }
%struct.cnbr_t = type { i32, i32 }
%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.11 = external hidden unnamed_addr constant [23 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.18 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [28 x i8], align 1
@__PRETTY_FUNCTION__.libmetis__ProjectKWayPartition = external hidden unnamed_addr constant [57 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [99 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [65 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: nounwind uwtable
define dso_local void @libmetis__ProjectKWayPartition(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 i32, align 4
  %16 = alloca i32, align 4
  %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
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = 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) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  call void @libmetis__wspacepush(ptr noundef %31)
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.ctrl_t, ptr %32, i32 0, i32 21
  %34 = load i32, ptr %33, align 4, !tbaa !9
  store i32 %34, ptr %10, align 4, !tbaa !15
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.graph_t, ptr %35, i32 0, i32 29
  %37 = load ptr, ptr %36, align 8, !tbaa !16
  store ptr %37, ptr %26, align 8, !tbaa !5
  %38 = load ptr, ptr %26, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.graph_t, ptr %38, i32 0, i32 19
  %40 = load ptr, ptr %39, align 8, !tbaa !18
  store ptr %40, ptr %24, align 8, !tbaa !5
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.graph_t, ptr %41, i32 0, i32 0
  %43 = load i32, ptr %42, align 8, !tbaa !19
  store i32 %43, ptr %8, align 4, !tbaa !15
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.graph_t, ptr %44, i32 0, i32 16
  %46 = load ptr, ptr %45, align 8, !tbaa !20
  store ptr %46, ptr %20, align 8, !tbaa !5
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.graph_t, ptr %47, i32 0, i32 3
  %49 = load ptr, ptr %48, align 8, !tbaa !21
  store ptr %49, ptr %17, align 8, !tbaa !5
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.graph_t, ptr %50, i32 0, i32 6
  %52 = load ptr, ptr %51, align 8, !tbaa !22
  store ptr %52, ptr %18, align 8, !tbaa !5
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.graph_t, ptr %53, i32 0, i32 7
  %55 = load ptr, ptr %54, align 8, !tbaa !23
  store ptr %55, ptr %19, align 8, !tbaa !5
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  call void @libmetis__AllocateKWayPartitionMemory(ptr noundef %56, ptr noundef %57)
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.graph_t, ptr %58, i32 0, i32 19
  %60 = load ptr, ptr %59, align 8, !tbaa !18
  store ptr %60, ptr %21, align 8, !tbaa !5
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.graph_t, ptr %61, i32 0, i32 23
  %63 = load ptr, ptr %62, align 8, !tbaa !24
  store ptr %63, ptr %23, align 8, !tbaa !5
  %64 = load i32, ptr %8, align 4, !tbaa !15
  %65 = sext i32 %64 to i64
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.graph_t, ptr %66, i32 0, i32 22
  %68 = load ptr, ptr %67, align 8, !tbaa !25
  %69 = call ptr @libmetis__iset(i64 noundef %65, i32 noundef -1, ptr noundef %68)
  store ptr %69, ptr %22, align 8, !tbaa !5
  %70 = load i32, ptr %10, align 4, !tbaa !15
  %71 = sext i32 %70 to i64
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = load i32, ptr %10, align 4, !tbaa !15
  %74 = call ptr @libmetis__iwspacemalloc(ptr noundef %72, i32 noundef %73)
  %75 = call ptr @libmetis__iset(i64 noundef %71, i32 noundef -1, ptr noundef %74)
  store ptr %75, ptr %25, align 8, !tbaa !5
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.ctrl_t, ptr %76, i32 0, i32 1
  %78 = load i32, ptr %77, align 4, !tbaa !26
  switch i32 %78, label %668 [
    i32 0, label %79
    i32 1, label %395
  ]

79:                                               ; preds = %2
  %80 = load ptr, ptr %26, align 8, !tbaa !5
  %81 = call i32 @libmetis__CheckBnd2(ptr noundef %80)
  %82 = icmp ne i32 %81, 0
  br i1 %82, label %91, label %83

83:                                               ; preds = %79
  %84 = call i32 (ptr, ...) @printf(ptr noundef @.str.22, i32 noundef 346, ptr noundef @.str.1)
  %85 = load ptr, ptr %26, align 8, !tbaa !5
  %86 = call i32 @libmetis__CheckBnd2(ptr noundef %85)
  %87 = icmp ne i32 %86, 0
  br i1 %87, label %88, label %89

88:                                               ; preds = %83
  br label %90

89:                                               ; preds = %83
  call void @__assert_fail(ptr noundef @.str.23, ptr noundef @.str.1, i32 noundef 346, ptr noundef @__PRETTY_FUNCTION__.libmetis__ProjectKWayPartition) #6
  unreachable

90:                                               ; preds = %88
  br label %91

91:                                               ; preds = %90, %79
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  store i32 0, ptr %5, align 4, !tbaa !15
  br label %92

92:                                               ; preds = %123, %91
  %93 = load i32, ptr %5, align 4, !tbaa !15
  %94 = load i32, ptr %8, align 4, !tbaa !15
  %95 = icmp slt i32 %93, %94
  br i1 %95, label %96, label %126

96:                                               ; preds = %92
  %97 = load ptr, ptr %20, align 8, !tbaa !5
  %98 = load i32, ptr %5, align 4, !tbaa !15
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds i32, ptr %97, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !15
  store i32 %101, ptr %7, align 4, !tbaa !15
  %102 = load ptr, ptr %24, align 8, !tbaa !5
  %103 = load i32, ptr %7, 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 = load ptr, ptr %21, align 8, !tbaa !5
  %108 = load i32, ptr %5, align 4, !tbaa !15
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds i32, ptr %107, i64 %109
  store i32 %106, ptr %110, align 4, !tbaa !15
  %111 = load ptr, ptr %26, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.graph_t, ptr %111, i32 0, i32 26
  %113 = load ptr, ptr %112, align 8, !tbaa !27
  %114 = load i32, ptr %7, align 4, !tbaa !15
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds %struct.ckrinfo_t, ptr %113, i64 %115
  %117 = getelementptr inbounds %struct.ckrinfo_t, ptr %116, i32 0, i32 1
  %118 = load i32, ptr %117, align 4, !tbaa !28
  %119 = load ptr, ptr %20, align 8, !tbaa !5
  %120 = load i32, ptr %5, align 4, !tbaa !15
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds i32, ptr %119, i64 %121
  store i32 %118, ptr %122, align 4, !tbaa !15
  br label %123

123:                                              ; preds = %96
  %124 = load i32, ptr %5, align 4, !tbaa !15
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %5, align 4, !tbaa !15
  br label %92, !llvm.loop !30

126:                                              ; preds = %92
  %127 = load ptr, ptr %4, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.graph_t, ptr %127, i32 0, i32 26
  %129 = load ptr, ptr %128, align 8, !tbaa !27
  %130 = load i32, ptr %8, align 4, !tbaa !15
  %131 = sext i32 %130 to i64
  %132 = mul i64 16, %131
  call void @llvm.memset.p0.i64(ptr align 4 %129, i8 0, i64 %132, i1 false)
  %133 = load ptr, ptr %3, align 8, !tbaa !5
  call void @libmetis__cnbrpoolReset(ptr noundef %133)
  store i32 0, ptr %9, align 4, !tbaa !15
  store i32 0, ptr %5, align 4, !tbaa !15
  br label %134

134:                                              ; preds = %376, %126
  %135 = load i32, ptr %5, align 4, !tbaa !15
  %136 = load i32, ptr %8, align 4, !tbaa !15
  %137 = icmp slt i32 %135, %136
  br i1 %137, label %138, label %379

138:                                              ; preds = %134
  %139 = load ptr, ptr %17, align 8, !tbaa !5
  %140 = load i32, ptr %5, align 4, !tbaa !15
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds i32, ptr %139, i64 %141
  %143 = load i32, ptr %142, align 4, !tbaa !15
  store i32 %143, ptr %13, align 4, !tbaa !15
  %144 = load ptr, ptr %17, align 8, !tbaa !5
  %145 = load i32, ptr %5, align 4, !tbaa !15
  %146 = add nsw i32 %145, 1
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds i32, ptr %144, i64 %147
  %149 = load i32, ptr %148, align 4, !tbaa !15
  store i32 %149, ptr %14, align 4, !tbaa !15
  %150 = load ptr, ptr %4, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.graph_t, ptr %150, i32 0, i32 26
  %152 = load ptr, ptr %151, align 8, !tbaa !27
  %153 = load i32, ptr %5, align 4, !tbaa !15
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds %struct.ckrinfo_t, ptr %152, i64 %154
  store ptr %155, ptr %27, align 8, !tbaa !5
  %156 = load ptr, ptr %20, align 8, !tbaa !5
  %157 = load i32, ptr %5, align 4, !tbaa !15
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds i32, ptr %156, i64 %158
  %160 = load i32, ptr %159, align 4, !tbaa !15
  %161 = icmp eq i32 %160, 0
  br i1 %161, label %162, label %185

162:                                              ; preds = %138
  store i32 0, ptr %15, align 4, !tbaa !15
  %163 = load i32, ptr %13, align 4, !tbaa !15
  store i32 %163, ptr %6, align 4, !tbaa !15
  br label %164

164:                                              ; preds = %176, %162
  %165 = load i32, ptr %6, align 4, !tbaa !15
  %166 = load i32, ptr %14, align 4, !tbaa !15
  %167 = icmp slt i32 %165, %166
  br i1 %167, label %168, label %179

168:                                              ; preds = %164
  %169 = load ptr, ptr %19, align 8, !tbaa !5
  %170 = load i32, ptr %6, align 4, !tbaa !15
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds i32, ptr %169, i64 %171
  %173 = load i32, ptr %172, align 4, !tbaa !15
  %174 = load i32, ptr %15, align 4, !tbaa !15
  %175 = add nsw i32 %174, %173
  store i32 %175, ptr %15, align 4, !tbaa !15
  br label %176

176:                                              ; preds = %168
  %177 = load i32, ptr %6, align 4, !tbaa !15
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %6, align 4, !tbaa !15
  br label %164, !llvm.loop !32

179:                                              ; preds = %164
  %180 = load i32, ptr %15, align 4, !tbaa !15
  %181 = load ptr, ptr %27, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.ckrinfo_t, ptr %181, i32 0, i32 0
  store i32 %180, ptr %182, align 4, !tbaa !33
  %183 = load ptr, ptr %27, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.ckrinfo_t, ptr %183, i32 0, i32 3
  store i32 -1, ptr %184, align 4, !tbaa !34
  br label %375

185:                                              ; preds = %138
  %186 = load ptr, ptr %3, align 8, !tbaa !5
  %187 = load i32, ptr %14, align 4, !tbaa !15
  %188 = load i32, ptr %13, align 4, !tbaa !15
  %189 = sub nsw i32 %187, %188
  %190 = add nsw i32 %189, 1
  %191 = call i32 @libmetis__cnbrpoolGetNext(ptr noundef %186, i32 noundef %190)
  %192 = load ptr, ptr %27, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.ckrinfo_t, ptr %192, i32 0, i32 3
  store i32 %191, ptr %193, align 4, !tbaa !34
  %194 = load ptr, ptr %3, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.ctrl_t, ptr %194, i32 0, i32 43
  %196 = load ptr, ptr %195, align 8, !tbaa !35
  %197 = load ptr, ptr %27, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.ckrinfo_t, ptr %197, i32 0, i32 3
  %199 = load i32, ptr %198, align 4, !tbaa !34
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds %struct.cnbr_t, ptr %196, i64 %200
  store ptr %201, ptr %28, align 8, !tbaa !5
  %202 = load ptr, ptr %21, align 8, !tbaa !5
  %203 = load i32, ptr %5, align 4, !tbaa !15
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds i32, ptr %202, i64 %204
  %206 = load i32, ptr %205, align 4, !tbaa !15
  store i32 %206, ptr %11, align 4, !tbaa !15
  store i32 0, ptr %15, align 4, !tbaa !15
  store i32 0, ptr %16, align 4, !tbaa !15
  %207 = load i32, ptr %13, align 4, !tbaa !15
  store i32 %207, ptr %6, align 4, !tbaa !15
  br label %208

208:                                              ; preds = %291, %185
  %209 = load i32, ptr %6, align 4, !tbaa !15
  %210 = load i32, ptr %14, align 4, !tbaa !15
  %211 = icmp slt i32 %209, %210
  br i1 %211, label %212, label %294

212:                                              ; preds = %208
  %213 = load ptr, ptr %21, align 8, !tbaa !5
  %214 = load ptr, ptr %18, align 8, !tbaa !5
  %215 = load i32, ptr %6, align 4, !tbaa !15
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds i32, ptr %214, i64 %216
  %218 = load i32, ptr %217, align 4, !tbaa !15
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds i32, ptr %213, i64 %219
  %221 = load i32, ptr %220, align 4, !tbaa !15
  store i32 %221, ptr %12, align 4, !tbaa !15
  %222 = load i32, ptr %11, align 4, !tbaa !15
  %223 = load i32, ptr %12, align 4, !tbaa !15
  %224 = icmp eq i32 %222, %223
  br i1 %224, label %225, label %233

225:                                              ; preds = %212
  %226 = load ptr, ptr %19, align 8, !tbaa !5
  %227 = load i32, ptr %6, align 4, !tbaa !15
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds i32, ptr %226, i64 %228
  %230 = load i32, ptr %229, align 4, !tbaa !15
  %231 = load i32, ptr %15, align 4, !tbaa !15
  %232 = add nsw i32 %231, %230
  store i32 %232, ptr %15, align 4, !tbaa !15
  br label %290

233:                                              ; preds = %212
  %234 = load ptr, ptr %19, align 8, !tbaa !5
  %235 = load i32, ptr %6, align 4, !tbaa !15
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds i32, ptr %234, i64 %236
  %238 = load i32, ptr %237, align 4, !tbaa !15
  %239 = load i32, ptr %16, align 4, !tbaa !15
  %240 = add nsw i32 %239, %238
  store i32 %240, ptr %16, align 4, !tbaa !15
  %241 = load ptr, ptr %25, align 8, !tbaa !5
  %242 = load i32, ptr %12, align 4, !tbaa !15
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds i32, ptr %241, i64 %243
  %245 = load i32, ptr %244, align 4, !tbaa !15
  store i32 %245, ptr %7, align 4, !tbaa !15
  %246 = icmp eq i32 %245, -1
  br i1 %246, label %247, label %276

247:                                              ; preds = %233
  %248 = load ptr, ptr %27, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.ckrinfo_t, ptr %248, i32 0, i32 2
  %250 = load i32, ptr %249, align 4, !tbaa !36
  %251 = load ptr, ptr %25, align 8, !tbaa !5
  %252 = load i32, ptr %12, align 4, !tbaa !15
  %253 = sext i32 %252 to i64
  %254 = getelementptr inbounds i32, ptr %251, i64 %253
  store i32 %250, ptr %254, align 4, !tbaa !15
  %255 = load i32, ptr %12, align 4, !tbaa !15
  %256 = load ptr, ptr %28, align 8, !tbaa !5
  %257 = load ptr, ptr %27, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.ckrinfo_t, ptr %257, i32 0, i32 2
  %259 = load i32, ptr %258, align 4, !tbaa !36
  %260 = sext i32 %259 to i64
  %261 = getelementptr inbounds %struct.cnbr_t, ptr %256, i64 %260
  %262 = getelementptr inbounds %struct.cnbr_t, ptr %261, i32 0, i32 0
  store i32 %255, ptr %262, align 4, !tbaa !37
  %263 = load ptr, ptr %19, align 8, !tbaa !5
  %264 = load i32, ptr %6, align 4, !tbaa !15
  %265 = sext i32 %264 to i64
  %266 = getelementptr inbounds i32, ptr %263, i64 %265
  %267 = load i32, ptr %266, align 4, !tbaa !15
  %268 = load ptr, ptr %28, align 8, !tbaa !5
  %269 = load ptr, ptr %27, align 8, !tbaa !5
  %270 = getelementptr inbounds %struct.ckrinfo_t, ptr %269, i32 0, i32 2
  %271 = load i32, ptr %270, align 4, !tbaa !36
  %272 = add nsw i32 %271, 1
  store i32 %272, ptr %270, align 4, !tbaa !36
  %273 = sext i32 %271 to i64
  %274 = getelementptr inbounds %struct.cnbr_t, ptr %268, i64 %273
  %275 = getelementptr inbounds %struct.cnbr_t, ptr %274, i32 0, i32 1
  store i32 %267, ptr %275, align 4, !tbaa !39
  br label %289

276:                                              ; preds = %233
  %277 = load ptr, ptr %19, align 8, !tbaa !5
  %278 = load i32, ptr %6, align 4, !tbaa !15
  %279 = sext i32 %278 to i64
  %280 = getelementptr inbounds i32, ptr %277, i64 %279
  %281 = load i32, ptr %280, align 4, !tbaa !15
  %282 = load ptr, ptr %28, align 8, !tbaa !5
  %283 = load i32, ptr %7, align 4, !tbaa !15
  %284 = sext i32 %283 to i64
  %285 = getelementptr inbounds %struct.cnbr_t, ptr %282, i64 %284
  %286 = getelementptr inbounds %struct.cnbr_t, ptr %285, i32 0, i32 1
  %287 = load i32, ptr %286, align 4, !tbaa !39
  %288 = add nsw i32 %287, %281
  store i32 %288, ptr %286, align 4, !tbaa !39
  br label %289

289:                                              ; preds = %276, %247
  br label %290

290:                                              ; preds = %289, %225
  br label %291

291:                                              ; preds = %290
  %292 = load i32, ptr %6, align 4, !tbaa !15
  %293 = add nsw i32 %292, 1
  store i32 %293, ptr %6, align 4, !tbaa !15
  br label %208, !llvm.loop !40

294:                                              ; preds = %208
  %295 = load i32, ptr %15, align 4, !tbaa !15
  %296 = load ptr, ptr %27, align 8, !tbaa !5
  %297 = getelementptr inbounds %struct.ckrinfo_t, ptr %296, i32 0, i32 0
  store i32 %295, ptr %297, align 4, !tbaa !33
  %298 = load i32, ptr %16, align 4, !tbaa !15
  %299 = load ptr, ptr %27, align 8, !tbaa !5
  %300 = getelementptr inbounds %struct.ckrinfo_t, ptr %299, i32 0, i32 1
  store i32 %298, ptr %300, align 4, !tbaa !28
  %301 = load i32, ptr %16, align 4, !tbaa !15
  %302 = icmp eq i32 %301, 0
  br i1 %302, label %303, label %315

303:                                              ; preds = %294
  %304 = load i32, ptr %14, align 4, !tbaa !15
  %305 = load i32, ptr %13, align 4, !tbaa !15
  %306 = sub nsw i32 %304, %305
  %307 = add nsw i32 %306, 1
  %308 = sext i32 %307 to i64
  %309 = load ptr, ptr %3, align 8, !tbaa !5
  %310 = getelementptr inbounds %struct.ctrl_t, ptr %309, i32 0, i32 41
  %311 = load i64, ptr %310, align 8, !tbaa !41
  %312 = sub i64 %311, %308
  store i64 %312, ptr %310, align 8, !tbaa !41
  %313 = load ptr, ptr %27, align 8, !tbaa !5
  %314 = getelementptr inbounds %struct.ckrinfo_t, ptr %313, i32 0, i32 3
  store i32 -1, ptr %314, align 4, !tbaa !34
  br label %374

315:                                              ; preds = %294
  %316 = load i32, ptr %16, align 4, !tbaa !15
  %317 = load i32, ptr %15, align 4, !tbaa !15
  %318 = sub nsw i32 %316, %317
  %319 = icmp sge i32 %318, 0
  br i1 %319, label %320, label %353

320:                                              ; preds = %315
  br label %321

321:                                              ; preds = %320
  %322 = load ptr, ptr %22, align 8, !tbaa !5
  %323 = load i32, ptr %5, align 4, !tbaa !15
  %324 = sext i32 %323 to i64
  %325 = getelementptr inbounds i32, ptr %322, i64 %324
  %326 = load i32, ptr %325, align 4, !tbaa !15
  %327 = icmp eq i32 %326, -1
  br i1 %327, label %339, label %328

328:                                              ; preds = %321
  %329 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, i32 noundef 406, ptr noundef @.str.1)
  %330 = load ptr, ptr %22, align 8, !tbaa !5
  %331 = load i32, ptr %5, align 4, !tbaa !15
  %332 = sext i32 %331 to i64
  %333 = getelementptr inbounds i32, ptr %330, i64 %332
  %334 = load i32, ptr %333, align 4, !tbaa !15
  %335 = icmp eq i32 %334, -1
  br i1 %335, label %336, label %337

336:                                              ; preds = %328
  br label %338

337:                                              ; preds = %328
  call void @__assert_fail(ptr noundef @.str.17, ptr noundef @.str.1, i32 noundef 406, ptr noundef @__PRETTY_FUNCTION__.libmetis__ProjectKWayPartition) #6
  unreachable

338:                                              ; preds = %336
  br label %339

339:                                              ; preds = %338, %321
  %340 = load i32, ptr %5, align 4, !tbaa !15
  %341 = load ptr, ptr %23, align 8, !tbaa !5
  %342 = load i32, ptr %9, align 4, !tbaa !15
  %343 = sext i32 %342 to i64
  %344 = getelementptr inbounds i32, ptr %341, i64 %343
  store i32 %340, ptr %344, align 4, !tbaa !15
  %345 = load i32, ptr %9, align 4, !tbaa !15
  %346 = add nsw i32 %345, 1
  store i32 %346, ptr %9, align 4, !tbaa !15
  %347 = load ptr, ptr %22, align 8, !tbaa !5
  %348 = load i32, ptr %5, align 4, !tbaa !15
  %349 = sext i32 %348 to i64
  %350 = getelementptr inbounds i32, ptr %347, i64 %349
  store i32 %345, ptr %350, align 4, !tbaa !15
  br label %351

351:                                              ; preds = %339
  br label %352

352:                                              ; preds = %351
  br label %353

353:                                              ; preds = %352, %315
  store i32 0, ptr %6, align 4, !tbaa !15
  br label %354

354:                                              ; preds = %370, %353
  %355 = load i32, ptr %6, align 4, !tbaa !15
  %356 = load ptr, ptr %27, align 8, !tbaa !5
  %357 = getelementptr inbounds %struct.ckrinfo_t, ptr %356, i32 0, i32 2
  %358 = load i32, ptr %357, align 4, !tbaa !36
  %359 = icmp slt i32 %355, %358
  br i1 %359, label %360, label %373

360:                                              ; preds = %354
  %361 = load ptr, ptr %25, align 8, !tbaa !5
  %362 = load ptr, ptr %28, align 8, !tbaa !5
  %363 = load i32, ptr %6, align 4, !tbaa !15
  %364 = sext i32 %363 to i64
  %365 = getelementptr inbounds %struct.cnbr_t, ptr %362, i64 %364
  %366 = getelementptr inbounds %struct.cnbr_t, ptr %365, i32 0, i32 0
  %367 = load i32, ptr %366, align 4, !tbaa !37
  %368 = sext i32 %367 to i64
  %369 = getelementptr inbounds i32, ptr %361, i64 %368
  store i32 -1, ptr %369, align 4, !tbaa !15
  br label %370

370:                                              ; preds = %360
  %371 = load i32, ptr %6, align 4, !tbaa !15
  %372 = add nsw i32 %371, 1
  store i32 %372, ptr %6, align 4, !tbaa !15
  br label %354, !llvm.loop !42

373:                                              ; preds = %354
  br label %374

374:                                              ; preds = %373, %303
  br label %375

375:                                              ; preds = %374, %179
  br label %376

376:                                              ; preds = %375
  %377 = load i32, ptr %5, align 4, !tbaa !15
  %378 = add nsw i32 %377, 1
  store i32 %378, ptr %5, align 4, !tbaa !15
  br label %134, !llvm.loop !43

379:                                              ; preds = %134
  %380 = load i32, ptr %9, align 4, !tbaa !15
  %381 = load ptr, ptr %4, align 8, !tbaa !5
  %382 = getelementptr inbounds %struct.graph_t, ptr %381, i32 0, i32 21
  store i32 %380, ptr %382, align 8, !tbaa !44
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  %383 = load ptr, ptr %4, align 8, !tbaa !5
  %384 = call i32 @libmetis__CheckBnd2(ptr noundef %383)
  %385 = icmp ne i32 %384, 0
  br i1 %385, label %394, label %386

386:                                              ; preds = %379
  %387 = call i32 (ptr, ...) @printf(ptr noundef @.str.18, i32 noundef 417, ptr noundef @.str.1)
  %388 = load ptr, ptr %4, align 8, !tbaa !5
  %389 = call i32 @libmetis__CheckBnd2(ptr noundef %388)
  %390 = icmp ne i32 %389, 0
  br i1 %390, label %391, label %392

391:                                              ; preds = %386
  br label %393

392:                                              ; preds = %386
  call void @__assert_fail(ptr noundef @.str.19, ptr noundef @.str.1, i32 noundef 417, ptr noundef @__PRETTY_FUNCTION__.libmetis__ProjectKWayPartition) #6
  unreachable

393:                                              ; preds = %391
  br label %394

394:                                              ; preds = %393, %379
  br label %672

395:                                              ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  %396 = load ptr, ptr %26, align 8, !tbaa !5
  %397 = getelementptr inbounds %struct.graph_t, ptr %396, i32 0, i32 18
  %398 = load i32, ptr %397, align 4, !tbaa !45
  %399 = load ptr, ptr %26, align 8, !tbaa !5
  %400 = load ptr, ptr %26, align 8, !tbaa !5
  %401 = getelementptr inbounds %struct.graph_t, ptr %400, i32 0, i32 19
  %402 = load ptr, ptr %401, align 8, !tbaa !18
  %403 = call i32 @libmetis__ComputeVolume(ptr noundef %399, ptr noundef %402)
  %404 = icmp eq i32 %398, %403
  br i1 %404, label %419, label %405

405:                                              ; preds = %395
  %406 = call i32 (ptr, ...) @printf(ptr noundef @.str.24, i32 noundef 425, ptr noundef @.str.1)
  %407 = load ptr, ptr %26, align 8, !tbaa !5
  %408 = getelementptr inbounds %struct.graph_t, ptr %407, i32 0, i32 18
  %409 = load i32, ptr %408, align 4, !tbaa !45
  %410 = load ptr, ptr %26, align 8, !tbaa !5
  %411 = load ptr, ptr %26, align 8, !tbaa !5
  %412 = getelementptr inbounds %struct.graph_t, ptr %411, i32 0, i32 19
  %413 = load ptr, ptr %412, align 8, !tbaa !18
  %414 = call i32 @libmetis__ComputeVolume(ptr noundef %410, ptr noundef %413)
  %415 = icmp eq i32 %409, %414
  br i1 %415, label %416, label %417

416:                                              ; preds = %405
  br label %418

417:                                              ; preds = %405
  call void @__assert_fail(ptr noundef @.str.25, ptr noundef @.str.1, i32 noundef 425, ptr noundef @__PRETTY_FUNCTION__.libmetis__ProjectKWayPartition) #6
  unreachable

418:                                              ; preds = %416
  br label %419

419:                                              ; preds = %418, %395
  store i32 0, ptr %5, align 4, !tbaa !15
  br label %420

420:                                              ; preds = %451, %419
  %421 = load i32, ptr %5, align 4, !tbaa !15
  %422 = load i32, ptr %8, align 4, !tbaa !15
  %423 = icmp slt i32 %421, %422
  br i1 %423, label %424, label %454

424:                                              ; preds = %420
  %425 = load ptr, ptr %20, align 8, !tbaa !5
  %426 = load i32, ptr %5, align 4, !tbaa !15
  %427 = sext i32 %426 to i64
  %428 = getelementptr inbounds i32, ptr %425, i64 %427
  %429 = load i32, ptr %428, align 4, !tbaa !15
  store i32 %429, ptr %7, align 4, !tbaa !15
  %430 = load ptr, ptr %24, align 8, !tbaa !5
  %431 = load i32, ptr %7, align 4, !tbaa !15
  %432 = sext i32 %431 to i64
  %433 = getelementptr inbounds i32, ptr %430, i64 %432
  %434 = load i32, ptr %433, align 4, !tbaa !15
  %435 = load ptr, ptr %21, align 8, !tbaa !5
  %436 = load i32, ptr %5, align 4, !tbaa !15
  %437 = sext i32 %436 to i64
  %438 = getelementptr inbounds i32, ptr %435, i64 %437
  store i32 %434, ptr %438, align 4, !tbaa !15
  %439 = load ptr, ptr %26, align 8, !tbaa !5
  %440 = getelementptr inbounds %struct.graph_t, ptr %439, i32 0, i32 27
  %441 = load ptr, ptr %440, align 8, !tbaa !46
  %442 = load i32, ptr %7, align 4, !tbaa !15
  %443 = sext i32 %442 to i64
  %444 = getelementptr inbounds %struct.vkrinfo_t, ptr %441, i64 %443
  %445 = getelementptr inbounds %struct.vkrinfo_t, ptr %444, i32 0, i32 1
  %446 = load i32, ptr %445, align 4, !tbaa !47
  %447 = load ptr, ptr %20, align 8, !tbaa !5
  %448 = load i32, ptr %5, align 4, !tbaa !15
  %449 = sext i32 %448 to i64
  %450 = getelementptr inbounds i32, ptr %447, i64 %449
  store i32 %446, ptr %450, align 4, !tbaa !15
  br label %451

451:                                              ; preds = %424
  %452 = load i32, ptr %5, align 4, !tbaa !15
  %453 = add nsw i32 %452, 1
  store i32 %453, ptr %5, align 4, !tbaa !15
  br label %420, !llvm.loop !49

454:                                              ; preds = %420
  %455 = load ptr, ptr %4, align 8, !tbaa !5
  %456 = getelementptr inbounds %struct.graph_t, ptr %455, i32 0, i32 27
  %457 = load ptr, ptr %456, align 8, !tbaa !46
  %458 = load i32, ptr %8, align 4, !tbaa !15
  %459 = sext i32 %458 to i64
  %460 = mul i64 20, %459
  call void @llvm.memset.p0.i64(ptr align 4 %457, i8 0, i64 %460, i1 false)
  %461 = load ptr, ptr %3, align 8, !tbaa !5
  call void @libmetis__vnbrpoolReset(ptr noundef %461)
  store i32 0, ptr %5, align 4, !tbaa !15
  br label %462

462:                                              ; preds = %638, %454
  %463 = load i32, ptr %5, align 4, !tbaa !15
  %464 = load i32, ptr %8, align 4, !tbaa !15
  %465 = icmp slt i32 %463, %464
  br i1 %465, label %466, label %641

466:                                              ; preds = %462
  %467 = load ptr, ptr %17, align 8, !tbaa !5
  %468 = load i32, ptr %5, align 4, !tbaa !15
  %469 = sext i32 %468 to i64
  %470 = getelementptr inbounds i32, ptr %467, i64 %469
  %471 = load i32, ptr %470, align 4, !tbaa !15
  store i32 %471, ptr %13, align 4, !tbaa !15
  %472 = load ptr, ptr %17, align 8, !tbaa !5
  %473 = load i32, ptr %5, align 4, !tbaa !15
  %474 = add nsw i32 %473, 1
  %475 = sext i32 %474 to i64
  %476 = getelementptr inbounds i32, ptr %472, i64 %475
  %477 = load i32, ptr %476, align 4, !tbaa !15
  store i32 %477, ptr %14, align 4, !tbaa !15
  %478 = load ptr, ptr %4, align 8, !tbaa !5
  %479 = getelementptr inbounds %struct.graph_t, ptr %478, i32 0, i32 27
  %480 = load ptr, ptr %479, align 8, !tbaa !46
  %481 = load i32, ptr %5, align 4, !tbaa !15
  %482 = sext i32 %481 to i64
  %483 = getelementptr inbounds %struct.vkrinfo_t, ptr %480, i64 %482
  store ptr %483, ptr %29, align 8, !tbaa !5
  %484 = load ptr, ptr %20, align 8, !tbaa !5
  %485 = load i32, ptr %5, align 4, !tbaa !15
  %486 = sext i32 %485 to i64
  %487 = getelementptr inbounds i32, ptr %484, i64 %486
  %488 = load i32, ptr %487, align 4, !tbaa !15
  %489 = icmp eq i32 %488, 0
  br i1 %489, label %490, label %498

490:                                              ; preds = %466
  %491 = load i32, ptr %14, align 4, !tbaa !15
  %492 = load i32, ptr %13, align 4, !tbaa !15
  %493 = sub nsw i32 %491, %492
  %494 = load ptr, ptr %29, align 8, !tbaa !5
  %495 = getelementptr inbounds %struct.vkrinfo_t, ptr %494, i32 0, i32 0
  store i32 %493, ptr %495, align 4, !tbaa !50
  %496 = load ptr, ptr %29, align 8, !tbaa !5
  %497 = getelementptr inbounds %struct.vkrinfo_t, ptr %496, i32 0, i32 4
  store i32 -1, ptr %497, align 4, !tbaa !51
  br label %637

498:                                              ; preds = %466
  %499 = load ptr, ptr %3, align 8, !tbaa !5
  %500 = load i32, ptr %14, align 4, !tbaa !15
  %501 = load i32, ptr %13, align 4, !tbaa !15
  %502 = sub nsw i32 %500, %501
  %503 = add nsw i32 %502, 1
  %504 = call i32 @libmetis__vnbrpoolGetNext(ptr noundef %499, i32 noundef %503)
  %505 = load ptr, ptr %29, align 8, !tbaa !5
  %506 = getelementptr inbounds %struct.vkrinfo_t, ptr %505, i32 0, i32 4
  store i32 %504, ptr %506, align 4, !tbaa !51
  %507 = load ptr, ptr %3, align 8, !tbaa !5
  %508 = getelementptr inbounds %struct.ctrl_t, ptr %507, i32 0, i32 44
  %509 = load ptr, ptr %508, align 8, !tbaa !52
  %510 = load ptr, ptr %29, align 8, !tbaa !5
  %511 = getelementptr inbounds %struct.vkrinfo_t, ptr %510, i32 0, i32 4
  %512 = load i32, ptr %511, align 4, !tbaa !51
  %513 = sext i32 %512 to i64
  %514 = getelementptr inbounds %struct.vnbr_t, ptr %509, i64 %513
  store ptr %514, ptr %30, align 8, !tbaa !5
  %515 = load ptr, ptr %21, align 8, !tbaa !5
  %516 = load i32, ptr %5, align 4, !tbaa !15
  %517 = sext i32 %516 to i64
  %518 = getelementptr inbounds i32, ptr %515, i64 %517
  %519 = load i32, ptr %518, align 4, !tbaa !15
  store i32 %519, ptr %11, align 4, !tbaa !15
  store i32 0, ptr %15, align 4, !tbaa !15
  store i32 0, ptr %16, align 4, !tbaa !15
  %520 = load i32, ptr %13, align 4, !tbaa !15
  store i32 %520, ptr %6, align 4, !tbaa !15
  br label %521

521:                                              ; preds = %591, %498
  %522 = load i32, ptr %6, align 4, !tbaa !15
  %523 = load i32, ptr %14, align 4, !tbaa !15
  %524 = icmp slt i32 %522, %523
  br i1 %524, label %525, label %594

525:                                              ; preds = %521
  %526 = load ptr, ptr %21, align 8, !tbaa !5
  %527 = load ptr, ptr %18, align 8, !tbaa !5
  %528 = load i32, ptr %6, align 4, !tbaa !15
  %529 = sext i32 %528 to i64
  %530 = getelementptr inbounds i32, ptr %527, i64 %529
  %531 = load i32, ptr %530, align 4, !tbaa !15
  %532 = sext i32 %531 to i64
  %533 = getelementptr inbounds i32, ptr %526, i64 %532
  %534 = load i32, ptr %533, align 4, !tbaa !15
  store i32 %534, ptr %12, align 4, !tbaa !15
  %535 = load i32, ptr %11, align 4, !tbaa !15
  %536 = load i32, ptr %12, align 4, !tbaa !15
  %537 = icmp eq i32 %535, %536
  br i1 %537, label %538, label %541

538:                                              ; preds = %525
  %539 = load i32, ptr %15, align 4, !tbaa !15
  %540 = add nsw i32 %539, 1
  store i32 %540, ptr %15, align 4, !tbaa !15
  br label %590

541:                                              ; preds = %525
  %542 = load i32, ptr %16, align 4, !tbaa !15
  %543 = add nsw i32 %542, 1
  store i32 %543, ptr %16, align 4, !tbaa !15
  %544 = load ptr, ptr %25, align 8, !tbaa !5
  %545 = load i32, ptr %12, align 4, !tbaa !15
  %546 = sext i32 %545 to i64
  %547 = getelementptr inbounds i32, ptr %544, i64 %546
  %548 = load i32, ptr %547, align 4, !tbaa !15
  store i32 %548, ptr %7, align 4, !tbaa !15
  %549 = icmp eq i32 %548, -1
  br i1 %549, label %550, label %581

550:                                              ; preds = %541
  %551 = load ptr, ptr %29, align 8, !tbaa !5
  %552 = getelementptr inbounds %struct.vkrinfo_t, ptr %551, i32 0, i32 3
  %553 = load i32, ptr %552, align 4, !tbaa !53
  %554 = load ptr, ptr %25, align 8, !tbaa !5
  %555 = load i32, ptr %12, align 4, !tbaa !15
  %556 = sext i32 %555 to i64
  %557 = getelementptr inbounds i32, ptr %554, i64 %556
  store i32 %553, ptr %557, align 4, !tbaa !15
  %558 = load ptr, ptr %30, align 8, !tbaa !5
  %559 = load ptr, ptr %29, align 8, !tbaa !5
  %560 = getelementptr inbounds %struct.vkrinfo_t, ptr %559, i32 0, i32 3
  %561 = load i32, ptr %560, align 4, !tbaa !53
  %562 = sext i32 %561 to i64
  %563 = getelementptr inbounds %struct.vnbr_t, ptr %558, i64 %562
  %564 = getelementptr inbounds %struct.vnbr_t, ptr %563, i32 0, i32 2
  store i32 0, ptr %564, align 4, !tbaa !54
  %565 = load i32, ptr %12, align 4, !tbaa !15
  %566 = load ptr, ptr %30, align 8, !tbaa !5
  %567 = load ptr, ptr %29, align 8, !tbaa !5
  %568 = getelementptr inbounds %struct.vkrinfo_t, ptr %567, i32 0, i32 3
  %569 = load i32, ptr %568, align 4, !tbaa !53
  %570 = sext i32 %569 to i64
  %571 = getelementptr inbounds %struct.vnbr_t, ptr %566, i64 %570
  %572 = getelementptr inbounds %struct.vnbr_t, ptr %571, i32 0, i32 0
  store i32 %565, ptr %572, align 4, !tbaa !56
  %573 = load ptr, ptr %30, align 8, !tbaa !5
  %574 = load ptr, ptr %29, align 8, !tbaa !5
  %575 = getelementptr inbounds %struct.vkrinfo_t, ptr %574, i32 0, i32 3
  %576 = load i32, ptr %575, align 4, !tbaa !53
  %577 = add nsw i32 %576, 1
  store i32 %577, ptr %575, align 4, !tbaa !53
  %578 = sext i32 %576 to i64
  %579 = getelementptr inbounds %struct.vnbr_t, ptr %573, i64 %578
  %580 = getelementptr inbounds %struct.vnbr_t, ptr %579, i32 0, i32 1
  store i32 1, ptr %580, align 4, !tbaa !57
  br label %589

581:                                              ; preds = %541
  %582 = load ptr, ptr %30, align 8, !tbaa !5
  %583 = load i32, ptr %7, align 4, !tbaa !15
  %584 = sext i32 %583 to i64
  %585 = getelementptr inbounds %struct.vnbr_t, ptr %582, i64 %584
  %586 = getelementptr inbounds %struct.vnbr_t, ptr %585, i32 0, i32 1
  %587 = load i32, ptr %586, align 4, !tbaa !57
  %588 = add nsw i32 %587, 1
  store i32 %588, ptr %586, align 4, !tbaa !57
  br label %589

589:                                              ; preds = %581, %550
  br label %590

590:                                              ; preds = %589, %538
  br label %591

591:                                              ; preds = %590
  %592 = load i32, ptr %6, align 4, !tbaa !15
  %593 = add nsw i32 %592, 1
  store i32 %593, ptr %6, align 4, !tbaa !15
  br label %521, !llvm.loop !58

594:                                              ; preds = %521
  %595 = load i32, ptr %15, align 4, !tbaa !15
  %596 = load ptr, ptr %29, align 8, !tbaa !5
  %597 = getelementptr inbounds %struct.vkrinfo_t, ptr %596, i32 0, i32 0
  store i32 %595, ptr %597, align 4, !tbaa !50
  %598 = load i32, ptr %16, align 4, !tbaa !15
  %599 = load ptr, ptr %29, align 8, !tbaa !5
  %600 = getelementptr inbounds %struct.vkrinfo_t, ptr %599, i32 0, i32 1
  store i32 %598, ptr %600, align 4, !tbaa !47
  %601 = load i32, ptr %16, align 4, !tbaa !15
  %602 = icmp eq i32 %601, 0
  br i1 %602, label %603, label %615

603:                                              ; preds = %594
  %604 = load i32, ptr %14, align 4, !tbaa !15
  %605 = load i32, ptr %13, align 4, !tbaa !15
  %606 = sub nsw i32 %604, %605
  %607 = add nsw i32 %606, 1
  %608 = sext i32 %607 to i64
  %609 = load ptr, ptr %3, align 8, !tbaa !5
  %610 = getelementptr inbounds %struct.ctrl_t, ptr %609, i32 0, i32 41
  %611 = load i64, ptr %610, align 8, !tbaa !41
  %612 = sub i64 %611, %608
  store i64 %612, ptr %610, align 8, !tbaa !41
  %613 = load ptr, ptr %29, align 8, !tbaa !5
  %614 = getelementptr inbounds %struct.vkrinfo_t, ptr %613, i32 0, i32 4
  store i32 -1, ptr %614, align 4, !tbaa !51
  br label %636

615:                                              ; preds = %594
  store i32 0, ptr %6, align 4, !tbaa !15
  br label %616

616:                                              ; preds = %632, %615
  %617 = load i32, ptr %6, align 4, !tbaa !15
  %618 = load ptr, ptr %29, align 8, !tbaa !5
  %619 = getelementptr inbounds %struct.vkrinfo_t, ptr %618, i32 0, i32 3
  %620 = load i32, ptr %619, align 4, !tbaa !53
  %621 = icmp slt i32 %617, %620
  br i1 %621, label %622, label %635

622:                                              ; preds = %616
  %623 = load ptr, ptr %25, align 8, !tbaa !5
  %624 = load ptr, ptr %30, align 8, !tbaa !5
  %625 = load i32, ptr %6, align 4, !tbaa !15
  %626 = sext i32 %625 to i64
  %627 = getelementptr inbounds %struct.vnbr_t, ptr %624, i64 %626
  %628 = getelementptr inbounds %struct.vnbr_t, ptr %627, i32 0, i32 0
  %629 = load i32, ptr %628, align 4, !tbaa !56
  %630 = sext i32 %629 to i64
  %631 = getelementptr inbounds i32, ptr %623, i64 %630
  store i32 -1, ptr %631, align 4, !tbaa !15
  br label %632

632:                                              ; preds = %622
  %633 = load i32, ptr %6, align 4, !tbaa !15
  %634 = add nsw i32 %633, 1
  store i32 %634, ptr %6, align 4, !tbaa !15
  br label %616, !llvm.loop !59

635:                                              ; preds = %616
  br label %636

636:                                              ; preds = %635, %603
  br label %637

637:                                              ; preds = %636, %490
  br label %638

638:                                              ; preds = %637
  %639 = load i32, ptr %5, align 4, !tbaa !15
  %640 = add nsw i32 %639, 1
  store i32 %640, ptr %5, align 4, !tbaa !15
  br label %462, !llvm.loop !60

641:                                              ; preds = %462
  %642 = load ptr, ptr %3, align 8, !tbaa !5
  %643 = load ptr, ptr %4, align 8, !tbaa !5
  call void @libmetis__ComputeKWayVolGains(ptr noundef %642, ptr noundef %643)
  %644 = load ptr, ptr %4, align 8, !tbaa !5
  %645 = getelementptr inbounds %struct.graph_t, ptr %644, i32 0, i32 18
  %646 = load i32, ptr %645, align 4, !tbaa !45
  %647 = load ptr, ptr %4, align 8, !tbaa !5
  %648 = load ptr, ptr %4, align 8, !tbaa !5
  %649 = getelementptr inbounds %struct.graph_t, ptr %648, i32 0, i32 19
  %650 = load ptr, ptr %649, align 8, !tbaa !18
  %651 = call i32 @libmetis__ComputeVolume(ptr noundef %647, ptr noundef %650)
  %652 = icmp eq i32 %646, %651
  br i1 %652, label %667, label %653

653:                                              ; preds = %641
  %654 = call i32 (ptr, ...) @printf(ptr noundef @.str.20, i32 noundef 486, ptr noundef @.str.1)
  %655 = load ptr, ptr %4, align 8, !tbaa !5
  %656 = getelementptr inbounds %struct.graph_t, ptr %655, i32 0, i32 18
  %657 = load i32, ptr %656, align 4, !tbaa !45
  %658 = load ptr, ptr %4, align 8, !tbaa !5
  %659 = load ptr, ptr %4, align 8, !tbaa !5
  %660 = getelementptr inbounds %struct.graph_t, ptr %659, i32 0, i32 19
  %661 = load ptr, ptr %660, align 8, !tbaa !18
  %662 = call i32 @libmetis__ComputeVolume(ptr noundef %658, ptr noundef %661)
  %663 = icmp eq i32 %657, %662
  br i1 %663, label %664, label %665

664:                                              ; preds = %653
  br label %666

665:                                              ; preds = %653
  call void @__assert_fail(ptr noundef @.str.21, ptr noundef @.str.1, i32 noundef 486, ptr noundef @__PRETTY_FUNCTION__.libmetis__ProjectKWayPartition) #6
  unreachable

666:                                              ; preds = %664
  br label %667

667:                                              ; preds = %666, %641
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  br label %672

668:                                              ; preds = %2
  %669 = load ptr, ptr %3, align 8, !tbaa !5
  %670 = getelementptr inbounds %struct.ctrl_t, ptr %669, i32 0, i32 1
  %671 = load i32, ptr %670, align 4, !tbaa !26
  call void (i32, ptr, ...) @gk_errexit(i32 noundef 15, ptr noundef @.str.11, i32 noundef %671)
  br label %672

672:                                              ; preds = %668, %667, %394
  %673 = load ptr, ptr %26, align 8, !tbaa !5
  %674 = getelementptr inbounds %struct.graph_t, ptr %673, i32 0, i32 17
  %675 = load i32, ptr %674, align 8, !tbaa !61
  %676 = load ptr, ptr %4, align 8, !tbaa !5
  %677 = getelementptr inbounds %struct.graph_t, ptr %676, i32 0, i32 17
  store i32 %675, ptr %677, align 8, !tbaa !61
  %678 = load i32, ptr %10, align 4, !tbaa !15
  %679 = load ptr, ptr %4, align 8, !tbaa !5
  %680 = getelementptr inbounds %struct.graph_t, ptr %679, i32 0, i32 2
  %681 = load i32, ptr %680, align 8, !tbaa !62
  %682 = mul nsw i32 %678, %681
  %683 = sext i32 %682 to i64
  %684 = load ptr, ptr %26, align 8, !tbaa !5
  %685 = getelementptr inbounds %struct.graph_t, ptr %684, i32 0, i32 20
  %686 = load ptr, ptr %685, align 8, !tbaa !63
  %687 = load ptr, ptr %4, align 8, !tbaa !5
  %688 = getelementptr inbounds %struct.graph_t, ptr %687, i32 0, i32 20
  %689 = load ptr, ptr %688, align 8, !tbaa !63
  %690 = call ptr @libmetis__icopy(i64 noundef %683, ptr noundef %686, ptr noundef %689)
  %691 = load ptr, ptr %4, align 8, !tbaa !5
  %692 = getelementptr inbounds %struct.graph_t, ptr %691, i32 0, i32 29
  call void @libmetis__FreeGraph(ptr noundef %692)
  %693 = load ptr, ptr %4, align 8, !tbaa !5
  %694 = getelementptr inbounds %struct.graph_t, ptr %693, i32 0, i32 29
  store ptr null, ptr %694, align 8, !tbaa !16
  %695 = load ptr, ptr %3, align 8, !tbaa !5
  call void @libmetis__wspacepop(ptr noundef %695)
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret void
}

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

; Function Attrs: nounwind uwtable
declare dso_local void @libmetis__AllocateKWayPartitionMemory(ptr noundef, ptr noundef) #3

declare void @gk_errexit(i32 noundef, ptr noundef, ...) #1

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

declare void @libmetis__cnbrpoolReset(ptr noundef) #1

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

declare i32 @libmetis__CheckBnd2(ptr noundef) #1

declare void @libmetis__vnbrpoolReset(ptr noundef) #1

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

; Function Attrs: nounwind uwtable
declare dso_local void @libmetis__ComputeKWayVolGains(ptr noundef, ptr noundef) #3

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

declare void @libmetis__wspacepush(ptr noundef) #1

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

declare ptr @libmetis__icopy(i64 noundef, ptr noundef, ptr noundef) #1

declare void @libmetis__FreeGraph(ptr 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind }
attributes #6 = { 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, !6, i64 200}
!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 120}
!19 = !{!17, !11, i64 0}
!20 = !{!17, !6, i64 104}
!21 = !{!17, !6, i64 16}
!22 = !{!17, !6, i64 40}
!23 = !{!17, !6, i64 48}
!24 = !{!17, !6, i64 152}
!25 = !{!17, !6, i64 144}
!26 = !{!10, !11, i64 4}
!27 = !{!17, !6, i64 176}
!28 = !{!29, !11, i64 4}
!29 = !{!"ckrinfo_t", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}
!33 = !{!29, !11, i64 0}
!34 = !{!29, !11, i64 12}
!35 = !{!10, !6, i64 264}
!36 = !{!29, !11, i64 8}
!37 = !{!38, !11, i64 0}
!38 = !{!"cnbr_t", !11, i64 0, !11, i64 4}
!39 = !{!38, !11, i64 4}
!40 = distinct !{!40, !31}
!41 = !{!10, !14, i64 248}
!42 = distinct !{!42, !31}
!43 = distinct !{!43, !31}
!44 = !{!17, !11, i64 136}
!45 = !{!17, !11, i64 116}
!46 = !{!17, !6, i64 184}
!47 = !{!48, !11, i64 4}
!48 = !{!"vkrinfo_t", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16}
!49 = distinct !{!49, !31}
!50 = !{!48, !11, i64 0}
!51 = !{!48, !11, i64 16}
!52 = !{!10, !6, i64 272}
!53 = !{!48, !11, i64 12}
!54 = !{!55, !11, i64 8}
!55 = !{!"vnbr_t", !11, i64 0, !11, i64 4, !11, i64 8}
!56 = !{!55, !11, i64 0}
!57 = !{!55, !11, i64 4}
!58 = distinct !{!58, !31}
!59 = distinct !{!59, !31}
!60 = distinct !{!60, !31}
!61 = !{!17, !11, i64 112}
!62 = !{!17, !11, i64 8}
!63 = !{!17, !6, i64 128}


; 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.ckrinfo_t = type { i32, i32, i32, i32 }
%struct.cnbr_t = type { i32, i32 }
%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.11 = external hidden unnamed_addr constant [23 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.18 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [28 x i8], align 1
@__PRETTY_FUNCTION__.libmetis__ProjectKWayPartition = external hidden unnamed_addr constant [57 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [99 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [65 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

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__ProjectKWayPartition(ptr noundef %0, ptr noundef %1) local_unnamed_addr #2 {
  tail call void @libmetis__wspacepush(ptr noundef %0) #6
  %3 = getelementptr inbounds i8, ptr %0, i64 92
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %1, i64 200
  %6 = load ptr, ptr %5, align 8, !tbaa !14
  %7 = getelementptr inbounds i8, ptr %6, i64 120
  %8 = load ptr, ptr %7, align 8, !tbaa !16
  %9 = load i32, ptr %1, align 8, !tbaa !17
  %10 = getelementptr inbounds i8, ptr %1, i64 104
  %11 = load ptr, ptr %10, align 8, !tbaa !18
  %12 = getelementptr inbounds i8, ptr %1, i64 16
  %13 = load ptr, ptr %12, align 8, !tbaa !19
  %14 = getelementptr inbounds i8, ptr %1, i64 40
  %15 = load ptr, ptr %14, align 8, !tbaa !20
  %16 = getelementptr inbounds i8, ptr %1, i64 48
  %17 = load ptr, ptr %16, align 8, !tbaa !21
  tail call void @libmetis__AllocateKWayPartitionMemory(ptr noundef %0, ptr noundef nonnull %1)
  %18 = getelementptr inbounds i8, ptr %1, i64 120
  %19 = load ptr, ptr %18, align 8, !tbaa !16
  %20 = getelementptr inbounds i8, ptr %1, i64 152
  %21 = load ptr, ptr %20, align 8, !tbaa !22
  %22 = sext i32 %9 to i64
  %23 = getelementptr inbounds i8, ptr %1, i64 144
  %24 = load ptr, ptr %23, align 8, !tbaa !23
  %25 = tail call ptr @libmetis__iset(i64 noundef %22, i32 noundef -1, ptr noundef %24) #6
  %26 = sext i32 %4 to i64
  %27 = tail call ptr @libmetis__iwspacemalloc(ptr noundef %0, i32 noundef %4) #6
  %28 = tail call ptr @libmetis__iset(i64 noundef %26, i32 noundef -1, ptr noundef %27) #6
  %29 = getelementptr inbounds i8, ptr %0, i64 4
  %30 = load i32, ptr %29, align 4, !tbaa !24
  switch i32 %30, label %306 [
    i32 0, label %31
    i32 1, label %176
  ]

31:                                               ; preds = %2
  %32 = tail call i32 @libmetis__CheckBnd2(ptr noundef nonnull %6) #6
  %.not = icmp eq i32 %32, 0
  br i1 %.not, label %33, label %37

33:                                               ; preds = %31
  %34 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.22, i32 noundef 346, ptr noundef nonnull @.str.1)
  %35 = tail call i32 @libmetis__CheckBnd2(ptr noundef nonnull %6) #6
  %.not252 = icmp eq i32 %35, 0
  br i1 %.not252, label %36, label %37

36:                                               ; preds = %33
  tail call void @__assert_fail(ptr noundef nonnull @.str.23, ptr noundef nonnull @.str.1, i32 noundef 346, ptr noundef nonnull @__PRETTY_FUNCTION__.libmetis__ProjectKWayPartition) #7
  unreachable

37:                                               ; preds = %33, %31
  %38 = icmp sgt i32 %9, 0
  br i1 %38, label %.lr.ph275, label %._crit_edge276

.lr.ph275:                                        ; preds = %37
  %39 = getelementptr inbounds i8, ptr %6, i64 176
  %40 = load ptr, ptr %39, align 8, !tbaa !25
  %wide.trip.count316 = zext nneg i32 %9 to i64
  %xtraiter347 = and i64 %wide.trip.count316, 1
  %41 = icmp eq i32 %9, 1
  br i1 %41, label %._crit_edge276.loopexit.unr-lcssa, label %.lr.ph275.new

.lr.ph275.new:                                    ; preds = %.lr.ph275
  %unroll_iter349 = and i64 %wide.trip.count316, 2147483646
  br label %42

42:                                               ; preds = %42, %.lr.ph275.new
  %indvars.iv313 = phi i64 [ 0, %.lr.ph275.new ], [ %indvars.iv.next314.1, %42 ]
  %niter350 = phi i64 [ 0, %.lr.ph275.new ], [ %niter350.next.1, %42 ]
  %43 = getelementptr inbounds i32, ptr %11, i64 %indvars.iv313
  %44 = load i32, ptr %43, align 4, !tbaa !26
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds i32, ptr %8, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !26
  %48 = getelementptr inbounds i32, ptr %19, i64 %indvars.iv313
  store i32 %47, ptr %48, align 4, !tbaa !26
  %49 = getelementptr inbounds %struct.ckrinfo_t, ptr %40, i64 %45, i32 1
  %50 = load i32, ptr %49, align 4, !tbaa !27
  store i32 %50, ptr %43, align 4, !tbaa !26
  %indvars.iv.next314 = or disjoint i64 %indvars.iv313, 1
  %51 = getelementptr inbounds i32, ptr %11, i64 %indvars.iv.next314
  %52 = load i32, ptr %51, align 4, !tbaa !26
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds i32, ptr %8, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !26
  %56 = getelementptr inbounds i32, ptr %19, i64 %indvars.iv.next314
  store i32 %55, ptr %56, align 4, !tbaa !26
  %57 = getelementptr inbounds %struct.ckrinfo_t, ptr %40, i64 %53, i32 1
  %58 = load i32, ptr %57, align 4, !tbaa !27
  store i32 %58, ptr %51, align 4, !tbaa !26
  %indvars.iv.next314.1 = add nuw nsw i64 %indvars.iv313, 2
  %niter350.next.1 = add i64 %niter350, 2
  %niter350.ncmp.1 = icmp eq i64 %niter350.next.1, %unroll_iter349
  br i1 %niter350.ncmp.1, label %._crit_edge276.loopexit.unr-lcssa, label %42, !llvm.loop !29

._crit_edge276.loopexit.unr-lcssa:                ; preds = %42, %.lr.ph275
  %indvars.iv313.unr = phi i64 [ 0, %.lr.ph275 ], [ %indvars.iv.next314.1, %42 ]
  %lcmp.mod348.not = icmp eq i64 %xtraiter347, 0
  br i1 %lcmp.mod348.not, label %._crit_edge276, label %._crit_edge276.loopexit.epilog-lcssa

._crit_edge276.loopexit.epilog-lcssa:             ; preds = %._crit_edge276.loopexit.unr-lcssa
  %59 = getelementptr inbounds i32, ptr %11, i64 %indvars.iv313.unr
  %60 = load i32, ptr %59, align 4, !tbaa !26
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds i32, ptr %8, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !26
  %64 = getelementptr inbounds i32, ptr %19, i64 %indvars.iv313.unr
  store i32 %63, ptr %64, align 4, !tbaa !26
  %65 = getelementptr inbounds %struct.ckrinfo_t, ptr %40, i64 %61, i32 1
  %66 = load i32, ptr %65, align 4, !tbaa !27
  store i32 %66, ptr %59, align 4, !tbaa !26
  br label %._crit_edge276

._crit_edge276:                                   ; preds = %._crit_edge276.loopexit.epilog-lcssa, %._crit_edge276.loopexit.unr-lcssa, %37
  %67 = getelementptr inbounds i8, ptr %1, i64 176
  %68 = load ptr, ptr %67, align 8, !tbaa !25
  %69 = shl nsw i64 %22, 4
  tail call void @llvm.memset.p0.i64(ptr align 4 %68, i8 0, i64 %69, i1 false)
  tail call void @libmetis__cnbrpoolReset(ptr noundef %0) #6
  br i1 %38, label %.lr.ph296, label %._crit_edge297

.lr.ph296:                                        ; preds = %._crit_edge276
  %70 = getelementptr inbounds i8, ptr %0, i64 264
  %71 = getelementptr inbounds i8, ptr %0, i64 248
  %wide.trip.count334 = zext nneg i32 %9 to i64
  br label %72

72:                                               ; preds = %.lr.ph296, %.loopexit
  %indvars.iv331 = phi i64 [ 0, %.lr.ph296 ], [ %indvars.iv.next332, %.loopexit ]
  %.0234293 = phi i32 [ 0, %.lr.ph296 ], [ %.2236, %.loopexit ]
  %73 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv331
  %74 = load i32, ptr %73, align 4, !tbaa !26
  %indvars.iv.next332 = add nuw nsw i64 %indvars.iv331, 1
  %75 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv.next332
  %76 = load i32, ptr %75, align 4, !tbaa !26
  %77 = load ptr, ptr %67, align 8, !tbaa !25
  %78 = getelementptr inbounds %struct.ckrinfo_t, ptr %77, i64 %indvars.iv331
  %79 = getelementptr inbounds i32, ptr %11, i64 %indvars.iv331
  %80 = load i32, ptr %79, align 4, !tbaa !26
  %81 = icmp eq i32 %80, 0
  br i1 %81, label %.preheader, label %94

.preheader:                                       ; preds = %72
  %82 = icmp slt i32 %74, %76
  br i1 %82, label %.lr.ph290.preheader, label %._crit_edge291

.lr.ph290.preheader:                              ; preds = %.preheader
  %83 = sext i32 %74 to i64
  %wide.trip.count329 = sext i32 %76 to i64
  %84 = sub nsw i64 %wide.trip.count329, %83
  %min.iters.check = icmp ult i64 %84, 8
  br i1 %min.iters.check, label %.lr.ph290.preheader343, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph290.preheader
  %n.vec = and i64 %84, -8
  %ind.end = add nsw i64 %n.vec, %83
  %invariant.gep = getelementptr i32, ptr %17, i64 %83
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %86, %vector.body ]
  %vec.phi341 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %87, %vector.body ]
  %gep = getelementptr i32, ptr %invariant.gep, i64 %index
  %85 = getelementptr inbounds i8, ptr %gep, i64 16
  %wide.load = load <4 x i32>, ptr %gep, align 4, !tbaa !26
  %wide.load342 = load <4 x i32>, ptr %85, align 4, !tbaa !26
  %86 = add <4 x i32> %wide.load, %vec.phi
  %87 = add <4 x i32> %wide.load342, %vec.phi341
  %index.next = add nuw i64 %index, 8
  %88 = icmp eq i64 %index.next, %n.vec
  br i1 %88, label %middle.block, label %vector.body, !llvm.loop !31

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %87, %86
  %89 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %84, %n.vec
  br i1 %cmp.n, label %._crit_edge291, label %.lr.ph290.preheader343

.lr.ph290.preheader343:                           ; preds = %middle.block, %.lr.ph290.preheader
  %indvars.iv326.ph = phi i64 [ %83, %.lr.ph290.preheader ], [ %ind.end, %middle.block ]
  %.0237288.ph = phi i32 [ 0, %.lr.ph290.preheader ], [ %89, %middle.block ]
  br label %.lr.ph290

.lr.ph290:                                        ; preds = %.lr.ph290.preheader343, %.lr.ph290
  %indvars.iv326 = phi i64 [ %indvars.iv.next327, %.lr.ph290 ], [ %indvars.iv326.ph, %.lr.ph290.preheader343 ]
  %.0237288 = phi i32 [ %92, %.lr.ph290 ], [ %.0237288.ph, %.lr.ph290.preheader343 ]
  %90 = getelementptr inbounds i32, ptr %17, i64 %indvars.iv326
  %91 = load i32, ptr %90, align 4, !tbaa !26
  %92 = add nsw i32 %91, %.0237288
  %indvars.iv.next327 = add nsw i64 %indvars.iv326, 1
  %exitcond330.not = icmp eq i64 %indvars.iv.next327, %wide.trip.count329
  br i1 %exitcond330.not, label %._crit_edge291, label %.lr.ph290, !llvm.loop !34

._crit_edge291:                                   ; preds = %.lr.ph290, %middle.block, %.preheader
  %.0237.lcssa = phi i32 [ 0, %.preheader ], [ %89, %middle.block ], [ %92, %.lr.ph290 ]
  store i32 %.0237.lcssa, ptr %78, align 4, !tbaa !35
  %93 = getelementptr inbounds i8, ptr %78, i64 12
  br label %.loopexit.sink.split

94:                                               ; preds = %72
  %95 = sub nsw i32 %76, %74
  %96 = add nsw i32 %95, 1
  %97 = tail call i32 @libmetis__cnbrpoolGetNext(ptr noundef %0, i32 noundef %96) #6
  %98 = getelementptr inbounds i8, ptr %78, i64 12
  store i32 %97, ptr %98, align 4, !tbaa !36
  %99 = load ptr, ptr %70, align 8, !tbaa !37
  %100 = sext i32 %97 to i64
  %101 = getelementptr inbounds %struct.cnbr_t, ptr %99, i64 %100
  %102 = getelementptr inbounds i32, ptr %19, i64 %indvars.iv331
  %103 = load i32, ptr %102, align 4, !tbaa !26
  %104 = icmp slt i32 %74, %76
  br i1 %104, label %.lr.ph281, label %._crit_edge282.thread

._crit_edge282.thread:                            ; preds = %94
  store i32 0, ptr %78, align 4, !tbaa !35
  %105 = getelementptr inbounds i8, ptr %78, i64 4
  store i32 0, ptr %105, align 4, !tbaa !27
  br label %140

.lr.ph281:                                        ; preds = %94
  %106 = getelementptr inbounds i8, ptr %78, i64 8
  %107 = sext i32 %74 to i64
  %wide.trip.count321 = sext i32 %76 to i64
  br label %108

108:                                              ; preds = %.lr.ph281, %137
  %indvars.iv318 = phi i64 [ %107, %.lr.ph281 ], [ %indvars.iv.next319, %137 ]
  %.1238278 = phi i32 [ 0, %.lr.ph281 ], [ %.2239, %137 ]
  %.0242277 = phi i32 [ 0, %.lr.ph281 ], [ %.1243, %137 ]
  %109 = getelementptr inbounds i32, ptr %15, i64 %indvars.iv318
  %110 = load i32, ptr %109, align 4, !tbaa !26
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds i32, ptr %19, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !26
  %114 = icmp eq i32 %103, %113
  %115 = getelementptr inbounds i32, ptr %17, i64 %indvars.iv318
  %116 = load i32, ptr %115, align 4, !tbaa !26
  br i1 %114, label %117, label %119

117:                                              ; preds = %108
  %118 = add nsw i32 %116, %.1238278
  br label %137

119:                                              ; preds = %108
  %120 = add nsw i32 %116, %.0242277
  %121 = sext i32 %113 to i64
  %122 = getelementptr inbounds i32, ptr %28, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !26
  %124 = icmp eq i32 %123, -1
  br i1 %124, label %125, label %132

125:                                              ; preds = %119
  %126 = load i32, ptr %106, align 4, !tbaa !38
  store i32 %126, ptr %122, align 4, !tbaa !26
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds %struct.cnbr_t, ptr %101, i64 %127
  store i32 %113, ptr %128, align 4, !tbaa !39
  %129 = load i32, ptr %115, align 4, !tbaa !26
  %130 = add nsw i32 %126, 1
  store i32 %130, ptr %106, align 4, !tbaa !38
  %131 = getelementptr inbounds %struct.cnbr_t, ptr %101, i64 %127, i32 1
  store i32 %129, ptr %131, align 4, !tbaa !41
  br label %137

132:                                              ; preds = %119
  %133 = sext i32 %123 to i64
  %134 = getelementptr inbounds %struct.cnbr_t, ptr %101, i64 %133, i32 1
  %135 = load i32, ptr %134, align 4, !tbaa !41
  %136 = add nsw i32 %135, %116
  store i32 %136, ptr %134, align 4, !tbaa !41
  br label %137

137:                                              ; preds = %117, %132, %125
  %.1243 = phi i32 [ %.0242277, %117 ], [ %120, %125 ], [ %120, %132 ]
  %.2239 = phi i32 [ %118, %117 ], [ %.1238278, %125 ], [ %.1238278, %132 ]
  %indvars.iv.next319 = add nsw i64 %indvars.iv318, 1
  %exitcond322.not = icmp eq i64 %indvars.iv.next319, %wide.trip.count321
  br i1 %exitcond322.not, label %._crit_edge282, label %108, !llvm.loop !42

._crit_edge282:                                   ; preds = %137
  store i32 %.2239, ptr %78, align 4, !tbaa !35
  %138 = getelementptr inbounds i8, ptr %78, i64 4
  store i32 %.1243, ptr %138, align 4, !tbaa !27
  %139 = icmp eq i32 %.1243, 0
  br i1 %139, label %140, label %144

140:                                              ; preds = %._crit_edge282.thread, %._crit_edge282
  %141 = sext i32 %96 to i64
  %142 = load i64, ptr %71, align 8, !tbaa !43
  %143 = sub i64 %142, %141
  store i64 %143, ptr %71, align 8, !tbaa !43
  br label %.loopexit.sink.split

144:                                              ; preds = %._crit_edge282
  %.not255 = icmp slt i32 %.1243, %.2239
  br i1 %.not255, label %159, label %145

145:                                              ; preds = %144
  %146 = getelementptr inbounds i32, ptr %25, i64 %indvars.iv331
  %147 = load i32, ptr %146, align 4, !tbaa !26
  %148 = icmp eq i32 %147, -1
  br i1 %148, label %154, label %149

149:                                              ; preds = %145
  %150 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, i32 noundef 406, ptr noundef nonnull @.str.1)
  %151 = load i32, ptr %146, align 4, !tbaa !26
  %152 = icmp eq i32 %151, -1
  br i1 %152, label %154, label %153

153:                                              ; preds = %149
  tail call void @__assert_fail(ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.1, i32 noundef 406, ptr noundef nonnull @__PRETTY_FUNCTION__.libmetis__ProjectKWayPartition) #7
  unreachable

154:                                              ; preds = %149, %145
  %155 = sext i32 %.0234293 to i64
  %156 = getelementptr inbounds i32, ptr %21, i64 %155
  %157 = trunc nuw nsw i64 %indvars.iv331 to i32
  store i32 %157, ptr %156, align 4, !tbaa !26
  %158 = add nsw i32 %.0234293, 1
  store i32 %.0234293, ptr %146, align 4, !tbaa !26
  br label %159

159:                                              ; preds = %154, %144
  %.1235 = phi i32 [ %158, %154 ], [ %.0234293, %144 ]
  %160 = getelementptr inbounds i8, ptr %78, i64 8
  %161 = load i32, ptr %160, align 4, !tbaa !38
  %162 = icmp sgt i32 %161, 0
  br i1 %162, label %.lr.ph287, label %.loopexit

.lr.ph287:                                        ; preds = %159, %.lr.ph287
  %indvars.iv323 = phi i64 [ %indvars.iv.next324, %.lr.ph287 ], [ 0, %159 ]
  %163 = getelementptr inbounds %struct.cnbr_t, ptr %101, i64 %indvars.iv323
  %164 = load i32, ptr %163, align 4, !tbaa !39
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds i32, ptr %28, i64 %165
  store i32 -1, ptr %166, align 4, !tbaa !26
  %indvars.iv.next324 = add nuw nsw i64 %indvars.iv323, 1
  %167 = load i32, ptr %160, align 4, !tbaa !38
  %168 = sext i32 %167 to i64
  %169 = icmp slt i64 %indvars.iv.next324, %168
  br i1 %169, label %.lr.ph287, label %.loopexit, !llvm.loop !44

.loopexit.sink.split:                             ; preds = %140, %._crit_edge291
  %.sink = phi ptr [ %93, %._crit_edge291 ], [ %98, %140 ]
  store i32 -1, ptr %.sink, align 4, !tbaa !36
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph287, %.loopexit.sink.split, %159
  %.2236 = phi i32 [ %.1235, %159 ], [ %.0234293, %.loopexit.sink.split ], [ %.1235, %.lr.ph287 ]
  %exitcond335.not = icmp eq i64 %indvars.iv.next332, %wide.trip.count334
  br i1 %exitcond335.not, label %._crit_edge297, label %72, !llvm.loop !45

._crit_edge297:                                   ; preds = %.loopexit, %._crit_edge276
  %.0234.lcssa = phi i32 [ 0, %._crit_edge276 ], [ %.2236, %.loopexit ]
  %170 = getelementptr inbounds i8, ptr %1, i64 136
  store i32 %.0234.lcssa, ptr %170, align 8, !tbaa !46
  %171 = tail call i32 @libmetis__CheckBnd2(ptr noundef nonnull %1) #6
  %.not253 = icmp eq i32 %171, 0
  br i1 %.not253, label %172, label %307

172:                                              ; preds = %._crit_edge297
  %173 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18, i32 noundef 417, ptr noundef nonnull @.str.1)
  %174 = tail call i32 @libmetis__CheckBnd2(ptr noundef nonnull %1) #6
  %.not254 = icmp eq i32 %174, 0
  br i1 %.not254, label %175, label %307

175:                                              ; preds = %172
  tail call void @__assert_fail(ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.1, i32 noundef 417, ptr noundef nonnull @__PRETTY_FUNCTION__.libmetis__ProjectKWayPartition) #7
  unreachable

176:                                              ; preds = %2
  %177 = getelementptr inbounds i8, ptr %6, i64 116
  %178 = load i32, ptr %177, align 4, !tbaa !47
  %179 = load ptr, ptr %7, align 8, !tbaa !16
  %180 = tail call i32 @libmetis__ComputeVolume(ptr noundef nonnull %6, ptr noundef %179) #6
  %181 = icmp eq i32 %178, %180
  br i1 %181, label %189, label %182

182:                                              ; preds = %176
  %183 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.24, i32 noundef 425, ptr noundef nonnull @.str.1)
  %184 = load i32, ptr %177, align 4, !tbaa !47
  %185 = load ptr, ptr %7, align 8, !tbaa !16
  %186 = tail call i32 @libmetis__ComputeVolume(ptr noundef nonnull %6, ptr noundef %185) #6
  %187 = icmp eq i32 %184, %186
  br i1 %187, label %189, label %188

188:                                              ; preds = %182
  tail call void @__assert_fail(ptr noundef nonnull @.str.25, ptr noundef nonnull @.str.1, i32 noundef 425, ptr noundef nonnull @__PRETTY_FUNCTION__.libmetis__ProjectKWayPartition) #7
  unreachable

189:                                              ; preds = %182, %176
  %190 = icmp sgt i32 %9, 0
  br i1 %190, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %189
  %191 = getelementptr inbounds i8, ptr %6, i64 184
  %192 = load ptr, ptr %191, align 8, !tbaa !48
  %wide.trip.count = zext nneg i32 %9 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %193 = icmp eq i32 %9, 1
  br i1 %193, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

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

194:                                              ; preds = %194, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.1, %194 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %194 ]
  %195 = getelementptr inbounds i32, ptr %11, i64 %indvars.iv
  %196 = load i32, ptr %195, align 4, !tbaa !26
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds i32, ptr %8, i64 %197
  %199 = load i32, ptr %198, align 4, !tbaa !26
  %200 = getelementptr inbounds i32, ptr %19, i64 %indvars.iv
  store i32 %199, ptr %200, align 4, !tbaa !26
  %201 = getelementptr inbounds %struct.vkrinfo_t, ptr %192, i64 %197, i32 1
  %202 = load i32, ptr %201, align 4, !tbaa !49
  store i32 %202, ptr %195, align 4, !tbaa !26
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %203 = getelementptr inbounds i32, ptr %11, i64 %indvars.iv.next
  %204 = load i32, ptr %203, align 4, !tbaa !26
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds i32, ptr %8, i64 %205
  %207 = load i32, ptr %206, align 4, !tbaa !26
  %208 = getelementptr inbounds i32, ptr %19, i64 %indvars.iv.next
  store i32 %207, ptr %208, align 4, !tbaa !26
  %209 = getelementptr inbounds %struct.vkrinfo_t, ptr %192, i64 %205, i32 1
  %210 = load i32, ptr %209, align 4, !tbaa !49
  store i32 %210, ptr %203, align 4, !tbaa !26
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %194, !llvm.loop !51

._crit_edge.loopexit.unr-lcssa:                   ; preds = %194, %.lr.ph
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.1, %194 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %._crit_edge.loopexit.epilog-lcssa

._crit_edge.loopexit.epilog-lcssa:                ; preds = %._crit_edge.loopexit.unr-lcssa
  %211 = getelementptr inbounds i32, ptr %11, i64 %indvars.iv.unr
  %212 = load i32, ptr %211, align 4, !tbaa !26
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds i32, ptr %8, i64 %213
  %215 = load i32, ptr %214, align 4, !tbaa !26
  %216 = getelementptr inbounds i32, ptr %19, i64 %indvars.iv.unr
  store i32 %215, ptr %216, align 4, !tbaa !26
  %217 = getelementptr inbounds %struct.vkrinfo_t, ptr %192, i64 %213, i32 1
  %218 = load i32, ptr %217, align 4, !tbaa !49
  store i32 %218, ptr %211, align 4, !tbaa !26
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.epilog-lcssa, %._crit_edge.loopexit.unr-lcssa, %189
  %219 = getelementptr inbounds i8, ptr %1, i64 184
  %220 = load ptr, ptr %219, align 8, !tbaa !48
  %221 = mul nsw i64 %22, 20
  tail call void @llvm.memset.p0.i64(ptr align 4 %220, i8 0, i64 %221, i1 false)
  tail call void @libmetis__vnbrpoolReset(ptr noundef %0) #6
  br i1 %190, label %.lr.ph271, label %._crit_edge272

.lr.ph271:                                        ; preds = %._crit_edge
  %222 = getelementptr inbounds i8, ptr %0, i64 272
  %223 = getelementptr inbounds i8, ptr %0, i64 248
  %wide.trip.count311 = zext nneg i32 %9 to i64
  br label %224

224:                                              ; preds = %.lr.ph271, %.loopexit257
  %indvars.iv308 = phi i64 [ 0, %.lr.ph271 ], [ %indvars.iv.next309, %.loopexit257 ]
  %225 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv308
  %226 = load i32, ptr %225, align 4, !tbaa !26
  %indvars.iv.next309 = add nuw nsw i64 %indvars.iv308, 1
  %227 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv.next309
  %228 = load i32, ptr %227, align 4, !tbaa !26
  %229 = load ptr, ptr %219, align 8, !tbaa !48
  %230 = getelementptr inbounds %struct.vkrinfo_t, ptr %229, i64 %indvars.iv308
  %231 = getelementptr inbounds i32, ptr %11, i64 %indvars.iv308
  %232 = load i32, ptr %231, align 4, !tbaa !26
  %233 = icmp eq i32 %232, 0
  %234 = sub nsw i32 %228, %226
  br i1 %233, label %235, label %237

235:                                              ; preds = %224
  store i32 %234, ptr %230, align 4, !tbaa !52
  %236 = getelementptr inbounds i8, ptr %230, i64 16
  br label %.loopexit257.sink.split

237:                                              ; preds = %224
  %238 = add nsw i32 %234, 1
  %239 = tail call i32 @libmetis__vnbrpoolGetNext(ptr noundef %0, i32 noundef %238) #6
  %240 = getelementptr inbounds i8, ptr %230, i64 16
  store i32 %239, ptr %240, align 4, !tbaa !53
  %241 = load ptr, ptr %222, align 8, !tbaa !54
  %242 = sext i32 %239 to i64
  %243 = getelementptr inbounds %struct.vnbr_t, ptr %241, i64 %242
  %244 = getelementptr inbounds i32, ptr %19, i64 %indvars.iv308
  %245 = load i32, ptr %244, align 4, !tbaa !26
  %246 = icmp slt i32 %226, %228
  br i1 %246, label %.lr.ph264, label %._crit_edge265.thread

._crit_edge265.thread:                            ; preds = %237
  store i32 0, ptr %230, align 4, !tbaa !52
  %247 = getelementptr inbounds i8, ptr %230, i64 4
  store i32 0, ptr %247, align 4, !tbaa !49
  br label %283

.lr.ph264:                                        ; preds = %237
  %248 = getelementptr inbounds i8, ptr %230, i64 12
  %249 = sext i32 %226 to i64
  %wide.trip.count303 = sext i32 %228 to i64
  br label %250

250:                                              ; preds = %.lr.ph264, %277
  %indvars.iv300 = phi i64 [ %249, %.lr.ph264 ], [ %indvars.iv.next301, %277 ]
  %.3240261 = phi i32 [ 0, %.lr.ph264 ], [ %.4241, %277 ]
  %.2244260 = phi i32 [ 0, %.lr.ph264 ], [ %.3245, %277 ]
  %251 = getelementptr inbounds i32, ptr %15, i64 %indvars.iv300
  %252 = load i32, ptr %251, align 4, !tbaa !26
  %253 = sext i32 %252 to i64
  %254 = getelementptr inbounds i32, ptr %19, i64 %253
  %255 = load i32, ptr %254, align 4, !tbaa !26
  %256 = icmp eq i32 %245, %255
  br i1 %256, label %257, label %259

257:                                              ; preds = %250
  %258 = add nsw i32 %.3240261, 1
  br label %277

259:                                              ; preds = %250
  %260 = add nsw i32 %.2244260, 1
  %261 = sext i32 %255 to i64
  %262 = getelementptr inbounds i32, ptr %28, i64 %261
  %263 = load i32, ptr %262, align 4, !tbaa !26
  %264 = icmp eq i32 %263, -1
  br i1 %264, label %265, label %272

265:                                              ; preds = %259
  %266 = load i32, ptr %248, align 4, !tbaa !55
  store i32 %266, ptr %262, align 4, !tbaa !26
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds %struct.vnbr_t, ptr %243, i64 %267, i32 2
  store i32 0, ptr %268, align 4, !tbaa !56
  %269 = getelementptr inbounds %struct.vnbr_t, ptr %243, i64 %267
  store i32 %255, ptr %269, align 4, !tbaa !58
  %270 = add nsw i32 %266, 1
  store i32 %270, ptr %248, align 4, !tbaa !55
  %271 = getelementptr inbounds %struct.vnbr_t, ptr %243, i64 %267, i32 1
  store i32 1, ptr %271, align 4, !tbaa !59
  br label %277

272:                                              ; preds = %259
  %273 = sext i32 %263 to i64
  %274 = getelementptr inbounds %struct.vnbr_t, ptr %243, i64 %273, i32 1
  %275 = load i32, ptr %274, align 4, !tbaa !59
  %276 = add nsw i32 %275, 1
  store i32 %276, ptr %274, align 4, !tbaa !59
  br label %277

277:                                              ; preds = %257, %272, %265
  %.3245 = phi i32 [ %.2244260, %257 ], [ %260, %265 ], [ %260, %272 ]
  %.4241 = phi i32 [ %258, %257 ], [ %.3240261, %265 ], [ %.3240261, %272 ]
  %indvars.iv.next301 = add nsw i64 %indvars.iv300, 1
  %exitcond304.not = icmp eq i64 %indvars.iv.next301, %wide.trip.count303
  br i1 %exitcond304.not, label %._crit_edge265, label %250, !llvm.loop !60

._crit_edge265:                                   ; preds = %277
  store i32 %.4241, ptr %230, align 4, !tbaa !52
  %278 = getelementptr inbounds i8, ptr %230, i64 4
  store i32 %.3245, ptr %278, align 4, !tbaa !49
  %279 = icmp eq i32 %.3245, 0
  br i1 %279, label %283, label %.preheader256

.preheader256:                                    ; preds = %._crit_edge265
  %280 = getelementptr inbounds i8, ptr %230, i64 12
  %281 = load i32, ptr %280, align 4, !tbaa !55
  %282 = icmp sgt i32 %281, 0
  br i1 %282, label %.lr.ph268, label %.loopexit257

283:                                              ; preds = %._crit_edge265.thread, %._crit_edge265
  %284 = sext i32 %238 to i64
  %285 = load i64, ptr %223, align 8, !tbaa !43
  %286 = sub i64 %285, %284
  store i64 %286, ptr %223, align 8, !tbaa !43
  br label %.loopexit257.sink.split

.lr.ph268:                                        ; preds = %.preheader256, %.lr.ph268
  %indvars.iv305 = phi i64 [ %indvars.iv.next306, %.lr.ph268 ], [ 0, %.preheader256 ]
  %287 = getelementptr inbounds %struct.vnbr_t, ptr %243, i64 %indvars.iv305
  %288 = load i32, ptr %287, align 4, !tbaa !58
  %289 = sext i32 %288 to i64
  %290 = getelementptr inbounds i32, ptr %28, i64 %289
  store i32 -1, ptr %290, align 4, !tbaa !26
  %indvars.iv.next306 = add nuw nsw i64 %indvars.iv305, 1
  %291 = load i32, ptr %280, align 4, !tbaa !55
  %292 = sext i32 %291 to i64
  %293 = icmp slt i64 %indvars.iv.next306, %292
  br i1 %293, label %.lr.ph268, label %.loopexit257, !llvm.loop !61

.loopexit257.sink.split:                          ; preds = %283, %235
  %.sink340 = phi ptr [ %236, %235 ], [ %240, %283 ]
  store i32 -1, ptr %.sink340, align 4, !tbaa !53
  br label %.loopexit257

.loopexit257:                                     ; preds = %.lr.ph268, %.loopexit257.sink.split, %.preheader256
  %exitcond312.not = icmp eq i64 %indvars.iv.next309, %wide.trip.count311
  br i1 %exitcond312.not, label %._crit_edge272, label %224, !llvm.loop !62

._crit_edge272:                                   ; preds = %.loopexit257, %._crit_edge
  tail call void @libmetis__ComputeKWayVolGains(ptr noundef %0, ptr noundef nonnull %1)
  %294 = getelementptr inbounds i8, ptr %1, i64 116
  %295 = load i32, ptr %294, align 4, !tbaa !47
  %296 = load ptr, ptr %18, align 8, !tbaa !16
  %297 = tail call i32 @libmetis__ComputeVolume(ptr noundef nonnull %1, ptr noundef %296) #6
  %298 = icmp eq i32 %295, %297
  br i1 %298, label %307, label %299

299:                                              ; preds = %._crit_edge272
  %300 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.20, i32 noundef 486, ptr noundef nonnull @.str.1)
  %301 = load i32, ptr %294, align 4, !tbaa !47
  %302 = load ptr, ptr %18, align 8, !tbaa !16
  %303 = tail call i32 @libmetis__ComputeVolume(ptr noundef nonnull %1, ptr noundef %302) #6
  %304 = icmp eq i32 %301, %303
  br i1 %304, label %307, label %305

305:                                              ; preds = %299
  tail call void @__assert_fail(ptr noundef nonnull @.str.21, ptr noundef nonnull @.str.1, i32 noundef 486, ptr noundef nonnull @__PRETTY_FUNCTION__.libmetis__ProjectKWayPartition) #7
  unreachable

306:                                              ; preds = %2
  tail call void (i32, ptr, ...) @gk_errexit(i32 noundef 15, ptr noundef nonnull @.str.11, i32 noundef %30) #6
  br label %307

307:                                              ; preds = %._crit_edge272, %299, %._crit_edge297, %172, %306
  %308 = getelementptr inbounds i8, ptr %6, i64 112
  %309 = load i32, ptr %308, align 8, !tbaa !63
  %310 = getelementptr inbounds i8, ptr %1, i64 112
  store i32 %309, ptr %310, align 8, !tbaa !63
  %311 = getelementptr inbounds i8, ptr %1, i64 8
  %312 = load i32, ptr %311, align 8, !tbaa !64
  %313 = mul nsw i32 %312, %4
  %314 = sext i32 %313 to i64
  %315 = getelementptr inbounds i8, ptr %6, i64 128
  %316 = load ptr, ptr %315, align 8, !tbaa !65
  %317 = getelementptr inbounds i8, ptr %1, i64 128
  %318 = load ptr, ptr %317, align 8, !tbaa !65
  %319 = tail call ptr @libmetis__icopy(i64 noundef %314, ptr noundef %316, ptr noundef %318) #6
  tail call void @libmetis__FreeGraph(ptr noundef nonnull %5) #6
  store ptr null, ptr %5, align 8, !tbaa !14
  tail call void @libmetis__wspacepop(ptr noundef %0) #6
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local void @libmetis__AllocateKWayPartitionMemory(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @gk_errexit(i32 noundef, ptr noundef, ...) local_unnamed_addr #3

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

declare void @libmetis__cnbrpoolReset(ptr noundef) local_unnamed_addr #3

declare i32 @libmetis__cnbrpoolGetNext(ptr noundef, i32 noundef) local_unnamed_addr #3

declare i32 @libmetis__CheckBnd2(ptr noundef) local_unnamed_addr #3

declare void @libmetis__vnbrpoolReset(ptr noundef) local_unnamed_addr #3

declare i32 @libmetis__vnbrpoolGetNext(ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local void @libmetis__ComputeKWayVolGains(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @libmetis__ComputeVolume(ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @libmetis__wspacepush(ptr noundef) local_unnamed_addr #3

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

declare ptr @libmetis__icopy(i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @libmetis__FreeGraph(ptr noundef) local_unnamed_addr #3

declare void @libmetis__wspacepop(ptr noundef) local_unnamed_addr #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #5

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 = { 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !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, !10, i64 200}
!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 120}
!17 = !{!15, !7, i64 0}
!18 = !{!15, !10, i64 104}
!19 = !{!15, !10, i64 16}
!20 = !{!15, !10, i64 40}
!21 = !{!15, !10, i64 48}
!22 = !{!15, !10, i64 152}
!23 = !{!15, !10, i64 144}
!24 = !{!6, !7, i64 4}
!25 = !{!15, !10, i64 176}
!26 = !{!7, !7, i64 0}
!27 = !{!28, !7, i64 4}
!28 = !{!"ckrinfo_t", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = distinct !{!31, !30, !32, !33}
!32 = !{!"llvm.loop.isvectorized", i32 1}
!33 = !{!"llvm.loop.unroll.runtime.disable"}
!34 = distinct !{!34, !30, !33, !32}
!35 = !{!28, !7, i64 0}
!36 = !{!28, !7, i64 12}
!37 = !{!6, !10, i64 264}
!38 = !{!28, !7, i64 8}
!39 = !{!40, !7, i64 0}
!40 = !{!"cnbr_t", !7, i64 0, !7, i64 4}
!41 = !{!40, !7, i64 4}
!42 = distinct !{!42, !30}
!43 = !{!6, !13, i64 248}
!44 = distinct !{!44, !30}
!45 = distinct !{!45, !30}
!46 = !{!15, !7, i64 136}
!47 = !{!15, !7, i64 116}
!48 = !{!15, !10, i64 184}
!49 = !{!50, !7, i64 4}
!50 = !{!"vkrinfo_t", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16}
!51 = distinct !{!51, !30}
!52 = !{!50, !7, i64 0}
!53 = !{!50, !7, i64 16}
!54 = !{!6, !10, i64 272}
!55 = !{!50, !7, i64 12}
!56 = !{!57, !7, i64 8}
!57 = !{!"vnbr_t", !7, i64 0, !7, i64 4, !7, i64 8}
!58 = !{!57, !7, i64 0}
!59 = !{!57, !7, i64 4}
!60 = distinct !{!60, !30}
!61 = distinct !{!61, !30}
!62 = distinct !{!62, !30}
!63 = !{!15, !7, i64 112}
!64 = !{!15, !7, i64 8}
!65 = !{!15, !10, i64 128}


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