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

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

@.str = external hidden unnamed_addr constant [24 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__RefineKWay(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4, float noundef %5) #0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca float, align 4
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca ptr, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store i64 %3, ptr %10, align 8, !tbaa !9
  store ptr %4, ptr %11, align 8, !tbaa !5
  store float %5, ptr %12, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  store i64 0, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %17 = load ptr, ptr %7, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.controldef, ptr %17, i32 0, i32 1
  %19 = load i64, ptr %18, align 8, !tbaa !13
  %20 = and i64 %19, 1
  %21 = icmp ne i64 %20, 0
  br i1 %21, label %22, label %28

22:                                               ; preds = %6
  %23 = call double @gk_CPUSeconds()
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.controldef, ptr %24, i32 0, i32 17
  %26 = load double, ptr %25, align 8, !tbaa !17
  %27 = fsub double %26, %23
  store double %27, ptr %25, align 8, !tbaa !17
  br label %28

28:                                               ; preds = %22, %6
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  %30 = load ptr, ptr %9, align 8, !tbaa !5
  %31 = load i64, ptr %10, align 8, !tbaa !9
  call void @libmetis__ComputeKWayPartitionParams(ptr noundef %29, ptr noundef %30, i64 noundef %31)
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.controldef, ptr %32, i32 0, i32 1
  %34 = load i64, ptr %33, align 8, !tbaa !13
  %35 = and i64 %34, 1
  %36 = icmp ne i64 %35, 0
  br i1 %36, label %37, label %43

37:                                               ; preds = %28
  %38 = call double @gk_CPUSeconds()
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.controldef, ptr %39, i32 0, i32 22
  %41 = load double, ptr %40, align 8, !tbaa !18
  %42 = fsub double %41, %38
  store double %42, ptr %40, align 8, !tbaa !18
  br label %43

43:                                               ; preds = %37, %28
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.controldef, ptr %44, i32 0, i32 4
  %46 = load i64, ptr %45, align 8, !tbaa !19
  %47 = icmp eq i64 %46, 3
  br i1 %47, label %48, label %61

48:                                               ; preds = %43
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  %51 = load i64, ptr %10, align 8, !tbaa !9
  %52 = load ptr, ptr %11, align 8, !tbaa !5
  call void @libmetis__EliminateComponents(ptr noundef %49, ptr noundef %50, i64 noundef %51, ptr noundef %52, float noundef 1.250000e+00)
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = load ptr, ptr %9, align 8, !tbaa !5
  %55 = load i64, ptr %10, align 8, !tbaa !9
  %56 = load ptr, ptr %11, align 8, !tbaa !5
  call void @libmetis__EliminateSubDomainEdges(ptr noundef %53, ptr noundef %54, i64 noundef %55, ptr noundef %56)
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = load ptr, ptr %9, align 8, !tbaa !5
  %59 = load i64, ptr %10, align 8, !tbaa !9
  %60 = load ptr, ptr %11, align 8, !tbaa !5
  call void @libmetis__EliminateComponents(ptr noundef %57, ptr noundef %58, i64 noundef %59, ptr noundef %60, float noundef 1.250000e+00)
  br label %61

61:                                               ; preds = %48, %43
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.controldef, ptr %62, i32 0, i32 1
  %64 = load i64, ptr %63, align 8, !tbaa !13
  %65 = and i64 %64, 1
  %66 = icmp ne i64 %65, 0
  br i1 %66, label %67, label %73

67:                                               ; preds = %61
  %68 = call double @gk_CPUSeconds()
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.controldef, ptr %69, i32 0, i32 22
  %71 = load double, ptr %70, align 8, !tbaa !18
  %72 = fadd double %71, %68
  store double %72, ptr %70, align 8, !tbaa !18
  br label %73

73:                                               ; preds = %67, %61
  %74 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %74, ptr %16, align 8, !tbaa !5
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %75

75:                                               ; preds = %80, %73
  %76 = load ptr, ptr %16, align 8, !tbaa !5
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  %78 = icmp ne ptr %76, %77
  br i1 %78, label %79, label %86

79:                                               ; preds = %75
  br label %80

80:                                               ; preds = %79
  %81 = load ptr, ptr %16, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.graphdef, ptr %81, i32 0, i32 32
  %83 = load ptr, ptr %82, align 8, !tbaa !20
  store ptr %83, ptr %16, align 8, !tbaa !5
  %84 = load i64, ptr %14, align 8, !tbaa !9
  %85 = add nsw i64 %84, 1
  store i64 %85, ptr %14, align 8, !tbaa !9
  br label %75, !llvm.loop !23

86:                                               ; preds = %75
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %87

87:                                               ; preds = %249, %86
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.controldef, ptr %88, i32 0, i32 4
  %90 = load i64, ptr %89, align 8, !tbaa !19
  %91 = icmp eq i64 %90, 3
  br i1 %91, label %92, label %108

92:                                               ; preds = %87
  %93 = load i64, ptr %13, align 8, !tbaa !9
  %94 = load i64, ptr %14, align 8, !tbaa !9
  %95 = sdiv i64 %94, 2
  %96 = icmp eq i64 %93, %95
  br i1 %96, label %103, label %97

97:                                               ; preds = %92
  %98 = load i64, ptr %13, align 8, !tbaa !9
  %99 = load i64, ptr %14, align 8, !tbaa !9
  %100 = sdiv i64 %99, 2
  %101 = add nsw i64 %100, 1
  %102 = icmp eq i64 %98, %101
  br i1 %102, label %103, label %108

103:                                              ; preds = %97, %92
  %104 = load ptr, ptr %7, align 8, !tbaa !5
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = load i64, ptr %10, align 8, !tbaa !9
  %107 = load ptr, ptr %11, align 8, !tbaa !5
  call void @libmetis__EliminateSubDomainEdges(ptr noundef %104, ptr noundef %105, i64 noundef %106, ptr noundef %107)
  br label %108

108:                                              ; preds = %103, %97, %87
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.controldef, ptr %109, i32 0, i32 1
  %111 = load i64, ptr %110, align 8, !tbaa !13
  %112 = and i64 %111, 1
  %113 = icmp ne i64 %112, 0
  br i1 %113, label %114, label %120

114:                                              ; preds = %108
  %115 = call double @gk_CPUSeconds()
  %116 = load ptr, ptr %7, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.controldef, ptr %116, i32 0, i32 19
  %118 = load double, ptr %117, align 8, !tbaa !25
  %119 = fsub double %118, %115
  store double %119, ptr %117, align 8, !tbaa !25
  br label %120

120:                                              ; preds = %114, %108
  %121 = load i64, ptr %13, align 8, !tbaa !9
  %122 = mul nsw i64 2, %121
  %123 = load i64, ptr %14, align 8, !tbaa !9
  %124 = icmp sge i64 %122, %123
  br i1 %124, label %125, label %161

125:                                              ; preds = %120
  %126 = load ptr, ptr %9, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.graphdef, ptr %126, i32 0, i32 19
  %128 = load ptr, ptr %127, align 8, !tbaa !26
  %129 = load i64, ptr %10, align 8, !tbaa !9
  %130 = load ptr, ptr %11, align 8, !tbaa !5
  %131 = load float, ptr %12, align 4, !tbaa !11
  %132 = fpext float %131 to double
  %133 = fmul double 1.040000e+00, %132
  %134 = fptrunc double %133 to float
  %135 = call i64 @libmetis__IsBalanced(ptr noundef %128, i64 noundef %129, ptr noundef %130, float noundef %134)
  %136 = icmp ne i64 %135, 0
  br i1 %136, label %161, label %137

137:                                              ; preds = %125
  %138 = load ptr, ptr %7, align 8, !tbaa !5
  %139 = load ptr, ptr %9, align 8, !tbaa !5
  %140 = load i64, ptr %10, align 8, !tbaa !9
  call void @libmetis__ComputeKWayBalanceBoundary(ptr noundef %138, ptr noundef %139, i64 noundef %140)
  %141 = load ptr, ptr %7, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.controldef, ptr %141, i32 0, i32 4
  %143 = load i64, ptr %142, align 8, !tbaa !19
  %144 = icmp eq i64 %143, 3
  br i1 %144, label %145, label %151

145:                                              ; preds = %137
  %146 = load ptr, ptr %7, align 8, !tbaa !5
  %147 = load ptr, ptr %9, align 8, !tbaa !5
  %148 = load i64, ptr %10, align 8, !tbaa !9
  %149 = load ptr, ptr %11, align 8, !tbaa !5
  %150 = load float, ptr %12, align 4, !tbaa !11
  call void @libmetis__Greedy_KWayEdgeBalanceMConn(ptr noundef %146, ptr noundef %147, i64 noundef %148, ptr noundef %149, float noundef %150, i64 noundef 1)
  br label %157

151:                                              ; preds = %137
  %152 = load ptr, ptr %7, align 8, !tbaa !5
  %153 = load ptr, ptr %9, align 8, !tbaa !5
  %154 = load i64, ptr %10, align 8, !tbaa !9
  %155 = load ptr, ptr %11, align 8, !tbaa !5
  %156 = load float, ptr %12, align 4, !tbaa !11
  call void @libmetis__Greedy_KWayEdgeBalance(ptr noundef %152, ptr noundef %153, i64 noundef %154, ptr noundef %155, float noundef %156, i64 noundef 1)
  br label %157

157:                                              ; preds = %151, %145
  %158 = load ptr, ptr %7, align 8, !tbaa !5
  %159 = load ptr, ptr %9, align 8, !tbaa !5
  %160 = load i64, ptr %10, align 8, !tbaa !9
  call void @libmetis__ComputeKWayBoundary(ptr noundef %158, ptr noundef %159, i64 noundef %160)
  br label %161

161:                                              ; preds = %157, %125, %120
  %162 = load ptr, ptr %7, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.controldef, ptr %162, i32 0, i32 4
  %164 = load i64, ptr %163, align 8, !tbaa !19
  switch i64 %164, label %183 [
    i64 1, label %165
    i64 2, label %171
    i64 3, label %177
  ]

165:                                              ; preds = %161
  %166 = load ptr, ptr %7, align 8, !tbaa !5
  %167 = load ptr, ptr %9, align 8, !tbaa !5
  %168 = load i64, ptr %10, align 8, !tbaa !9
  %169 = load ptr, ptr %11, align 8, !tbaa !5
  %170 = load float, ptr %12, align 4, !tbaa !11
  call void @libmetis__Random_KWayEdgeRefine(ptr noundef %166, ptr noundef %167, i64 noundef %168, ptr noundef %169, float noundef %170, i64 noundef 10, i64 noundef 1)
  br label %183

171:                                              ; preds = %161
  %172 = load ptr, ptr %7, align 8, !tbaa !5
  %173 = load ptr, ptr %9, align 8, !tbaa !5
  %174 = load i64, ptr %10, align 8, !tbaa !9
  %175 = load ptr, ptr %11, align 8, !tbaa !5
  %176 = load float, ptr %12, align 4, !tbaa !11
  call void @libmetis__Greedy_KWayEdgeRefine(ptr noundef %172, ptr noundef %173, i64 noundef %174, ptr noundef %175, float noundef %176, i64 noundef 10)
  br label %183

177:                                              ; preds = %161
  %178 = load ptr, ptr %7, align 8, !tbaa !5
  %179 = load ptr, ptr %9, align 8, !tbaa !5
  %180 = load i64, ptr %10, align 8, !tbaa !9
  %181 = load ptr, ptr %11, align 8, !tbaa !5
  %182 = load float, ptr %12, align 4, !tbaa !11
  call void @libmetis__Random_KWayEdgeRefineMConn(ptr noundef %178, ptr noundef %179, i64 noundef %180, ptr noundef %181, float noundef %182, i64 noundef 10, i64 noundef 1)
  br label %183

183:                                              ; preds = %177, %171, %165, %161
  %184 = load ptr, ptr %7, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.controldef, ptr %184, i32 0, i32 1
  %186 = load i64, ptr %185, align 8, !tbaa !13
  %187 = and i64 %186, 1
  %188 = icmp ne i64 %187, 0
  br i1 %188, label %189, label %195

189:                                              ; preds = %183
  %190 = call double @gk_CPUSeconds()
  %191 = load ptr, ptr %7, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.controldef, ptr %191, i32 0, i32 19
  %193 = load double, ptr %192, align 8, !tbaa !25
  %194 = fadd double %193, %190
  store double %194, ptr %192, align 8, !tbaa !25
  br label %195

195:                                              ; preds = %189, %183
  %196 = load ptr, ptr %9, align 8, !tbaa !5
  %197 = load ptr, ptr %8, align 8, !tbaa !5
  %198 = icmp eq ptr %196, %197
  br i1 %198, label %199, label %200

199:                                              ; preds = %195
  br label %252

200:                                              ; preds = %195
  %201 = load ptr, ptr %9, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.graphdef, ptr %201, i32 0, i32 32
  %203 = load ptr, ptr %202, align 8, !tbaa !20
  store ptr %203, ptr %9, align 8, !tbaa !5
  %204 = load ptr, ptr %7, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.controldef, ptr %204, i32 0, i32 1
  %206 = load i64, ptr %205, align 8, !tbaa !13
  %207 = and i64 %206, 1
  %208 = icmp ne i64 %207, 0
  br i1 %208, label %209, label %215

209:                                              ; preds = %200
  %210 = call double @gk_CPUSeconds()
  %211 = load ptr, ptr %7, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.controldef, ptr %211, i32 0, i32 20
  %213 = load double, ptr %212, align 8, !tbaa !27
  %214 = fsub double %213, %210
  store double %214, ptr %212, align 8, !tbaa !27
  br label %215

215:                                              ; preds = %209, %200
  %216 = load ptr, ptr %9, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.graphdef, ptr %216, i32 0, i32 3
  %218 = load ptr, ptr %217, align 8, !tbaa !28
  %219 = icmp eq ptr %218, null
  br i1 %219, label %220, label %233

220:                                              ; preds = %215
  %221 = load ptr, ptr %9, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.graphdef, ptr %221, i32 0, i32 0
  %223 = load i64, ptr %222, align 8, !tbaa !29
  %224 = call ptr @libmetis__idxsmalloc(i64 noundef %223, i64 noundef 1, ptr noundef @.str)
  %225 = load ptr, ptr %9, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.graphdef, ptr %225, i32 0, i32 3
  store ptr %224, ptr %226, align 8, !tbaa !28
  %227 = load ptr, ptr %9, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.graphdef, ptr %227, i32 0, i32 1
  %229 = load i64, ptr %228, align 8, !tbaa !30
  %230 = call ptr @libmetis__idxsmalloc(i64 noundef %229, i64 noundef 1, ptr noundef @.str.1)
  %231 = load ptr, ptr %9, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.graphdef, ptr %231, i32 0, i32 6
  store ptr %230, ptr %232, align 8, !tbaa !31
  store i64 1, ptr %15, align 8, !tbaa !9
  br label %233

233:                                              ; preds = %220, %215
  %234 = load ptr, ptr %7, align 8, !tbaa !5
  %235 = load ptr, ptr %9, align 8, !tbaa !5
  %236 = load i64, ptr %10, align 8, !tbaa !9
  call void @libmetis__ProjectKWayPartition(ptr noundef %234, ptr noundef %235, i64 noundef %236)
  %237 = load ptr, ptr %7, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct.controldef, ptr %237, i32 0, i32 1
  %239 = load i64, ptr %238, align 8, !tbaa !13
  %240 = and i64 %239, 1
  %241 = icmp ne i64 %240, 0
  br i1 %241, label %242, label %248

242:                                              ; preds = %233
  %243 = call double @gk_CPUSeconds()
  %244 = load ptr, ptr %7, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.controldef, ptr %244, i32 0, i32 20
  %246 = load double, ptr %245, align 8, !tbaa !27
  %247 = fadd double %246, %243
  store double %247, ptr %245, align 8, !tbaa !27
  br label %248

248:                                              ; preds = %242, %233
  br label %249

249:                                              ; preds = %248
  %250 = load i64, ptr %13, align 8, !tbaa !9
  %251 = add nsw i64 %250, 1
  store i64 %251, ptr %13, align 8, !tbaa !9
  br label %87

252:                                              ; preds = %199
  %253 = load ptr, ptr %9, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.graphdef, ptr %253, i32 0, i32 19
  %255 = load ptr, ptr %254, align 8, !tbaa !26
  %256 = load i64, ptr %10, align 8, !tbaa !9
  %257 = load ptr, ptr %11, align 8, !tbaa !5
  %258 = load float, ptr %12, align 4, !tbaa !11
  %259 = call i64 @libmetis__IsBalanced(ptr noundef %255, i64 noundef %256, ptr noundef %257, float noundef %258)
  %260 = icmp ne i64 %259, 0
  br i1 %260, label %292, label %261

261:                                              ; preds = %252
  %262 = load ptr, ptr %7, align 8, !tbaa !5
  %263 = load ptr, ptr %9, align 8, !tbaa !5
  %264 = load i64, ptr %10, align 8, !tbaa !9
  call void @libmetis__ComputeKWayBalanceBoundary(ptr noundef %262, ptr noundef %263, i64 noundef %264)
  %265 = load ptr, ptr %7, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.controldef, ptr %265, i32 0, i32 4
  %267 = load i64, ptr %266, align 8, !tbaa !19
  %268 = icmp eq i64 %267, 3
  br i1 %268, label %269, label %280

269:                                              ; preds = %261
  %270 = load ptr, ptr %7, align 8, !tbaa !5
  %271 = load ptr, ptr %9, align 8, !tbaa !5
  %272 = load i64, ptr %10, align 8, !tbaa !9
  %273 = load ptr, ptr %11, align 8, !tbaa !5
  %274 = load float, ptr %12, align 4, !tbaa !11
  call void @libmetis__Greedy_KWayEdgeBalanceMConn(ptr noundef %270, ptr noundef %271, i64 noundef %272, ptr noundef %273, float noundef %274, i64 noundef 8)
  %275 = load ptr, ptr %7, align 8, !tbaa !5
  %276 = load ptr, ptr %9, align 8, !tbaa !5
  %277 = load i64, ptr %10, align 8, !tbaa !9
  %278 = load ptr, ptr %11, align 8, !tbaa !5
  %279 = load float, ptr %12, align 4, !tbaa !11
  call void @libmetis__Random_KWayEdgeRefineMConn(ptr noundef %275, ptr noundef %276, i64 noundef %277, ptr noundef %278, float noundef %279, i64 noundef 10, i64 noundef 0)
  br label %291

280:                                              ; preds = %261
  %281 = load ptr, ptr %7, align 8, !tbaa !5
  %282 = load ptr, ptr %9, align 8, !tbaa !5
  %283 = load i64, ptr %10, align 8, !tbaa !9
  %284 = load ptr, ptr %11, align 8, !tbaa !5
  %285 = load float, ptr %12, align 4, !tbaa !11
  call void @libmetis__Greedy_KWayEdgeBalance(ptr noundef %281, ptr noundef %282, i64 noundef %283, ptr noundef %284, float noundef %285, i64 noundef 8)
  %286 = load ptr, ptr %7, align 8, !tbaa !5
  %287 = load ptr, ptr %9, align 8, !tbaa !5
  %288 = load i64, ptr %10, align 8, !tbaa !9
  %289 = load ptr, ptr %11, align 8, !tbaa !5
  %290 = load float, ptr %12, align 4, !tbaa !11
  call void @libmetis__Random_KWayEdgeRefine(ptr noundef %286, ptr noundef %287, i64 noundef %288, ptr noundef %289, float noundef %290, i64 noundef 10, i64 noundef 0)
  br label %291

291:                                              ; preds = %280, %269
  br label %292

292:                                              ; preds = %291, %252
  %293 = load ptr, ptr %7, align 8, !tbaa !5
  %294 = getelementptr inbounds %struct.controldef, ptr %293, i32 0, i32 1
  %295 = load i64, ptr %294, align 8, !tbaa !13
  %296 = and i64 %295, 1
  %297 = icmp ne i64 %296, 0
  br i1 %297, label %298, label %304

298:                                              ; preds = %292
  %299 = call double @gk_CPUSeconds()
  %300 = load ptr, ptr %7, align 8, !tbaa !5
  %301 = getelementptr inbounds %struct.controldef, ptr %300, i32 0, i32 23
  %302 = load double, ptr %301, align 8, !tbaa !32
  %303 = fsub double %302, %299
  store double %303, ptr %301, align 8, !tbaa !32
  br label %304

304:                                              ; preds = %298, %292
  %305 = load ptr, ptr %7, align 8, !tbaa !5
  %306 = load ptr, ptr %9, align 8, !tbaa !5
  %307 = load i64, ptr %10, align 8, !tbaa !9
  %308 = load ptr, ptr %11, align 8, !tbaa !5
  %309 = load float, ptr %12, align 4, !tbaa !11
  call void @libmetis__EliminateComponents(ptr noundef %305, ptr noundef %306, i64 noundef %307, ptr noundef %308, float noundef %309)
  %310 = load ptr, ptr %7, align 8, !tbaa !5
  %311 = getelementptr inbounds %struct.controldef, ptr %310, i32 0, i32 1
  %312 = load i64, ptr %311, align 8, !tbaa !13
  %313 = and i64 %312, 1
  %314 = icmp ne i64 %313, 0
  br i1 %314, label %315, label %321

315:                                              ; preds = %304
  %316 = call double @gk_CPUSeconds()
  %317 = load ptr, ptr %7, align 8, !tbaa !5
  %318 = getelementptr inbounds %struct.controldef, ptr %317, i32 0, i32 23
  %319 = load double, ptr %318, align 8, !tbaa !32
  %320 = fadd double %319, %316
  store double %320, ptr %318, align 8, !tbaa !32
  br label %321

321:                                              ; preds = %315, %304
  %322 = load i64, ptr %15, align 8, !tbaa !9
  %323 = icmp ne i64 %322, 0
  br i1 %323, label %324, label %329

324:                                              ; preds = %321
  %325 = load ptr, ptr %9, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.graphdef, ptr %325, i32 0, i32 3
  %327 = load ptr, ptr %9, align 8, !tbaa !5
  %328 = getelementptr inbounds %struct.graphdef, ptr %327, i32 0, i32 6
  call void (ptr, ...) @gk_free(ptr noundef %326, ptr noundef %328, ptr noundef null)
  br label %329

329:                                              ; preds = %324, %321
  %330 = load ptr, ptr %7, align 8, !tbaa !5
  %331 = getelementptr inbounds %struct.controldef, ptr %330, i32 0, i32 1
  %332 = load i64, ptr %331, align 8, !tbaa !13
  %333 = and i64 %332, 1
  %334 = icmp ne i64 %333, 0
  br i1 %334, label %335, label %341

335:                                              ; preds = %329
  %336 = call double @gk_CPUSeconds()
  %337 = load ptr, ptr %7, align 8, !tbaa !5
  %338 = getelementptr inbounds %struct.controldef, ptr %337, i32 0, i32 17
  %339 = load double, ptr %338, align 8, !tbaa !17
  %340 = fadd double %339, %336
  store double %340, ptr %338, align 8, !tbaa !17
  br label %341

341:                                              ; preds = %335, %329
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  ret void
}

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

declare double @gk_CPUSeconds() #2

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

declare void @libmetis__EliminateComponents(ptr noundef, ptr noundef, i64 noundef, ptr noundef, float noundef) #2

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @libmetis__IsBalanced(ptr noundef, i64 noundef, ptr noundef, float noundef) #0

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

declare void @libmetis__Greedy_KWayEdgeBalanceMConn(ptr noundef, ptr noundef, i64 noundef, ptr noundef, float noundef, i64 noundef) #2

declare void @libmetis__Greedy_KWayEdgeBalance(ptr noundef, ptr noundef, i64 noundef, ptr noundef, float noundef, i64 noundef) #2

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

declare void @libmetis__Random_KWayEdgeRefine(ptr noundef, ptr noundef, i64 noundef, ptr noundef, float noundef, i64 noundef, i64 noundef) #2

declare void @libmetis__Greedy_KWayEdgeRefine(ptr noundef, ptr noundef, i64 noundef, ptr noundef, float noundef, i64 noundef) #2

declare void @libmetis__Random_KWayEdgeRefineMConn(ptr noundef, ptr noundef, i64 noundef, ptr noundef, float noundef, i64 noundef, i64 noundef) #2

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

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

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

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

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

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

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


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

@.str = external hidden unnamed_addr constant [24 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__RefineKWay(ptr noundef %0, ptr noundef readnone %1, ptr noundef %2, i64 noundef %3, ptr noundef %4, float noundef %5) local_unnamed_addr #0 {
  %7 = getelementptr inbounds i8, ptr %0, i64 8
  %8 = load i64, ptr %7, align 8, !tbaa !5
  %9 = and i64 %8, 1
  %.not = icmp eq i64 %9, 0
  br i1 %.not, label %15, label %10

10:                                               ; preds = %6
  %11 = tail call double @gk_CPUSeconds() #2
  %12 = getelementptr inbounds i8, ptr %0, i64 192
  %13 = load double, ptr %12, align 8, !tbaa !14
  %14 = fsub double %13, %11
  store double %14, ptr %12, align 8, !tbaa !14
  br label %15

15:                                               ; preds = %10, %6
  tail call void @libmetis__ComputeKWayPartitionParams(ptr noundef nonnull %0, ptr noundef %2, i64 noundef %3)
  %16 = load i64, ptr %7, align 8, !tbaa !5
  %17 = and i64 %16, 1
  %.not142 = icmp eq i64 %17, 0
  br i1 %.not142, label %23, label %18

18:                                               ; preds = %15
  %19 = tail call double @gk_CPUSeconds() #2
  %20 = getelementptr inbounds i8, ptr %0, i64 232
  %21 = load double, ptr %20, align 8, !tbaa !15
  %22 = fsub double %21, %19
  store double %22, ptr %20, align 8, !tbaa !15
  br label %23

23:                                               ; preds = %18, %15
  %24 = getelementptr inbounds i8, ptr %0, i64 32
  %25 = load i64, ptr %24, align 8, !tbaa !16
  %26 = icmp eq i64 %25, 3
  br i1 %26, label %27, label %28

27:                                               ; preds = %23
  tail call void @libmetis__EliminateComponents(ptr noundef nonnull %0, ptr noundef %2, i64 noundef %3, ptr noundef %4, float noundef 1.250000e+00) #2
  tail call void @libmetis__EliminateSubDomainEdges(ptr noundef nonnull %0, ptr noundef %2, i64 noundef %3, ptr noundef %4) #2
  tail call void @libmetis__EliminateComponents(ptr noundef nonnull %0, ptr noundef %2, i64 noundef %3, ptr noundef %4, float noundef 1.250000e+00) #2
  br label %28

28:                                               ; preds = %27, %23
  %29 = load i64, ptr %7, align 8, !tbaa !5
  %30 = and i64 %29, 1
  %.not143 = icmp eq i64 %30, 0
  br i1 %.not143, label %36, label %31

31:                                               ; preds = %28
  %32 = tail call double @gk_CPUSeconds() #2
  %33 = getelementptr inbounds i8, ptr %0, i64 232
  %34 = load double, ptr %33, align 8, !tbaa !15
  %35 = fadd double %32, %34
  store double %35, ptr %33, align 8, !tbaa !15
  br label %36

36:                                               ; preds = %31, %28
  %.not144157 = icmp eq ptr %2, %1
  br i1 %.not144157, label %.preheader, label %.lr.ph

.preheader:                                       ; preds = %.lr.ph, %36
  %.0137.lcssa = phi i64 [ 0, %36 ], [ %46, %.lr.ph ]
  %37 = lshr i64 %.0137.lcssa, 1
  %38 = add nuw nsw i64 %37, 1
  %39 = getelementptr inbounds i8, ptr %0, i64 208
  %40 = fpext float %5 to double
  %41 = fmul double %40, 1.040000e+00
  %42 = fptrunc double %41 to float
  %43 = getelementptr inbounds i8, ptr %0, i64 216
  br label %47

.lr.ph:                                           ; preds = %36, %.lr.ph
  %.0159 = phi ptr [ %45, %.lr.ph ], [ %2, %36 ]
  %.0137158 = phi i64 [ %46, %.lr.ph ], [ 0, %36 ]
  %44 = getelementptr inbounds i8, ptr %.0159, i64 240
  %45 = load ptr, ptr %44, align 8, !tbaa !17
  %46 = add nuw nsw i64 %.0137158, 1
  %.not144 = icmp eq ptr %45, %1
  br i1 %.not144, label %.preheader, label %.lr.ph, !llvm.loop !20

47:                                               ; preds = %.preheader, %114
  %.0139 = phi ptr [ %89, %114 ], [ %2, %.preheader ]
  %.0138 = phi i64 [ %115, %114 ], [ 0, %.preheader ]
  %.0136 = phi i64 [ %.1, %114 ], [ 0, %.preheader ]
  %48 = load i64, ptr %24, align 8, !tbaa !16
  %49 = icmp eq i64 %48, 3
  br i1 %49, label %50, label %54

50:                                               ; preds = %47
  %51 = icmp eq i64 %.0138, %37
  %52 = icmp eq i64 %.0138, %38
  %or.cond = select i1 %51, i1 true, i1 %52
  br i1 %or.cond, label %53, label %54

53:                                               ; preds = %50
  tail call void @libmetis__EliminateSubDomainEdges(ptr noundef nonnull %0, ptr noundef %.0139, i64 noundef %3, ptr noundef %4) #2
  br label %54

54:                                               ; preds = %50, %53, %47
  %55 = load i64, ptr %7, align 8, !tbaa !5
  %56 = and i64 %55, 1
  %.not145 = icmp eq i64 %56, 0
  br i1 %.not145, label %61, label %57

57:                                               ; preds = %54
  %58 = tail call double @gk_CPUSeconds() #2
  %59 = load double, ptr %39, align 8, !tbaa !22
  %60 = fsub double %59, %58
  store double %60, ptr %39, align 8, !tbaa !22
  br label %61

61:                                               ; preds = %57, %54
  %62 = shl nuw nsw i64 %.0138, 1
  %.not146 = icmp ult i64 %62, %.0137.lcssa
  br i1 %.not146, label %73, label %63

63:                                               ; preds = %61
  %64 = getelementptr inbounds i8, ptr %.0139, i64 136
  %65 = load ptr, ptr %64, align 8, !tbaa !23
  %66 = tail call i64 @libmetis__IsBalanced(ptr noundef %65, i64 noundef %3, ptr noundef %4, float noundef %42)
  %.not147 = icmp eq i64 %66, 0
  br i1 %.not147, label %67, label %73

67:                                               ; preds = %63
  tail call void @libmetis__ComputeKWayBalanceBoundary(ptr noundef nonnull %0, ptr noundef nonnull %.0139, i64 noundef %3)
  %68 = load i64, ptr %24, align 8, !tbaa !16
  %69 = icmp eq i64 %68, 3
  br i1 %69, label %70, label %71

70:                                               ; preds = %67
  tail call void @libmetis__Greedy_KWayEdgeBalanceMConn(ptr noundef nonnull %0, ptr noundef nonnull %.0139, i64 noundef %3, ptr noundef %4, float noundef %5, i64 noundef 1) #2
  br label %72

71:                                               ; preds = %67
  tail call void @libmetis__Greedy_KWayEdgeBalance(ptr noundef nonnull %0, ptr noundef nonnull %.0139, i64 noundef %3, ptr noundef %4, float noundef %5, i64 noundef 1) #2
  br label %72

72:                                               ; preds = %71, %70
  tail call void @libmetis__ComputeKWayBoundary(ptr noundef nonnull %0, ptr noundef nonnull %.0139, i64 noundef %3)
  br label %73

73:                                               ; preds = %72, %63, %61
  %74 = load i64, ptr %24, align 8, !tbaa !16
  switch i64 %74, label %78 [
    i64 1, label %75
    i64 2, label %76
    i64 3, label %77
  ]

75:                                               ; preds = %73
  tail call void @libmetis__Random_KWayEdgeRefine(ptr noundef nonnull %0, ptr noundef %.0139, i64 noundef %3, ptr noundef %4, float noundef %5, i64 noundef 10, i64 noundef 1) #2
  br label %78

76:                                               ; preds = %73
  tail call void @libmetis__Greedy_KWayEdgeRefine(ptr noundef nonnull %0, ptr noundef %.0139, i64 noundef %3, ptr noundef %4, float noundef %5, i64 noundef 10) #2
  br label %78

77:                                               ; preds = %73
  tail call void @libmetis__Random_KWayEdgeRefineMConn(ptr noundef nonnull %0, ptr noundef %.0139, i64 noundef %3, ptr noundef %4, float noundef %5, i64 noundef 10, i64 noundef 1) #2
  br label %78

78:                                               ; preds = %77, %76, %75, %73
  %79 = load i64, ptr %7, align 8, !tbaa !5
  %80 = and i64 %79, 1
  %.not148 = icmp eq i64 %80, 0
  br i1 %.not148, label %85, label %81

81:                                               ; preds = %78
  %82 = tail call double @gk_CPUSeconds() #2
  %83 = load double, ptr %39, align 8, !tbaa !22
  %84 = fadd double %82, %83
  store double %84, ptr %39, align 8, !tbaa !22
  br label %85

85:                                               ; preds = %81, %78
  %86 = icmp eq ptr %.0139, %1
  br i1 %86, label %116, label %87

87:                                               ; preds = %85
  %88 = getelementptr inbounds i8, ptr %.0139, i64 240
  %89 = load ptr, ptr %88, align 8, !tbaa !17
  %90 = load i64, ptr %7, align 8, !tbaa !5
  %91 = and i64 %90, 1
  %.not149 = icmp eq i64 %91, 0
  br i1 %.not149, label %96, label %92

92:                                               ; preds = %87
  %93 = tail call double @gk_CPUSeconds() #2
  %94 = load double, ptr %43, align 8, !tbaa !24
  %95 = fsub double %94, %93
  store double %95, ptr %43, align 8, !tbaa !24
  br label %96

96:                                               ; preds = %92, %87
  %97 = getelementptr inbounds i8, ptr %89, i64 24
  %98 = load ptr, ptr %97, align 8, !tbaa !25
  %99 = icmp eq ptr %98, null
  br i1 %99, label %100, label %107

100:                                              ; preds = %96
  %101 = load i64, ptr %89, align 8, !tbaa !26
  %102 = tail call ptr @libmetis__idxsmalloc(i64 noundef %101, i64 noundef 1, ptr noundef nonnull @.str) #2
  store ptr %102, ptr %97, align 8, !tbaa !25
  %103 = getelementptr inbounds i8, ptr %89, i64 8
  %104 = load i64, ptr %103, align 8, !tbaa !27
  %105 = tail call ptr @libmetis__idxsmalloc(i64 noundef %104, i64 noundef 1, ptr noundef nonnull @.str.1) #2
  %106 = getelementptr inbounds i8, ptr %89, i64 48
  store ptr %105, ptr %106, align 8, !tbaa !28
  br label %107

107:                                              ; preds = %100, %96
  %.1 = phi i64 [ 1, %100 ], [ %.0136, %96 ]
  tail call void @libmetis__ProjectKWayPartition(ptr noundef nonnull %0, ptr noundef nonnull %89, i64 noundef %3)
  %108 = load i64, ptr %7, align 8, !tbaa !5
  %109 = and i64 %108, 1
  %.not150 = icmp eq i64 %109, 0
  br i1 %.not150, label %114, label %110

110:                                              ; preds = %107
  %111 = tail call double @gk_CPUSeconds() #2
  %112 = load double, ptr %43, align 8, !tbaa !24
  %113 = fadd double %111, %112
  store double %113, ptr %43, align 8, !tbaa !24
  br label %114

114:                                              ; preds = %107, %110
  %115 = add nuw nsw i64 %.0138, 1
  br label %47

116:                                              ; preds = %85
  %117 = getelementptr inbounds i8, ptr %.0139, i64 136
  %118 = load ptr, ptr %117, align 8, !tbaa !23
  %119 = tail call i64 @libmetis__IsBalanced(ptr noundef %118, i64 noundef %3, ptr noundef %4, float noundef %5)
  %.not151 = icmp eq i64 %119, 0
  br i1 %.not151, label %120, label %125

120:                                              ; preds = %116
  tail call void @libmetis__ComputeKWayBalanceBoundary(ptr noundef nonnull %0, ptr noundef nonnull %.0139, i64 noundef %3)
  %121 = load i64, ptr %24, align 8, !tbaa !16
  %122 = icmp eq i64 %121, 3
  br i1 %122, label %123, label %124

123:                                              ; preds = %120
  tail call void @libmetis__Greedy_KWayEdgeBalanceMConn(ptr noundef nonnull %0, ptr noundef nonnull %.0139, i64 noundef %3, ptr noundef %4, float noundef %5, i64 noundef 8) #2
  tail call void @libmetis__Random_KWayEdgeRefineMConn(ptr noundef nonnull %0, ptr noundef nonnull %.0139, i64 noundef %3, ptr noundef %4, float noundef %5, i64 noundef 10, i64 noundef 0) #2
  br label %125

124:                                              ; preds = %120
  tail call void @libmetis__Greedy_KWayEdgeBalance(ptr noundef nonnull %0, ptr noundef nonnull %.0139, i64 noundef %3, ptr noundef %4, float noundef %5, i64 noundef 8) #2
  tail call void @libmetis__Random_KWayEdgeRefine(ptr noundef nonnull %0, ptr noundef nonnull %.0139, i64 noundef %3, ptr noundef %4, float noundef %5, i64 noundef 10, i64 noundef 0) #2
  br label %125

125:                                              ; preds = %123, %124, %116
  %126 = load i64, ptr %7, align 8, !tbaa !5
  %127 = and i64 %126, 1
  %.not152 = icmp eq i64 %127, 0
  br i1 %.not152, label %133, label %128

128:                                              ; preds = %125
  %129 = tail call double @gk_CPUSeconds() #2
  %130 = getelementptr inbounds i8, ptr %0, i64 240
  %131 = load double, ptr %130, align 8, !tbaa !29
  %132 = fsub double %131, %129
  store double %132, ptr %130, align 8, !tbaa !29
  br label %133

133:                                              ; preds = %128, %125
  tail call void @libmetis__EliminateComponents(ptr noundef nonnull %0, ptr noundef nonnull %.0139, i64 noundef %3, ptr noundef %4, float noundef %5) #2
  %134 = load i64, ptr %7, align 8, !tbaa !5
  %135 = and i64 %134, 1
  %.not153 = icmp eq i64 %135, 0
  br i1 %.not153, label %141, label %136

136:                                              ; preds = %133
  %137 = tail call double @gk_CPUSeconds() #2
  %138 = getelementptr inbounds i8, ptr %0, i64 240
  %139 = load double, ptr %138, align 8, !tbaa !29
  %140 = fadd double %137, %139
  store double %140, ptr %138, align 8, !tbaa !29
  br label %141

141:                                              ; preds = %136, %133
  %.not154 = icmp eq i64 %.0136, 0
  br i1 %.not154, label %145, label %142

142:                                              ; preds = %141
  %143 = getelementptr inbounds i8, ptr %.0139, i64 24
  %144 = getelementptr inbounds i8, ptr %.0139, i64 48
  tail call void (ptr, ...) @gk_free(ptr noundef nonnull %143, ptr noundef nonnull %144, ptr noundef null) #2
  br label %145

145:                                              ; preds = %142, %141
  %146 = load i64, ptr %7, align 8, !tbaa !5
  %147 = and i64 %146, 1
  %.not155 = icmp eq i64 %147, 0
  br i1 %.not155, label %153, label %148

148:                                              ; preds = %145
  %149 = tail call double @gk_CPUSeconds() #2
  %150 = getelementptr inbounds i8, ptr %0, i64 192
  %151 = load double, ptr %150, align 8, !tbaa !14
  %152 = fadd double %149, %151
  store double %152, ptr %150, align 8, !tbaa !14
  br label %153

153:                                              ; preds = %148, %145
  ret void
}

declare double @gk_CPUSeconds() local_unnamed_addr #1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 = { nounwind }

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

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


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