; LLVM IR from GGiecold-zz/Cluster_Ensembles :: src/Cluster_Ensembles/Hypergraph_Partitioning/metis-5.1.0/libmetis (initpart)

; 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.graph_t = type { i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, ptr, ptr, i32, i32, ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.ctrl_t = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, i32, i32, float, ptr, ptr, ptr, float, double, double, double, double, double, double, double, double, double, double, double, double, ptr, i64, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@.str.7 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [26 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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__GrowBisectionNode(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) #2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca [2 x i32], align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store i32 %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #3
  store i32 0, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #3
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  call void @libmetis__wspacepush(ptr noundef %36)
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.graph_t, ptr %37, i32 0, i32 0
  %39 = load i32, ptr %38, align 8, !tbaa !11
  store i32 %39, ptr %12, align 4, !tbaa !9
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.graph_t, ptr %40, i32 0, i32 3
  %42 = load ptr, ptr %41, align 8, !tbaa !13
  store ptr %42, ptr %26, align 8, !tbaa !5
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.graph_t, ptr %43, i32 0, i32 4
  %45 = load ptr, ptr %44, align 8, !tbaa !14
  store ptr %45, ptr %27, align 8, !tbaa !5
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.graph_t, ptr %46, i32 0, i32 6
  %48 = load ptr, ptr %47, align 8, !tbaa !15
  store ptr %48, ptr %28, align 8, !tbaa !5
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.graph_t, ptr %49, i32 0, i32 7
  %51 = load ptr, ptr %50, align 8, !tbaa !16
  store ptr %51, ptr %29, align 8, !tbaa !5
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = load i32, ptr %12, align 4, !tbaa !9
  %54 = call ptr @libmetis__iwspacemalloc(ptr noundef %52, i32 noundef %53)
  store ptr %54, ptr %35, align 8, !tbaa !5
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = load i32, ptr %12, align 4, !tbaa !9
  %57 = call ptr @libmetis__iwspacemalloc(ptr noundef %55, i32 noundef %56)
  store ptr %57, ptr %32, align 8, !tbaa !5
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = load i32, ptr %12, align 4, !tbaa !9
  %60 = call ptr @libmetis__iwspacemalloc(ptr noundef %58, i32 noundef %59)
  store ptr %60, ptr %33, align 8, !tbaa !5
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.ctrl_t, ptr %61, i32 0, i32 23
  %63 = load ptr, ptr %62, align 8, !tbaa !17
  %64 = getelementptr inbounds float, ptr %63, i64 0
  %65 = load float, ptr %64, align 4, !tbaa !22
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.graph_t, ptr %66, i32 0, i32 8
  %68 = load ptr, ptr %67, align 8, !tbaa !23
  %69 = getelementptr inbounds i32, ptr %68, i64 0
  %70 = load i32, ptr %69, align 4, !tbaa !9
  %71 = sitofp i32 %70 to float
  %72 = fmul float %65, %71
  %73 = fpext float %72 to double
  %74 = fmul double %73, 5.000000e-01
  %75 = fptosi double %74 to i32
  store i32 %75, ptr %19, align 4, !tbaa !9
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.ctrl_t, ptr %76, i32 0, i32 23
  %78 = load ptr, ptr %77, align 8, !tbaa !17
  %79 = getelementptr inbounds float, ptr %78, i64 0
  %80 = load float, ptr %79, align 4, !tbaa !22
  %81 = fpext float %80 to double
  %82 = fdiv double 1.000000e+00, %81
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.graph_t, ptr %83, i32 0, i32 8
  %85 = load ptr, ptr %84, align 8, !tbaa !23
  %86 = getelementptr inbounds i32, ptr %85, i64 0
  %87 = load i32, ptr %86, align 4, !tbaa !9
  %88 = sitofp i32 %87 to double
  %89 = fmul double %82, %88
  %90 = fmul double %89, 5.000000e-01
  %91 = fptosi double %90 to i32
  store i32 %91, ptr %18, align 4, !tbaa !9
  %92 = call ptr @libmetis__imalloc(i64 noundef 3, ptr noundef @.str.7)
  %93 = load ptr, ptr %6, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.graph_t, ptr %93, i32 0, i32 20
  store ptr %92, ptr %94, align 8, !tbaa !24
  %95 = load i32, ptr %12, align 4, !tbaa !9
  %96 = sext i32 %95 to i64
  %97 = call ptr @libmetis__imalloc(i64 noundef %96, ptr noundef @.str.8)
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.graph_t, ptr %98, i32 0, i32 19
  store ptr %97, ptr %99, align 8, !tbaa !25
  %100 = load i32, ptr %12, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = call ptr @libmetis__imalloc(i64 noundef %101, ptr noundef @.str.9)
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.graph_t, ptr %103, i32 0, i32 22
  store ptr %102, ptr %104, align 8, !tbaa !26
  %105 = load i32, ptr %12, align 4, !tbaa !9
  %106 = sext i32 %105 to i64
  %107 = call ptr @libmetis__imalloc(i64 noundef %106, ptr noundef @.str.10)
  %108 = load ptr, ptr %6, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.graph_t, ptr %108, i32 0, i32 23
  store ptr %107, ptr %109, align 8, !tbaa !27
  %110 = load i32, ptr %12, align 4, !tbaa !9
  %111 = sext i32 %110 to i64
  %112 = call ptr @libmetis__imalloc(i64 noundef %111, ptr noundef @.str.11)
  %113 = load ptr, ptr %6, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.graph_t, ptr %113, i32 0, i32 24
  store ptr %112, ptr %114, align 8, !tbaa !28
  %115 = load i32, ptr %12, align 4, !tbaa !9
  %116 = sext i32 %115 to i64
  %117 = call ptr @libmetis__imalloc(i64 noundef %116, ptr noundef @.str.12)
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.graph_t, ptr %118, i32 0, i32 25
  store ptr %117, ptr %119, align 8, !tbaa !29
  %120 = load i32, ptr %12, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = mul i64 %121, 8
  %123 = call ptr @gk_malloc(i64 noundef %122, ptr noundef @.str.13)
  %124 = load ptr, ptr %6, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.graph_t, ptr %124, i32 0, i32 28
  store ptr %123, ptr %125, align 8, !tbaa !30
  %126 = load ptr, ptr %6, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.graph_t, ptr %126, i32 0, i32 19
  %128 = load ptr, ptr %127, align 8, !tbaa !25
  store ptr %128, ptr %30, align 8, !tbaa !5
  %129 = load ptr, ptr %6, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.graph_t, ptr %129, i32 0, i32 23
  %131 = load ptr, ptr %130, align 8, !tbaa !27
  store ptr %131, ptr %31, align 8, !tbaa !5
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %132

132:                                              ; preds = %371, %4
  %133 = load i32, ptr %25, align 4, !tbaa !9
  %134 = load i32, ptr %8, align 4, !tbaa !9
  %135 = icmp slt i32 %133, %134
  br i1 %135, label %136, label %374

136:                                              ; preds = %132
  %137 = load i32, ptr %12, align 4, !tbaa !9
  %138 = sext i32 %137 to i64
  %139 = load ptr, ptr %30, align 8, !tbaa !5
  %140 = call ptr @libmetis__iset(i64 noundef %138, i32 noundef 1, ptr noundef %139)
  %141 = load i32, ptr %12, align 4, !tbaa !9
  %142 = sext i32 %141 to i64
  %143 = load ptr, ptr %33, align 8, !tbaa !5
  %144 = call ptr @libmetis__iset(i64 noundef %142, i32 noundef 0, ptr noundef %143)
  %145 = load ptr, ptr %6, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.graph_t, ptr %145, i32 0, i32 8
  %147 = load ptr, ptr %146, align 8, !tbaa !23
  %148 = getelementptr inbounds i32, ptr %147, i64 0
  %149 = load i32, ptr %148, align 4, !tbaa !9
  %150 = getelementptr inbounds [2 x i32], ptr %17, i64 0, i64 1
  store i32 %149, ptr %150, align 4, !tbaa !9
  %151 = getelementptr inbounds [2 x i32], ptr %17, i64 0, i64 0
  store i32 0, ptr %151, align 4, !tbaa !9
  %152 = load i32, ptr %12, align 4, !tbaa !9
  %153 = call i32 @libmetis__irandInRange(i32 noundef %152)
  %154 = load ptr, ptr %32, align 8, !tbaa !5
  %155 = getelementptr inbounds i32, ptr %154, i64 0
  store i32 %153, ptr %155, align 4, !tbaa !9
  %156 = load ptr, ptr %33, align 8, !tbaa !5
  %157 = load ptr, ptr %32, align 8, !tbaa !5
  %158 = getelementptr inbounds i32, ptr %157, i64 0
  %159 = load i32, ptr %158, align 4, !tbaa !9
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds i32, ptr %156, i64 %160
  store i32 1, ptr %161, align 4, !tbaa !9
  store i32 0, ptr %15, align 4, !tbaa !9
  store i32 1, ptr %16, align 4, !tbaa !9
  %162 = load i32, ptr %12, align 4, !tbaa !9
  %163 = sub nsw i32 %162, 1
  store i32 %163, ptr %14, align 4, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %164

164:                                              ; preds = %302, %228, %136
  %165 = load i32, ptr %15, align 4, !tbaa !9
  %166 = load i32, ptr %16, align 4, !tbaa !9
  %167 = icmp eq i32 %165, %166
  br i1 %167, label %168, label %211

168:                                              ; preds = %164
  %169 = load i32, ptr %14, align 4, !tbaa !9
  %170 = icmp eq i32 %169, 0
  br i1 %170, label %174, label %171

171:                                              ; preds = %168
  %172 = load i32, ptr %13, align 4, !tbaa !9
  %173 = icmp ne i32 %172, 0
  br i1 %173, label %174, label %175

174:                                              ; preds = %171, %168
  br label %303

175:                                              ; preds = %171
  %176 = load i32, ptr %14, align 4, !tbaa !9
  %177 = call i32 @libmetis__irandInRange(i32 noundef %176)
  store i32 %177, ptr %11, align 4, !tbaa !9
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %178

178:                                              ; preds = %198, %175
  %179 = load i32, ptr %9, align 4, !tbaa !9
  %180 = load i32, ptr %12, align 4, !tbaa !9
  %181 = icmp slt i32 %179, %180
  br i1 %181, label %182, label %201

182:                                              ; preds = %178
  %183 = load ptr, ptr %33, align 8, !tbaa !5
  %184 = load i32, ptr %9, align 4, !tbaa !9
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds i32, ptr %183, i64 %185
  %187 = load i32, ptr %186, align 4, !tbaa !9
  %188 = icmp eq i32 %187, 0
  br i1 %188, label %189, label %197

189:                                              ; preds = %182
  %190 = load i32, ptr %11, align 4, !tbaa !9
  %191 = icmp eq i32 %190, 0
  br i1 %191, label %192, label %193

192:                                              ; preds = %189
  br label %201

193:                                              ; preds = %189
  %194 = load i32, ptr %11, align 4, !tbaa !9
  %195 = add nsw i32 %194, -1
  store i32 %195, ptr %11, align 4, !tbaa !9
  br label %196

196:                                              ; preds = %193
  br label %197

197:                                              ; preds = %196, %182
  br label %198

198:                                              ; preds = %197
  %199 = load i32, ptr %9, align 4, !tbaa !9
  %200 = add nsw i32 %199, 1
  store i32 %200, ptr %9, align 4, !tbaa !9
  br label %178, !llvm.loop !31

201:                                              ; preds = %192, %178
  %202 = load i32, ptr %9, align 4, !tbaa !9
  %203 = load ptr, ptr %32, align 8, !tbaa !5
  %204 = getelementptr inbounds i32, ptr %203, i64 0
  store i32 %202, ptr %204, align 4, !tbaa !9
  %205 = load ptr, ptr %33, align 8, !tbaa !5
  %206 = load i32, ptr %9, align 4, !tbaa !9
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds i32, ptr %205, i64 %207
  store i32 1, ptr %208, align 4, !tbaa !9
  store i32 0, ptr %15, align 4, !tbaa !9
  store i32 1, ptr %16, align 4, !tbaa !9
  %209 = load i32, ptr %14, align 4, !tbaa !9
  %210 = add nsw i32 %209, -1
  store i32 %210, ptr %14, align 4, !tbaa !9
  br label %211

211:                                              ; preds = %201, %164
  %212 = load ptr, ptr %32, align 8, !tbaa !5
  %213 = load i32, ptr %15, align 4, !tbaa !9
  %214 = add nsw i32 %213, 1
  store i32 %214, ptr %15, align 4, !tbaa !9
  %215 = sext i32 %213 to i64
  %216 = getelementptr inbounds i32, ptr %212, i64 %215
  %217 = load i32, ptr %216, align 4, !tbaa !9
  store i32 %217, ptr %9, align 4, !tbaa !9
  %218 = getelementptr inbounds [2 x i32], ptr %17, i64 0, i64 1
  %219 = load i32, ptr %218, align 4, !tbaa !9
  %220 = load ptr, ptr %27, align 8, !tbaa !5
  %221 = load i32, ptr %9, align 4, !tbaa !9
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds i32, ptr %220, i64 %222
  %224 = load i32, ptr %223, align 4, !tbaa !9
  %225 = sub nsw i32 %219, %224
  %226 = load i32, ptr %18, align 4, !tbaa !9
  %227 = icmp slt i32 %225, %226
  br i1 %227, label %228, label %229

228:                                              ; preds = %211
  store i32 1, ptr %13, align 4, !tbaa !9
  br label %164

229:                                              ; preds = %211
  %230 = load ptr, ptr %30, align 8, !tbaa !5
  %231 = load i32, ptr %9, align 4, !tbaa !9
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds i32, ptr %230, i64 %232
  store i32 0, ptr %233, align 4, !tbaa !9
  br label %234

234:                                              ; preds = %229
  %235 = load ptr, ptr %27, align 8, !tbaa !5
  %236 = load i32, ptr %9, align 4, !tbaa !9
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds i32, ptr %235, i64 %237
  %239 = load i32, ptr %238, align 4, !tbaa !9
  %240 = getelementptr inbounds [2 x i32], ptr %17, i64 0, i64 0
  %241 = load i32, ptr %240, align 4, !tbaa !9
  %242 = add nsw i32 %241, %239
  store i32 %242, ptr %240, align 4, !tbaa !9
  %243 = load ptr, ptr %27, align 8, !tbaa !5
  %244 = load i32, ptr %9, align 4, !tbaa !9
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds i32, ptr %243, i64 %245
  %247 = load i32, ptr %246, align 4, !tbaa !9
  %248 = getelementptr inbounds [2 x i32], ptr %17, i64 0, i64 1
  %249 = load i32, ptr %248, align 4, !tbaa !9
  %250 = sub nsw i32 %249, %247
  store i32 %250, ptr %248, align 4, !tbaa !9
  br label %251

251:                                              ; preds = %234
  br label %252

252:                                              ; preds = %251
  %253 = getelementptr inbounds [2 x i32], ptr %17, i64 0, i64 1
  %254 = load i32, ptr %253, align 4, !tbaa !9
  %255 = load i32, ptr %19, align 4, !tbaa !9
  %256 = icmp sle i32 %254, %255
  br i1 %256, label %257, label %258

257:                                              ; preds = %252
  br label %303

258:                                              ; preds = %252
  store i32 0, ptr %13, align 4, !tbaa !9
  %259 = load ptr, ptr %26, align 8, !tbaa !5
  %260 = load i32, ptr %9, align 4, !tbaa !9
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds i32, ptr %259, i64 %261
  %263 = load i32, ptr %262, align 4, !tbaa !9
  store i32 %263, ptr %10, align 4, !tbaa !9
  br label %264

264:                                              ; preds = %299, %258
  %265 = load i32, ptr %10, align 4, !tbaa !9
  %266 = load ptr, ptr %26, align 8, !tbaa !5
  %267 = load i32, ptr %9, align 4, !tbaa !9
  %268 = add nsw i32 %267, 1
  %269 = sext i32 %268 to i64
  %270 = getelementptr inbounds i32, ptr %266, i64 %269
  %271 = load i32, ptr %270, align 4, !tbaa !9
  %272 = icmp slt i32 %265, %271
  br i1 %272, label %273, label %302

273:                                              ; preds = %264
  %274 = load ptr, ptr %28, align 8, !tbaa !5
  %275 = load i32, ptr %10, align 4, !tbaa !9
  %276 = sext i32 %275 to i64
  %277 = getelementptr inbounds i32, ptr %274, i64 %276
  %278 = load i32, ptr %277, align 4, !tbaa !9
  store i32 %278, ptr %11, align 4, !tbaa !9
  %279 = load ptr, ptr %33, align 8, !tbaa !5
  %280 = load i32, ptr %11, align 4, !tbaa !9
  %281 = sext i32 %280 to i64
  %282 = getelementptr inbounds i32, ptr %279, i64 %281
  %283 = load i32, ptr %282, align 4, !tbaa !9
  %284 = icmp eq i32 %283, 0
  br i1 %284, label %285, label %298

285:                                              ; preds = %273
  %286 = load i32, ptr %11, align 4, !tbaa !9
  %287 = load ptr, ptr %32, align 8, !tbaa !5
  %288 = load i32, ptr %16, align 4, !tbaa !9
  %289 = add nsw i32 %288, 1
  store i32 %289, ptr %16, align 4, !tbaa !9
  %290 = sext i32 %288 to i64
  %291 = getelementptr inbounds i32, ptr %287, i64 %290
  store i32 %286, ptr %291, align 4, !tbaa !9
  %292 = load ptr, ptr %33, align 8, !tbaa !5
  %293 = load i32, ptr %11, align 4, !tbaa !9
  %294 = sext i32 %293 to i64
  %295 = getelementptr inbounds i32, ptr %292, i64 %294
  store i32 1, ptr %295, align 4, !tbaa !9
  %296 = load i32, ptr %14, align 4, !tbaa !9
  %297 = add nsw i32 %296, -1
  store i32 %297, ptr %14, align 4, !tbaa !9
  br label %298

298:                                              ; preds = %285, %273
  br label %299

299:                                              ; preds = %298
  %300 = load i32, ptr %10, align 4, !tbaa !9
  %301 = add nsw i32 %300, 1
  store i32 %301, ptr %10, align 4, !tbaa !9
  br label %264, !llvm.loop !33

302:                                              ; preds = %264
  br label %164

303:                                              ; preds = %257, %174
  %304 = load ptr, ptr %5, align 8, !tbaa !5
  %305 = load ptr, ptr %6, align 8, !tbaa !5
  call void @libmetis__Compute2WayPartitionParams(ptr noundef %304, ptr noundef %305)
  %306 = load ptr, ptr %5, align 8, !tbaa !5
  %307 = load ptr, ptr %6, align 8, !tbaa !5
  %308 = load ptr, ptr %7, align 8, !tbaa !5
  call void @libmetis__Balance2Way(ptr noundef %306, ptr noundef %307, ptr noundef %308)
  %309 = load ptr, ptr %5, align 8, !tbaa !5
  %310 = load ptr, ptr %6, align 8, !tbaa !5
  %311 = load ptr, ptr %7, align 8, !tbaa !5
  call void @libmetis__FM_2WayRefine(ptr noundef %309, ptr noundef %310, ptr noundef %311, i32 noundef 4)
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %312

312:                                              ; preds = %343, %303
  %313 = load i32, ptr %9, align 4, !tbaa !9
  %314 = load ptr, ptr %6, align 8, !tbaa !5
  %315 = getelementptr inbounds %struct.graph_t, ptr %314, i32 0, i32 21
  %316 = load i32, ptr %315, align 8, !tbaa !34
  %317 = icmp slt i32 %313, %316
  br i1 %317, label %318, label %346

318:                                              ; preds = %312
  %319 = load ptr, ptr %31, align 8, !tbaa !5
  %320 = load i32, ptr %9, align 4, !tbaa !9
  %321 = sext i32 %320 to i64
  %322 = getelementptr inbounds i32, ptr %319, i64 %321
  %323 = load i32, ptr %322, align 4, !tbaa !9
  store i32 %323, ptr %10, align 4, !tbaa !9
  %324 = load ptr, ptr %26, align 8, !tbaa !5
  %325 = load i32, ptr %10, align 4, !tbaa !9
  %326 = add nsw i32 %325, 1
  %327 = sext i32 %326 to i64
  %328 = getelementptr inbounds i32, ptr %324, i64 %327
  %329 = load i32, ptr %328, align 4, !tbaa !9
  %330 = load ptr, ptr %26, align 8, !tbaa !5
  %331 = load i32, ptr %10, align 4, !tbaa !9
  %332 = sext i32 %331 to i64
  %333 = getelementptr inbounds i32, ptr %330, i64 %332
  %334 = load i32, ptr %333, align 4, !tbaa !9
  %335 = sub nsw i32 %329, %334
  %336 = icmp sgt i32 %335, 0
  br i1 %336, label %337, label %342

337:                                              ; preds = %318
  %338 = load ptr, ptr %30, align 8, !tbaa !5
  %339 = load i32, ptr %10, align 4, !tbaa !9
  %340 = sext i32 %339 to i64
  %341 = getelementptr inbounds i32, ptr %338, i64 %340
  store i32 2, ptr %341, align 4, !tbaa !9
  br label %342

342:                                              ; preds = %337, %318
  br label %343

343:                                              ; preds = %342
  %344 = load i32, ptr %9, align 4, !tbaa !9
  %345 = add nsw i32 %344, 1
  store i32 %345, ptr %9, align 4, !tbaa !9
  br label %312, !llvm.loop !35

346:                                              ; preds = %312
  %347 = load ptr, ptr %5, align 8, !tbaa !5
  %348 = load ptr, ptr %6, align 8, !tbaa !5
  call void @libmetis__Compute2WayNodePartitionParams(ptr noundef %347, ptr noundef %348)
  %349 = load ptr, ptr %5, align 8, !tbaa !5
  %350 = load ptr, ptr %6, align 8, !tbaa !5
  call void @libmetis__FM_2WayNodeRefine2Sided(ptr noundef %349, ptr noundef %350, i32 noundef 1)
  %351 = load ptr, ptr %5, align 8, !tbaa !5
  %352 = load ptr, ptr %6, align 8, !tbaa !5
  call void @libmetis__FM_2WayNodeRefine1Sided(ptr noundef %351, ptr noundef %352, i32 noundef 4)
  %353 = load i32, ptr %25, align 4, !tbaa !9
  %354 = icmp eq i32 %353, 0
  br i1 %354, label %361, label %355

355:                                              ; preds = %346
  %356 = load i32, ptr %22, align 4, !tbaa !9
  %357 = load ptr, ptr %6, align 8, !tbaa !5
  %358 = getelementptr inbounds %struct.graph_t, ptr %357, i32 0, i32 17
  %359 = load i32, ptr %358, align 8, !tbaa !36
  %360 = icmp sgt i32 %356, %359
  br i1 %360, label %361, label %370

361:                                              ; preds = %355, %346
  %362 = load ptr, ptr %6, align 8, !tbaa !5
  %363 = getelementptr inbounds %struct.graph_t, ptr %362, i32 0, i32 17
  %364 = load i32, ptr %363, align 8, !tbaa !36
  store i32 %364, ptr %22, align 4, !tbaa !9
  %365 = load i32, ptr %12, align 4, !tbaa !9
  %366 = sext i32 %365 to i64
  %367 = load ptr, ptr %30, align 8, !tbaa !5
  %368 = load ptr, ptr %35, align 8, !tbaa !5
  %369 = call ptr @libmetis__icopy(i64 noundef %366, ptr noundef %367, ptr noundef %368)
  br label %370

370:                                              ; preds = %361, %355
  br label %371

371:                                              ; preds = %370
  %372 = load i32, ptr %25, align 4, !tbaa !9
  %373 = add nsw i32 %372, 1
  store i32 %373, ptr %25, align 4, !tbaa !9
  br label %132, !llvm.loop !37

374:                                              ; preds = %132
  %375 = load i32, ptr %22, align 4, !tbaa !9
  %376 = load ptr, ptr %6, align 8, !tbaa !5
  %377 = getelementptr inbounds %struct.graph_t, ptr %376, i32 0, i32 17
  store i32 %375, ptr %377, align 8, !tbaa !36
  %378 = load i32, ptr %12, align 4, !tbaa !9
  %379 = sext i32 %378 to i64
  %380 = load ptr, ptr %35, align 8, !tbaa !5
  %381 = load ptr, ptr %30, align 8, !tbaa !5
  %382 = call ptr @libmetis__icopy(i64 noundef %379, ptr noundef %380, ptr noundef %381)
  %383 = load ptr, ptr %5, align 8, !tbaa !5
  call void @libmetis__wspacepop(ptr noundef %383)
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  ret void
}

declare void @libmetis__wspacepush(ptr noundef) #1

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

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

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

declare void @libmetis__FM_2WayRefine(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #1

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

declare void @libmetis__wspacepop(ptr noundef) #1

declare i32 @libmetis__irandInRange(i32 noundef) #1

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

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

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

declare void @libmetis__FM_2WayNodeRefine2Sided(ptr noundef, ptr noundef, i32 noundef) #1

declare void @libmetis__FM_2WayNodeRefine1Sided(ptr noundef, ptr noundef, i32 noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"graph_t", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !6, i64 96, !6, i64 104, !10, i64 112, !10, i64 116, !6, i64 120, !6, i64 128, !10, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208}
!13 = !{!12, !6, i64 16}
!14 = !{!12, !6, i64 24}
!15 = !{!12, !6, i64 40}
!16 = !{!12, !6, i64 48}
!17 = !{!18, !6, i64 104}
!18 = !{!"ctrl_t", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !6, i64 80, !10, i64 88, !10, i64 92, !19, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !19, i64 128, !20, i64 136, !20, i64 144, !20, i64 152, !20, i64 160, !20, i64 168, !20, i64 176, !20, i64 184, !20, i64 192, !20, i64 200, !20, i64 208, !20, i64 216, !20, i64 224, !6, i64 232, !21, i64 240, !21, i64 248, !21, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !6, i64 320}
!19 = !{!"float", !7, i64 0}
!20 = !{!"double", !7, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{!19, !19, i64 0}
!23 = !{!12, !6, i64 56}
!24 = !{!12, !6, i64 128}
!25 = !{!12, !6, i64 120}
!26 = !{!12, !6, i64 144}
!27 = !{!12, !6, i64 152}
!28 = !{!12, !6, i64 160}
!29 = !{!12, !6, i64 168}
!30 = !{!12, !6, i64 192}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = distinct !{!33, !32}
!34 = !{!12, !10, i64 136}
!35 = distinct !{!35, !32}
!36 = !{!12, !10, i64 112}
!37 = distinct !{!37, !32}


; 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.7 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [26 x i8], align 1

declare void @libmetis__Compute2WayPartitionParams(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__GrowBisectionNode(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) local_unnamed_addr #1 {
  tail call void @libmetis__wspacepush(ptr noundef %0) #2
  %5 = load i32, ptr %1, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %1, i64 16
  %7 = load ptr, ptr %6, align 8, !tbaa !11
  %8 = getelementptr inbounds i8, ptr %1, i64 24
  %9 = load ptr, ptr %8, align 8, !tbaa !12
  %10 = getelementptr inbounds i8, ptr %1, i64 40
  %11 = load ptr, ptr %10, align 8, !tbaa !13
  %12 = tail call ptr @libmetis__iwspacemalloc(ptr noundef %0, i32 noundef %5) #2
  %13 = tail call ptr @libmetis__iwspacemalloc(ptr noundef %0, i32 noundef %5) #2
  %14 = tail call ptr @libmetis__iwspacemalloc(ptr noundef %0, i32 noundef %5) #2
  %15 = getelementptr inbounds i8, ptr %0, i64 104
  %16 = load ptr, ptr %15, align 8, !tbaa !14
  %17 = load float, ptr %16, align 4, !tbaa !19
  %18 = getelementptr inbounds i8, ptr %1, i64 56
  %19 = load ptr, ptr %18, align 8, !tbaa !20
  %20 = load i32, ptr %19, align 4, !tbaa !21
  %21 = sitofp i32 %20 to float
  %22 = fmul float %17, %21
  %23 = fpext float %22 to double
  %24 = fmul double %23, 5.000000e-01
  %25 = fptosi double %24 to i32
  %26 = fpext float %17 to double
  %27 = fdiv double 1.000000e+00, %26
  %28 = sitofp i32 %20 to double
  %29 = fmul double %27, %28
  %30 = fmul double %29, 5.000000e-01
  %31 = fptosi double %30 to i32
  %32 = tail call ptr @libmetis__imalloc(i64 noundef 3, ptr noundef nonnull @.str.7) #2
  %33 = getelementptr inbounds i8, ptr %1, i64 128
  store ptr %32, ptr %33, align 8, !tbaa !22
  %34 = sext i32 %5 to i64
  %35 = tail call ptr @libmetis__imalloc(i64 noundef %34, ptr noundef nonnull @.str.8) #2
  %36 = getelementptr inbounds i8, ptr %1, i64 120
  store ptr %35, ptr %36, align 8, !tbaa !23
  %37 = tail call ptr @libmetis__imalloc(i64 noundef %34, ptr noundef nonnull @.str.9) #2
  %38 = getelementptr inbounds i8, ptr %1, i64 144
  store ptr %37, ptr %38, align 8, !tbaa !24
  %39 = tail call ptr @libmetis__imalloc(i64 noundef %34, ptr noundef nonnull @.str.10) #2
  %40 = getelementptr inbounds i8, ptr %1, i64 152
  store ptr %39, ptr %40, align 8, !tbaa !25
  %41 = tail call ptr @libmetis__imalloc(i64 noundef %34, ptr noundef nonnull @.str.11) #2
  %42 = getelementptr inbounds i8, ptr %1, i64 160
  store ptr %41, ptr %42, align 8, !tbaa !26
  %43 = tail call ptr @libmetis__imalloc(i64 noundef %34, ptr noundef nonnull @.str.12) #2
  %44 = getelementptr inbounds i8, ptr %1, i64 168
  store ptr %43, ptr %44, align 8, !tbaa !27
  %45 = shl nsw i64 %34, 3
  %46 = tail call ptr @gk_malloc(i64 noundef %45, ptr noundef nonnull @.str.13) #2
  %47 = getelementptr inbounds i8, ptr %1, i64 192
  store ptr %46, ptr %47, align 8, !tbaa !28
  %48 = load ptr, ptr %36, align 8, !tbaa !23
  %49 = load ptr, ptr %40, align 8, !tbaa !25
  %50 = icmp sgt i32 %3, 0
  br i1 %50, label %.lr.ph167, label %._crit_edge168

.lr.ph167:                                        ; preds = %4
  %51 = add nsw i32 %5, -1
  %52 = icmp sgt i32 %5, 0
  %53 = getelementptr inbounds i8, ptr %1, i64 136
  %54 = getelementptr inbounds i8, ptr %1, i64 112
  %wide.trip.count = zext nneg i32 %5 to i64
  br label %55

55:                                               ; preds = %.lr.ph167, %159
  %.0141165 = phi i32 [ 0, %.lr.ph167 ], [ %.1142, %159 ]
  %.0143164 = phi i32 [ 0, %.lr.ph167 ], [ %160, %159 ]
  %56 = tail call ptr @libmetis__iset(i64 noundef %34, i32 noundef 1, ptr noundef %48) #2
  %57 = tail call ptr @libmetis__iset(i64 noundef %34, i32 noundef 0, ptr noundef %14) #2
  %58 = load ptr, ptr %18, align 8, !tbaa !20
  %59 = load i32, ptr %58, align 4, !tbaa !21
  %60 = tail call i32 @libmetis__irandInRange(i32 noundef %5) #2
  store i32 %60, ptr %13, align 4, !tbaa !21
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds i32, ptr %14, i64 %61
  store i32 1, ptr %62, align 4, !tbaa !21
  br label %.outer

.outer:                                           ; preds = %.outer.backedge, %55
  %.sroa.5.0.ph = phi i32 [ %59, %55 ], [ %114, %.outer.backedge ]
  %.0137.ph = phi i32 [ 1, %55 ], [ %.0137.ph.be, %.outer.backedge ]
  %.0135.ph = phi i32 [ 0, %55 ], [ %.us-phi156, %.outer.backedge ]
  %.0133.ph = phi i32 [ %51, %55 ], [ %.0133.ph.be, %.outer.backedge ]
  br i1 %52, label %.outer.split.us, label %.outer.split.preheader

.outer.split.preheader:                           ; preds = %.outer
  %63 = icmp eq i32 %.0135.ph, %.0137.ph
  br i1 %63, label %64, label %69

64:                                               ; preds = %.outer.split.preheader
  %65 = icmp eq i32 %.0133.ph, 0
  br i1 %65, label %.loopexit145, label %66

66:                                               ; preds = %64
  %67 = tail call i32 @libmetis__irandInRange(i32 noundef %.0133.ph) #2
  store i32 0, ptr %13, align 4, !tbaa !21
  store i32 1, ptr %14, align 4, !tbaa !21
  %68 = add nsw i32 %.0133.ph, -1
  br label %69

69:                                               ; preds = %66, %.outer.split.preheader
  %.1138.peel = phi i32 [ 1, %66 ], [ %.0137.ph, %.outer.split.preheader ]
  %.1136.peel = phi i32 [ 0, %66 ], [ %.0135.ph, %.outer.split.preheader ]
  %.1134.peel = phi i32 [ %68, %66 ], [ %.0133.ph, %.outer.split.preheader ]
  %70 = add nsw i32 %.1136.peel, 1
  %71 = sext i32 %.1136.peel to i64
  %72 = getelementptr inbounds i32, ptr %13, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !21
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds i32, ptr %9, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !21
  %77 = sub nsw i32 %.sroa.5.0.ph, %76
  %78 = icmp slt i32 %77, %31
  br i1 %78, label %.outer.split, label %.split.us

.outer.split.us:                                  ; preds = %.outer, %96
  %.0137.us = phi i32 [ %.1138.us, %96 ], [ %.0137.ph, %.outer ]
  %.0135.us = phi i32 [ %97, %96 ], [ %.0135.ph, %.outer ]
  %.0133.us = phi i32 [ %.1134.us, %96 ], [ %.0133.ph, %.outer ]
  %79 = phi i1 [ true, %96 ], [ false, %.outer ]
  %80 = icmp eq i32 %.0135.us, %.0137.us
  br i1 %80, label %81, label %96

81:                                               ; preds = %.outer.split.us
  %82 = icmp eq i32 %.0133.us, 0
  %or.cond.us = or i1 %82, %79
  br i1 %or.cond.us, label %.loopexit145, label %.lr.ph.us

.lr.ph.us:                                        ; preds = %81
  %83 = tail call i32 @libmetis__irandInRange(i32 noundef %.0133.us) #2
  br label %84

84:                                               ; preds = %.lr.ph.us, %93
  %indvars.iv = phi i64 [ 0, %.lr.ph.us ], [ %indvars.iv.next, %93 ]
  %.0130149.us = phi i32 [ %83, %.lr.ph.us ], [ %.1131.us, %93 ]
  %85 = getelementptr inbounds i32, ptr %14, i64 %indvars.iv
  %86 = load i32, ptr %85, align 4, !tbaa !21
  %87 = icmp eq i32 %86, 0
  br i1 %87, label %88, label %93

88:                                               ; preds = %84
  %89 = icmp eq i32 %.0130149.us, 0
  br i1 %89, label %.._crit_edge.us_crit_edge, label %91

.._crit_edge.us_crit_edge:                        ; preds = %88
  %90 = trunc nuw nsw i64 %indvars.iv to i32
  %.pre196 = and i64 %indvars.iv, 4294967295
  br label %._crit_edge.us

91:                                               ; preds = %88
  %92 = add nsw i32 %.0130149.us, -1
  br label %93

93:                                               ; preds = %91, %84
  %.1131.us = phi i32 [ %92, %91 ], [ %.0130149.us, %84 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge.us, label %84, !llvm.loop !29

._crit_edge.us:                                   ; preds = %93, %.._crit_edge.us_crit_edge
  %.pre-phi197 = phi i64 [ %.pre196, %.._crit_edge.us_crit_edge ], [ %wide.trip.count, %93 ]
  %.0.lcssa.us = phi i32 [ %90, %.._crit_edge.us_crit_edge ], [ %5, %93 ]
  store i32 %.0.lcssa.us, ptr %13, align 4, !tbaa !21
  %94 = getelementptr inbounds i32, ptr %14, i64 %.pre-phi197
  store i32 1, ptr %94, align 4, !tbaa !21
  %95 = add nsw i32 %.0133.us, -1
  br label %96

96:                                               ; preds = %._crit_edge.us, %.outer.split.us
  %.1138.us = phi i32 [ 1, %._crit_edge.us ], [ %.0137.us, %.outer.split.us ]
  %.1136.us = phi i32 [ 0, %._crit_edge.us ], [ %.0135.us, %.outer.split.us ]
  %.1134.us = phi i32 [ %95, %._crit_edge.us ], [ %.0133.us, %.outer.split.us ]
  %97 = add nsw i32 %.1136.us, 1
  %98 = sext i32 %.1136.us to i64
  %99 = getelementptr inbounds i32, ptr %13, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !21
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds i32, ptr %9, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !21
  %104 = sub nsw i32 %.sroa.5.0.ph, %103
  %105 = icmp slt i32 %104, %31
  br i1 %105, label %.outer.split.us, label %.split.us

.outer.split:                                     ; preds = %69, %107
  %.0135 = phi i32 [ %108, %107 ], [ %70, %69 ]
  %106 = icmp eq i32 %.0135, %.1138.peel
  br i1 %106, label %.loopexit145, label %107

107:                                              ; preds = %.outer.split
  %.phi.trans.insert = sext i32 %.0135 to i64
  %.phi.trans.insert186 = getelementptr inbounds i32, ptr %13, i64 %.phi.trans.insert
  %.pre = load i32, ptr %.phi.trans.insert186, align 4, !tbaa !21
  %.phi.trans.insert187 = sext i32 %.pre to i64
  %.phi.trans.insert188 = getelementptr inbounds i32, ptr %9, i64 %.phi.trans.insert187
  %.pre189 = load i32, ptr %.phi.trans.insert188, align 4, !tbaa !21
  %108 = add nsw i32 %.0135, 1
  %109 = sub nsw i32 %.sroa.5.0.ph, %.pre189
  %110 = icmp slt i32 %109, %31
  br i1 %110, label %.outer.split, label %.split.us, !llvm.loop !31

.split.us:                                        ; preds = %107, %96, %69
  %.us-phi = phi i64 [ %74, %69 ], [ %101, %96 ], [ %.phi.trans.insert187, %107 ]
  %.us-phi154 = phi i32 [ %.1138.peel, %69 ], [ %.1138.us, %96 ], [ %.1138.peel, %107 ]
  %.us-phi155 = phi i32 [ %.1134.peel, %69 ], [ %.1134.us, %96 ], [ %.1134.peel, %107 ]
  %.us-phi156 = phi i32 [ %70, %69 ], [ %97, %96 ], [ %108, %107 ]
  %111 = getelementptr inbounds i32, ptr %9, i64 %.us-phi
  %112 = getelementptr inbounds i32, ptr %48, i64 %.us-phi
  store i32 0, ptr %112, align 4, !tbaa !21
  %113 = load i32, ptr %111, align 4, !tbaa !21
  %114 = sub nsw i32 %.sroa.5.0.ph, %113
  %.not = icmp sgt i32 %114, %25
  br i1 %.not, label %115, label %.loopexit145

115:                                              ; preds = %.split.us
  %116 = getelementptr inbounds i32, ptr %7, i64 %.us-phi
  %117 = load i32, ptr %116, align 4, !tbaa !21
  %118 = getelementptr i8, ptr %116, i64 4
  %119 = load i32, ptr %118, align 4, !tbaa !21
  %120 = icmp slt i32 %117, %119
  br i1 %120, label %.lr.ph.preheader, label %.outer.backedge

.outer.backedge:                                  ; preds = %134, %115
  %.0137.ph.be = phi i32 [ %.us-phi154, %115 ], [ %.3140, %134 ]
  %.0133.ph.be = phi i32 [ %.us-phi155, %115 ], [ %.3, %134 ]
  br label %.outer

.lr.ph.preheader:                                 ; preds = %115
  %121 = sext i32 %117 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %134
  %122 = phi i32 [ %119, %.lr.ph.preheader ], [ %135, %134 ]
  %indvars.iv179 = phi i64 [ %121, %.lr.ph.preheader ], [ %indvars.iv.next180, %134 ]
  %.2159 = phi i32 [ %.us-phi155, %.lr.ph.preheader ], [ %.3, %134 ]
  %.2139158 = phi i32 [ %.us-phi154, %.lr.ph.preheader ], [ %.3140, %134 ]
  %123 = getelementptr inbounds i32, ptr %11, i64 %indvars.iv179
  %124 = load i32, ptr %123, align 4, !tbaa !21
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds i32, ptr %14, i64 %125
  %127 = load i32, ptr %126, align 4, !tbaa !21
  %128 = icmp eq i32 %127, 0
  br i1 %128, label %129, label %134

129:                                              ; preds = %.lr.ph
  %130 = add nsw i32 %.2139158, 1
  %131 = sext i32 %.2139158 to i64
  %132 = getelementptr inbounds i32, ptr %13, i64 %131
  store i32 %124, ptr %132, align 4, !tbaa !21
  store i32 1, ptr %126, align 4, !tbaa !21
  %133 = add nsw i32 %.2159, -1
  %.pre190 = load i32, ptr %118, align 4, !tbaa !21
  br label %134

134:                                              ; preds = %.lr.ph, %129
  %135 = phi i32 [ %.pre190, %129 ], [ %122, %.lr.ph ]
  %.3140 = phi i32 [ %130, %129 ], [ %.2139158, %.lr.ph ]
  %.3 = phi i32 [ %133, %129 ], [ %.2159, %.lr.ph ]
  %indvars.iv.next180 = add nsw i64 %indvars.iv179, 1
  %136 = sext i32 %135 to i64
  %137 = icmp slt i64 %indvars.iv.next180, %136
  br i1 %137, label %.lr.ph, label %.outer.backedge, !llvm.loop !33

.loopexit145:                                     ; preds = %.split.us, %64, %.outer.split, %81
  tail call void @libmetis__Compute2WayPartitionParams(ptr noundef %0, ptr noundef nonnull %1) #2
  tail call void @libmetis__Balance2Way(ptr noundef %0, ptr noundef nonnull %1, ptr noundef %2) #2
  tail call void @libmetis__FM_2WayRefine(ptr noundef %0, ptr noundef nonnull %1, ptr noundef %2, i32 noundef 4) #2
  %138 = load i32, ptr %53, align 8, !tbaa !34
  %139 = icmp sgt i32 %138, 0
  br i1 %139, label %.lr.ph163, label %._crit_edge

.lr.ph163:                                        ; preds = %.loopexit145, %151
  %140 = phi i32 [ %152, %151 ], [ %138, %.loopexit145 ]
  %indvars.iv182 = phi i64 [ %indvars.iv.next183, %151 ], [ 0, %.loopexit145 ]
  %141 = getelementptr inbounds i32, ptr %49, i64 %indvars.iv182
  %142 = load i32, ptr %141, align 4, !tbaa !21
  %143 = sext i32 %142 to i64
  %144 = getelementptr i32, ptr %7, i64 %143
  %145 = getelementptr i8, ptr %144, i64 4
  %146 = load i32, ptr %145, align 4, !tbaa !21
  %147 = load i32, ptr %144, align 4, !tbaa !21
  %148 = icmp sgt i32 %146, %147
  br i1 %148, label %149, label %151

149:                                              ; preds = %.lr.ph163
  %150 = getelementptr inbounds i32, ptr %48, i64 %143
  store i32 2, ptr %150, align 4, !tbaa !21
  %.pre191 = load i32, ptr %53, align 8, !tbaa !34
  br label %151

151:                                              ; preds = %.lr.ph163, %149
  %152 = phi i32 [ %140, %.lr.ph163 ], [ %.pre191, %149 ]
  %indvars.iv.next183 = add nuw nsw i64 %indvars.iv182, 1
  %153 = sext i32 %152 to i64
  %154 = icmp slt i64 %indvars.iv.next183, %153
  br i1 %154, label %.lr.ph163, label %._crit_edge, !llvm.loop !35

._crit_edge:                                      ; preds = %151, %.loopexit145
  tail call void @libmetis__Compute2WayNodePartitionParams(ptr noundef %0, ptr noundef nonnull %1) #2
  tail call void @libmetis__FM_2WayNodeRefine2Sided(ptr noundef %0, ptr noundef nonnull %1, i32 noundef 1) #2
  tail call void @libmetis__FM_2WayNodeRefine1Sided(ptr noundef %0, ptr noundef nonnull %1, i32 noundef 4) #2
  %155 = icmp eq i32 %.0143164, 0
  %.pre192 = load i32, ptr %54, align 8, !tbaa !36
  %156 = icmp sgt i32 %.0141165, %.pre192
  %or.cond = select i1 %155, i1 true, i1 %156
  br i1 %or.cond, label %157, label %159

157:                                              ; preds = %._crit_edge
  %158 = tail call ptr @libmetis__icopy(i64 noundef %34, ptr noundef %48, ptr noundef %12) #2
  br label %159

159:                                              ; preds = %._crit_edge, %157
  %.1142 = phi i32 [ %.pre192, %157 ], [ %.0141165, %._crit_edge ]
  %160 = add nuw nsw i32 %.0143164, 1
  %exitcond185.not = icmp eq i32 %160, %3
  br i1 %exitcond185.not, label %._crit_edge168, label %55, !llvm.loop !37

._crit_edge168:                                   ; preds = %159, %4
  %.0141.lcssa = phi i32 [ 0, %4 ], [ %.1142, %159 ]
  %161 = getelementptr inbounds i8, ptr %1, i64 112
  store i32 %.0141.lcssa, ptr %161, align 8, !tbaa !36
  %162 = tail call ptr @libmetis__icopy(i64 noundef %34, ptr noundef %12, ptr noundef %48) #2
  tail call void @libmetis__wspacepop(ptr noundef %0) #2
  ret void
}

declare void @libmetis__wspacepush(ptr noundef) local_unnamed_addr #0

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

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

declare void @libmetis__Balance2Way(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @libmetis__FM_2WayRefine(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

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

declare void @libmetis__wspacepop(ptr noundef) local_unnamed_addr #0

declare i32 @libmetis__irandInRange(i32 noundef) local_unnamed_addr #0

declare ptr @libmetis__imalloc(i64 noundef, ptr noundef) local_unnamed_addr #0

declare ptr @gk_malloc(i64 noundef, ptr noundef) local_unnamed_addr #0

declare void @libmetis__Compute2WayNodePartitionParams(ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @libmetis__FM_2WayNodeRefine2Sided(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare void @libmetis__FM_2WayNodeRefine1Sided(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

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

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

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


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass