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

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

@.str.1 = external hidden unnamed_addr constant [139 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [31 x i8], align 1
@__PRETTY_FUNCTION__.libmetis__Compute2WayPartitionParams = external hidden unnamed_addr constant [63 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [81 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [16 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__Compute2WayPartitionParams(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %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 ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.graph_t, ptr %26, i32 0, i32 0
  %28 = load i32, ptr %27, align 8, !tbaa !9
  store i32 %28, ptr %7, align 4, !tbaa !12
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.graph_t, ptr %29, i32 0, i32 2
  %31 = load i32, ptr %30, align 8, !tbaa !13
  store i32 %31, ptr %8, align 4, !tbaa !12
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.graph_t, ptr %32, i32 0, i32 3
  %34 = load ptr, ptr %33, align 8, !tbaa !14
  store ptr %34, ptr %16, align 8, !tbaa !5
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.graph_t, ptr %35, i32 0, i32 4
  %37 = load ptr, ptr %36, align 8, !tbaa !15
  store ptr %37, ptr %17, align 8, !tbaa !5
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.graph_t, ptr %38, i32 0, i32 6
  %40 = load ptr, ptr %39, align 8, !tbaa !16
  store ptr %40, ptr %18, align 8, !tbaa !5
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.graph_t, ptr %41, i32 0, i32 7
  %43 = load ptr, ptr %42, align 8, !tbaa !17
  store ptr %43, ptr %19, align 8, !tbaa !5
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.graph_t, ptr %44, i32 0, i32 19
  %46 = load ptr, ptr %45, align 8, !tbaa !18
  store ptr %46, ptr %21, align 8, !tbaa !5
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.graph_t, ptr %47, i32 0, i32 24
  %49 = load ptr, ptr %48, align 8, !tbaa !19
  store ptr %49, ptr %24, align 8, !tbaa !5
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.graph_t, ptr %50, i32 0, i32 25
  %52 = load ptr, ptr %51, align 8, !tbaa !20
  store ptr %52, ptr %25, align 8, !tbaa !5
  %53 = load i32, ptr %8, align 4, !tbaa !12
  %54 = mul nsw i32 2, %53
  %55 = sext i32 %54 to i64
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.graph_t, ptr %56, i32 0, i32 20
  %58 = load ptr, ptr %57, align 8, !tbaa !21
  %59 = call ptr @libmetis__iset(i64 noundef %55, i32 noundef 0, ptr noundef %58)
  store ptr %59, ptr %20, align 8, !tbaa !5
  %60 = load i32, ptr %7, align 4, !tbaa !12
  %61 = sext i32 %60 to i64
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.graph_t, ptr %62, i32 0, i32 22
  %64 = load ptr, ptr %63, align 8, !tbaa !22
  %65 = call ptr @libmetis__iset(i64 noundef %61, i32 noundef -1, ptr noundef %64)
  store ptr %65, ptr %22, align 8, !tbaa !5
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.graph_t, ptr %66, i32 0, i32 23
  %68 = load ptr, ptr %67, align 8, !tbaa !23
  store ptr %68, ptr %23, align 8, !tbaa !5
  %69 = load i32, ptr %8, align 4, !tbaa !12
  %70 = icmp eq i32 %69, 1
  br i1 %70, label %71, label %160

71:                                               ; preds = %2
  store i32 0, ptr %5, align 4, !tbaa !12
  br label %72

72:                                               ; preds = %124, %71
  %73 = load i32, ptr %5, align 4, !tbaa !12
  %74 = load i32, ptr %7, align 4, !tbaa !12
  %75 = icmp slt i32 %73, %74
  br i1 %75, label %76, label %127

76:                                               ; preds = %72
  %77 = load ptr, ptr %21, align 8, !tbaa !5
  %78 = load i32, ptr %5, align 4, !tbaa !12
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds i32, ptr %77, i64 %79
  %81 = load i32, ptr %80, align 4, !tbaa !12
  %82 = icmp sge i32 %81, 0
  br i1 %82, label %83, label %90

83:                                               ; preds = %76
  %84 = load ptr, ptr %21, align 8, !tbaa !5
  %85 = load i32, ptr %5, align 4, !tbaa !12
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds i32, ptr %84, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !12
  %89 = icmp sle i32 %88, 1
  br i1 %89, label %108, label %90

90:                                               ; preds = %83, %76
  %91 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, i32 noundef 95, ptr noundef @.str.1)
  %92 = load ptr, ptr %21, align 8, !tbaa !5
  %93 = load i32, ptr %5, align 4, !tbaa !12
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds i32, ptr %92, i64 %94
  %96 = load i32, ptr %95, align 4, !tbaa !12
  %97 = icmp sge i32 %96, 0
  br i1 %97, label %98, label %106

98:                                               ; preds = %90
  %99 = load ptr, ptr %21, align 8, !tbaa !5
  %100 = load i32, ptr %5, align 4, !tbaa !12
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds i32, ptr %99, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !12
  %104 = icmp sle i32 %103, 1
  br i1 %104, label %105, label %106

105:                                              ; preds = %98
  br label %107

106:                                              ; preds = %98, %90
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str.1, i32 noundef 95, ptr noundef @__PRETTY_FUNCTION__.libmetis__Compute2WayPartitionParams) #5
  unreachable

107:                                              ; preds = %105
  br label %108

108:                                              ; preds = %107, %83
  %109 = load ptr, ptr %17, align 8, !tbaa !5
  %110 = load i32, ptr %5, align 4, !tbaa !12
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds i32, ptr %109, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !12
  %114 = load ptr, ptr %20, align 8, !tbaa !5
  %115 = load ptr, ptr %21, align 8, !tbaa !5
  %116 = load i32, ptr %5, align 4, !tbaa !12
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds i32, ptr %115, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !12
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds i32, ptr %114, i64 %120
  %122 = load i32, ptr %121, align 4, !tbaa !12
  %123 = add nsw i32 %122, %113
  store i32 %123, ptr %121, align 4, !tbaa !12
  br label %124

124:                                              ; preds = %108
  %125 = load i32, ptr %5, align 4, !tbaa !12
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %5, align 4, !tbaa !12
  br label %72, !llvm.loop !24

127:                                              ; preds = %72
  %128 = load ptr, ptr %20, align 8, !tbaa !5
  %129 = getelementptr inbounds i32, ptr %128, i64 0
  %130 = load i32, ptr %129, align 4, !tbaa !12
  %131 = load ptr, ptr %20, align 8, !tbaa !5
  %132 = getelementptr inbounds i32, ptr %131, i64 1
  %133 = load i32, ptr %132, align 4, !tbaa !12
  %134 = add nsw i32 %130, %133
  %135 = load ptr, ptr %4, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.graph_t, ptr %135, i32 0, i32 8
  %137 = load ptr, ptr %136, align 8, !tbaa !26
  %138 = getelementptr inbounds i32, ptr %137, i64 0
  %139 = load i32, ptr %138, align 4, !tbaa !12
  %140 = icmp eq i32 %134, %139
  br i1 %140, label %159, label %141

141:                                              ; preds = %127
  %142 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, i32 noundef 98, ptr noundef @.str.1)
  %143 = load ptr, ptr %20, align 8, !tbaa !5
  %144 = getelementptr inbounds i32, ptr %143, i64 0
  %145 = load i32, ptr %144, align 4, !tbaa !12
  %146 = load ptr, ptr %20, align 8, !tbaa !5
  %147 = getelementptr inbounds i32, ptr %146, i64 1
  %148 = load i32, ptr %147, align 4, !tbaa !12
  %149 = add nsw i32 %145, %148
  %150 = load ptr, ptr %4, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.graph_t, ptr %150, i32 0, i32 8
  %152 = load ptr, ptr %151, align 8, !tbaa !26
  %153 = getelementptr inbounds i32, ptr %152, i64 0
  %154 = load i32, ptr %153, align 4, !tbaa !12
  %155 = icmp eq i32 %149, %154
  br i1 %155, label %156, label %157

156:                                              ; preds = %141
  br label %158

157:                                              ; preds = %141
  call void @__assert_fail(ptr noundef @.str.12, ptr noundef @.str.1, i32 noundef 98, ptr noundef @__PRETTY_FUNCTION__.libmetis__Compute2WayPartitionParams) #5
  unreachable

158:                                              ; preds = %156
  br label %159

159:                                              ; preds = %158, %127
  br label %203

160:                                              ; preds = %2
  store i32 0, ptr %5, align 4, !tbaa !12
  br label %161

161:                                              ; preds = %199, %160
  %162 = load i32, ptr %5, align 4, !tbaa !12
  %163 = load i32, ptr %7, align 4, !tbaa !12
  %164 = icmp slt i32 %162, %163
  br i1 %164, label %165, label %202

165:                                              ; preds = %161
  %166 = load ptr, ptr %21, align 8, !tbaa !5
  %167 = load i32, ptr %5, align 4, !tbaa !12
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds i32, ptr %166, i64 %168
  %170 = load i32, ptr %169, align 4, !tbaa !12
  store i32 %170, ptr %15, align 4, !tbaa !12
  store i32 0, ptr %6, align 4, !tbaa !12
  br label %171

171:                                              ; preds = %195, %165
  %172 = load i32, ptr %6, align 4, !tbaa !12
  %173 = load i32, ptr %8, align 4, !tbaa !12
  %174 = icmp slt i32 %172, %173
  br i1 %174, label %175, label %198

175:                                              ; preds = %171
  %176 = load ptr, ptr %17, align 8, !tbaa !5
  %177 = load i32, ptr %5, align 4, !tbaa !12
  %178 = load i32, ptr %8, align 4, !tbaa !12
  %179 = mul nsw i32 %177, %178
  %180 = load i32, ptr %6, align 4, !tbaa !12
  %181 = add nsw i32 %179, %180
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds i32, ptr %176, i64 %182
  %184 = load i32, ptr %183, align 4, !tbaa !12
  %185 = load ptr, ptr %20, align 8, !tbaa !5
  %186 = load i32, ptr %15, align 4, !tbaa !12
  %187 = load i32, ptr %8, align 4, !tbaa !12
  %188 = mul nsw i32 %186, %187
  %189 = load i32, ptr %6, align 4, !tbaa !12
  %190 = add nsw i32 %188, %189
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds i32, ptr %185, i64 %191
  %193 = load i32, ptr %192, align 4, !tbaa !12
  %194 = add nsw i32 %193, %184
  store i32 %194, ptr %192, align 4, !tbaa !12
  br label %195

195:                                              ; preds = %175
  %196 = load i32, ptr %6, align 4, !tbaa !12
  %197 = add nsw i32 %196, 1
  store i32 %197, ptr %6, align 4, !tbaa !12
  br label %171, !llvm.loop !27

198:                                              ; preds = %171
  br label %199

199:                                              ; preds = %198
  %200 = load i32, ptr %5, align 4, !tbaa !12
  %201 = add nsw i32 %200, 1
  store i32 %201, ptr %5, align 4, !tbaa !12
  br label %161, !llvm.loop !28

202:                                              ; preds = %161
  br label %203

203:                                              ; preds = %202, %159
  store i32 0, ptr %9, align 4, !tbaa !12
  store i32 0, ptr %10, align 4, !tbaa !12
  store i32 0, ptr %5, align 4, !tbaa !12
  br label %204

204:                                              ; preds = %316, %203
  %205 = load i32, ptr %5, align 4, !tbaa !12
  %206 = load i32, ptr %7, align 4, !tbaa !12
  %207 = icmp slt i32 %205, %206
  br i1 %207, label %208, label %319

208:                                              ; preds = %204
  %209 = load ptr, ptr %16, align 8, !tbaa !5
  %210 = load i32, ptr %5, align 4, !tbaa !12
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds i32, ptr %209, i64 %211
  %213 = load i32, ptr %212, align 4, !tbaa !12
  store i32 %213, ptr %11, align 4, !tbaa !12
  %214 = load ptr, ptr %16, align 8, !tbaa !5
  %215 = load i32, ptr %5, align 4, !tbaa !12
  %216 = add nsw i32 %215, 1
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds i32, ptr %214, i64 %217
  %219 = load i32, ptr %218, align 4, !tbaa !12
  store i32 %219, ptr %12, align 4, !tbaa !12
  %220 = load ptr, ptr %21, align 8, !tbaa !5
  %221 = load i32, ptr %5, align 4, !tbaa !12
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds i32, ptr %220, i64 %222
  %224 = load i32, ptr %223, align 4, !tbaa !12
  store i32 %224, ptr %15, align 4, !tbaa !12
  store i32 0, ptr %14, align 4, !tbaa !12
  store i32 0, ptr %13, align 4, !tbaa !12
  %225 = load i32, ptr %11, align 4, !tbaa !12
  store i32 %225, ptr %6, align 4, !tbaa !12
  br label %226

226:                                              ; preds = %259, %208
  %227 = load i32, ptr %6, align 4, !tbaa !12
  %228 = load i32, ptr %12, align 4, !tbaa !12
  %229 = icmp slt i32 %227, %228
  br i1 %229, label %230, label %262

230:                                              ; preds = %226
  %231 = load i32, ptr %15, align 4, !tbaa !12
  %232 = load ptr, ptr %21, align 8, !tbaa !5
  %233 = load ptr, ptr %18, align 8, !tbaa !5
  %234 = load i32, ptr %6, align 4, !tbaa !12
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds i32, ptr %233, i64 %235
  %237 = load i32, ptr %236, align 4, !tbaa !12
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds i32, ptr %232, i64 %238
  %240 = load i32, ptr %239, align 4, !tbaa !12
  %241 = icmp eq i32 %231, %240
  br i1 %241, label %242, label %250

242:                                              ; preds = %230
  %243 = load ptr, ptr %19, align 8, !tbaa !5
  %244 = load i32, ptr %6, align 4, !tbaa !12
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds i32, ptr %243, i64 %245
  %247 = load i32, ptr %246, align 4, !tbaa !12
  %248 = load i32, ptr %13, align 4, !tbaa !12
  %249 = add nsw i32 %248, %247
  store i32 %249, ptr %13, align 4, !tbaa !12
  br label %258

250:                                              ; preds = %230
  %251 = load ptr, ptr %19, align 8, !tbaa !5
  %252 = load i32, ptr %6, align 4, !tbaa !12
  %253 = sext i32 %252 to i64
  %254 = getelementptr inbounds i32, ptr %251, i64 %253
  %255 = load i32, ptr %254, align 4, !tbaa !12
  %256 = load i32, ptr %14, align 4, !tbaa !12
  %257 = add nsw i32 %256, %255
  store i32 %257, ptr %14, align 4, !tbaa !12
  br label %258

258:                                              ; preds = %250, %242
  br label %259

259:                                              ; preds = %258
  %260 = load i32, ptr %6, align 4, !tbaa !12
  %261 = add nsw i32 %260, 1
  store i32 %261, ptr %6, align 4, !tbaa !12
  br label %226, !llvm.loop !29

262:                                              ; preds = %226
  %263 = load i32, ptr %13, align 4, !tbaa !12
  %264 = load ptr, ptr %24, align 8, !tbaa !5
  %265 = load i32, ptr %5, align 4, !tbaa !12
  %266 = sext i32 %265 to i64
  %267 = getelementptr inbounds i32, ptr %264, i64 %266
  store i32 %263, ptr %267, align 4, !tbaa !12
  %268 = load i32, ptr %14, align 4, !tbaa !12
  %269 = load ptr, ptr %25, align 8, !tbaa !5
  %270 = load i32, ptr %5, align 4, !tbaa !12
  %271 = sext i32 %270 to i64
  %272 = getelementptr inbounds i32, ptr %269, i64 %271
  store i32 %268, ptr %272, align 4, !tbaa !12
  %273 = load i32, ptr %14, align 4, !tbaa !12
  %274 = icmp sgt i32 %273, 0
  br i1 %274, label %279, label %275

275:                                              ; preds = %262
  %276 = load i32, ptr %11, align 4, !tbaa !12
  %277 = load i32, ptr %12, align 4, !tbaa !12
  %278 = icmp eq i32 %276, %277
  br i1 %278, label %279, label %315

279:                                              ; preds = %275, %262
  br label %280

280:                                              ; preds = %279
  %281 = load ptr, ptr %22, align 8, !tbaa !5
  %282 = load i32, ptr %5, align 4, !tbaa !12
  %283 = sext i32 %282 to i64
  %284 = getelementptr inbounds i32, ptr %281, i64 %283
  %285 = load i32, ptr %284, align 4, !tbaa !12
  %286 = icmp eq i32 %285, -1
  br i1 %286, label %298, label %287

287:                                              ; preds = %280
  %288 = call i32 (ptr, ...) @printf(ptr noundef @.str.13, i32 noundef 127, ptr noundef @.str.1)
  %289 = load ptr, ptr %22, align 8, !tbaa !5
  %290 = load i32, ptr %5, align 4, !tbaa !12
  %291 = sext i32 %290 to i64
  %292 = getelementptr inbounds i32, ptr %289, i64 %291
  %293 = load i32, ptr %292, align 4, !tbaa !12
  %294 = icmp eq i32 %293, -1
  br i1 %294, label %295, label %296

295:                                              ; preds = %287
  br label %297

296:                                              ; preds = %287
  call void @__assert_fail(ptr noundef @.str.14, ptr noundef @.str.1, i32 noundef 127, ptr noundef @__PRETTY_FUNCTION__.libmetis__Compute2WayPartitionParams) #5
  unreachable

297:                                              ; preds = %295
  br label %298

298:                                              ; preds = %297, %280
  %299 = load i32, ptr %5, align 4, !tbaa !12
  %300 = load ptr, ptr %23, align 8, !tbaa !5
  %301 = load i32, ptr %9, align 4, !tbaa !12
  %302 = sext i32 %301 to i64
  %303 = getelementptr inbounds i32, ptr %300, i64 %302
  store i32 %299, ptr %303, align 4, !tbaa !12
  %304 = load i32, ptr %9, align 4, !tbaa !12
  %305 = add nsw i32 %304, 1
  store i32 %305, ptr %9, align 4, !tbaa !12
  %306 = load ptr, ptr %22, align 8, !tbaa !5
  %307 = load i32, ptr %5, align 4, !tbaa !12
  %308 = sext i32 %307 to i64
  %309 = getelementptr inbounds i32, ptr %306, i64 %308
  store i32 %304, ptr %309, align 4, !tbaa !12
  br label %310

310:                                              ; preds = %298
  br label %311

311:                                              ; preds = %310
  %312 = load i32, ptr %14, align 4, !tbaa !12
  %313 = load i32, ptr %10, align 4, !tbaa !12
  %314 = add nsw i32 %313, %312
  store i32 %314, ptr %10, align 4, !tbaa !12
  br label %315

315:                                              ; preds = %311, %275
  br label %316

316:                                              ; preds = %315
  %317 = load i32, ptr %5, align 4, !tbaa !12
  %318 = add nsw i32 %317, 1
  store i32 %318, ptr %5, align 4, !tbaa !12
  br label %204, !llvm.loop !30

319:                                              ; preds = %204
  %320 = load i32, ptr %10, align 4, !tbaa !12
  %321 = sdiv i32 %320, 2
  %322 = load ptr, ptr %4, align 8, !tbaa !5
  %323 = getelementptr inbounds %struct.graph_t, ptr %322, i32 0, i32 17
  store i32 %321, ptr %323, align 8, !tbaa !31
  %324 = load i32, ptr %9, align 4, !tbaa !12
  %325 = load ptr, ptr %4, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.graph_t, ptr %325, i32 0, i32 21
  store i32 %324, ptr %326, align 8, !tbaa !32
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  ret void
}

declare i32 @printf(ptr noundef, ...) #1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

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

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

declare ptr @libmetis__iset(i64 noundef, i32 noundef, ptr noundef) #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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind }
attributes #5 = { noreturn 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, !11, i64 0}
!10 = !{!"graph_t", !11, i64 0, !11, i64 4, !11, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !11, i64 72, !11, i64 76, !11, i64 80, !11, i64 84, !11, i64 88, !6, i64 96, !6, i64 104, !11, i64 112, !11, i64 116, !6, i64 120, !6, i64 128, !11, 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}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!10, !11, i64 8}
!14 = !{!10, !6, i64 16}
!15 = !{!10, !6, i64 24}
!16 = !{!10, !6, i64 40}
!17 = !{!10, !6, i64 48}
!18 = !{!10, !6, i64 120}
!19 = !{!10, !6, i64 160}
!20 = !{!10, !6, i64 168}
!21 = !{!10, !6, i64 128}
!22 = !{!10, !6, i64 144}
!23 = !{!10, !6, i64 152}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!10, !6, i64 56}
!27 = distinct !{!27, !25}
!28 = distinct !{!28, !25}
!29 = distinct !{!29, !25}
!30 = distinct !{!30, !25}
!31 = !{!10, !11, i64 112}
!32 = !{!10, !11, i64 136}


; 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.1 = external hidden unnamed_addr constant [139 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [31 x i8], align 1
@__PRETTY_FUNCTION__.libmetis__Compute2WayPartitionParams = external hidden unnamed_addr constant [63 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [81 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [16 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__Compute2WayPartitionParams(ptr nocapture noundef readnone %0, ptr nocapture noundef %1) local_unnamed_addr #0 {
  %3 = load i32, ptr %1, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %1, i64 8
  %5 = load i32, ptr %4, align 8, !tbaa !11
  %6 = getelementptr inbounds i8, ptr %1, i64 16
  %7 = load ptr, ptr %6, align 8, !tbaa !12
  %8 = getelementptr inbounds i8, ptr %1, i64 24
  %9 = load ptr, ptr %8, align 8, !tbaa !13
  %10 = getelementptr inbounds i8, ptr %1, i64 40
  %11 = load ptr, ptr %10, align 8, !tbaa !14
  %12 = getelementptr inbounds i8, ptr %1, i64 48
  %13 = load ptr, ptr %12, align 8, !tbaa !15
  %14 = getelementptr inbounds i8, ptr %1, i64 120
  %15 = load ptr, ptr %14, align 8, !tbaa !16
  %16 = getelementptr inbounds i8, ptr %1, i64 160
  %17 = load ptr, ptr %16, align 8, !tbaa !17
  %18 = getelementptr inbounds i8, ptr %1, i64 168
  %19 = load ptr, ptr %18, align 8, !tbaa !18
  %20 = shl nsw i32 %5, 1
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds i8, ptr %1, i64 128
  %23 = load ptr, ptr %22, align 8, !tbaa !19
  %24 = tail call ptr @libmetis__iset(i64 noundef %21, i32 noundef 0, ptr noundef %23) #4
  %25 = sext i32 %3 to i64
  %26 = getelementptr inbounds i8, ptr %1, i64 144
  %27 = load ptr, ptr %26, align 8, !tbaa !20
  %28 = tail call ptr @libmetis__iset(i64 noundef %25, i32 noundef -1, ptr noundef %27) #4
  %29 = getelementptr inbounds i8, ptr %1, i64 152
  %30 = load ptr, ptr %29, align 8, !tbaa !21
  %31 = icmp eq i32 %5, 1
  %32 = icmp sgt i32 %3, 0
  br i1 %31, label %.preheader, label %.preheader116

.preheader116:                                    ; preds = %2
  br i1 %32, label %.lr.ph121, label %._crit_edge135

.lr.ph121:                                        ; preds = %.preheader116
  %33 = icmp sgt i32 %5, 0
  br i1 %33, label %.lr.ph.us.preheader, label %.lr.ph134.preheader

.lr.ph.us.preheader:                              ; preds = %.lr.ph121
  %34 = zext nneg i32 %5 to i64
  %wide.trip.count143 = zext nneg i32 %3 to i64
  %wide.trip.count = zext nneg i32 %5 to i64
  %35 = shl nuw nsw i64 %wide.trip.count, 2
  %scevgep = getelementptr i8, ptr %24, i64 %35
  %36 = mul nuw nsw i64 %wide.trip.count143, %wide.trip.count
  %37 = shl nuw i64 %36, 2
  %scevgep164 = getelementptr i8, ptr %9, i64 %37
  %min.iters.check = icmp ult i32 %5, 8
  %n.vec = and i64 %wide.trip.count, 2147483640
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  %xtraiter = and i64 %wide.trip.count, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %._crit_edge.us
  %indvars.iv140 = phi i64 [ 0, %.lr.ph.us.preheader ], [ %indvars.iv.next141, %._crit_edge.us ]
  %38 = getelementptr inbounds i32, ptr %15, i64 %indvars.iv140
  %39 = load i32, ptr %38, align 4, !tbaa !22
  %40 = mul nuw nsw i64 %indvars.iv140, %34
  %41 = mul nsw i32 %39, %5
  %42 = sext i32 %41 to i64
  %invariant.gep = getelementptr inbounds i32, ptr %9, i64 %40
  %invariant.gep161 = getelementptr i32, ptr %24, i64 %42
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph.us
  %43 = shl nsw i64 %42, 2
  %scevgep163 = getelementptr i8, ptr %scevgep, i64 %43
  %bound0 = icmp ult ptr %invariant.gep161, %scevgep164
  %bound1 = icmp ult ptr %9, %scevgep163
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %scalar.ph.preheader, label %vector.body

vector.body:                                      ; preds = %vector.memcheck, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %vector.memcheck ]
  %44 = getelementptr inbounds i32, ptr %invariant.gep, i64 %index
  %45 = getelementptr inbounds i8, ptr %44, i64 16
  %wide.load = load <4 x i32>, ptr %44, align 4, !tbaa !22, !alias.scope !23
  %wide.load165 = load <4 x i32>, ptr %45, align 4, !tbaa !22, !alias.scope !23
  %46 = getelementptr i32, ptr %invariant.gep161, i64 %index
  %47 = getelementptr i8, ptr %46, i64 16
  %wide.load166 = load <4 x i32>, ptr %46, align 4, !tbaa !22, !alias.scope !26, !noalias !23
  %wide.load167 = load <4 x i32>, ptr %47, align 4, !tbaa !22, !alias.scope !26, !noalias !23
  %48 = add nsw <4 x i32> %wide.load166, %wide.load
  %49 = add nsw <4 x i32> %wide.load167, %wide.load165
  store <4 x i32> %48, ptr %46, align 4, !tbaa !22, !alias.scope !26, !noalias !23
  store <4 x i32> %49, ptr %47, align 4, !tbaa !22, !alias.scope !26, !noalias !23
  %index.next = add nuw i64 %index, 8
  %50 = icmp eq i64 %index.next, %n.vec
  br i1 %50, label %middle.block, label %vector.body, !llvm.loop !28

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.lr.ph.us
  %indvars.iv.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph.us ], [ %n.vec, %middle.block ]
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv.prol = phi i64 [ %indvars.iv.next.prol, %scalar.ph.prol ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %gep.prol = getelementptr inbounds i32, ptr %invariant.gep, i64 %indvars.iv.prol
  %51 = load i32, ptr %gep.prol, align 4, !tbaa !22
  %gep162.prol = getelementptr i32, ptr %invariant.gep161, i64 %indvars.iv.prol
  %52 = load i32, ptr %gep162.prol, align 4, !tbaa !22
  %53 = add nsw i32 %52, %51
  store i32 %53, ptr %gep162.prol, align 4, !tbaa !22
  %indvars.iv.next.prol = add nuw nsw i64 %indvars.iv.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !32

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol ]
  %54 = sub nsw i64 %indvars.iv.ph, %wide.trip.count
  %55 = icmp ugt i64 %54, -4
  br i1 %55, label %._crit_edge.us, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %scalar.ph ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %gep = getelementptr inbounds i32, ptr %invariant.gep, i64 %indvars.iv
  %56 = load i32, ptr %gep, align 4, !tbaa !22
  %gep162 = getelementptr i32, ptr %invariant.gep161, i64 %indvars.iv
  %57 = load i32, ptr %gep162, align 4, !tbaa !22
  %58 = add nsw i32 %57, %56
  store i32 %58, ptr %gep162, align 4, !tbaa !22
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %gep.1 = getelementptr inbounds i32, ptr %invariant.gep, i64 %indvars.iv.next
  %59 = load i32, ptr %gep.1, align 4, !tbaa !22
  %gep162.1 = getelementptr i32, ptr %invariant.gep161, i64 %indvars.iv.next
  %60 = load i32, ptr %gep162.1, align 4, !tbaa !22
  %61 = add nsw i32 %60, %59
  store i32 %61, ptr %gep162.1, align 4, !tbaa !22
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %gep.2 = getelementptr inbounds i32, ptr %invariant.gep, i64 %indvars.iv.next.1
  %62 = load i32, ptr %gep.2, align 4, !tbaa !22
  %gep162.2 = getelementptr i32, ptr %invariant.gep161, i64 %indvars.iv.next.1
  %63 = load i32, ptr %gep162.2, align 4, !tbaa !22
  %64 = add nsw i32 %63, %62
  store i32 %64, ptr %gep162.2, align 4, !tbaa !22
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %gep.3 = getelementptr inbounds i32, ptr %invariant.gep, i64 %indvars.iv.next.2
  %65 = load i32, ptr %gep.3, align 4, !tbaa !22
  %gep162.3 = getelementptr i32, ptr %invariant.gep161, i64 %indvars.iv.next.2
  %66 = load i32, ptr %gep162.3, align 4, !tbaa !22
  %67 = add nsw i32 %66, %65
  store i32 %67, ptr %gep162.3, align 4, !tbaa !22
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %exitcond.not.3 = icmp eq i64 %indvars.iv.next.3, %wide.trip.count
  br i1 %exitcond.not.3, label %._crit_edge.us, label %scalar.ph, !llvm.loop !34

._crit_edge.us:                                   ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  %indvars.iv.next141 = add nuw nsw i64 %indvars.iv140, 1
  %exitcond144.not = icmp eq i64 %indvars.iv.next141, %wide.trip.count143
  br i1 %exitcond144.not, label %.loopexit, label %.lr.ph.us, !llvm.loop !35

.preheader:                                       ; preds = %2
  br i1 %32, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.preheader
  %wide.trip.count148 = zext nneg i32 %3 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %74
  %indvars.iv145 = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next146, %74 ]
  %68 = getelementptr inbounds i32, ptr %15, i64 %indvars.iv145
  %69 = load i32, ptr %68, align 4, !tbaa !22
  %or.cond = icmp ult i32 %69, 2
  br i1 %or.cond, label %74, label %70

70:                                               ; preds = %.lr.ph
  %71 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, i32 noundef 95, ptr noundef nonnull @.str.1)
  %72 = load i32, ptr %68, align 4, !tbaa !22
  %or.cond114 = icmp ult i32 %72, 2
  br i1 %or.cond114, label %74, label %73

73:                                               ; preds = %70
  tail call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.1, i32 noundef 95, ptr noundef nonnull @__PRETTY_FUNCTION__.libmetis__Compute2WayPartitionParams) #5
  unreachable

74:                                               ; preds = %70, %.lr.ph
  %75 = phi i32 [ %72, %70 ], [ %69, %.lr.ph ]
  %76 = getelementptr inbounds i32, ptr %9, i64 %indvars.iv145
  %77 = load i32, ptr %76, align 4, !tbaa !22
  %78 = zext nneg i32 %75 to i64
  %79 = getelementptr inbounds i32, ptr %24, i64 %78
  %80 = load i32, ptr %79, align 4, !tbaa !22
  %81 = add nsw i32 %80, %77
  store i32 %81, ptr %79, align 4, !tbaa !22
  %indvars.iv.next146 = add nuw nsw i64 %indvars.iv145, 1
  %exitcond149.not = icmp eq i64 %indvars.iv.next146, %wide.trip.count148
  br i1 %exitcond149.not, label %._crit_edge, label %.lr.ph, !llvm.loop !36

._crit_edge:                                      ; preds = %74, %.preheader
  %82 = load i32, ptr %24, align 4, !tbaa !22
  %83 = getelementptr inbounds i8, ptr %24, i64 4
  %84 = load i32, ptr %83, align 4, !tbaa !22
  %85 = add nsw i32 %84, %82
  %86 = getelementptr inbounds i8, ptr %1, i64 56
  %87 = load ptr, ptr %86, align 8, !tbaa !37
  %88 = load i32, ptr %87, align 4, !tbaa !22
  %89 = icmp eq i32 %85, %88
  br i1 %89, label %.loopexit, label %90

90:                                               ; preds = %._crit_edge
  %91 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, i32 noundef 98, ptr noundef nonnull @.str.1)
  %92 = load i32, ptr %24, align 4, !tbaa !22
  %93 = load i32, ptr %83, align 4, !tbaa !22
  %94 = add nsw i32 %93, %92
  %95 = load ptr, ptr %86, align 8, !tbaa !37
  %96 = load i32, ptr %95, align 4, !tbaa !22
  %97 = icmp eq i32 %94, %96
  br i1 %97, label %.loopexit, label %98

98:                                               ; preds = %90
  tail call void @__assert_fail(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.1, i32 noundef 98, ptr noundef nonnull @__PRETTY_FUNCTION__.libmetis__Compute2WayPartitionParams) #5
  unreachable

.loopexit:                                        ; preds = %._crit_edge.us, %._crit_edge, %90
  %99 = icmp sgt i32 %3, 0
  br i1 %99, label %.lr.ph134.preheader, label %._crit_edge135

.lr.ph134.preheader:                              ; preds = %.lr.ph121, %.loopexit
  %wide.trip.count158 = zext nneg i32 %3 to i64
  br label %.lr.ph134

.lr.ph134:                                        ; preds = %.lr.ph134.preheader, %160
  %indvars.iv155 = phi i64 [ 0, %.lr.ph134.preheader ], [ %indvars.iv.next156, %160 ]
  %.0102131 = phi i32 [ 0, %.lr.ph134.preheader ], [ %.1103, %160 ]
  %.0104130 = phi i32 [ 0, %.lr.ph134.preheader ], [ %.1105, %160 ]
  %100 = getelementptr inbounds i32, ptr %7, i64 %indvars.iv155
  %101 = load i32, ptr %100, align 4, !tbaa !22
  %indvars.iv.next156 = add nuw nsw i64 %indvars.iv155, 1
  %102 = getelementptr inbounds i32, ptr %7, i64 %indvars.iv.next156
  %103 = load i32, ptr %102, align 4, !tbaa !22
  %104 = getelementptr inbounds i32, ptr %15, i64 %indvars.iv155
  %105 = load i32, ptr %104, align 4, !tbaa !22
  %106 = icmp slt i32 %101, %103
  br i1 %106, label %.lr.ph127.preheader, label %._crit_edge128

.lr.ph127.preheader:                              ; preds = %.lr.ph134
  %107 = sext i32 %101 to i64
  %wide.trip.count153 = sext i32 %103 to i64
  %108 = sub nsw i64 %wide.trip.count153, %107
  %xtraiter168 = and i64 %108, 1
  %109 = add nsw i64 %wide.trip.count153, -1
  %110 = icmp eq i64 %109, %107
  br i1 %110, label %._crit_edge128.loopexit.unr-lcssa, label %.lr.ph127.preheader.new

.lr.ph127.preheader.new:                          ; preds = %.lr.ph127.preheader
  %unroll_iter = and i64 %108, -2
  br label %.lr.ph127

.lr.ph127:                                        ; preds = %.lr.ph127, %.lr.ph127.preheader.new
  %indvars.iv150 = phi i64 [ %107, %.lr.ph127.preheader.new ], [ %indvars.iv.next151.1, %.lr.ph127 ]
  %.0106124 = phi i32 [ 0, %.lr.ph127.preheader.new ], [ %.1107.1, %.lr.ph127 ]
  %.0108123 = phi i32 [ 0, %.lr.ph127.preheader.new ], [ %.1109.1, %.lr.ph127 ]
  %niter = phi i64 [ 0, %.lr.ph127.preheader.new ], [ %niter.next.1, %.lr.ph127 ]
  %111 = getelementptr inbounds i32, ptr %11, i64 %indvars.iv150
  %112 = load i32, ptr %111, align 4, !tbaa !22
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds i32, ptr %15, i64 %113
  %115 = load i32, ptr %114, align 4, !tbaa !22
  %116 = icmp eq i32 %105, %115
  %117 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv150
  %118 = load i32, ptr %117, align 4, !tbaa !22
  %119 = select i1 %116, i32 0, i32 %118
  %.1109 = add nsw i32 %.0108123, %119
  %120 = select i1 %116, i32 %118, i32 0
  %.1107 = add nsw i32 %.0106124, %120
  %indvars.iv.next151 = add nsw i64 %indvars.iv150, 1
  %121 = getelementptr inbounds i32, ptr %11, i64 %indvars.iv.next151
  %122 = load i32, ptr %121, align 4, !tbaa !22
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds i32, ptr %15, i64 %123
  %125 = load i32, ptr %124, align 4, !tbaa !22
  %126 = icmp eq i32 %105, %125
  %127 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv.next151
  %128 = load i32, ptr %127, align 4, !tbaa !22
  %129 = select i1 %126, i32 0, i32 %128
  %.1109.1 = add nsw i32 %.1109, %129
  %130 = select i1 %126, i32 %128, i32 0
  %.1107.1 = add nsw i32 %.1107, %130
  %indvars.iv.next151.1 = add nsw i64 %indvars.iv150, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge128.loopexit.unr-lcssa, label %.lr.ph127, !llvm.loop !38

._crit_edge128.loopexit.unr-lcssa:                ; preds = %.lr.ph127, %.lr.ph127.preheader
  %.1109.lcssa.ph = phi i32 [ poison, %.lr.ph127.preheader ], [ %.1109.1, %.lr.ph127 ]
  %.1107.lcssa.ph = phi i32 [ poison, %.lr.ph127.preheader ], [ %.1107.1, %.lr.ph127 ]
  %indvars.iv150.unr = phi i64 [ %107, %.lr.ph127.preheader ], [ %indvars.iv.next151.1, %.lr.ph127 ]
  %.0106124.unr = phi i32 [ 0, %.lr.ph127.preheader ], [ %.1107.1, %.lr.ph127 ]
  %.0108123.unr = phi i32 [ 0, %.lr.ph127.preheader ], [ %.1109.1, %.lr.ph127 ]
  %lcmp.mod169.not = icmp eq i64 %xtraiter168, 0
  br i1 %lcmp.mod169.not, label %._crit_edge128, label %.lr.ph127.epil

.lr.ph127.epil:                                   ; preds = %._crit_edge128.loopexit.unr-lcssa
  %131 = getelementptr inbounds i32, ptr %11, i64 %indvars.iv150.unr
  %132 = load i32, ptr %131, align 4, !tbaa !22
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds i32, ptr %15, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !22
  %136 = icmp eq i32 %105, %135
  %137 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv150.unr
  %138 = load i32, ptr %137, align 4, !tbaa !22
  %139 = select i1 %136, i32 0, i32 %138
  %.1109.epil = add nsw i32 %.0108123.unr, %139
  %140 = select i1 %136, i32 %138, i32 0
  %.1107.epil = add nsw i32 %.0106124.unr, %140
  br label %._crit_edge128

._crit_edge128:                                   ; preds = %.lr.ph127.epil, %._crit_edge128.loopexit.unr-lcssa, %.lr.ph134
  %.0108.lcssa = phi i32 [ 0, %.lr.ph134 ], [ %.1109.lcssa.ph, %._crit_edge128.loopexit.unr-lcssa ], [ %.1109.epil, %.lr.ph127.epil ]
  %.0106.lcssa = phi i32 [ 0, %.lr.ph134 ], [ %.1107.lcssa.ph, %._crit_edge128.loopexit.unr-lcssa ], [ %.1107.epil, %.lr.ph127.epil ]
  %141 = getelementptr inbounds i32, ptr %17, i64 %indvars.iv155
  store i32 %.0106.lcssa, ptr %141, align 4, !tbaa !22
  %142 = getelementptr inbounds i32, ptr %19, i64 %indvars.iv155
  store i32 %.0108.lcssa, ptr %142, align 4, !tbaa !22
  %143 = icmp sgt i32 %.0108.lcssa, 0
  %144 = icmp eq i32 %101, %103
  %or.cond115 = or i1 %143, %144
  br i1 %or.cond115, label %145, label %160

145:                                              ; preds = %._crit_edge128
  %146 = getelementptr inbounds i32, ptr %28, i64 %indvars.iv155
  %147 = load i32, ptr %146, align 4, !tbaa !22
  %148 = icmp eq i32 %147, -1
  br i1 %148, label %154, label %149

149:                                              ; preds = %145
  %150 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, i32 noundef 127, ptr noundef nonnull @.str.1)
  %151 = load i32, ptr %146, align 4, !tbaa !22
  %152 = icmp eq i32 %151, -1
  br i1 %152, label %154, label %153

153:                                              ; preds = %149
  tail call void @__assert_fail(ptr noundef nonnull @.str.14, ptr noundef nonnull @.str.1, i32 noundef 127, ptr noundef nonnull @__PRETTY_FUNCTION__.libmetis__Compute2WayPartitionParams) #5
  unreachable

154:                                              ; preds = %149, %145
  %155 = sext i32 %.0102131 to i64
  %156 = getelementptr inbounds i32, ptr %30, i64 %155
  %157 = trunc nuw nsw i64 %indvars.iv155 to i32
  store i32 %157, ptr %156, align 4, !tbaa !22
  %158 = add nsw i32 %.0102131, 1
  store i32 %.0102131, ptr %146, align 4, !tbaa !22
  %159 = add nsw i32 %.0108.lcssa, %.0104130
  br label %160

160:                                              ; preds = %._crit_edge128, %154
  %.1105 = phi i32 [ %159, %154 ], [ %.0104130, %._crit_edge128 ]
  %.1103 = phi i32 [ %158, %154 ], [ %.0102131, %._crit_edge128 ]
  %exitcond159.not = icmp eq i64 %indvars.iv.next156, %wide.trip.count158
  br i1 %exitcond159.not, label %._crit_edge135.loopexit, label %.lr.ph134, !llvm.loop !39

._crit_edge135.loopexit:                          ; preds = %160
  %161 = sdiv i32 %.1105, 2
  br label %._crit_edge135

._crit_edge135:                                   ; preds = %.preheader116, %._crit_edge135.loopexit, %.loopexit
  %.0104.lcssa = phi i32 [ 0, %.loopexit ], [ %161, %._crit_edge135.loopexit ], [ 0, %.preheader116 ]
  %.0102.lcssa = phi i32 [ 0, %.loopexit ], [ %.1103, %._crit_edge135.loopexit ], [ 0, %.preheader116 ]
  %162 = getelementptr inbounds i8, ptr %1, i64 112
  store i32 %.0104.lcssa, ptr %162, align 8, !tbaa !40
  %163 = getelementptr inbounds i8, ptr %1, i64 136
  store i32 %.0102.lcssa, ptr %163, align 8, !tbaa !41
  ret void
}

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nofree nounwind "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 = { noreturn nounwind "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 = { "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 #4 = { nounwind }
attributes #5 = { noreturn 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, !7, i64 8}
!12 = !{!6, !10, i64 16}
!13 = !{!6, !10, i64 24}
!14 = !{!6, !10, i64 40}
!15 = !{!6, !10, i64 48}
!16 = !{!6, !10, i64 120}
!17 = !{!6, !10, i64 160}
!18 = !{!6, !10, i64 168}
!19 = !{!6, !10, i64 128}
!20 = !{!6, !10, i64 144}
!21 = !{!6, !10, i64 152}
!22 = !{!7, !7, i64 0}
!23 = !{!24}
!24 = distinct !{!24, !25}
!25 = distinct !{!25, !"LVerDomain"}
!26 = !{!27}
!27 = distinct !{!27, !25}
!28 = distinct !{!28, !29, !30, !31}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!"llvm.loop.isvectorized", i32 1}
!31 = !{!"llvm.loop.unroll.runtime.disable"}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.unroll.disable"}
!34 = distinct !{!34, !29, !30}
!35 = distinct !{!35, !29}
!36 = distinct !{!36, !29}
!37 = !{!6, !10, i64 56}
!38 = distinct !{!38, !29}
!39 = distinct !{!39, !29}
!40 = !{!6, !7, i64 112}
!41 = !{!6, !7, i64 136}


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