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

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

@.str = external hidden unnamed_addr constant [16 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 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 void @libmetis__Change2CNumbering(i64 noundef, ptr noundef, ptr noundef) #1

declare void @libmetis__SetUpGraph(ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef) #1

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

declare void @libmetis__InitRandom(i64 noundef) #1

declare void @libmetis__AllocateWorkSpace(ptr noundef, ptr noundef, i64 noundef) #1

declare void @libmetis__InitTimers(ptr noundef) #1

declare double @gk_CPUSeconds() #1

; Function Attrs: nounwind uwtable
declare dso_local void @libmetis__MlevelNestedDissection(ptr noundef, ptr noundef, ptr noundef, float noundef, i64 noundef) #2

declare void @libmetis__PrintTimers(ptr noundef) #1

declare void @libmetis__FreeWorkSpace(ptr noundef, ptr noundef) #1

declare void @libmetis__Change2FNumberingOrder(i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local void @METIS_NodeND(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #2 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, 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 i64, align 8
  %21 = alloca %struct.graphdef, align 8
  %22 = alloca %struct.controldef, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !5
  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 248, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 280, 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
  %26 = load ptr, ptr %11, align 8, !tbaa !5
  %27 = load i64, ptr %26, align 8, !tbaa !9
  %28 = icmp eq i64 %27, 1
  br i1 %28, label %29, label %34

29:                                               ; preds = %7
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = load i64, ptr %30, align 8, !tbaa !9
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = load ptr, ptr %10, align 8, !tbaa !5
  call void @libmetis__Change2CNumbering(i64 noundef %31, ptr noundef %32, ptr noundef %33)
  br label %34

34:                                               ; preds = %29, %7
  %35 = load ptr, ptr %12, align 8, !tbaa !5
  %36 = getelementptr inbounds i64, ptr %35, i64 0
  %37 = load i64, ptr %36, align 8, !tbaa !9
  %38 = icmp eq i64 %37, 0
  br i1 %38, label %39, label %47

39:                                               ; preds = %34
  %40 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 2
  store i64 3, ptr %40, align 8, !tbaa !11
  %41 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 3
  store i64 1, ptr %41, align 8, !tbaa !16
  %42 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 4
  store i64 2, ptr %42, align 8, !tbaa !17
  %43 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 1
  store i64 0, ptr %43, align 8, !tbaa !18
  %44 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 10
  store i64 1, ptr %44, align 8, !tbaa !19
  %45 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 8
  store i64 -1, ptr %45, align 8, !tbaa !20
  %46 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 9
  store i64 1, ptr %46, align 8, !tbaa !21
  br label %76

47:                                               ; preds = %34
  %48 = load ptr, ptr %12, align 8, !tbaa !5
  %49 = getelementptr inbounds i64, ptr %48, i64 1
  %50 = load i64, ptr %49, align 8, !tbaa !9
  %51 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 2
  store i64 %50, ptr %51, align 8, !tbaa !11
  %52 = load ptr, ptr %12, align 8, !tbaa !5
  %53 = getelementptr inbounds i64, ptr %52, i64 2
  %54 = load i64, ptr %53, align 8, !tbaa !9
  %55 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 3
  store i64 %54, ptr %55, align 8, !tbaa !16
  %56 = load ptr, ptr %12, align 8, !tbaa !5
  %57 = getelementptr inbounds i64, ptr %56, i64 3
  %58 = load i64, ptr %57, align 8, !tbaa !9
  %59 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 4
  store i64 %58, ptr %59, align 8, !tbaa !17
  %60 = load ptr, ptr %12, align 8, !tbaa !5
  %61 = getelementptr inbounds i64, ptr %60, i64 4
  %62 = load i64, ptr %61, align 8, !tbaa !9
  %63 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 1
  store i64 %62, ptr %63, align 8, !tbaa !18
  %64 = load ptr, ptr %12, align 8, !tbaa !5
  %65 = getelementptr inbounds i64, ptr %64, i64 5
  %66 = load i64, ptr %65, align 8, !tbaa !9
  %67 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 10
  store i64 %66, ptr %67, align 8, !tbaa !19
  %68 = load ptr, ptr %12, align 8, !tbaa !5
  %69 = getelementptr inbounds i64, ptr %68, i64 6
  %70 = load i64, ptr %69, align 8, !tbaa !9
  %71 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 8
  store i64 %70, ptr %71, align 8, !tbaa !20
  %72 = load ptr, ptr %12, align 8, !tbaa !5
  %73 = getelementptr inbounds i64, ptr %72, i64 7
  %74 = load i64, ptr %73, align 8, !tbaa !9
  %75 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 9
  store i64 %74, ptr %75, align 8, !tbaa !21
  br label %76

76:                                               ; preds = %47, %39
  %77 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 9
  %78 = load i64, ptr %77, align 8, !tbaa !21
  %79 = icmp slt i64 %78, 1
  br i1 %79, label %80, label %82

80:                                               ; preds = %76
  %81 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 9
  store i64 1, ptr %81, align 8, !tbaa !21
  br label %82

82:                                               ; preds = %80, %76
  %83 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 7
  store i64 4, ptr %83, align 8, !tbaa !22
  %84 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 0
  store i64 100, ptr %84, align 8, !tbaa !23
  %85 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 1
  %86 = load i64, ptr %85, align 8, !tbaa !18
  %87 = and i64 %86, 1
  %88 = icmp ne i64 %87, 0
  br i1 %88, label %89, label %90

89:                                               ; preds = %82
  call void @libmetis__InitTimers(ptr noundef %22)
  br label %90

90:                                               ; preds = %89, %82
  %91 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 1
  %92 = load i64, ptr %91, align 8, !tbaa !18
  %93 = and i64 %92, 1
  %94 = icmp ne i64 %93, 0
  br i1 %94, label %95, label %100

95:                                               ; preds = %90
  %96 = call double @gk_CPUSeconds()
  %97 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 12
  %98 = load double, ptr %97, align 8, !tbaa !24
  %99 = fsub double %98, %96
  store double %99, ptr %97, align 8, !tbaa !24
  br label %100

100:                                              ; preds = %95, %90
  call void @libmetis__InitRandom(i64 noundef -1)
  %101 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 8
  %102 = load i64, ptr %101, align 8, !tbaa !20
  %103 = icmp sgt i64 %102, 0
  br i1 %103, label %104, label %118

104:                                              ; preds = %100
  %105 = load ptr, ptr %8, align 8, !tbaa !5
  %106 = load i64, ptr %105, align 8, !tbaa !9
  %107 = call ptr @libmetis__idxmalloc(i64 noundef %106, ptr noundef @.str)
  store ptr %107, ptr %25, align 8, !tbaa !5
  %108 = load ptr, ptr %8, align 8, !tbaa !5
  %109 = load i64, ptr %108, align 8, !tbaa !9
  %110 = load ptr, ptr %9, align 8, !tbaa !5
  %111 = load ptr, ptr %10, align 8, !tbaa !5
  %112 = load ptr, ptr %25, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 8
  %114 = load i64, ptr %113, align 8, !tbaa !20
  %115 = sitofp i64 %114 to double
  %116 = fmul double 1.000000e-01, %115
  %117 = fptrunc double %116 to float
  call void @libmetis__PruneGraph(ptr noundef %22, ptr noundef %21, i64 noundef %109, ptr noundef %110, ptr noundef %111, ptr noundef %112, float noundef %117)
  br label %170

118:                                              ; preds = %100
  %119 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 10
  %120 = load i64, ptr %119, align 8, !tbaa !19
  %121 = and i64 %120, 1
  %122 = icmp ne i64 %121, 0
  br i1 %122, label %123, label %164

123:                                              ; preds = %118
  %124 = load ptr, ptr %8, align 8, !tbaa !5
  %125 = load i64, ptr %124, align 8, !tbaa !9
  %126 = add nsw i64 %125, 1
  %127 = call ptr @libmetis__idxmalloc(i64 noundef %126, ptr noundef @.str.1)
  store ptr %127, ptr %23, align 8, !tbaa !5
  %128 = load ptr, ptr %8, align 8, !tbaa !5
  %129 = load i64, ptr %128, align 8, !tbaa !9
  %130 = call ptr @libmetis__idxmalloc(i64 noundef %129, ptr noundef @.str.2)
  store ptr %130, ptr %24, align 8, !tbaa !5
  %131 = load ptr, ptr %8, align 8, !tbaa !5
  %132 = load i64, ptr %131, align 8, !tbaa !9
  %133 = load ptr, ptr %9, align 8, !tbaa !5
  %134 = load ptr, ptr %10, align 8, !tbaa !5
  %135 = load ptr, ptr %23, align 8, !tbaa !5
  %136 = load ptr, ptr %24, align 8, !tbaa !5
  call void @libmetis__CompressGraph(ptr noundef %22, ptr noundef %21, i64 noundef %132, ptr noundef %133, ptr noundef %134, ptr noundef %135, ptr noundef %136)
  %137 = getelementptr inbounds %struct.graphdef, ptr %21, i32 0, i32 0
  %138 = load i64, ptr %137, align 8, !tbaa !25
  %139 = sitofp i64 %138 to double
  %140 = load ptr, ptr %8, align 8, !tbaa !5
  %141 = load i64, ptr %140, align 8, !tbaa !9
  %142 = sitofp i64 %141 to double
  %143 = fmul double 8.500000e-01, %142
  %144 = fcmp oge double %139, %143
  br i1 %144, label %145, label %149

145:                                              ; preds = %123
  %146 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 10
  %147 = load i64, ptr %146, align 8, !tbaa !19
  %148 = add nsw i64 %147, -1
  store i64 %148, ptr %146, align 8, !tbaa !19
  call void (ptr, ...) @gk_free(ptr noundef %23, ptr noundef %24, ptr noundef null)
  br label %163

149:                                              ; preds = %123
  %150 = getelementptr inbounds %struct.graphdef, ptr %21, i32 0, i32 0
  %151 = load i64, ptr %150, align 8, !tbaa !25
  %152 = mul nsw i64 2, %151
  %153 = load ptr, ptr %8, align 8, !tbaa !5
  %154 = load i64, ptr %153, align 8, !tbaa !9
  %155 = icmp slt i64 %152, %154
  br i1 %155, label %156, label %162

156:                                              ; preds = %149
  %157 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 9
  %158 = load i64, ptr %157, align 8, !tbaa !21
  %159 = icmp eq i64 %158, 1
  br i1 %159, label %160, label %162

160:                                              ; preds = %156
  %161 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 9
  store i64 2, ptr %161, align 8, !tbaa !21
  br label %162

162:                                              ; preds = %160, %156, %149
  br label %163

163:                                              ; preds = %162, %145
  br label %169

164:                                              ; preds = %118
  %165 = load ptr, ptr %8, align 8, !tbaa !5
  %166 = load i64, ptr %165, align 8, !tbaa !9
  %167 = load ptr, ptr %9, align 8, !tbaa !5
  %168 = load ptr, ptr %10, align 8, !tbaa !5
  call void @libmetis__SetUpGraph(ptr noundef %21, i64 noundef 4, i64 noundef %166, i64 noundef 1, ptr noundef %167, ptr noundef %168, ptr noundef null, ptr noundef null, i64 noundef 0)
  br label %169

169:                                              ; preds = %164, %163
  br label %170

170:                                              ; preds = %169, %104
  %171 = getelementptr inbounds %struct.graphdef, ptr %21, i32 0, i32 0
  %172 = load i64, ptr %171, align 8, !tbaa !25
  %173 = getelementptr inbounds %struct.graphdef, ptr %21, i32 0, i32 3
  %174 = load ptr, ptr %173, align 8, !tbaa !28
  %175 = call i64 @libmetis__idxsum(i64 noundef %172, ptr noundef %174, i64 noundef 1)
  %176 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 0
  %177 = load i64, ptr %176, align 8, !tbaa !23
  %178 = sdiv i64 %175, %177
  %179 = sitofp i64 %178 to double
  %180 = fmul double 1.500000e+00, %179
  %181 = fptosi double %180 to i64
  %182 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 5
  store i64 %181, ptr %182, align 8, !tbaa !29
  call void @libmetis__AllocateWorkSpace(ptr noundef %22, ptr noundef %21, i64 noundef 2)
  %183 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 10
  %184 = load i64, ptr %183, align 8, !tbaa !19
  %185 = and i64 %184, 2
  %186 = icmp ne i64 %185, 0
  br i1 %186, label %187, label %191

187:                                              ; preds = %170
  %188 = load ptr, ptr %14, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.graphdef, ptr %21, i32 0, i32 0
  %190 = load i64, ptr %189, align 8, !tbaa !25
  call void @libmetis__MlevelNestedDissectionCC(ptr noundef %22, ptr noundef %21, ptr noundef %188, float noundef 0x3FF19999A0000000, i64 noundef %190)
  br label %195

191:                                              ; preds = %170
  %192 = load ptr, ptr %14, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.graphdef, ptr %21, i32 0, i32 0
  %194 = load i64, ptr %193, align 8, !tbaa !25
  call void @libmetis__MlevelNestedDissection(ptr noundef %22, ptr noundef %21, ptr noundef %192, float noundef 0x3FF19999A0000000, i64 noundef %194)
  br label %195

195:                                              ; preds = %191, %187
  call void @libmetis__FreeWorkSpace(ptr noundef %22, ptr noundef %21)
  %196 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 8
  %197 = load i64, ptr %196, align 8, !tbaa !20
  %198 = icmp sgt i64 %197, 0
  br i1 %198, label %199, label %251

199:                                              ; preds = %195
  %200 = getelementptr inbounds %struct.graphdef, ptr %21, i32 0, i32 0
  %201 = load i64, ptr %200, align 8, !tbaa !25
  %202 = load ptr, ptr %8, align 8, !tbaa !5
  %203 = load i64, ptr %202, align 8, !tbaa !9
  %204 = icmp slt i64 %201, %203
  br i1 %204, label %205, label %250

205:                                              ; preds = %199
  %206 = load ptr, ptr %13, align 8, !tbaa !5
  %207 = load ptr, ptr %14, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.graphdef, ptr %21, i32 0, i32 0
  %209 = load i64, ptr %208, align 8, !tbaa !25
  %210 = mul i64 8, %209
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %206, ptr align 1 %207, i64 %210, i1 false)
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %211

211:                                              ; preds = %227, %205
  %212 = load i64, ptr %15, align 8, !tbaa !9
  %213 = getelementptr inbounds %struct.graphdef, ptr %21, i32 0, i32 0
  %214 = load i64, ptr %213, align 8, !tbaa !25
  %215 = icmp slt i64 %212, %214
  br i1 %215, label %216, label %230

216:                                              ; preds = %211
  %217 = load ptr, ptr %13, align 8, !tbaa !5
  %218 = load i64, ptr %15, align 8, !tbaa !9
  %219 = getelementptr inbounds i64, ptr %217, i64 %218
  %220 = load i64, ptr %219, align 8, !tbaa !9
  %221 = load ptr, ptr %14, align 8, !tbaa !5
  %222 = load ptr, ptr %25, align 8, !tbaa !5
  %223 = load i64, ptr %15, align 8, !tbaa !9
  %224 = getelementptr inbounds i64, ptr %222, i64 %223
  %225 = load i64, ptr %224, align 8, !tbaa !9
  %226 = getelementptr inbounds i64, ptr %221, i64 %225
  store i64 %220, ptr %226, align 8, !tbaa !9
  br label %227

227:                                              ; preds = %216
  %228 = load i64, ptr %15, align 8, !tbaa !9
  %229 = add nsw i64 %228, 1
  store i64 %229, ptr %15, align 8, !tbaa !9
  br label %211, !llvm.loop !30

230:                                              ; preds = %211
  %231 = getelementptr inbounds %struct.graphdef, ptr %21, i32 0, i32 0
  %232 = load i64, ptr %231, align 8, !tbaa !25
  store i64 %232, ptr %15, align 8, !tbaa !9
  br label %233

233:                                              ; preds = %246, %230
  %234 = load i64, ptr %15, align 8, !tbaa !9
  %235 = load ptr, ptr %8, align 8, !tbaa !5
  %236 = load i64, ptr %235, align 8, !tbaa !9
  %237 = icmp slt i64 %234, %236
  br i1 %237, label %238, label %249

238:                                              ; preds = %233
  %239 = load i64, ptr %15, align 8, !tbaa !9
  %240 = load ptr, ptr %14, align 8, !tbaa !5
  %241 = load ptr, ptr %25, align 8, !tbaa !5
  %242 = load i64, ptr %15, align 8, !tbaa !9
  %243 = getelementptr inbounds i64, ptr %241, i64 %242
  %244 = load i64, ptr %243, align 8, !tbaa !9
  %245 = getelementptr inbounds i64, ptr %240, i64 %244
  store i64 %239, ptr %245, align 8, !tbaa !9
  br label %246

246:                                              ; preds = %238
  %247 = load i64, ptr %15, align 8, !tbaa !9
  %248 = add nsw i64 %247, 1
  store i64 %248, ptr %15, align 8, !tbaa !9
  br label %233, !llvm.loop !32

249:                                              ; preds = %233
  br label %250

250:                                              ; preds = %249, %199
  call void (ptr, ...) @gk_free(ptr noundef %25, ptr noundef null)
  br label %324

251:                                              ; preds = %195
  %252 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 10
  %253 = load i64, ptr %252, align 8, !tbaa !19
  %254 = and i64 %253, 1
  %255 = icmp ne i64 %254, 0
  br i1 %255, label %256, label %323

256:                                              ; preds = %251
  %257 = getelementptr inbounds %struct.graphdef, ptr %21, i32 0, i32 0
  %258 = load i64, ptr %257, align 8, !tbaa !25
  %259 = sitofp i64 %258 to double
  %260 = load ptr, ptr %8, align 8, !tbaa !5
  %261 = load i64, ptr %260, align 8, !tbaa !9
  %262 = sitofp i64 %261 to double
  %263 = fmul double 8.500000e-01, %262
  %264 = fcmp olt double %259, %263
  br i1 %264, label %265, label %322

265:                                              ; preds = %256
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %266

266:                                              ; preds = %279, %265
  %267 = load i64, ptr %15, align 8, !tbaa !9
  %268 = getelementptr inbounds %struct.graphdef, ptr %21, i32 0, i32 0
  %269 = load i64, ptr %268, align 8, !tbaa !25
  %270 = icmp slt i64 %267, %269
  br i1 %270, label %271, label %282

271:                                              ; preds = %266
  %272 = load i64, ptr %15, align 8, !tbaa !9
  %273 = load ptr, ptr %13, align 8, !tbaa !5
  %274 = load ptr, ptr %14, align 8, !tbaa !5
  %275 = load i64, ptr %15, align 8, !tbaa !9
  %276 = getelementptr inbounds i64, ptr %274, i64 %275
  %277 = load i64, ptr %276, align 8, !tbaa !9
  %278 = getelementptr inbounds i64, ptr %273, i64 %277
  store i64 %272, ptr %278, align 8, !tbaa !9
  br label %279

279:                                              ; preds = %271
  %280 = load i64, ptr %15, align 8, !tbaa !9
  %281 = add nsw i64 %280, 1
  store i64 %281, ptr %15, align 8, !tbaa !9
  br label %266, !llvm.loop !33

282:                                              ; preds = %266
  store i64 0, ptr %16, align 8, !tbaa !9
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %283

283:                                              ; preds = %318, %282
  %284 = load i64, ptr %16, align 8, !tbaa !9
  %285 = getelementptr inbounds %struct.graphdef, ptr %21, i32 0, i32 0
  %286 = load i64, ptr %285, align 8, !tbaa !25
  %287 = icmp slt i64 %284, %286
  br i1 %287, label %288, label %321

288:                                              ; preds = %283
  %289 = load ptr, ptr %13, align 8, !tbaa !5
  %290 = load i64, ptr %16, align 8, !tbaa !9
  %291 = getelementptr inbounds i64, ptr %289, i64 %290
  %292 = load i64, ptr %291, align 8, !tbaa !9
  store i64 %292, ptr %15, align 8, !tbaa !9
  %293 = load ptr, ptr %23, align 8, !tbaa !5
  %294 = load i64, ptr %15, align 8, !tbaa !9
  %295 = getelementptr inbounds i64, ptr %293, i64 %294
  %296 = load i64, ptr %295, align 8, !tbaa !9
  store i64 %296, ptr %17, align 8, !tbaa !9
  br label %297

297:                                              ; preds = %314, %288
  %298 = load i64, ptr %17, align 8, !tbaa !9
  %299 = load ptr, ptr %23, align 8, !tbaa !5
  %300 = load i64, ptr %15, align 8, !tbaa !9
  %301 = add nsw i64 %300, 1
  %302 = getelementptr inbounds i64, ptr %299, i64 %301
  %303 = load i64, ptr %302, align 8, !tbaa !9
  %304 = icmp slt i64 %298, %303
  br i1 %304, label %305, label %317

305:                                              ; preds = %297
  %306 = load i64, ptr %18, align 8, !tbaa !9
  %307 = add nsw i64 %306, 1
  store i64 %307, ptr %18, align 8, !tbaa !9
  %308 = load ptr, ptr %14, align 8, !tbaa !5
  %309 = load ptr, ptr %24, align 8, !tbaa !5
  %310 = load i64, ptr %17, align 8, !tbaa !9
  %311 = getelementptr inbounds i64, ptr %309, i64 %310
  %312 = load i64, ptr %311, align 8, !tbaa !9
  %313 = getelementptr inbounds i64, ptr %308, i64 %312
  store i64 %306, ptr %313, align 8, !tbaa !9
  br label %314

314:                                              ; preds = %305
  %315 = load i64, ptr %17, align 8, !tbaa !9
  %316 = add nsw i64 %315, 1
  store i64 %316, ptr %17, align 8, !tbaa !9
  br label %297, !llvm.loop !34

317:                                              ; preds = %297
  br label %318

318:                                              ; preds = %317
  %319 = load i64, ptr %16, align 8, !tbaa !9
  %320 = add nsw i64 %319, 1
  store i64 %320, ptr %16, align 8, !tbaa !9
  br label %283, !llvm.loop !35

321:                                              ; preds = %283
  br label %322

322:                                              ; preds = %321, %256
  call void (ptr, ...) @gk_free(ptr noundef %23, ptr noundef %24, ptr noundef null)
  br label %323

323:                                              ; preds = %322, %251
  br label %324

324:                                              ; preds = %323, %250
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %325

325:                                              ; preds = %338, %324
  %326 = load i64, ptr %15, align 8, !tbaa !9
  %327 = load ptr, ptr %8, align 8, !tbaa !5
  %328 = load i64, ptr %327, align 8, !tbaa !9
  %329 = icmp slt i64 %326, %328
  br i1 %329, label %330, label %341

330:                                              ; preds = %325
  %331 = load i64, ptr %15, align 8, !tbaa !9
  %332 = load ptr, ptr %13, align 8, !tbaa !5
  %333 = load ptr, ptr %14, align 8, !tbaa !5
  %334 = load i64, ptr %15, align 8, !tbaa !9
  %335 = getelementptr inbounds i64, ptr %333, i64 %334
  %336 = load i64, ptr %335, align 8, !tbaa !9
  %337 = getelementptr inbounds i64, ptr %332, i64 %336
  store i64 %331, ptr %337, align 8, !tbaa !9
  br label %338

338:                                              ; preds = %330
  %339 = load i64, ptr %15, align 8, !tbaa !9
  %340 = add nsw i64 %339, 1
  store i64 %340, ptr %15, align 8, !tbaa !9
  br label %325, !llvm.loop !36

341:                                              ; preds = %325
  %342 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 1
  %343 = load i64, ptr %342, align 8, !tbaa !18
  %344 = and i64 %343, 1
  %345 = icmp ne i64 %344, 0
  br i1 %345, label %346, label %351

346:                                              ; preds = %341
  %347 = call double @gk_CPUSeconds()
  %348 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 12
  %349 = load double, ptr %348, align 8, !tbaa !24
  %350 = fadd double %349, %347
  store double %350, ptr %348, align 8, !tbaa !24
  br label %351

351:                                              ; preds = %346, %341
  %352 = getelementptr inbounds %struct.controldef, ptr %22, i32 0, i32 1
  %353 = load i64, ptr %352, align 8, !tbaa !18
  %354 = and i64 %353, 1
  %355 = icmp ne i64 %354, 0
  br i1 %355, label %356, label %357

356:                                              ; preds = %351
  call void @libmetis__PrintTimers(ptr noundef %22)
  br label %357

357:                                              ; preds = %356, %351
  %358 = load ptr, ptr %11, align 8, !tbaa !5
  %359 = load i64, ptr %358, align 8, !tbaa !9
  %360 = icmp eq i64 %359, 1
  br i1 %360, label %361, label %368

361:                                              ; preds = %357
  %362 = load ptr, ptr %8, align 8, !tbaa !5
  %363 = load i64, ptr %362, align 8, !tbaa !9
  %364 = load ptr, ptr %9, align 8, !tbaa !5
  %365 = load ptr, ptr %10, align 8, !tbaa !5
  %366 = load ptr, ptr %13, align 8, !tbaa !5
  %367 = load ptr, ptr %14, align 8, !tbaa !5
  call void @libmetis__Change2FNumberingOrder(i64 noundef %363, ptr noundef %364, ptr noundef %365, ptr noundef %366, ptr noundef %367)
  br label %368

368:                                              ; preds = %361, %357
  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 280, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 248, 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
  ret void
}

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

declare void @libmetis__PruneGraph(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, float noundef) #1

declare void @libmetis__CompressGraph(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare void @gk_free(ptr noundef, ...) #1

; Function Attrs: nounwind uwtable
declare dso_local void @libmetis__MlevelNestedDissectionCC(ptr noundef, ptr noundef, ptr noundef, float 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

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 = { 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 = { 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, !10, i64 16}
!12 = !{!"controldef", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !13, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !14, i64 88, !15, i64 152, !15, i64 160, !15, i64 168, !15, i64 176, !15, i64 184, !15, i64 192, !15, i64 200, !15, i64 208, !15, i64 216, !15, i64 224, !15, i64 232, !15, i64 240, !15, i64 248, !15, i64 256, !15, i64 264, !15, i64 272}
!13 = !{!"float", !7, i64 0}
!14 = !{!"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}
!15 = !{!"double", !7, i64 0}
!16 = !{!12, !10, i64 24}
!17 = !{!12, !10, i64 32}
!18 = !{!12, !10, i64 8}
!19 = !{!12, !10, i64 80}
!20 = !{!12, !10, i64 64}
!21 = !{!12, !10, i64 72}
!22 = !{!12, !10, i64 56}
!23 = !{!12, !10, i64 0}
!24 = !{!12, !15, i64 152}
!25 = !{!26, !10, i64 0}
!26 = !{!"graphdef", !10, i64 0, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !27, i64 56, !27, i64 60, !27, i64 64, !27, i64 68, !27, 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}
!27 = !{!"int", !7, i64 0}
!28 = !{!26, !6, i64 24}
!29 = !{!12, !10, i64 40}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}
!33 = distinct !{!33, !31}
!34 = distinct !{!34, !31}
!35 = distinct !{!35, !31}
!36 = distinct !{!36, !31}


; 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.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 }

@.str = external hidden unnamed_addr constant [16 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1

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

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

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

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

declare void @libmetis__InitRandom(i64 noundef) local_unnamed_addr #1

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

declare void @libmetis__InitTimers(ptr noundef) local_unnamed_addr #1

declare double @gk_CPUSeconds() local_unnamed_addr #1

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

declare void @libmetis__PrintTimers(ptr noundef) local_unnamed_addr #1

declare void @libmetis__FreeWorkSpace(ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @METIS_NodeND(ptr nocapture noundef readonly %0, ptr noundef %1, ptr noundef %2, ptr nocapture noundef readonly %3, ptr nocapture noundef readonly %4, ptr noundef %5, ptr noundef %6) local_unnamed_addr #2 {
  %8 = alloca %struct.graphdef, align 8
  %9 = alloca %struct.controldef, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 248, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 280, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #5
  %13 = load i64, ptr %3, align 8, !tbaa !5
  %14 = icmp eq i64 %13, 1
  br i1 %14, label %15, label %17

15:                                               ; preds = %7
  %16 = load i64, ptr %0, align 8, !tbaa !5
  tail call void @libmetis__Change2CNumbering(i64 noundef %16, ptr noundef %1, ptr noundef %2) #5
  br label %17

17:                                               ; preds = %15, %7
  %18 = load i64, ptr %4, align 8, !tbaa !5
  %19 = icmp eq i64 %18, 0
  br i1 %19, label %33, label %20

20:                                               ; preds = %17
  %21 = getelementptr inbounds i8, ptr %4, i64 8
  %22 = load <2 x i64>, ptr %21, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %4, i64 24
  %24 = load i64, ptr %23, align 8, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %4, i64 32
  %26 = load i64, ptr %25, align 8, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %4, i64 40
  %28 = load i64, ptr %27, align 8, !tbaa !5
  %29 = getelementptr inbounds i8, ptr %4, i64 48
  %30 = load i64, ptr %29, align 8, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %4, i64 56
  %32 = load i64, ptr %31, align 8, !tbaa !5
  br label %33

33:                                               ; preds = %17, %20
  %.sink111 = phi i64 [ %24, %20 ], [ 2, %17 ]
  %34 = phi i64 [ %26, %20 ], [ 0, %17 ]
  %.sink109 = phi i64 [ %28, %20 ], [ 1, %17 ]
  %.sink108 = phi i64 [ %30, %20 ], [ -1, %17 ]
  %.sink = phi i64 [ %32, %20 ], [ 1, %17 ]
  %35 = phi <2 x i64> [ %22, %20 ], [ <i64 3, i64 1>, %17 ]
  %36 = getelementptr inbounds i8, ptr %9, i64 16
  store <2 x i64> %35, ptr %36, align 8
  %37 = getelementptr inbounds i8, ptr %9, i64 32
  store i64 %.sink111, ptr %37, align 8
  %38 = getelementptr inbounds i8, ptr %9, i64 8
  store i64 %34, ptr %38, align 8
  %39 = getelementptr inbounds i8, ptr %9, i64 80
  store i64 %.sink109, ptr %39, align 8
  %40 = getelementptr inbounds i8, ptr %9, i64 64
  store i64 %.sink108, ptr %40, align 8
  %41 = getelementptr inbounds i8, ptr %9, i64 72
  %spec.select = tail call i64 @llvm.smax.i64(i64 %.sink, i64 1)
  store i64 %spec.select, ptr %41, align 8
  %42 = getelementptr inbounds i8, ptr %9, i64 56
  store i64 4, ptr %42, align 8, !tbaa !9
  store i64 100, ptr %9, align 8, !tbaa !15
  %43 = and i64 %34, 1
  %.not = icmp eq i64 %43, 0
  br i1 %.not, label %.thread, label %44

44:                                               ; preds = %33
  call void @libmetis__InitTimers(ptr noundef nonnull %9) #5
  %.pre = load i64, ptr %38, align 8, !tbaa !16
  %.pre115 = and i64 %.pre, 1
  %.not81 = icmp eq i64 %.pre115, 0
  br i1 %.not81, label %.thread, label %45

45:                                               ; preds = %44
  %46 = call double @gk_CPUSeconds() #5
  %47 = getelementptr inbounds i8, ptr %9, i64 152
  %48 = load double, ptr %47, align 8, !tbaa !17
  %49 = fsub double %48, %46
  store double %49, ptr %47, align 8, !tbaa !17
  br label %.thread

.thread:                                          ; preds = %33, %45, %44
  call void @libmetis__InitRandom(i64 noundef -1) #5
  %50 = load i64, ptr %40, align 8, !tbaa !18
  %51 = icmp sgt i64 %50, 0
  br i1 %51, label %52, label %60

52:                                               ; preds = %.thread
  %53 = load i64, ptr %0, align 8, !tbaa !5
  %54 = call ptr @libmetis__idxmalloc(i64 noundef %53, ptr noundef nonnull @.str) #5
  store ptr %54, ptr %12, align 8, !tbaa !19
  %55 = load i64, ptr %0, align 8, !tbaa !5
  %56 = load i64, ptr %40, align 8, !tbaa !18
  %57 = sitofp i64 %56 to double
  %58 = fmul double %57, 1.000000e-01
  %59 = fptrunc double %58 to float
  call void @libmetis__PruneGraph(ptr noundef nonnull %9, ptr noundef nonnull %8, i64 noundef %55, ptr noundef %1, ptr noundef %2, ptr noundef %54, float noundef %59) #5
  br label %87

60:                                               ; preds = %.thread
  %61 = load i64, ptr %39, align 8, !tbaa !20
  %62 = and i64 %61, 1
  %.not82 = icmp eq i64 %62, 0
  %63 = load i64, ptr %0, align 8, !tbaa !5
  br i1 %.not82, label %86, label %64

64:                                               ; preds = %60
  %65 = add nsw i64 %63, 1
  %66 = call ptr @libmetis__idxmalloc(i64 noundef %65, ptr noundef nonnull @.str.1) #5
  store ptr %66, ptr %10, align 8, !tbaa !19
  %67 = load i64, ptr %0, align 8, !tbaa !5
  %68 = call ptr @libmetis__idxmalloc(i64 noundef %67, ptr noundef nonnull @.str.2) #5
  store ptr %68, ptr %11, align 8, !tbaa !19
  %69 = load i64, ptr %0, align 8, !tbaa !5
  %70 = load ptr, ptr %10, align 8, !tbaa !19
  call void @libmetis__CompressGraph(ptr noundef nonnull %9, ptr noundef nonnull %8, i64 noundef %69, ptr noundef %1, ptr noundef %2, ptr noundef %70, ptr noundef %68) #5
  %71 = load i64, ptr %8, align 8, !tbaa !21
  %72 = sitofp i64 %71 to double
  %73 = load i64, ptr %0, align 8, !tbaa !5
  %74 = sitofp i64 %73 to double
  %75 = fmul double %74, 8.500000e-01
  %76 = fcmp ugt double %75, %72
  br i1 %76, label %80, label %77

77:                                               ; preds = %64
  %78 = load i64, ptr %39, align 8, !tbaa !20
  %79 = add nsw i64 %78, -1
  store i64 %79, ptr %39, align 8, !tbaa !20
  call void (ptr, ...) @gk_free(ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef null) #5
  br label %87

80:                                               ; preds = %64
  %81 = shl nsw i64 %71, 1
  %82 = icmp slt i64 %81, %73
  %83 = load i64, ptr %41, align 8
  %84 = icmp eq i64 %83, 1
  %or.cond = select i1 %82, i1 %84, i1 false
  br i1 %or.cond, label %85, label %87

85:                                               ; preds = %80
  store i64 2, ptr %41, align 8, !tbaa !24
  br label %87

86:                                               ; preds = %60
  call void @libmetis__SetUpGraph(ptr noundef nonnull %8, i64 noundef 4, i64 noundef %63, i64 noundef 1, ptr noundef %1, ptr noundef %2, ptr noundef null, ptr noundef null, i64 noundef 0) #5
  br label %87

87:                                               ; preds = %86, %80, %85, %77, %52
  %88 = phi ptr [ undef, %86 ], [ undef, %80 ], [ undef, %85 ], [ undef, %77 ], [ %54, %52 ]
  %89 = load i64, ptr %8, align 8, !tbaa !21
  %90 = getelementptr inbounds i8, ptr %8, i64 24
  %91 = load ptr, ptr %90, align 8, !tbaa !25
  %92 = call i64 @libmetis__idxsum(i64 noundef %89, ptr noundef %91, i64 noundef 1) #5
  %93 = load i64, ptr %9, align 8, !tbaa !15
  %94 = sdiv i64 %92, %93
  %95 = sitofp i64 %94 to double
  %96 = fmul double %95, 1.500000e+00
  %97 = fptosi double %96 to i64
  %98 = getelementptr inbounds i8, ptr %9, i64 40
  store i64 %97, ptr %98, align 8, !tbaa !26
  call void @libmetis__AllocateWorkSpace(ptr noundef nonnull %9, ptr noundef nonnull %8, i64 noundef 2) #5
  %99 = load i64, ptr %39, align 8, !tbaa !20
  %100 = and i64 %99, 2
  %.not83 = icmp eq i64 %100, 0
  %101 = load i64, ptr %8, align 8, !tbaa !21
  br i1 %.not83, label %103, label %102

102:                                              ; preds = %87
  call void @libmetis__MlevelNestedDissectionCC(ptr noundef nonnull %9, ptr noundef nonnull %8, ptr noundef %6, float noundef 0x3FF19999A0000000, i64 noundef %101)
  br label %104

103:                                              ; preds = %87
  call void @libmetis__MlevelNestedDissection(ptr noundef nonnull %9, ptr noundef nonnull %8, ptr noundef %6, float noundef 0x3FF19999A0000000, i64 noundef %101)
  br label %104

104:                                              ; preds = %103, %102
  call void @libmetis__FreeWorkSpace(ptr noundef nonnull %9, ptr noundef nonnull %8) #5
  %105 = load i64, ptr %40, align 8, !tbaa !18
  %106 = icmp sgt i64 %105, 0
  br i1 %106, label %107, label %153

107:                                              ; preds = %104
  %108 = load i64, ptr %8, align 8, !tbaa !21
  %109 = load i64, ptr %0, align 8, !tbaa !5
  %110 = icmp slt i64 %108, %109
  br i1 %110, label %111, label %.loopexit

111:                                              ; preds = %107
  %112 = shl i64 %108, 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %5, ptr align 1 %6, i64 %112, i1 false)
  %113 = icmp sgt i64 %108, 0
  br i1 %113, label %.lr.ph99.preheader, label %.preheader

.lr.ph99.preheader:                               ; preds = %111
  %xtraiter122 = and i64 %108, 3
  %114 = icmp ult i64 %108, 4
  br i1 %114, label %.preheader.loopexit.unr-lcssa, label %.lr.ph99.preheader.new

.lr.ph99.preheader.new:                           ; preds = %.lr.ph99.preheader
  %unroll_iter125 = and i64 %108, 9223372036854775804
  br label %.lr.ph99

.preheader.loopexit.unr-lcssa:                    ; preds = %.lr.ph99, %.lr.ph99.preheader
  %.097.unr = phi i64 [ 0, %.lr.ph99.preheader ], [ %146, %.lr.ph99 ]
  %lcmp.mod124.not = icmp eq i64 %xtraiter122, 0
  br i1 %lcmp.mod124.not, label %.preheader, label %.lr.ph99.epil

.lr.ph99.epil:                                    ; preds = %.preheader.loopexit.unr-lcssa, %.lr.ph99.epil
  %.097.epil = phi i64 [ %120, %.lr.ph99.epil ], [ %.097.unr, %.preheader.loopexit.unr-lcssa ]
  %epil.iter123 = phi i64 [ %epil.iter123.next, %.lr.ph99.epil ], [ 0, %.preheader.loopexit.unr-lcssa ]
  %115 = getelementptr inbounds i64, ptr %5, i64 %.097.epil
  %116 = load i64, ptr %115, align 8, !tbaa !5
  %117 = getelementptr inbounds i64, ptr %88, i64 %.097.epil
  %118 = load i64, ptr %117, align 8, !tbaa !5
  %119 = getelementptr inbounds i64, ptr %6, i64 %118
  store i64 %116, ptr %119, align 8, !tbaa !5
  %120 = add nuw nsw i64 %.097.epil, 1
  %epil.iter123.next = add i64 %epil.iter123, 1
  %epil.iter123.cmp.not = icmp eq i64 %epil.iter123.next, %xtraiter122
  br i1 %epil.iter123.cmp.not, label %.preheader, label %.lr.ph99.epil, !llvm.loop !27

.preheader:                                       ; preds = %.preheader.loopexit.unr-lcssa, %.lr.ph99.epil, %111
  %121 = load i64, ptr %0, align 8, !tbaa !5
  %122 = icmp slt i64 %108, %121
  br i1 %122, label %.lr.ph101, label %.loopexit

.lr.ph99:                                         ; preds = %.lr.ph99, %.lr.ph99.preheader.new
  %.097 = phi i64 [ 0, %.lr.ph99.preheader.new ], [ %146, %.lr.ph99 ]
  %niter126 = phi i64 [ 0, %.lr.ph99.preheader.new ], [ %niter126.next.3, %.lr.ph99 ]
  %123 = getelementptr inbounds i64, ptr %5, i64 %.097
  %124 = load i64, ptr %123, align 8, !tbaa !5
  %125 = getelementptr inbounds i64, ptr %88, i64 %.097
  %126 = load i64, ptr %125, align 8, !tbaa !5
  %127 = getelementptr inbounds i64, ptr %6, i64 %126
  store i64 %124, ptr %127, align 8, !tbaa !5
  %128 = or disjoint i64 %.097, 1
  %129 = getelementptr inbounds i64, ptr %5, i64 %128
  %130 = load i64, ptr %129, align 8, !tbaa !5
  %131 = getelementptr inbounds i64, ptr %88, i64 %128
  %132 = load i64, ptr %131, align 8, !tbaa !5
  %133 = getelementptr inbounds i64, ptr %6, i64 %132
  store i64 %130, ptr %133, align 8, !tbaa !5
  %134 = or disjoint i64 %.097, 2
  %135 = getelementptr inbounds i64, ptr %5, i64 %134
  %136 = load i64, ptr %135, align 8, !tbaa !5
  %137 = getelementptr inbounds i64, ptr %88, i64 %134
  %138 = load i64, ptr %137, align 8, !tbaa !5
  %139 = getelementptr inbounds i64, ptr %6, i64 %138
  store i64 %136, ptr %139, align 8, !tbaa !5
  %140 = or disjoint i64 %.097, 3
  %141 = getelementptr inbounds i64, ptr %5, i64 %140
  %142 = load i64, ptr %141, align 8, !tbaa !5
  %143 = getelementptr inbounds i64, ptr %88, i64 %140
  %144 = load i64, ptr %143, align 8, !tbaa !5
  %145 = getelementptr inbounds i64, ptr %6, i64 %144
  store i64 %142, ptr %145, align 8, !tbaa !5
  %146 = add nuw nsw i64 %.097, 4
  %niter126.next.3 = add i64 %niter126, 4
  %niter126.ncmp.3 = icmp eq i64 %niter126.next.3, %unroll_iter125
  br i1 %niter126.ncmp.3, label %.preheader.loopexit.unr-lcssa, label %.lr.ph99, !llvm.loop !29

.lr.ph101:                                        ; preds = %.preheader, %.lr.ph101
  %.1100 = phi i64 [ %150, %.lr.ph101 ], [ %108, %.preheader ]
  %147 = getelementptr inbounds i64, ptr %88, i64 %.1100
  %148 = load i64, ptr %147, align 8, !tbaa !5
  %149 = getelementptr inbounds i64, ptr %6, i64 %148
  store i64 %.1100, ptr %149, align 8, !tbaa !5
  %150 = add nsw i64 %.1100, 1
  %151 = load i64, ptr %0, align 8, !tbaa !5
  %152 = icmp slt i64 %150, %151
  br i1 %152, label %.lr.ph101, label %.loopexit, !llvm.loop !31

.loopexit:                                        ; preds = %.lr.ph101, %.preheader, %107
  call void (ptr, ...) @gk_free(ptr noundef nonnull %12, ptr noundef null) #5
  br label %203

153:                                              ; preds = %104
  %154 = load i64, ptr %39, align 8, !tbaa !20
  %155 = and i64 %154, 1
  %.not84 = icmp eq i64 %155, 0
  br i1 %.not84, label %203, label %156

156:                                              ; preds = %153
  %157 = load i64, ptr %8, align 8, !tbaa !21
  %158 = sitofp i64 %157 to double
  %159 = load i64, ptr %0, align 8, !tbaa !5
  %160 = sitofp i64 %159 to double
  %161 = fmul double %160, 8.500000e-01
  %162 = fcmp ogt double %161, %158
  br i1 %162, label %.preheader89, label %.loopexit88

.preheader89:                                     ; preds = %156
  %163 = icmp sgt i64 %157, 0
  br i1 %163, label %.lr.ph.preheader, label %.loopexit88

.lr.ph.preheader:                                 ; preds = %.preheader89
  %xtraiter = and i64 %157, 3
  %164 = icmp ult i64 %157, 4
  br i1 %164, label %.preheader87.unr-lcssa, label %.lr.ph.preheader.new

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

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

.lr.ph.epil:                                      ; preds = %.preheader87.unr-lcssa, %.lr.ph.epil
  %.290.epil = phi i64 [ %168, %.lr.ph.epil ], [ %.290.unr, %.preheader87.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %.preheader87.unr-lcssa ]
  %165 = getelementptr inbounds i64, ptr %6, i64 %.290.epil
  %166 = load i64, ptr %165, align 8, !tbaa !5
  %167 = getelementptr inbounds i64, ptr %5, i64 %166
  store i64 %.290.epil, ptr %167, align 8, !tbaa !5
  %168 = add nuw nsw i64 %.290.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader87, label %.lr.ph.epil, !llvm.loop !32

.preheader87:                                     ; preds = %.lr.ph.epil, %.preheader87.unr-lcssa
  br i1 %163, label %.lr.ph96, label %.loopexit88

.lr.ph96:                                         ; preds = %.preheader87
  %169 = load ptr, ptr %10, align 8, !tbaa !19
  %170 = load ptr, ptr %11, align 8
  br label %187

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %.290 = phi i64 [ 0, %.lr.ph.preheader.new ], [ %186, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %171 = getelementptr inbounds i64, ptr %6, i64 %.290
  %172 = load i64, ptr %171, align 8, !tbaa !5
  %173 = getelementptr inbounds i64, ptr %5, i64 %172
  store i64 %.290, ptr %173, align 8, !tbaa !5
  %174 = or disjoint i64 %.290, 1
  %175 = getelementptr inbounds i64, ptr %6, i64 %174
  %176 = load i64, ptr %175, align 8, !tbaa !5
  %177 = getelementptr inbounds i64, ptr %5, i64 %176
  store i64 %174, ptr %177, align 8, !tbaa !5
  %178 = or disjoint i64 %.290, 2
  %179 = getelementptr inbounds i64, ptr %6, i64 %178
  %180 = load i64, ptr %179, align 8, !tbaa !5
  %181 = getelementptr inbounds i64, ptr %5, i64 %180
  store i64 %178, ptr %181, align 8, !tbaa !5
  %182 = or disjoint i64 %.290, 3
  %183 = getelementptr inbounds i64, ptr %6, i64 %182
  %184 = load i64, ptr %183, align 8, !tbaa !5
  %185 = getelementptr inbounds i64, ptr %5, i64 %184
  store i64 %182, ptr %185, align 8, !tbaa !5
  %186 = add nuw nsw i64 %.290, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader87.unr-lcssa, label %.lr.ph, !llvm.loop !33

187:                                              ; preds = %.lr.ph96, %._crit_edge
  %.07595 = phi i64 [ 0, %.lr.ph96 ], [ %202, %._crit_edge ]
  %.07694 = phi i64 [ 0, %.lr.ph96 ], [ %.177.lcssa, %._crit_edge ]
  %188 = getelementptr inbounds i64, ptr %5, i64 %.07595
  %189 = load i64, ptr %188, align 8, !tbaa !5
  %190 = getelementptr inbounds i64, ptr %169, i64 %189
  %191 = load i64, ptr %190, align 8, !tbaa !5
  %192 = getelementptr i8, ptr %190, i64 8
  %193 = load i64, ptr %192, align 8, !tbaa !5
  %194 = icmp slt i64 %191, %193
  br i1 %194, label %.lr.ph93, label %._crit_edge

.lr.ph93:                                         ; preds = %187, %.lr.ph93
  %.17792 = phi i64 [ %195, %.lr.ph93 ], [ %.07694, %187 ]
  %.07891 = phi i64 [ %199, %.lr.ph93 ], [ %191, %187 ]
  %195 = add nsw i64 %.17792, 1
  %196 = getelementptr inbounds i64, ptr %170, i64 %.07891
  %197 = load i64, ptr %196, align 8, !tbaa !5
  %198 = getelementptr inbounds i64, ptr %6, i64 %197
  store i64 %.17792, ptr %198, align 8, !tbaa !5
  %199 = add nsw i64 %.07891, 1
  %200 = load i64, ptr %192, align 8, !tbaa !5
  %201 = icmp slt i64 %199, %200
  br i1 %201, label %.lr.ph93, label %._crit_edge, !llvm.loop !34

._crit_edge:                                      ; preds = %.lr.ph93, %187
  %.177.lcssa = phi i64 [ %.07694, %187 ], [ %195, %.lr.ph93 ]
  %202 = add nuw nsw i64 %.07595, 1
  %exitcond106.not = icmp eq i64 %202, %157
  br i1 %exitcond106.not, label %.loopexit88, label %187, !llvm.loop !35

.loopexit88:                                      ; preds = %._crit_edge, %.preheader89, %.preheader87, %156
  call void (ptr, ...) @gk_free(ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef null) #5
  br label %203

203:                                              ; preds = %153, %.loopexit88, %.loopexit
  %204 = load i64, ptr %0, align 8, !tbaa !5
  %205 = icmp sgt i64 %204, 0
  br i1 %205, label %.lr.ph104, label %._crit_edge105

.lr.ph104:                                        ; preds = %203, %.lr.ph104
  %.3102 = phi i64 [ %209, %.lr.ph104 ], [ 0, %203 ]
  %206 = getelementptr inbounds i64, ptr %6, i64 %.3102
  %207 = load i64, ptr %206, align 8, !tbaa !5
  %208 = getelementptr inbounds i64, ptr %5, i64 %207
  store i64 %.3102, ptr %208, align 8, !tbaa !5
  %209 = add nuw nsw i64 %.3102, 1
  %210 = load i64, ptr %0, align 8, !tbaa !5
  %211 = icmp slt i64 %209, %210
  br i1 %211, label %.lr.ph104, label %._crit_edge105, !llvm.loop !36

._crit_edge105:                                   ; preds = %.lr.ph104, %203
  %212 = load i64, ptr %38, align 8, !tbaa !16
  %213 = and i64 %212, 1
  %.not85 = icmp eq i64 %213, 0
  br i1 %.not85, label %.thread120, label %214

214:                                              ; preds = %._crit_edge105
  %215 = call double @gk_CPUSeconds() #5
  %216 = getelementptr inbounds i8, ptr %9, i64 152
  %217 = load double, ptr %216, align 8, !tbaa !17
  %218 = fadd double %215, %217
  store double %218, ptr %216, align 8, !tbaa !17
  %.pre114 = load i64, ptr %38, align 8, !tbaa !16
  %.pre116 = and i64 %.pre114, 1
  %219 = icmp eq i64 %.pre116, 0
  br i1 %219, label %.thread120, label %220

220:                                              ; preds = %214
  call void @libmetis__PrintTimers(ptr noundef nonnull %9) #5
  br label %.thread120

.thread120:                                       ; preds = %._crit_edge105, %220, %214
  %221 = load i64, ptr %3, align 8, !tbaa !5
  %222 = icmp eq i64 %221, 1
  br i1 %222, label %223, label %225

223:                                              ; preds = %.thread120
  %224 = load i64, ptr %0, align 8, !tbaa !5
  call void @libmetis__Change2FNumberingOrder(i64 noundef %224, ptr noundef %1, ptr noundef %2, ptr noundef %5, ptr noundef %6) #5
  br label %225

225:                                              ; preds = %223, %.thread120
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 280, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 248, ptr nonnull %8) #5
  ret void
}

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

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

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

declare void @gk_free(ptr noundef, ...) local_unnamed_addr #1

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

; 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) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #4

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


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