; LLVM IR from ekoontz/graphlab :: src/graphlab/extern/metis/libmetis (kwayvolrefine)

; 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.graphdef = type { i64, i64, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, i64, i64, ptr, ptr, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, ptr, ptr, ptr, ptr }
%struct.controldef = type { i64, i64, i64, i64, i64, i64, float, i64, i64, i64, i64, %struct.workspacedef, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double }
%struct.workspacedef = type { ptr, i64, i64, ptr, ptr, i64, ptr, ptr }
%struct.vrinfodef = type { i64, i64, i64, i64, i64, ptr }
%struct.vedegreedef = type { i64, i64, i64, i64 }

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

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

60:                                               ; preds = %282, %3
  %61 = load i64, ptr %7, align 8, !tbaa !9
  %62 = load i64, ptr %13, align 8, !tbaa !9
  %63 = icmp slt i64 %61, %62
  br i1 %63, label %64, label %285

64:                                               ; preds = %60
  %65 = load ptr, ptr %25, align 8, !tbaa !5
  %66 = load i64, ptr %7, align 8, !tbaa !9
  %67 = getelementptr inbounds i64, ptr %65, i64 %66
  %68 = load i64, ptr %67, align 8, !tbaa !9
  store i64 %68, ptr %17, align 8, !tbaa !9
  %69 = load ptr, ptr %21, align 8, !tbaa !5
  %70 = load i64, ptr %7, align 8, !tbaa !9
  %71 = getelementptr inbounds i64, ptr %69, i64 %70
  %72 = load i64, ptr %71, align 8, !tbaa !9
  %73 = load ptr, ptr %24, align 8, !tbaa !5
  %74 = load i64, ptr %17, align 8, !tbaa !9
  %75 = getelementptr inbounds i64, ptr %73, i64 %74
  %76 = load i64, ptr %75, align 8, !tbaa !9
  %77 = add nsw i64 %76, %72
  store i64 %77, ptr %75, align 8, !tbaa !9
  %78 = load ptr, ptr %26, align 8, !tbaa !5
  %79 = load i64, ptr %7, align 8, !tbaa !9
  %80 = getelementptr inbounds %struct.vrinfodef, ptr %78, i64 %79
  store ptr %80, ptr %27, align 8, !tbaa !5
  %81 = load ptr, ptr %27, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.vrinfodef, ptr %81, i32 0, i32 4
  store i64 0, ptr %82, align 8, !tbaa !26
  %83 = load ptr, ptr %27, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.vrinfodef, ptr %83, i32 0, i32 2
  store i64 0, ptr %84, align 8, !tbaa !28
  %85 = load ptr, ptr %27, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.vrinfodef, ptr %85, i32 0, i32 1
  store i64 0, ptr %86, align 8, !tbaa !29
  %87 = load ptr, ptr %27, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.vrinfodef, ptr %87, i32 0, i32 0
  store i64 0, ptr %88, align 8, !tbaa !30
  %89 = load ptr, ptr %27, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.vrinfodef, ptr %89, i32 0, i32 5
  store ptr null, ptr %90, align 8, !tbaa !31
  %91 = load ptr, ptr %20, align 8, !tbaa !5
  %92 = load i64, ptr %7, align 8, !tbaa !9
  %93 = getelementptr inbounds i64, ptr %91, i64 %92
  %94 = load i64, ptr %93, align 8, !tbaa !9
  store i64 %94, ptr %9, align 8, !tbaa !9
  br label %95

95:                                               ; preds = %127, %64
  %96 = load i64, ptr %9, align 8, !tbaa !9
  %97 = load ptr, ptr %20, align 8, !tbaa !5
  %98 = load i64, ptr %7, align 8, !tbaa !9
  %99 = add nsw i64 %98, 1
  %100 = getelementptr inbounds i64, ptr %97, i64 %99
  %101 = load i64, ptr %100, align 8, !tbaa !9
  %102 = icmp slt i64 %96, %101
  br i1 %102, label %103, label %130

103:                                              ; preds = %95
  %104 = load i64, ptr %17, align 8, !tbaa !9
  %105 = load ptr, ptr %25, align 8, !tbaa !5
  %106 = load ptr, ptr %22, align 8, !tbaa !5
  %107 = load i64, ptr %9, align 8, !tbaa !9
  %108 = getelementptr inbounds i64, ptr %106, i64 %107
  %109 = load i64, ptr %108, align 8, !tbaa !9
  %110 = getelementptr inbounds i64, ptr %105, i64 %109
  %111 = load i64, ptr %110, align 8, !tbaa !9
  %112 = icmp eq i64 %104, %111
  br i1 %112, label %113, label %126

113:                                              ; preds = %103
  %114 = load ptr, ptr %23, align 8, !tbaa !5
  %115 = load i64, ptr %9, align 8, !tbaa !9
  %116 = getelementptr inbounds i64, ptr %114, i64 %115
  %117 = load i64, ptr %116, align 8, !tbaa !9
  %118 = load ptr, ptr %27, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.vrinfodef, ptr %118, i32 0, i32 0
  %120 = load i64, ptr %119, align 8, !tbaa !30
  %121 = add nsw i64 %120, %117
  store i64 %121, ptr %119, align 8, !tbaa !30
  %122 = load ptr, ptr %27, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.vrinfodef, ptr %122, i32 0, i32 2
  %124 = load i64, ptr %123, align 8, !tbaa !28
  %125 = add nsw i64 %124, 1
  store i64 %125, ptr %123, align 8, !tbaa !28
  br label %126

126:                                              ; preds = %113, %103
  br label %127

127:                                              ; preds = %126
  %128 = load i64, ptr %9, align 8, !tbaa !9
  %129 = add nsw i64 %128, 1
  store i64 %129, ptr %9, align 8, !tbaa !9
  br label %95, !llvm.loop !32

130:                                              ; preds = %95
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.graphdef, ptr %131, i32 0, i32 13
  %133 = load ptr, ptr %132, align 8, !tbaa !34
  %134 = load i64, ptr %7, align 8, !tbaa !9
  %135 = getelementptr inbounds i64, ptr %133, i64 %134
  %136 = load i64, ptr %135, align 8, !tbaa !9
  %137 = load ptr, ptr %27, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.vrinfodef, ptr %137, i32 0, i32 0
  %139 = load i64, ptr %138, align 8, !tbaa !30
  %140 = sub nsw i64 %136, %139
  %141 = load ptr, ptr %27, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.vrinfodef, ptr %141, i32 0, i32 1
  store i64 %140, ptr %142, align 8, !tbaa !29
  %143 = load ptr, ptr %27, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.vrinfodef, ptr %143, i32 0, i32 1
  %145 = load i64, ptr %144, align 8, !tbaa !29
  %146 = load i64, ptr %15, align 8, !tbaa !9
  %147 = add nsw i64 %146, %145
  store i64 %147, ptr %15, align 8, !tbaa !9
  %148 = load ptr, ptr %27, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.vrinfodef, ptr %148, i32 0, i32 1
  %150 = load i64, ptr %149, align 8, !tbaa !29
  %151 = icmp sgt i64 %150, 0
  br i1 %151, label %152, label %281

152:                                              ; preds = %130
  %153 = load ptr, ptr %4, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.controldef, ptr %153, i32 0, i32 11
  %155 = getelementptr inbounds %struct.workspacedef, ptr %154, i32 0, i32 4
  %156 = load ptr, ptr %155, align 8, !tbaa !35
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.controldef, ptr %157, i32 0, i32 11
  %159 = getelementptr inbounds %struct.workspacedef, ptr %158, i32 0, i32 5
  %160 = load i64, ptr %159, align 8, !tbaa !21
  %161 = getelementptr inbounds %struct.vedegreedef, ptr %156, i64 %160
  %162 = load ptr, ptr %27, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.vrinfodef, ptr %162, i32 0, i32 5
  store ptr %161, ptr %163, align 8, !tbaa !31
  store ptr %161, ptr %29, align 8, !tbaa !5
  %164 = load ptr, ptr %20, align 8, !tbaa !5
  %165 = load i64, ptr %7, align 8, !tbaa !9
  %166 = add nsw i64 %165, 1
  %167 = getelementptr inbounds i64, ptr %164, i64 %166
  %168 = load i64, ptr %167, align 8, !tbaa !9
  %169 = load ptr, ptr %20, align 8, !tbaa !5
  %170 = load i64, ptr %7, align 8, !tbaa !9
  %171 = getelementptr inbounds i64, ptr %169, i64 %170
  %172 = load i64, ptr %171, align 8, !tbaa !9
  %173 = sub nsw i64 %168, %172
  %174 = load ptr, ptr %4, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.controldef, ptr %174, i32 0, i32 11
  %176 = getelementptr inbounds %struct.workspacedef, ptr %175, i32 0, i32 5
  %177 = load i64, ptr %176, align 8, !tbaa !21
  %178 = add nsw i64 %177, %173
  store i64 %178, ptr %176, align 8, !tbaa !21
  %179 = load ptr, ptr %20, align 8, !tbaa !5
  %180 = load i64, ptr %7, align 8, !tbaa !9
  %181 = getelementptr inbounds i64, ptr %179, i64 %180
  %182 = load i64, ptr %181, align 8, !tbaa !9
  store i64 %182, ptr %9, align 8, !tbaa !9
  br label %183

183:                                              ; preds = %277, %152
  %184 = load i64, ptr %9, align 8, !tbaa !9
  %185 = load ptr, ptr %20, align 8, !tbaa !5
  %186 = load i64, ptr %7, align 8, !tbaa !9
  %187 = add nsw i64 %186, 1
  %188 = getelementptr inbounds i64, ptr %185, i64 %187
  %189 = load i64, ptr %188, align 8, !tbaa !9
  %190 = icmp slt i64 %184, %189
  br i1 %190, label %191, label %280

191:                                              ; preds = %183
  %192 = load ptr, ptr %25, align 8, !tbaa !5
  %193 = load ptr, ptr %22, align 8, !tbaa !5
  %194 = load i64, ptr %9, align 8, !tbaa !9
  %195 = getelementptr inbounds i64, ptr %193, i64 %194
  %196 = load i64, ptr %195, align 8, !tbaa !9
  %197 = getelementptr inbounds i64, ptr %192, i64 %196
  %198 = load i64, ptr %197, align 8, !tbaa !9
  store i64 %198, ptr %18, align 8, !tbaa !9
  %199 = load i64, ptr %17, align 8, !tbaa !9
  %200 = load i64, ptr %18, align 8, !tbaa !9
  %201 = icmp ne i64 %199, %200
  br i1 %201, label %202, label %276

202:                                              ; preds = %191
  store i64 0, ptr %10, align 8, !tbaa !9
  br label %203

203:                                              ; preds = %235, %202
  %204 = load i64, ptr %10, align 8, !tbaa !9
  %205 = load ptr, ptr %27, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.vrinfodef, ptr %205, i32 0, i32 4
  %207 = load i64, ptr %206, align 8, !tbaa !26
  %208 = icmp slt i64 %204, %207
  br i1 %208, label %209, label %238

209:                                              ; preds = %203
  %210 = load ptr, ptr %29, align 8, !tbaa !5
  %211 = load i64, ptr %10, align 8, !tbaa !9
  %212 = getelementptr inbounds %struct.vedegreedef, ptr %210, i64 %211
  %213 = getelementptr inbounds %struct.vedegreedef, ptr %212, i32 0, i32 0
  %214 = load i64, ptr %213, align 8, !tbaa !36
  %215 = load i64, ptr %18, align 8, !tbaa !9
  %216 = icmp eq i64 %214, %215
  br i1 %216, label %217, label %234

217:                                              ; preds = %209
  %218 = load ptr, ptr %23, align 8, !tbaa !5
  %219 = load i64, ptr %9, align 8, !tbaa !9
  %220 = getelementptr inbounds i64, ptr %218, i64 %219
  %221 = load i64, ptr %220, align 8, !tbaa !9
  %222 = load ptr, ptr %29, align 8, !tbaa !5
  %223 = load i64, ptr %10, align 8, !tbaa !9
  %224 = getelementptr inbounds %struct.vedegreedef, ptr %222, i64 %223
  %225 = getelementptr inbounds %struct.vedegreedef, ptr %224, i32 0, i32 1
  %226 = load i64, ptr %225, align 8, !tbaa !38
  %227 = add nsw i64 %226, %221
  store i64 %227, ptr %225, align 8, !tbaa !38
  %228 = load ptr, ptr %29, align 8, !tbaa !5
  %229 = load i64, ptr %10, align 8, !tbaa !9
  %230 = getelementptr inbounds %struct.vedegreedef, ptr %228, i64 %229
  %231 = getelementptr inbounds %struct.vedegreedef, ptr %230, i32 0, i32 2
  %232 = load i64, ptr %231, align 8, !tbaa !39
  %233 = add nsw i64 %232, 1
  store i64 %233, ptr %231, align 8, !tbaa !39
  br label %238

234:                                              ; preds = %209
  br label %235

235:                                              ; preds = %234
  %236 = load i64, ptr %10, align 8, !tbaa !9
  %237 = add nsw i64 %236, 1
  store i64 %237, ptr %10, align 8, !tbaa !9
  br label %203, !llvm.loop !40

238:                                              ; preds = %217, %203
  %239 = load i64, ptr %10, align 8, !tbaa !9
  %240 = load ptr, ptr %27, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct.vrinfodef, ptr %240, i32 0, i32 4
  %242 = load i64, ptr %241, align 8, !tbaa !26
  %243 = icmp eq i64 %239, %242
  br i1 %243, label %244, label %275

244:                                              ; preds = %238
  %245 = load ptr, ptr %29, align 8, !tbaa !5
  %246 = load ptr, ptr %27, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct.vrinfodef, ptr %246, i32 0, i32 4
  %248 = load i64, ptr %247, align 8, !tbaa !26
  %249 = getelementptr inbounds %struct.vedegreedef, ptr %245, i64 %248
  %250 = getelementptr inbounds %struct.vedegreedef, ptr %249, i32 0, i32 3
  store i64 0, ptr %250, align 8, !tbaa !41
  %251 = load i64, ptr %18, align 8, !tbaa !9
  %252 = load ptr, ptr %29, align 8, !tbaa !5
  %253 = load ptr, ptr %27, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.vrinfodef, ptr %253, i32 0, i32 4
  %255 = load i64, ptr %254, align 8, !tbaa !26
  %256 = getelementptr inbounds %struct.vedegreedef, ptr %252, i64 %255
  %257 = getelementptr inbounds %struct.vedegreedef, ptr %256, i32 0, i32 0
  store i64 %251, ptr %257, align 8, !tbaa !36
  %258 = load ptr, ptr %23, align 8, !tbaa !5
  %259 = load i64, ptr %9, align 8, !tbaa !9
  %260 = getelementptr inbounds i64, ptr %258, i64 %259
  %261 = load i64, ptr %260, align 8, !tbaa !9
  %262 = load ptr, ptr %29, align 8, !tbaa !5
  %263 = load ptr, ptr %27, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.vrinfodef, ptr %263, i32 0, i32 4
  %265 = load i64, ptr %264, align 8, !tbaa !26
  %266 = getelementptr inbounds %struct.vedegreedef, ptr %262, i64 %265
  %267 = getelementptr inbounds %struct.vedegreedef, ptr %266, i32 0, i32 1
  store i64 %261, ptr %267, align 8, !tbaa !38
  %268 = load ptr, ptr %29, align 8, !tbaa !5
  %269 = load ptr, ptr %27, align 8, !tbaa !5
  %270 = getelementptr inbounds %struct.vrinfodef, ptr %269, i32 0, i32 4
  %271 = load i64, ptr %270, align 8, !tbaa !26
  %272 = add nsw i64 %271, 1
  store i64 %272, ptr %270, align 8, !tbaa !26
  %273 = getelementptr inbounds %struct.vedegreedef, ptr %268, i64 %271
  %274 = getelementptr inbounds %struct.vedegreedef, ptr %273, i32 0, i32 2
  store i64 1, ptr %274, align 8, !tbaa !39
  br label %275

275:                                              ; preds = %244, %238
  br label %276

276:                                              ; preds = %275, %191
  br label %277

277:                                              ; preds = %276
  %278 = load i64, ptr %9, align 8, !tbaa !9
  %279 = add nsw i64 %278, 1
  store i64 %279, ptr %9, align 8, !tbaa !9
  br label %183, !llvm.loop !42

280:                                              ; preds = %183
  br label %281

281:                                              ; preds = %280, %130
  br label %282

282:                                              ; preds = %281
  %283 = load i64, ptr %7, align 8, !tbaa !9
  %284 = add nsw i64 %283, 1
  store i64 %284, ptr %7, align 8, !tbaa !9
  br label %60, !llvm.loop !43

285:                                              ; preds = %60
  %286 = load i64, ptr %15, align 8, !tbaa !9
  %287 = sdiv i64 %286, 2
  %288 = load ptr, ptr %5, align 8, !tbaa !5
  %289 = getelementptr inbounds %struct.graphdef, ptr %288, i32 0, i32 16
  store i64 %287, ptr %289, align 8, !tbaa !44
  %290 = load ptr, ptr %4, align 8, !tbaa !5
  %291 = load ptr, ptr %5, align 8, !tbaa !5
  %292 = load i64, ptr %6, align 8, !tbaa !9
  call void @libmetis__ComputeKWayVolGains(ptr noundef %290, ptr noundef %291, i64 noundef %292)
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  ret void
}

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"graphdef", !10, i64 0, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !13, i64 56, !13, i64 60, !13, i64 64, !13, i64 68, !13, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !10, i64 112, !10, i64 120, !6, i64 128, !6, i64 136, !10, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !10, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240}
!13 = !{!"int", !7, i64 0}
!14 = !{!12, !6, i64 16}
!15 = !{!12, !6, i64 24}
!16 = !{!12, !6, i64 40}
!17 = !{!12, !6, i64 48}
!18 = !{!12, !6, i64 128}
!19 = !{!12, !6, i64 136}
!20 = !{!12, !6, i64 192}
!21 = !{!22, !10, i64 128}
!22 = !{!"controldef", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !23, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !24, i64 88, !25, i64 152, !25, i64 160, !25, i64 168, !25, i64 176, !25, i64 184, !25, i64 192, !25, i64 200, !25, i64 208, !25, i64 216, !25, i64 224, !25, i64 232, !25, i64 240, !25, i64 248, !25, i64 256, !25, i64 264, !25, i64 272}
!23 = !{!"float", !7, i64 0}
!24 = !{!"workspacedef", !6, i64 0, !10, i64 8, !10, i64 16, !6, i64 24, !6, i64 32, !10, i64 40, !6, i64 48, !6, i64 56}
!25 = !{!"double", !7, i64 0}
!26 = !{!27, !10, i64 32}
!27 = !{!"vrinfodef", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !6, i64 40}
!28 = !{!27, !10, i64 16}
!29 = !{!27, !10, i64 8}
!30 = !{!27, !10, i64 0}
!31 = !{!27, !6, i64 40}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = !{!12, !6, i64 88}
!35 = !{!22, !6, i64 120}
!36 = !{!37, !10, i64 0}
!37 = !{!"vedegreedef", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!38 = !{!37, !10, i64 8}
!39 = !{!37, !10, i64 16}
!40 = distinct !{!40, !33}
!41 = !{!37, !10, i64 24}
!42 = distinct !{!42, !33}
!43 = distinct !{!43, !33}
!44 = !{!12, !10, i64 112}


; 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.vrinfodef = type { i64, i64, i64, i64, i64, ptr }
%struct.vedegreedef = type { i64, i64, i64, i64 }

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__ComputeVolKWayPartitionParams(ptr noundef %0, ptr noundef %1, i64 noundef %2) local_unnamed_addr #0 {
  %4 = load i64, ptr %1, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %1, i64 16
  %6 = load ptr, ptr %5, align 8, !tbaa !12
  %7 = getelementptr inbounds i8, ptr %1, i64 24
  %8 = load ptr, ptr %7, align 8, !tbaa !13
  %9 = getelementptr inbounds i8, ptr %1, i64 40
  %10 = load ptr, ptr %9, align 8, !tbaa !14
  %11 = getelementptr inbounds i8, ptr %1, i64 48
  %12 = load ptr, ptr %11, align 8, !tbaa !15
  %13 = getelementptr inbounds i8, ptr %1, i64 128
  %14 = load ptr, ptr %13, align 8, !tbaa !16
  %15 = getelementptr inbounds i8, ptr %1, i64 136
  %16 = load ptr, ptr %15, align 8, !tbaa !17
  %17 = tail call ptr @libmetis__idxset(i64 noundef %2, i64 noundef 0, ptr noundef %16) #3
  %18 = getelementptr inbounds i8, ptr %1, i64 192
  %19 = load ptr, ptr %18, align 8, !tbaa !18
  %20 = getelementptr inbounds i8, ptr %0, i64 128
  store i64 0, ptr %20, align 8, !tbaa !19
  %21 = icmp sgt i64 %4, 0
  br i1 %21, label %.lr.ph122, label %._crit_edge123

.lr.ph122:                                        ; preds = %3
  %22 = getelementptr inbounds i8, ptr %1, i64 88
  %23 = load ptr, ptr %22, align 8, !tbaa !24
  %24 = getelementptr inbounds i8, ptr %0, i64 120
  br label %25

25:                                               ; preds = %.lr.ph122, %.loopexit100
  %.0120 = phi i64 [ 0, %.lr.ph122 ], [ %40, %.loopexit100 ]
  %.097119 = phi i64 [ 0, %.lr.ph122 ], [ %67, %.loopexit100 ]
  %26 = getelementptr inbounds i64, ptr %14, i64 %.0120
  %27 = load i64, ptr %26, align 8, !tbaa !25
  %28 = getelementptr inbounds i64, ptr %8, i64 %.0120
  %29 = load i64, ptr %28, align 8, !tbaa !25
  %30 = getelementptr inbounds i64, ptr %17, i64 %27
  %31 = load i64, ptr %30, align 8, !tbaa !25
  %32 = add nsw i64 %31, %29
  store i64 %32, ptr %30, align 8, !tbaa !25
  %33 = getelementptr inbounds %struct.vrinfodef, ptr %19, i64 %.0120
  %34 = getelementptr inbounds i8, ptr %33, i64 32
  %35 = getelementptr inbounds i8, ptr %33, i64 16
  %36 = getelementptr inbounds i8, ptr %33, i64 8
  %37 = getelementptr inbounds i8, ptr %33, i64 40
  %38 = getelementptr inbounds i64, ptr %6, i64 %.0120
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %33, i8 0, i64 24, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %34, i8 0, i64 16, i1 false)
  %39 = load i64, ptr %38, align 8, !tbaa !25
  %40 = add nuw nsw i64 %.0120, 1
  %41 = getelementptr inbounds i64, ptr %6, i64 %40
  %42 = load i64, ptr %41, align 8, !tbaa !25
  %43 = icmp slt i64 %39, %42
  br i1 %43, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %25, %57
  %44 = phi i64 [ %58, %57 ], [ %42, %25 ]
  %45 = phi i64 [ %59, %57 ], [ 0, %25 ]
  %46 = phi i64 [ %60, %57 ], [ 0, %25 ]
  %.095108 = phi i64 [ %61, %57 ], [ %39, %25 ]
  %47 = getelementptr inbounds i64, ptr %10, i64 %.095108
  %48 = load i64, ptr %47, align 8, !tbaa !25
  %49 = getelementptr inbounds i64, ptr %14, i64 %48
  %50 = load i64, ptr %49, align 8, !tbaa !25
  %51 = icmp eq i64 %27, %50
  br i1 %51, label %52, label %57

52:                                               ; preds = %.lr.ph
  %53 = getelementptr inbounds i64, ptr %12, i64 %.095108
  %54 = load i64, ptr %53, align 8, !tbaa !25
  %55 = add nsw i64 %46, %54
  store i64 %55, ptr %33, align 8, !tbaa !26
  %56 = add nsw i64 %45, 1
  store i64 %56, ptr %35, align 8, !tbaa !28
  %.pre = load i64, ptr %41, align 8, !tbaa !25
  br label %57

57:                                               ; preds = %.lr.ph, %52
  %58 = phi i64 [ %44, %.lr.ph ], [ %.pre, %52 ]
  %59 = phi i64 [ %45, %.lr.ph ], [ %56, %52 ]
  %60 = phi i64 [ %46, %.lr.ph ], [ %55, %52 ]
  %61 = add nsw i64 %.095108, 1
  %62 = icmp slt i64 %61, %58
  br i1 %62, label %.lr.ph, label %._crit_edge, !llvm.loop !29

._crit_edge:                                      ; preds = %57, %25
  %63 = phi i64 [ 0, %25 ], [ %60, %57 ]
  %64 = getelementptr inbounds i64, ptr %23, i64 %.0120
  %65 = load i64, ptr %64, align 8, !tbaa !25
  %66 = sub nsw i64 %65, %63
  store i64 %66, ptr %36, align 8, !tbaa !31
  %67 = add nsw i64 %66, %.097119
  %68 = icmp sgt i64 %66, 0
  br i1 %68, label %69, label %.loopexit100

69:                                               ; preds = %._crit_edge
  %70 = load ptr, ptr %24, align 8, !tbaa !32
  %71 = load i64, ptr %20, align 8, !tbaa !19
  %72 = getelementptr inbounds %struct.vedegreedef, ptr %70, i64 %71
  store ptr %72, ptr %37, align 8, !tbaa !33
  %73 = load i64, ptr %41, align 8, !tbaa !25
  %74 = load i64, ptr %38, align 8, !tbaa !25
  %75 = add i64 %73, %71
  %76 = sub i64 %75, %74
  store i64 %76, ptr %20, align 8, !tbaa !19
  %77 = load i64, ptr %38, align 8, !tbaa !25
  %78 = load i64, ptr %41, align 8, !tbaa !25
  %79 = icmp slt i64 %77, %78
  br i1 %79, label %.lr.ph118, label %.loopexit100

.lr.ph118:                                        ; preds = %69, %106
  %80 = phi i64 [ %107, %106 ], [ 0, %69 ]
  %.1114 = phi i64 [ %108, %106 ], [ %77, %69 ]
  %81 = getelementptr inbounds i64, ptr %10, i64 %.1114
  %82 = load i64, ptr %81, align 8, !tbaa !25
  %83 = getelementptr inbounds i64, ptr %14, i64 %82
  %84 = load i64, ptr %83, align 8, !tbaa !25
  %.not = icmp eq i64 %27, %84
  br i1 %.not, label %106, label %.preheader

.preheader:                                       ; preds = %.lr.ph118
  %85 = icmp sgt i64 %80, 0
  br i1 %85, label %.lr.ph111, label %.loopexit

.lr.ph111:                                        ; preds = %.preheader, %96
  %.096110 = phi i64 [ %97, %96 ], [ 0, %.preheader ]
  %86 = getelementptr inbounds %struct.vedegreedef, ptr %72, i64 %.096110
  %87 = load i64, ptr %86, align 8, !tbaa !34
  %88 = icmp eq i64 %87, %84
  br i1 %88, label %89, label %96

89:                                               ; preds = %.lr.ph111
  %90 = getelementptr inbounds i64, ptr %12, i64 %.1114
  %91 = load i64, ptr %90, align 8, !tbaa !25
  %92 = getelementptr inbounds i8, ptr %86, i64 8
  %93 = load <2 x i64>, ptr %92, align 8, !tbaa !25
  %94 = insertelement <2 x i64> <i64 poison, i64 1>, i64 %91, i64 0
  %95 = add nsw <2 x i64> %93, %94
  store <2 x i64> %95, ptr %92, align 8, !tbaa !25
  br label %.loopexit

96:                                               ; preds = %.lr.ph111
  %97 = add nuw nsw i64 %.096110, 1
  %exitcond.not = icmp eq i64 %97, %80
  br i1 %exitcond.not, label %.loopexit.thread, label %.lr.ph111, !llvm.loop !36

.loopexit:                                        ; preds = %.preheader, %89
  %.096105 = phi i64 [ %.096110, %89 ], [ 0, %.preheader ]
  %98 = icmp eq i64 %.096105, %80
  br i1 %98, label %.loopexit.thread, label %106

.loopexit.thread:                                 ; preds = %96, %.loopexit
  %99 = getelementptr inbounds %struct.vedegreedef, ptr %72, i64 %80, i32 3
  store i64 0, ptr %99, align 8, !tbaa !37
  %100 = getelementptr inbounds %struct.vedegreedef, ptr %72, i64 %80
  store i64 %84, ptr %100, align 8, !tbaa !34
  %101 = getelementptr inbounds i64, ptr %12, i64 %.1114
  %102 = load i64, ptr %101, align 8, !tbaa !25
  %103 = getelementptr inbounds %struct.vedegreedef, ptr %72, i64 %80, i32 1
  store i64 %102, ptr %103, align 8, !tbaa !38
  %104 = add nsw i64 %80, 1
  store i64 %104, ptr %34, align 8, !tbaa !39
  %105 = getelementptr inbounds %struct.vedegreedef, ptr %72, i64 %80, i32 2
  store i64 1, ptr %105, align 8, !tbaa !40
  br label %106

106:                                              ; preds = %.lr.ph118, %.loopexit.thread, %.loopexit
  %107 = phi i64 [ %80, %.lr.ph118 ], [ %104, %.loopexit.thread ], [ %80, %.loopexit ]
  %108 = add nsw i64 %.1114, 1
  %109 = load i64, ptr %41, align 8, !tbaa !25
  %110 = icmp slt i64 %108, %109
  br i1 %110, label %.lr.ph118, label %.loopexit100, !llvm.loop !41

.loopexit100:                                     ; preds = %106, %69, %._crit_edge
  %exitcond128.not = icmp eq i64 %40, %4
  br i1 %exitcond128.not, label %._crit_edge123.loopexit, label %25, !llvm.loop !42

._crit_edge123.loopexit:                          ; preds = %.loopexit100
  %111 = sdiv i64 %67, 2
  br label %._crit_edge123

._crit_edge123:                                   ; preds = %._crit_edge123.loopexit, %3
  %.097.lcssa = phi i64 [ 0, %3 ], [ %111, %._crit_edge123.loopexit ]
  %112 = getelementptr inbounds i8, ptr %1, i64 112
  store i64 %.097.lcssa, ptr %112, align 8, !tbaa !43
  tail call void @libmetis__ComputeKWayVolGains(ptr noundef %0, ptr noundef nonnull %1, i64 noundef %2)
  ret void
}

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

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

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

attributes #0 = { 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 0}
!6 = !{!"graphdef", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !7, i64 112, !7, i64 120, !10, i64 128, !10, i64 136, !7, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !7, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!6, !10, i64 16}
!13 = !{!6, !10, i64 24}
!14 = !{!6, !10, i64 40}
!15 = !{!6, !10, i64 48}
!16 = !{!6, !10, i64 128}
!17 = !{!6, !10, i64 136}
!18 = !{!6, !10, i64 192}
!19 = !{!20, !7, i64 128}
!20 = !{!"controldef", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !21, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !22, i64 88, !23, i64 152, !23, i64 160, !23, i64 168, !23, i64 176, !23, i64 184, !23, i64 192, !23, i64 200, !23, i64 208, !23, i64 216, !23, i64 224, !23, i64 232, !23, i64 240, !23, i64 248, !23, i64 256, !23, i64 264, !23, i64 272}
!21 = !{!"float", !8, i64 0}
!22 = !{!"workspacedef", !10, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 32, !7, i64 40, !10, i64 48, !10, i64 56}
!23 = !{!"double", !8, i64 0}
!24 = !{!6, !10, i64 88}
!25 = !{!7, !7, i64 0}
!26 = !{!27, !7, i64 0}
!27 = !{!"vrinfodef", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !10, i64 40}
!28 = !{!27, !7, i64 16}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{!27, !7, i64 8}
!32 = !{!20, !10, i64 120}
!33 = !{!27, !10, i64 40}
!34 = !{!35, !7, i64 0}
!35 = !{!"vedegreedef", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!36 = distinct !{!36, !30}
!37 = !{!35, !7, i64 24}
!38 = !{!35, !7, i64 8}
!39 = !{!27, !7, i64 32}
!40 = !{!35, !7, i64 16}
!41 = distinct !{!41, !30}
!42 = distinct !{!42, !30}
!43 = !{!6, !7, i64 112}


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