; LLVM IR from ekoontz/graphlab :: src/graphlab/extern/metis/libmetis/kwayrefine.ll_libmetis (ProjectKWayPartition)

; 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.rinfodef = type { i64, i64, i64, 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.edegreedef = type { 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__ProjectKWayPartition(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 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
  %31 = 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) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #4
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.graphdef, ptr %32, i32 0, i32 31
  %34 = load ptr, ptr %33, align 8, !tbaa !11
  store ptr %34, ptr %26, align 8, !tbaa !5
  %35 = load ptr, ptr %26, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.graphdef, ptr %35, i32 0, i32 18
  %37 = load ptr, ptr %36, align 8, !tbaa !14
  store ptr %37, ptr %25, align 8, !tbaa !5
  %38 = load ptr, ptr %26, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.graphdef, ptr %38, i32 0, i32 25
  %40 = load ptr, ptr %39, align 8, !tbaa !15
  store ptr %40, ptr %27, align 8, !tbaa !5
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.graphdef, ptr %41, i32 0, i32 0
  %43 = load i64, ptr %42, align 8, !tbaa !16
  store i64 %43, ptr %10, align 8, !tbaa !9
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.graphdef, ptr %44, i32 0, i32 15
  %46 = load ptr, ptr %45, align 8, !tbaa !17
  store ptr %46, ptr %21, align 8, !tbaa !5
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.graphdef, ptr %47, i32 0, i32 2
  %49 = load ptr, ptr %48, align 8, !tbaa !18
  store ptr %49, ptr %17, align 8, !tbaa !5
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.graphdef, ptr %50, i32 0, i32 5
  %52 = load ptr, ptr %51, align 8, !tbaa !19
  store ptr %52, ptr %18, align 8, !tbaa !5
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.graphdef, ptr %53, i32 0, i32 6
  %55 = load ptr, ptr %54, align 8, !tbaa !20
  store ptr %55, ptr %19, align 8, !tbaa !5
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.graphdef, ptr %56, i32 0, i32 13
  %58 = load ptr, ptr %57, align 8, !tbaa !21
  store ptr %58, ptr %20, align 8, !tbaa !5
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = load i64, ptr %6, align 8, !tbaa !9
  call void @libmetis__AllocateKWayPartitionMemory(ptr noundef %59, ptr noundef %60, i64 noundef %61)
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.graphdef, ptr %62, i32 0, i32 18
  %64 = load ptr, ptr %63, align 8, !tbaa !14
  store ptr %64, ptr %22, align 8, !tbaa !5
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.graphdef, ptr %65, i32 0, i32 25
  %67 = load ptr, ptr %66, align 8, !tbaa !15
  store ptr %67, ptr %28, align 8, !tbaa !5
  %68 = load ptr, ptr %5, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.graphdef, ptr %68, i32 0, i32 22
  %70 = load ptr, ptr %69, align 8, !tbaa !22
  store ptr %70, ptr %24, align 8, !tbaa !5
  %71 = load i64, ptr %10, align 8, !tbaa !9
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.graphdef, ptr %72, i32 0, i32 21
  %74 = load ptr, ptr %73, align 8, !tbaa !23
  %75 = call ptr @libmetis__idxset(i64 noundef %71, i64 noundef -1, ptr noundef %74)
  store ptr %75, ptr %23, align 8, !tbaa !5
  store i64 0, ptr %7, align 8, !tbaa !9
  br label %76

76:                                               ; preds = %100, %3
  %77 = load i64, ptr %7, align 8, !tbaa !9
  %78 = load i64, ptr %10, align 8, !tbaa !9
  %79 = icmp slt i64 %77, %78
  br i1 %79, label %80, label %103

80:                                               ; preds = %76
  %81 = load ptr, ptr %21, align 8, !tbaa !5
  %82 = load i64, ptr %7, align 8, !tbaa !9
  %83 = getelementptr inbounds i64, ptr %81, i64 %82
  %84 = load i64, ptr %83, align 8, !tbaa !9
  store i64 %84, ptr %9, align 8, !tbaa !9
  %85 = load ptr, ptr %25, align 8, !tbaa !5
  %86 = load i64, ptr %9, align 8, !tbaa !9
  %87 = getelementptr inbounds i64, ptr %85, i64 %86
  %88 = load i64, ptr %87, align 8, !tbaa !9
  %89 = load ptr, ptr %22, align 8, !tbaa !5
  %90 = load i64, ptr %7, align 8, !tbaa !9
  %91 = getelementptr inbounds i64, ptr %89, i64 %90
  store i64 %88, ptr %91, align 8, !tbaa !9
  %92 = load ptr, ptr %27, align 8, !tbaa !5
  %93 = load i64, ptr %9, align 8, !tbaa !9
  %94 = getelementptr inbounds %struct.rinfodef, ptr %92, i64 %93
  %95 = getelementptr inbounds %struct.rinfodef, ptr %94, i32 0, i32 1
  %96 = load i64, ptr %95, align 8, !tbaa !24
  %97 = load ptr, ptr %21, align 8, !tbaa !5
  %98 = load i64, ptr %7, align 8, !tbaa !9
  %99 = getelementptr inbounds i64, ptr %97, i64 %98
  store i64 %96, ptr %99, align 8, !tbaa !9
  br label %100

100:                                              ; preds = %80
  %101 = load i64, ptr %7, align 8, !tbaa !9
  %102 = add nsw i64 %101, 1
  store i64 %102, ptr %7, align 8, !tbaa !9
  br label %76, !llvm.loop !26

103:                                              ; preds = %76
  %104 = load i64, ptr %6, align 8, !tbaa !9
  %105 = load ptr, ptr %4, align 8, !tbaa !5
  %106 = load i64, ptr %6, align 8, !tbaa !9
  %107 = call ptr @libmetis__idxwspacemalloc(ptr noundef %105, i64 noundef %106)
  %108 = call ptr @libmetis__idxset(i64 noundef %104, i64 noundef -1, ptr noundef %107)
  store ptr %108, ptr %31, align 8, !tbaa !5
  %109 = load ptr, ptr %4, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.controldef, ptr %109, i32 0, i32 11
  %111 = getelementptr inbounds %struct.workspacedef, ptr %110, i32 0, i32 5
  store i64 0, ptr %111, align 8, !tbaa !28
  store i64 0, ptr %11, align 8, !tbaa !9
  store i64 0, ptr %7, align 8, !tbaa !9
  br label %112

112:                                              ; preds = %304, %103
  %113 = load i64, ptr %7, align 8, !tbaa !9
  %114 = load i64, ptr %10, align 8, !tbaa !9
  %115 = icmp slt i64 %113, %114
  br i1 %115, label %116, label %307

116:                                              ; preds = %112
  %117 = load ptr, ptr %22, align 8, !tbaa !5
  %118 = load i64, ptr %7, align 8, !tbaa !9
  %119 = getelementptr inbounds i64, ptr %117, i64 %118
  %120 = load i64, ptr %119, align 8, !tbaa !9
  store i64 %120, ptr %12, align 8, !tbaa !9
  %121 = load ptr, ptr %28, align 8, !tbaa !5
  %122 = load i64, ptr %7, align 8, !tbaa !9
  %123 = getelementptr inbounds %struct.rinfodef, ptr %121, i64 %122
  store ptr %123, ptr %29, align 8, !tbaa !5
  %124 = load ptr, ptr %29, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.rinfodef, ptr %124, i32 0, i32 2
  store i64 0, ptr %125, align 8, !tbaa !33
  %126 = load ptr, ptr %29, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.rinfodef, ptr %126, i32 0, i32 1
  store i64 0, ptr %127, align 8, !tbaa !24
  %128 = load ptr, ptr %29, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.rinfodef, ptr %128, i32 0, i32 0
  store i64 0, ptr %129, align 8, !tbaa !34
  %130 = load ptr, ptr %29, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.rinfodef, ptr %130, i32 0, i32 3
  store ptr null, ptr %131, align 8, !tbaa !35
  %132 = load ptr, ptr %20, align 8, !tbaa !5
  %133 = load i64, ptr %7, align 8, !tbaa !9
  %134 = getelementptr inbounds i64, ptr %132, i64 %133
  %135 = load i64, ptr %134, align 8, !tbaa !9
  %136 = load ptr, ptr %29, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.rinfodef, ptr %136, i32 0, i32 0
  store i64 %135, ptr %137, align 8, !tbaa !34
  %138 = load ptr, ptr %21, align 8, !tbaa !5
  %139 = load i64, ptr %7, align 8, !tbaa !9
  %140 = getelementptr inbounds i64, ptr %138, i64 %139
  %141 = load i64, ptr %140, align 8, !tbaa !9
  %142 = icmp sgt i64 %141, 0
  br i1 %142, label %143, label %303

143:                                              ; preds = %116
  %144 = load ptr, ptr %17, align 8, !tbaa !5
  %145 = load i64, ptr %7, align 8, !tbaa !9
  %146 = getelementptr inbounds i64, ptr %144, i64 %145
  %147 = load i64, ptr %146, align 8, !tbaa !9
  store i64 %147, ptr %14, align 8, !tbaa !9
  %148 = load ptr, ptr %17, align 8, !tbaa !5
  %149 = load i64, ptr %7, align 8, !tbaa !9
  %150 = add nsw i64 %149, 1
  %151 = getelementptr inbounds i64, ptr %148, i64 %150
  %152 = load i64, ptr %151, align 8, !tbaa !9
  store i64 %152, ptr %15, align 8, !tbaa !9
  %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 3
  %156 = load ptr, ptr %155, align 8, !tbaa !36
  %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 !28
  %161 = getelementptr inbounds %struct.edegreedef, ptr %156, i64 %160
  %162 = load ptr, ptr %29, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.rinfodef, ptr %162, i32 0, i32 3
  store ptr %161, ptr %163, align 8, !tbaa !35
  store ptr %161, ptr %30, align 8, !tbaa !5
  %164 = load i64, ptr %15, align 8, !tbaa !9
  %165 = load i64, ptr %14, align 8, !tbaa !9
  %166 = sub nsw i64 %164, %165
  %167 = load ptr, ptr %4, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.controldef, ptr %167, i32 0, i32 11
  %169 = getelementptr inbounds %struct.workspacedef, ptr %168, i32 0, i32 5
  %170 = load i64, ptr %169, align 8, !tbaa !28
  %171 = add nsw i64 %170, %166
  store i64 %171, ptr %169, align 8, !tbaa !28
  store i64 0, ptr %16, align 8, !tbaa !9
  %172 = load i64, ptr %14, align 8, !tbaa !9
  store i64 %172, ptr %8, align 8, !tbaa !9
  br label %173

173:                                              ; preds = %234, %143
  %174 = load i64, ptr %8, align 8, !tbaa !9
  %175 = load i64, ptr %15, align 8, !tbaa !9
  %176 = icmp slt i64 %174, %175
  br i1 %176, label %177, label %237

177:                                              ; preds = %173
  %178 = load ptr, ptr %22, align 8, !tbaa !5
  %179 = load ptr, ptr %18, align 8, !tbaa !5
  %180 = load i64, ptr %8, align 8, !tbaa !9
  %181 = getelementptr inbounds i64, ptr %179, i64 %180
  %182 = load i64, ptr %181, align 8, !tbaa !9
  %183 = getelementptr inbounds i64, ptr %178, i64 %182
  %184 = load i64, ptr %183, align 8, !tbaa !9
  store i64 %184, ptr %13, align 8, !tbaa !9
  %185 = load i64, ptr %12, align 8, !tbaa !9
  %186 = load i64, ptr %13, align 8, !tbaa !9
  %187 = icmp ne i64 %185, %186
  br i1 %187, label %188, label %233

188:                                              ; preds = %177
  %189 = load ptr, ptr %19, align 8, !tbaa !5
  %190 = load i64, ptr %8, align 8, !tbaa !9
  %191 = getelementptr inbounds i64, ptr %189, i64 %190
  %192 = load i64, ptr %191, align 8, !tbaa !9
  %193 = load ptr, ptr %29, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.rinfodef, ptr %193, i32 0, i32 1
  %195 = load i64, ptr %194, align 8, !tbaa !24
  %196 = add nsw i64 %195, %192
  store i64 %196, ptr %194, align 8, !tbaa !24
  %197 = load ptr, ptr %31, align 8, !tbaa !5
  %198 = load i64, ptr %13, align 8, !tbaa !9
  %199 = getelementptr inbounds i64, ptr %197, i64 %198
  %200 = load i64, ptr %199, align 8, !tbaa !9
  store i64 %200, ptr %9, align 8, !tbaa !9
  %201 = icmp eq i64 %200, -1
  br i1 %201, label %202, label %221

202:                                              ; preds = %188
  %203 = load i64, ptr %16, align 8, !tbaa !9
  %204 = load ptr, ptr %31, align 8, !tbaa !5
  %205 = load i64, ptr %13, align 8, !tbaa !9
  %206 = getelementptr inbounds i64, ptr %204, i64 %205
  store i64 %203, ptr %206, align 8, !tbaa !9
  %207 = load i64, ptr %13, align 8, !tbaa !9
  %208 = load ptr, ptr %30, align 8, !tbaa !5
  %209 = load i64, ptr %16, align 8, !tbaa !9
  %210 = getelementptr inbounds %struct.edegreedef, ptr %208, i64 %209
  %211 = getelementptr inbounds %struct.edegreedef, ptr %210, i32 0, i32 0
  store i64 %207, ptr %211, align 8, !tbaa !37
  %212 = load ptr, ptr %19, align 8, !tbaa !5
  %213 = load i64, ptr %8, align 8, !tbaa !9
  %214 = getelementptr inbounds i64, ptr %212, i64 %213
  %215 = load i64, ptr %214, align 8, !tbaa !9
  %216 = load ptr, ptr %30, align 8, !tbaa !5
  %217 = load i64, ptr %16, align 8, !tbaa !9
  %218 = add nsw i64 %217, 1
  store i64 %218, ptr %16, align 8, !tbaa !9
  %219 = getelementptr inbounds %struct.edegreedef, ptr %216, i64 %217
  %220 = getelementptr inbounds %struct.edegreedef, ptr %219, i32 0, i32 1
  store i64 %215, ptr %220, align 8, !tbaa !39
  br label %232

221:                                              ; preds = %188
  %222 = load ptr, ptr %19, align 8, !tbaa !5
  %223 = load i64, ptr %8, align 8, !tbaa !9
  %224 = getelementptr inbounds i64, ptr %222, i64 %223
  %225 = load i64, ptr %224, align 8, !tbaa !9
  %226 = load ptr, ptr %30, align 8, !tbaa !5
  %227 = load i64, ptr %9, align 8, !tbaa !9
  %228 = getelementptr inbounds %struct.edegreedef, ptr %226, i64 %227
  %229 = getelementptr inbounds %struct.edegreedef, ptr %228, i32 0, i32 1
  %230 = load i64, ptr %229, align 8, !tbaa !39
  %231 = add nsw i64 %230, %225
  store i64 %231, ptr %229, align 8, !tbaa !39
  br label %232

232:                                              ; preds = %221, %202
  br label %233

233:                                              ; preds = %232, %177
  br label %234

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

237:                                              ; preds = %173
  %238 = load ptr, ptr %29, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.rinfodef, ptr %238, i32 0, i32 1
  %240 = load i64, ptr %239, align 8, !tbaa !24
  %241 = load ptr, ptr %29, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct.rinfodef, ptr %241, i32 0, i32 0
  %243 = load i64, ptr %242, align 8, !tbaa !34
  %244 = sub nsw i64 %243, %240
  store i64 %244, ptr %242, align 8, !tbaa !34
  %245 = load ptr, ptr %29, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.rinfodef, ptr %245, i32 0, i32 1
  %247 = load i64, ptr %246, align 8, !tbaa !24
  %248 = icmp eq i64 %247, 0
  br i1 %248, label %249, label %260

249:                                              ; preds = %237
  %250 = load ptr, ptr %29, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.rinfodef, ptr %250, i32 0, i32 3
  store ptr null, ptr %251, align 8, !tbaa !35
  %252 = load i64, ptr %15, align 8, !tbaa !9
  %253 = load i64, ptr %14, align 8, !tbaa !9
  %254 = sub nsw i64 %252, %253
  %255 = load ptr, ptr %4, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct.controldef, ptr %255, i32 0, i32 11
  %257 = getelementptr inbounds %struct.workspacedef, ptr %256, i32 0, i32 5
  %258 = load i64, ptr %257, align 8, !tbaa !28
  %259 = sub nsw i64 %258, %254
  store i64 %259, ptr %257, align 8, !tbaa !28
  br label %302

260:                                              ; preds = %237
  %261 = load ptr, ptr %29, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct.rinfodef, ptr %261, i32 0, i32 1
  %263 = load i64, ptr %262, align 8, !tbaa !24
  %264 = load ptr, ptr %29, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.rinfodef, ptr %264, i32 0, i32 0
  %266 = load i64, ptr %265, align 8, !tbaa !34
  %267 = sub nsw i64 %263, %266
  %268 = icmp sge i64 %267, 0
  br i1 %268, label %269, label %282

269:                                              ; preds = %260
  br label %270

270:                                              ; preds = %269
  %271 = load i64, ptr %7, align 8, !tbaa !9
  %272 = load ptr, ptr %24, align 8, !tbaa !5
  %273 = load i64, ptr %11, align 8, !tbaa !9
  %274 = getelementptr inbounds i64, ptr %272, i64 %273
  store i64 %271, ptr %274, align 8, !tbaa !9
  %275 = load i64, ptr %11, align 8, !tbaa !9
  %276 = add nsw i64 %275, 1
  store i64 %276, ptr %11, align 8, !tbaa !9
  %277 = load ptr, ptr %23, align 8, !tbaa !5
  %278 = load i64, ptr %7, align 8, !tbaa !9
  %279 = getelementptr inbounds i64, ptr %277, i64 %278
  store i64 %275, ptr %279, align 8, !tbaa !9
  br label %280

280:                                              ; preds = %270
  br label %281

281:                                              ; preds = %280
  br label %282

282:                                              ; preds = %281, %260
  %283 = load i64, ptr %16, align 8, !tbaa !9
  %284 = load ptr, ptr %29, align 8, !tbaa !5
  %285 = getelementptr inbounds %struct.rinfodef, ptr %284, i32 0, i32 2
  store i64 %283, ptr %285, align 8, !tbaa !33
  store i64 0, ptr %8, align 8, !tbaa !9
  br label %286

286:                                              ; preds = %298, %282
  %287 = load i64, ptr %8, align 8, !tbaa !9
  %288 = load i64, ptr %16, align 8, !tbaa !9
  %289 = icmp slt i64 %287, %288
  br i1 %289, label %290, label %301

290:                                              ; preds = %286
  %291 = load ptr, ptr %31, align 8, !tbaa !5
  %292 = load ptr, ptr %30, align 8, !tbaa !5
  %293 = load i64, ptr %8, align 8, !tbaa !9
  %294 = getelementptr inbounds %struct.edegreedef, ptr %292, i64 %293
  %295 = getelementptr inbounds %struct.edegreedef, ptr %294, i32 0, i32 0
  %296 = load i64, ptr %295, align 8, !tbaa !37
  %297 = getelementptr inbounds i64, ptr %291, i64 %296
  store i64 -1, ptr %297, align 8, !tbaa !9
  br label %298

298:                                              ; preds = %290
  %299 = load i64, ptr %8, align 8, !tbaa !9
  %300 = add nsw i64 %299, 1
  store i64 %300, ptr %8, align 8, !tbaa !9
  br label %286, !llvm.loop !41

301:                                              ; preds = %286
  br label %302

302:                                              ; preds = %301, %249
  br label %303

303:                                              ; preds = %302, %116
  br label %304

304:                                              ; preds = %303
  %305 = load i64, ptr %7, align 8, !tbaa !9
  %306 = add nsw i64 %305, 1
  store i64 %306, ptr %7, align 8, !tbaa !9
  br label %112, !llvm.loop !42

307:                                              ; preds = %112
  %308 = load ptr, ptr %5, align 8, !tbaa !5
  %309 = getelementptr inbounds %struct.graphdef, ptr %308, i32 0, i32 19
  %310 = load ptr, ptr %309, align 8, !tbaa !43
  %311 = load ptr, ptr %26, align 8, !tbaa !5
  %312 = getelementptr inbounds %struct.graphdef, ptr %311, i32 0, i32 19
  %313 = load ptr, ptr %312, align 8, !tbaa !43
  %314 = load i64, ptr %6, align 8, !tbaa !9
  %315 = mul i64 8, %314
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %310, ptr align 1 %313, i64 %315, i1 false)
  %316 = load ptr, ptr %26, align 8, !tbaa !5
  %317 = getelementptr inbounds %struct.graphdef, ptr %316, i32 0, i32 16
  %318 = load i64, ptr %317, align 8, !tbaa !44
  %319 = load ptr, ptr %5, align 8, !tbaa !5
  %320 = getelementptr inbounds %struct.graphdef, ptr %319, i32 0, i32 16
  store i64 %318, ptr %320, align 8, !tbaa !44
  %321 = load i64, ptr %11, align 8, !tbaa !9
  %322 = load ptr, ptr %5, align 8, !tbaa !5
  %323 = getelementptr inbounds %struct.graphdef, ptr %322, i32 0, i32 20
  store i64 %321, ptr %323, align 8, !tbaa !45
  %324 = load ptr, ptr %5, align 8, !tbaa !5
  %325 = getelementptr inbounds %struct.graphdef, ptr %324, i32 0, i32 31
  %326 = load ptr, ptr %325, align 8, !tbaa !11
  call void @libmetis__FreeGraph(ptr noundef %326, i32 noundef 1)
  %327 = load ptr, ptr %5, align 8, !tbaa !5
  %328 = getelementptr inbounds %struct.graphdef, ptr %327, i32 0, i32 31
  store ptr null, ptr %328, align 8, !tbaa !11
  %329 = load ptr, ptr %4, align 8, !tbaa !5
  %330 = load i64, ptr %6, align 8, !tbaa !9
  call void @libmetis__idxwspacefree(ptr noundef %329, i64 noundef %330)
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  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, i64 noundef) #1

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

declare void @libmetis__FreeGraph(ptr noundef, i32 noundef) #2

declare void @libmetis__idxwspacefree(ptr noundef, i64 noundef) #2

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !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, !6, i64 232}
!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 128}
!15 = !{!12, !6, i64 184}
!16 = !{!12, !10, i64 0}
!17 = !{!12, !6, i64 104}
!18 = !{!12, !6, i64 16}
!19 = !{!12, !6, i64 40}
!20 = !{!12, !6, i64 48}
!21 = !{!12, !6, i64 88}
!22 = !{!12, !6, i64 160}
!23 = !{!12, !6, i64 152}
!24 = !{!25, !10, i64 8}
!25 = !{!"rinfodef", !10, i64 0, !10, i64 8, !10, i64 16, !6, i64 24}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!29, !10, i64 128}
!29 = !{!"controldef", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !30, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !31, i64 88, !32, i64 152, !32, i64 160, !32, i64 168, !32, i64 176, !32, i64 184, !32, i64 192, !32, i64 200, !32, i64 208, !32, i64 216, !32, i64 224, !32, i64 232, !32, i64 240, !32, i64 248, !32, i64 256, !32, i64 264, !32, i64 272}
!30 = !{!"float", !7, i64 0}
!31 = !{!"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}
!32 = !{!"double", !7, i64 0}
!33 = !{!25, !10, i64 16}
!34 = !{!25, !10, i64 0}
!35 = !{!25, !6, i64 24}
!36 = !{!29, !6, i64 112}
!37 = !{!38, !10, i64 0}
!38 = !{!"edegreedef", !10, i64 0, !10, i64 8}
!39 = !{!38, !10, i64 8}
!40 = distinct !{!40, !27}
!41 = distinct !{!41, !27}
!42 = distinct !{!42, !27}
!43 = !{!12, !6, i64 136}
!44 = !{!12, !10, i64 112}
!45 = !{!12, !10, i64 144}


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

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__ProjectKWayPartition(ptr noundef %0, ptr noundef %1, i64 noundef %2) local_unnamed_addr #0 {
  %4 = getelementptr inbounds i8, ptr %1, i64 232
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %5, i64 128
  %7 = load ptr, ptr %6, align 8, !tbaa !12
  %8 = getelementptr inbounds i8, ptr %5, i64 184
  %9 = load ptr, ptr %8, align 8, !tbaa !13
  %10 = load i64, ptr %1, align 8, !tbaa !14
  %11 = getelementptr inbounds i8, ptr %1, i64 104
  %12 = load ptr, ptr %11, align 8, !tbaa !15
  %13 = getelementptr inbounds i8, ptr %1, i64 16
  %14 = load ptr, ptr %13, align 8, !tbaa !16
  %15 = getelementptr inbounds i8, ptr %1, i64 40
  %16 = load ptr, ptr %15, align 8, !tbaa !17
  %17 = getelementptr inbounds i8, ptr %1, i64 48
  %18 = load ptr, ptr %17, align 8, !tbaa !18
  %19 = getelementptr inbounds i8, ptr %1, i64 88
  %20 = load ptr, ptr %19, align 8, !tbaa !19
  tail call void @libmetis__AllocateKWayPartitionMemory(ptr noundef %0, ptr noundef nonnull %1, i64 noundef %2)
  %21 = getelementptr inbounds i8, ptr %1, i64 128
  %22 = load ptr, ptr %21, align 8, !tbaa !12
  %23 = getelementptr inbounds i8, ptr %1, i64 184
  %24 = load ptr, ptr %23, align 8, !tbaa !13
  %25 = getelementptr inbounds i8, ptr %1, i64 160
  %26 = load ptr, ptr %25, align 8, !tbaa !20
  %27 = getelementptr inbounds i8, ptr %1, i64 152
  %28 = load ptr, ptr %27, align 8, !tbaa !21
  %29 = tail call ptr @libmetis__idxset(i64 noundef %10, i64 noundef -1, ptr noundef %28) #4
  %30 = icmp sgt i64 %10, 0
  br i1 %30, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %3
  %xtraiter = and i64 %10, 1
  %31 = icmp eq i64 %10, 1
  br i1 %31, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %10, 9223372036854775806
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %.0132 = phi i64 [ 0, %.lr.ph.preheader.new ], [ %47, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.1, %.lr.ph ]
  %32 = getelementptr inbounds i64, ptr %12, i64 %.0132
  %33 = load i64, ptr %32, align 8, !tbaa !22
  %34 = getelementptr inbounds i64, ptr %7, i64 %33
  %35 = load i64, ptr %34, align 8, !tbaa !22
  %36 = getelementptr inbounds i64, ptr %22, i64 %.0132
  store i64 %35, ptr %36, align 8, !tbaa !22
  %37 = getelementptr inbounds %struct.rinfodef, ptr %9, i64 %33, i32 1
  %38 = load i64, ptr %37, align 8, !tbaa !23
  store i64 %38, ptr %32, align 8, !tbaa !22
  %39 = or disjoint i64 %.0132, 1
  %40 = getelementptr inbounds i64, ptr %12, i64 %39
  %41 = load i64, ptr %40, align 8, !tbaa !22
  %42 = getelementptr inbounds i64, ptr %7, i64 %41
  %43 = load i64, ptr %42, align 8, !tbaa !22
  %44 = getelementptr inbounds i64, ptr %22, i64 %39
  store i64 %43, ptr %44, align 8, !tbaa !22
  %45 = getelementptr inbounds %struct.rinfodef, ptr %9, i64 %41, i32 1
  %46 = load i64, ptr %45, align 8, !tbaa !23
  store i64 %46, ptr %40, align 8, !tbaa !22
  %47 = add nuw nsw i64 %.0132, 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 %.lr.ph, !llvm.loop !25

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph, %.lr.ph.preheader
  %.0132.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %47, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa
  %48 = getelementptr inbounds i64, ptr %12, i64 %.0132.unr
  %49 = load i64, ptr %48, align 8, !tbaa !22
  %50 = getelementptr inbounds i64, ptr %7, i64 %49
  %51 = load i64, ptr %50, align 8, !tbaa !22
  %52 = getelementptr inbounds i64, ptr %22, i64 %.0132.unr
  store i64 %51, ptr %52, align 8, !tbaa !22
  %53 = getelementptr inbounds %struct.rinfodef, ptr %9, i64 %49, i32 1
  %54 = load i64, ptr %53, align 8, !tbaa !23
  store i64 %54, ptr %48, align 8, !tbaa !22
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph.epil, %._crit_edge.loopexit.unr-lcssa, %3
  %55 = tail call ptr @libmetis__idxwspacemalloc(ptr noundef %0, i64 noundef %2) #4
  %56 = tail call ptr @libmetis__idxset(i64 noundef %2, i64 noundef -1, ptr noundef %55) #4
  %57 = getelementptr inbounds i8, ptr %0, i64 128
  store i64 0, ptr %57, align 8, !tbaa !27
  br i1 %30, label %.lr.ph145, label %._crit_edge146

.lr.ph145:                                        ; preds = %._crit_edge
  %58 = getelementptr inbounds i8, ptr %0, i64 112
  br label %59

59:                                               ; preds = %.lr.ph145, %.loopexit
  %.1142 = phi i64 [ 0, %.lr.ph145 ], [ %139, %.loopexit ]
  %.0123141 = phi i64 [ 0, %.lr.ph145 ], [ %.2, %.loopexit ]
  %60 = getelementptr inbounds i64, ptr %22, i64 %.1142
  %61 = load i64, ptr %60, align 8, !tbaa !22
  %62 = getelementptr inbounds %struct.rinfodef, ptr %24, i64 %.1142
  %63 = getelementptr inbounds i8, ptr %62, i64 16
  %64 = getelementptr inbounds i8, ptr %62, i64 8
  %65 = getelementptr inbounds i8, ptr %62, i64 24
  %66 = getelementptr inbounds i64, ptr %20, i64 %.1142
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %62, i8 0, i64 32, i1 false)
  %67 = load i64, ptr %66, align 8, !tbaa !22
  store i64 %67, ptr %62, align 8, !tbaa !32
  %68 = getelementptr inbounds i64, ptr %12, i64 %.1142
  %69 = load i64, ptr %68, align 8, !tbaa !22
  %70 = icmp sgt i64 %69, 0
  br i1 %70, label %71, label %.loopexit

71:                                               ; preds = %59
  %72 = getelementptr inbounds i64, ptr %14, i64 %.1142
  %73 = load i64, ptr %72, align 8, !tbaa !22
  %74 = getelementptr inbounds i8, ptr %72, i64 8
  %75 = load i64, ptr %74, align 8, !tbaa !22
  %76 = load ptr, ptr %58, align 8, !tbaa !33
  %77 = load i64, ptr %57, align 8, !tbaa !27
  %78 = getelementptr inbounds %struct.edegreedef, ptr %76, i64 %77
  store ptr %78, ptr %65, align 8, !tbaa !34
  %79 = sub nsw i64 %75, %73
  %80 = add nsw i64 %77, %79
  store i64 %80, ptr %57, align 8, !tbaa !27
  %81 = icmp slt i64 %73, %75
  br i1 %81, label %.lr.ph136, label %._crit_edge137.thread

._crit_edge137.thread:                            ; preds = %71
  store i64 %67, ptr %62, align 8, !tbaa !32
  br label %108

.lr.ph136:                                        ; preds = %71, %104
  %.0121134 = phi i64 [ %105, %104 ], [ %73, %71 ]
  %.0125133 = phi i64 [ %.1126, %104 ], [ 0, %71 ]
  %82 = getelementptr inbounds i64, ptr %16, i64 %.0121134
  %83 = load i64, ptr %82, align 8, !tbaa !22
  %84 = getelementptr inbounds i64, ptr %22, i64 %83
  %85 = load i64, ptr %84, align 8, !tbaa !22
  %.not131 = icmp eq i64 %61, %85
  br i1 %.not131, label %104, label %86

86:                                               ; preds = %.lr.ph136
  %87 = getelementptr inbounds i64, ptr %18, i64 %.0121134
  %88 = load i64, ptr %87, align 8, !tbaa !22
  %89 = load i64, ptr %64, align 8, !tbaa !23
  %90 = add nsw i64 %89, %88
  store i64 %90, ptr %64, align 8, !tbaa !23
  %91 = getelementptr inbounds i64, ptr %56, i64 %85
  %92 = load i64, ptr %91, align 8, !tbaa !22
  %93 = icmp eq i64 %92, -1
  br i1 %93, label %94, label %99

94:                                               ; preds = %86
  store i64 %.0125133, ptr %91, align 8, !tbaa !22
  %95 = getelementptr inbounds %struct.edegreedef, ptr %78, i64 %.0125133
  store i64 %85, ptr %95, align 8, !tbaa !35
  %96 = load i64, ptr %87, align 8, !tbaa !22
  %97 = add nsw i64 %.0125133, 1
  %98 = getelementptr inbounds i8, ptr %95, i64 8
  store i64 %96, ptr %98, align 8, !tbaa !37
  br label %104

99:                                               ; preds = %86
  %100 = load i64, ptr %87, align 8, !tbaa !22
  %101 = getelementptr inbounds %struct.edegreedef, ptr %78, i64 %92, i32 1
  %102 = load i64, ptr %101, align 8, !tbaa !37
  %103 = add nsw i64 %102, %100
  store i64 %103, ptr %101, align 8, !tbaa !37
  br label %104

104:                                              ; preds = %.lr.ph136, %99, %94
  %.1126 = phi i64 [ %97, %94 ], [ %.0125133, %99 ], [ %.0125133, %.lr.ph136 ]
  %105 = add nsw i64 %.0121134, 1
  %exitcond148.not = icmp eq i64 %105, %75
  br i1 %exitcond148.not, label %._crit_edge137, label %.lr.ph136, !llvm.loop !38

._crit_edge137:                                   ; preds = %104
  %.pre = load i64, ptr %64, align 8, !tbaa !23
  %.pre151 = load i64, ptr %62, align 8, !tbaa !32
  %106 = sub nsw i64 %.pre151, %.pre
  store i64 %106, ptr %62, align 8, !tbaa !32
  %107 = icmp eq i64 %.pre, 0
  br i1 %107, label %108, label %111

108:                                              ; preds = %._crit_edge137.thread, %._crit_edge137
  store ptr null, ptr %65, align 8, !tbaa !34
  %109 = load i64, ptr %57, align 8, !tbaa !27
  %110 = sub nsw i64 %109, %79
  store i64 %110, ptr %57, align 8, !tbaa !27
  br label %.loopexit

111:                                              ; preds = %._crit_edge137
  %.not = icmp slt i64 %.pre, %106
  br i1 %.not, label %116, label %112

112:                                              ; preds = %111
  %113 = getelementptr inbounds i64, ptr %26, i64 %.0123141
  store i64 %.1142, ptr %113, align 8, !tbaa !22
  %114 = add nsw i64 %.0123141, 1
  %115 = getelementptr inbounds i64, ptr %29, i64 %.1142
  store i64 %.0123141, ptr %115, align 8, !tbaa !22
  br label %116

116:                                              ; preds = %112, %111
  %.1124 = phi i64 [ %114, %112 ], [ %.0123141, %111 ]
  store i64 %.1126, ptr %63, align 8, !tbaa !39
  %117 = icmp sgt i64 %.1126, 0
  br i1 %117, label %.lr.ph140.preheader, label %.loopexit

.lr.ph140.preheader:                              ; preds = %116
  %xtraiter153 = and i64 %.1126, 3
  %118 = icmp ult i64 %.1126, 4
  br i1 %118, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph140.preheader.new

.lr.ph140.preheader.new:                          ; preds = %.lr.ph140.preheader
  %unroll_iter155 = and i64 %.1126, 9223372036854775804
  br label %.lr.ph140

.lr.ph140:                                        ; preds = %.lr.ph140, %.lr.ph140.preheader.new
  %.1122138 = phi i64 [ 0, %.lr.ph140.preheader.new ], [ %134, %.lr.ph140 ]
  %niter156 = phi i64 [ 0, %.lr.ph140.preheader.new ], [ %niter156.next.3, %.lr.ph140 ]
  %119 = getelementptr inbounds %struct.edegreedef, ptr %78, i64 %.1122138
  %120 = load i64, ptr %119, align 8, !tbaa !35
  %121 = getelementptr inbounds i64, ptr %56, i64 %120
  store i64 -1, ptr %121, align 8, !tbaa !22
  %122 = or disjoint i64 %.1122138, 1
  %123 = getelementptr inbounds %struct.edegreedef, ptr %78, i64 %122
  %124 = load i64, ptr %123, align 8, !tbaa !35
  %125 = getelementptr inbounds i64, ptr %56, i64 %124
  store i64 -1, ptr %125, align 8, !tbaa !22
  %126 = or disjoint i64 %.1122138, 2
  %127 = getelementptr inbounds %struct.edegreedef, ptr %78, i64 %126
  %128 = load i64, ptr %127, align 8, !tbaa !35
  %129 = getelementptr inbounds i64, ptr %56, i64 %128
  store i64 -1, ptr %129, align 8, !tbaa !22
  %130 = or disjoint i64 %.1122138, 3
  %131 = getelementptr inbounds %struct.edegreedef, ptr %78, i64 %130
  %132 = load i64, ptr %131, align 8, !tbaa !35
  %133 = getelementptr inbounds i64, ptr %56, i64 %132
  store i64 -1, ptr %133, align 8, !tbaa !22
  %134 = add nuw nsw i64 %.1122138, 4
  %niter156.next.3 = add i64 %niter156, 4
  %niter156.ncmp.3 = icmp eq i64 %niter156.next.3, %unroll_iter155
  br i1 %niter156.ncmp.3, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph140, !llvm.loop !40

.loopexit.loopexit.unr-lcssa:                     ; preds = %.lr.ph140, %.lr.ph140.preheader
  %.1122138.unr = phi i64 [ 0, %.lr.ph140.preheader ], [ %134, %.lr.ph140 ]
  %lcmp.mod154.not = icmp eq i64 %xtraiter153, 0
  br i1 %lcmp.mod154.not, label %.loopexit, label %.lr.ph140.epil

.lr.ph140.epil:                                   ; preds = %.loopexit.loopexit.unr-lcssa, %.lr.ph140.epil
  %.1122138.epil = phi i64 [ %138, %.lr.ph140.epil ], [ %.1122138.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph140.epil ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %135 = getelementptr inbounds %struct.edegreedef, ptr %78, i64 %.1122138.epil
  %136 = load i64, ptr %135, align 8, !tbaa !35
  %137 = getelementptr inbounds i64, ptr %56, i64 %136
  store i64 -1, ptr %137, align 8, !tbaa !22
  %138 = add nuw nsw i64 %.1122138.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter153
  br i1 %epil.iter.cmp.not, label %.loopexit, label %.lr.ph140.epil, !llvm.loop !41

.loopexit:                                        ; preds = %.loopexit.loopexit.unr-lcssa, %.lr.ph140.epil, %116, %59, %108
  %.2 = phi i64 [ %.0123141, %108 ], [ %.0123141, %59 ], [ %.1124, %116 ], [ %.1124, %.lr.ph140.epil ], [ %.1124, %.loopexit.loopexit.unr-lcssa ]
  %139 = add nuw nsw i64 %.1142, 1
  %exitcond150.not = icmp eq i64 %139, %10
  br i1 %exitcond150.not, label %._crit_edge146, label %59, !llvm.loop !43

._crit_edge146:                                   ; preds = %.loopexit, %._crit_edge
  %.0123.lcssa = phi i64 [ 0, %._crit_edge ], [ %.2, %.loopexit ]
  %140 = getelementptr inbounds i8, ptr %1, i64 136
  %141 = load ptr, ptr %140, align 8, !tbaa !44
  %142 = getelementptr inbounds i8, ptr %5, i64 136
  %143 = load ptr, ptr %142, align 8, !tbaa !44
  %144 = shl i64 %2, 3
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %141, ptr align 1 %143, i64 %144, i1 false)
  %145 = getelementptr inbounds i8, ptr %5, i64 112
  %146 = load i64, ptr %145, align 8, !tbaa !45
  %147 = getelementptr inbounds i8, ptr %1, i64 112
  store i64 %146, ptr %147, align 8, !tbaa !45
  %148 = getelementptr inbounds i8, ptr %1, i64 144
  store i64 %.0123.lcssa, ptr %148, align 8, !tbaa !46
  %149 = load ptr, ptr %4, align 8, !tbaa !5
  tail call void @libmetis__FreeGraph(ptr noundef %149, i32 noundef 1) #4
  store ptr null, ptr %4, align 8, !tbaa !5
  tail call void @libmetis__idxwspacefree(ptr noundef %0, i64 noundef %2) #4
  ret void
}

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

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

declare void @libmetis__FreeGraph(ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @libmetis__idxwspacefree(ptr noundef, i64 noundef) local_unnamed_addr #1

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

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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 232}
!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 128}
!13 = !{!6, !10, i64 184}
!14 = !{!6, !7, i64 0}
!15 = !{!6, !10, i64 104}
!16 = !{!6, !10, i64 16}
!17 = !{!6, !10, i64 40}
!18 = !{!6, !10, i64 48}
!19 = !{!6, !10, i64 88}
!20 = !{!6, !10, i64 160}
!21 = !{!6, !10, i64 152}
!22 = !{!7, !7, i64 0}
!23 = !{!24, !7, i64 8}
!24 = !{!"rinfodef", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!28, !7, i64 128}
!28 = !{!"controldef", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !29, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !30, i64 88, !31, i64 152, !31, i64 160, !31, i64 168, !31, i64 176, !31, i64 184, !31, i64 192, !31, i64 200, !31, i64 208, !31, i64 216, !31, i64 224, !31, i64 232, !31, i64 240, !31, i64 248, !31, i64 256, !31, i64 264, !31, i64 272}
!29 = !{!"float", !8, i64 0}
!30 = !{!"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}
!31 = !{!"double", !8, i64 0}
!32 = !{!24, !7, i64 0}
!33 = !{!28, !10, i64 112}
!34 = !{!24, !10, i64 24}
!35 = !{!36, !7, i64 0}
!36 = !{!"edegreedef", !7, i64 0, !7, i64 8}
!37 = !{!36, !7, i64 8}
!38 = distinct !{!38, !26}
!39 = !{!24, !7, i64 16}
!40 = distinct !{!40, !26}
!41 = distinct !{!41, !42}
!42 = !{!"llvm.loop.unroll.disable"}
!43 = distinct !{!43, !26}
!44 = !{!6, !10, i64 136}
!45 = !{!6, !7, i64 112}
!46 = !{!6, !7, i64 144}


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