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

; 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.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }

@gk_jbufs = external thread_local global [0 x [1 x %struct.__jmp_buf_tag]], align 8
@gk_cur_jbufs = external thread_local global i32, align 4
@.str = external hidden unnamed_addr constant [25 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [25 x i8], align 1

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

declare i32 @gk_malloc_init(...) #1

declare i32 @gk_sigtrap(...) #1

; Function Attrs: nounwind returns_twice
declare i32 @_setjmp(ptr noundef) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #3

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

; Function Attrs: nounwind
declare i32 @raise(i32 noundef) #4

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @libmetis__InduceRowPartFromColumnPart(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef) #5

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

declare i32 @METIS_Free(ptr noundef) #1

declare i32 @gk_siguntrap(...) #1

declare void @gk_malloc_cleanup(i32 noundef) #1

declare i32 @libmetis__metis_rcode(i32 noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local i32 @METIS_PartMeshDual(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12) #5 {
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %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
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca i32, align 4
  store ptr %0, ptr %15, align 8, !tbaa !5
  store ptr %1, ptr %16, align 8, !tbaa !5
  store ptr %2, ptr %17, align 8, !tbaa !5
  store ptr %3, ptr %18, align 8, !tbaa !5
  store ptr %4, ptr %19, align 8, !tbaa !5
  store ptr %5, ptr %20, align 8, !tbaa !5
  store ptr %6, ptr %21, align 8, !tbaa !5
  store ptr %7, ptr %22, align 8, !tbaa !5
  store ptr %8, ptr %23, align 8, !tbaa !5
  store ptr %9, ptr %24, align 8, !tbaa !5
  store ptr %10, ptr %25, align 8, !tbaa !5
  store ptr %11, ptr %26, align 8, !tbaa !5
  store ptr %12, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  store i32 0, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  store i32 0, ptr %29, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #6
  store ptr null, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #6
  store ptr null, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #6
  store ptr null, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #6
  store ptr null, ptr %36, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #6
  store i32 1, ptr %37, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #6
  store i32 0, ptr %38, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #6
  store i32 1, ptr %39, align 4, !tbaa !9
  %41 = call i32 (...) @gk_malloc_init()
  %42 = icmp ne i32 %41, 0
  br i1 %42, label %44, label %43

43:                                               ; preds = %13
  store i32 -3, ptr %14, align 4
  store i32 1, ptr %40, align 4
  br label %335

44:                                               ; preds = %13
  %45 = call i32 (...) @gk_sigtrap()
  %46 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @gk_jbufs)
  %47 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @gk_cur_jbufs)
  %48 = load i32, ptr %47, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [0 x [1 x %struct.__jmp_buf_tag]], ptr %46, i64 0, i64 %49
  %51 = getelementptr inbounds [1 x %struct.__jmp_buf_tag], ptr %50, i64 0, i64 0
  %52 = call i32 @_setjmp(ptr noundef %51) #7
  store i32 %52, ptr %28, align 4, !tbaa !9
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %54, label %55

54:                                               ; preds = %44
  br label %313

55:                                               ; preds = %44
  %56 = load ptr, ptr %24, align 8, !tbaa !5
  %57 = icmp eq ptr %56, null
  br i1 %57, label %63, label %58

58:                                               ; preds = %55
  %59 = load ptr, ptr %24, align 8, !tbaa !5
  %60 = getelementptr inbounds i32, ptr %59, i64 17
  %61 = load i32, ptr %60, align 4, !tbaa !9
  %62 = icmp eq i32 %61, -1
  br i1 %62, label %63, label %64

63:                                               ; preds = %58, %55
  br label %68

64:                                               ; preds = %58
  %65 = load ptr, ptr %24, align 8, !tbaa !5
  %66 = getelementptr inbounds i32, ptr %65, i64 17
  %67 = load i32, ptr %66, align 4, !tbaa !9
  br label %68

68:                                               ; preds = %64, %63
  %69 = phi i32 [ 0, %63 ], [ %67, %64 ]
  store i32 %69, ptr %29, align 4, !tbaa !9
  %70 = load ptr, ptr %24, align 8, !tbaa !5
  %71 = icmp eq ptr %70, null
  br i1 %71, label %77, label %72

72:                                               ; preds = %68
  %73 = load ptr, ptr %24, align 8, !tbaa !5
  %74 = getelementptr inbounds i32, ptr %73, i64 0
  %75 = load i32, ptr %74, align 4, !tbaa !9
  %76 = icmp eq i32 %75, -1
  br i1 %76, label %77, label %78

77:                                               ; preds = %72, %68
  br label %82

78:                                               ; preds = %72
  %79 = load ptr, ptr %24, align 8, !tbaa !5
  %80 = getelementptr inbounds i32, ptr %79, i64 0
  %81 = load i32, ptr %80, align 4, !tbaa !9
  br label %82

82:                                               ; preds = %78, %77
  %83 = phi i32 [ 1, %77 ], [ %81, %78 ]
  store i32 %83, ptr %30, align 4, !tbaa !9
  %84 = load i32, ptr %29, align 4, !tbaa !9
  %85 = icmp ne i32 %84, 0
  br i1 %85, label %86, label %93

86:                                               ; preds = %82
  %87 = load ptr, ptr %15, align 8, !tbaa !5
  %88 = load i32, ptr %87, align 4, !tbaa !9
  %89 = load ptr, ptr %17, align 8, !tbaa !5
  %90 = load ptr, ptr %18, align 8, !tbaa !5
  call void @libmetis__ChangeMesh2CNumbering(i32 noundef %88, ptr noundef %89, ptr noundef %90)
  %91 = load ptr, ptr %24, align 8, !tbaa !5
  %92 = getelementptr inbounds i32, ptr %91, i64 17
  store i32 0, ptr %92, align 4, !tbaa !9
  br label %93

93:                                               ; preds = %86, %82
  %94 = load ptr, ptr %15, align 8, !tbaa !5
  %95 = load ptr, ptr %16, align 8, !tbaa !5
  %96 = load ptr, ptr %17, align 8, !tbaa !5
  %97 = load ptr, ptr %18, align 8, !tbaa !5
  %98 = load ptr, ptr %21, align 8, !tbaa !5
  %99 = call i32 @METIS_MeshToDual(ptr noundef %94, ptr noundef %95, ptr noundef %96, ptr noundef %97, ptr noundef %98, ptr noundef %38, ptr noundef %33, ptr noundef %34)
  store i32 %99, ptr %39, align 4, !tbaa !9
  %100 = load i32, ptr %39, align 4, !tbaa !9
  %101 = icmp ne i32 %100, 1
  br i1 %101, label %102, label %104

102:                                              ; preds = %93
  %103 = call i32 @raise(i32 noundef 15) #6
  br label %104

104:                                              ; preds = %102, %93
  %105 = load i32, ptr %30, align 4, !tbaa !9
  %106 = icmp eq i32 %105, 1
  br i1 %106, label %107, label %119

107:                                              ; preds = %104
  %108 = load ptr, ptr %15, align 8, !tbaa !5
  %109 = load ptr, ptr %33, align 8, !tbaa !5
  %110 = load ptr, ptr %34, align 8, !tbaa !5
  %111 = load ptr, ptr %19, align 8, !tbaa !5
  %112 = load ptr, ptr %20, align 8, !tbaa !5
  %113 = load ptr, ptr %22, align 8, !tbaa !5
  %114 = load ptr, ptr %23, align 8, !tbaa !5
  %115 = load ptr, ptr %24, align 8, !tbaa !5
  %116 = load ptr, ptr %25, align 8, !tbaa !5
  %117 = load ptr, ptr %26, align 8, !tbaa !5
  %118 = call i32 @METIS_PartGraphKway(ptr noundef %108, ptr noundef %37, ptr noundef %109, ptr noundef %110, ptr noundef %111, ptr noundef %112, ptr noundef null, ptr noundef %113, ptr noundef %114, ptr noundef null, ptr noundef %115, ptr noundef %116, ptr noundef %117)
  store i32 %118, ptr %39, align 4, !tbaa !9
  br label %131

119:                                              ; preds = %104
  %120 = load ptr, ptr %15, align 8, !tbaa !5
  %121 = load ptr, ptr %33, align 8, !tbaa !5
  %122 = load ptr, ptr %34, align 8, !tbaa !5
  %123 = load ptr, ptr %19, align 8, !tbaa !5
  %124 = load ptr, ptr %20, align 8, !tbaa !5
  %125 = load ptr, ptr %22, align 8, !tbaa !5
  %126 = load ptr, ptr %23, align 8, !tbaa !5
  %127 = load ptr, ptr %24, align 8, !tbaa !5
  %128 = load ptr, ptr %25, align 8, !tbaa !5
  %129 = load ptr, ptr %26, align 8, !tbaa !5
  %130 = call i32 @METIS_PartGraphRecursive(ptr noundef %120, ptr noundef %37, ptr noundef %121, ptr noundef %122, ptr noundef %123, ptr noundef %124, ptr noundef null, ptr noundef %125, ptr noundef %126, ptr noundef null, ptr noundef %127, ptr noundef %128, ptr noundef %129)
  store i32 %130, ptr %39, align 4, !tbaa !9
  br label %131

131:                                              ; preds = %119, %107
  %132 = load i32, ptr %39, align 4, !tbaa !9
  %133 = icmp ne i32 %132, 1
  br i1 %133, label %134, label %136

134:                                              ; preds = %131
  %135 = call i32 @raise(i32 noundef 15) #6
  br label %136

136:                                              ; preds = %134, %131
  %137 = load ptr, ptr %16, align 8, !tbaa !5
  %138 = load i32, ptr %137, align 4, !tbaa !9
  %139 = add nsw i32 %138, 1
  %140 = sext i32 %139 to i64
  %141 = call ptr @libmetis__ismalloc(i64 noundef %140, i32 noundef 0, ptr noundef @.str)
  store ptr %141, ptr %35, align 8, !tbaa !5
  %142 = load ptr, ptr %17, align 8, !tbaa !5
  %143 = load ptr, ptr %15, align 8, !tbaa !5
  %144 = load i32, ptr %143, align 4, !tbaa !9
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds i32, ptr %142, i64 %145
  %147 = load i32, ptr %146, align 4, !tbaa !9
  %148 = sext i32 %147 to i64
  %149 = call ptr @libmetis__imalloc(i64 noundef %148, ptr noundef @.str.1)
  store ptr %149, ptr %36, align 8, !tbaa !5
  store i32 0, ptr %31, align 4, !tbaa !9
  br label %150

150:                                              ; preds = %185, %136
  %151 = load i32, ptr %31, align 4, !tbaa !9
  %152 = load ptr, ptr %15, align 8, !tbaa !5
  %153 = load i32, ptr %152, align 4, !tbaa !9
  %154 = icmp slt i32 %151, %153
  br i1 %154, label %155, label %188

155:                                              ; preds = %150
  %156 = load ptr, ptr %17, align 8, !tbaa !5
  %157 = load i32, ptr %31, align 4, !tbaa !9
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds i32, ptr %156, i64 %158
  %160 = load i32, ptr %159, align 4, !tbaa !9
  store i32 %160, ptr %32, align 4, !tbaa !9
  br label %161

161:                                              ; preds = %181, %155
  %162 = load i32, ptr %32, align 4, !tbaa !9
  %163 = load ptr, ptr %17, align 8, !tbaa !5
  %164 = load i32, ptr %31, align 4, !tbaa !9
  %165 = add nsw i32 %164, 1
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds i32, ptr %163, i64 %166
  %168 = load i32, ptr %167, align 4, !tbaa !9
  %169 = icmp slt i32 %162, %168
  br i1 %169, label %170, label %184

170:                                              ; preds = %161
  %171 = load ptr, ptr %35, align 8, !tbaa !5
  %172 = load ptr, ptr %18, align 8, !tbaa !5
  %173 = load i32, ptr %32, align 4, !tbaa !9
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds i32, ptr %172, i64 %174
  %176 = load i32, ptr %175, align 4, !tbaa !9
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds i32, ptr %171, i64 %177
  %179 = load i32, ptr %178, align 4, !tbaa !9
  %180 = add nsw i32 %179, 1
  store i32 %180, ptr %178, align 4, !tbaa !9
  br label %181

181:                                              ; preds = %170
  %182 = load i32, ptr %32, align 4, !tbaa !9
  %183 = add nsw i32 %182, 1
  store i32 %183, ptr %32, align 4, !tbaa !9
  br label %161, !llvm.loop !11

184:                                              ; preds = %161
  br label %185

185:                                              ; preds = %184
  %186 = load i32, ptr %31, align 4, !tbaa !9
  %187 = add nsw i32 %186, 1
  store i32 %187, ptr %31, align 4, !tbaa !9
  br label %150, !llvm.loop !13

188:                                              ; preds = %150
  br label %189

189:                                              ; preds = %188
  store i32 1, ptr %31, align 4, !tbaa !9
  br label %190

190:                                              ; preds = %208, %189
  %191 = load i32, ptr %31, align 4, !tbaa !9
  %192 = load ptr, ptr %16, align 8, !tbaa !5
  %193 = load i32, ptr %192, align 4, !tbaa !9
  %194 = icmp slt i32 %191, %193
  br i1 %194, label %195, label %211

195:                                              ; preds = %190
  %196 = load ptr, ptr %35, align 8, !tbaa !5
  %197 = load i32, ptr %31, align 4, !tbaa !9
  %198 = sub nsw i32 %197, 1
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds i32, ptr %196, i64 %199
  %201 = load i32, ptr %200, align 4, !tbaa !9
  %202 = load ptr, ptr %35, align 8, !tbaa !5
  %203 = load i32, ptr %31, align 4, !tbaa !9
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds i32, ptr %202, i64 %204
  %206 = load i32, ptr %205, align 4, !tbaa !9
  %207 = add nsw i32 %206, %201
  store i32 %207, ptr %205, align 4, !tbaa !9
  br label %208

208:                                              ; preds = %195
  %209 = load i32, ptr %31, align 4, !tbaa !9
  %210 = add nsw i32 %209, 1
  store i32 %210, ptr %31, align 4, !tbaa !9
  br label %190, !llvm.loop !14

211:                                              ; preds = %190
  %212 = load ptr, ptr %16, align 8, !tbaa !5
  %213 = load i32, ptr %212, align 4, !tbaa !9
  store i32 %213, ptr %31, align 4, !tbaa !9
  br label %214

214:                                              ; preds = %228, %211
  %215 = load i32, ptr %31, align 4, !tbaa !9
  %216 = icmp sgt i32 %215, 0
  br i1 %216, label %217, label %231

217:                                              ; preds = %214
  %218 = load ptr, ptr %35, align 8, !tbaa !5
  %219 = load i32, ptr %31, align 4, !tbaa !9
  %220 = sub nsw i32 %219, 1
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds i32, ptr %218, i64 %221
  %223 = load i32, ptr %222, align 4, !tbaa !9
  %224 = load ptr, ptr %35, align 8, !tbaa !5
  %225 = load i32, ptr %31, align 4, !tbaa !9
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds i32, ptr %224, i64 %226
  store i32 %223, ptr %227, align 4, !tbaa !9
  br label %228

228:                                              ; preds = %217
  %229 = load i32, ptr %31, align 4, !tbaa !9
  %230 = add nsw i32 %229, -1
  store i32 %230, ptr %31, align 4, !tbaa !9
  br label %214, !llvm.loop !15

231:                                              ; preds = %214
  %232 = load ptr, ptr %35, align 8, !tbaa !5
  %233 = getelementptr inbounds i32, ptr %232, i64 0
  store i32 0, ptr %233, align 4, !tbaa !9
  br label %234

234:                                              ; preds = %231
  br label %235

235:                                              ; preds = %234
  store i32 0, ptr %31, align 4, !tbaa !9
  br label %236

236:                                              ; preds = %275, %235
  %237 = load i32, ptr %31, align 4, !tbaa !9
  %238 = load ptr, ptr %15, align 8, !tbaa !5
  %239 = load i32, ptr %238, align 4, !tbaa !9
  %240 = icmp slt i32 %237, %239
  br i1 %240, label %241, label %278

241:                                              ; preds = %236
  %242 = load ptr, ptr %17, align 8, !tbaa !5
  %243 = load i32, ptr %31, align 4, !tbaa !9
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds i32, ptr %242, i64 %244
  %246 = load i32, ptr %245, align 4, !tbaa !9
  store i32 %246, ptr %32, align 4, !tbaa !9
  br label %247

247:                                              ; preds = %271, %241
  %248 = load i32, ptr %32, align 4, !tbaa !9
  %249 = load ptr, ptr %17, align 8, !tbaa !5
  %250 = load i32, ptr %31, align 4, !tbaa !9
  %251 = add nsw i32 %250, 1
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds i32, ptr %249, i64 %252
  %254 = load i32, ptr %253, align 4, !tbaa !9
  %255 = icmp slt i32 %248, %254
  br i1 %255, label %256, label %274

256:                                              ; preds = %247
  %257 = load i32, ptr %31, align 4, !tbaa !9
  %258 = load ptr, ptr %36, align 8, !tbaa !5
  %259 = load ptr, ptr %35, align 8, !tbaa !5
  %260 = load ptr, ptr %18, align 8, !tbaa !5
  %261 = load i32, ptr %32, align 4, !tbaa !9
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds i32, ptr %260, i64 %262
  %264 = load i32, ptr %263, align 4, !tbaa !9
  %265 = sext i32 %264 to i64
  %266 = getelementptr inbounds i32, ptr %259, i64 %265
  %267 = load i32, ptr %266, align 4, !tbaa !9
  %268 = add nsw i32 %267, 1
  store i32 %268, ptr %266, align 4, !tbaa !9
  %269 = sext i32 %267 to i64
  %270 = getelementptr inbounds i32, ptr %258, i64 %269
  store i32 %257, ptr %270, align 4, !tbaa !9
  br label %271

271:                                              ; preds = %256
  %272 = load i32, ptr %32, align 4, !tbaa !9
  %273 = add nsw i32 %272, 1
  store i32 %273, ptr %32, align 4, !tbaa !9
  br label %247, !llvm.loop !16

274:                                              ; preds = %247
  br label %275

275:                                              ; preds = %274
  %276 = load i32, ptr %31, align 4, !tbaa !9
  %277 = add nsw i32 %276, 1
  store i32 %277, ptr %31, align 4, !tbaa !9
  br label %236, !llvm.loop !17

278:                                              ; preds = %236
  br label %279

279:                                              ; preds = %278
  %280 = load ptr, ptr %16, align 8, !tbaa !5
  %281 = load i32, ptr %280, align 4, !tbaa !9
  store i32 %281, ptr %31, align 4, !tbaa !9
  br label %282

282:                                              ; preds = %296, %279
  %283 = load i32, ptr %31, align 4, !tbaa !9
  %284 = icmp sgt i32 %283, 0
  br i1 %284, label %285, label %299

285:                                              ; preds = %282
  %286 = load ptr, ptr %35, align 8, !tbaa !5
  %287 = load i32, ptr %31, align 4, !tbaa !9
  %288 = sub nsw i32 %287, 1
  %289 = sext i32 %288 to i64
  %290 = getelementptr inbounds i32, ptr %286, i64 %289
  %291 = load i32, ptr %290, align 4, !tbaa !9
  %292 = load ptr, ptr %35, align 8, !tbaa !5
  %293 = load i32, ptr %31, align 4, !tbaa !9
  %294 = sext i32 %293 to i64
  %295 = getelementptr inbounds i32, ptr %292, i64 %294
  store i32 %291, ptr %295, align 4, !tbaa !9
  br label %296

296:                                              ; preds = %285
  %297 = load i32, ptr %31, align 4, !tbaa !9
  %298 = add nsw i32 %297, -1
  store i32 %298, ptr %31, align 4, !tbaa !9
  br label %282, !llvm.loop !18

299:                                              ; preds = %282
  %300 = load ptr, ptr %35, align 8, !tbaa !5
  %301 = getelementptr inbounds i32, ptr %300, i64 0
  store i32 0, ptr %301, align 4, !tbaa !9
  br label %302

302:                                              ; preds = %299
  br label %303

303:                                              ; preds = %302
  %304 = load ptr, ptr %16, align 8, !tbaa !5
  %305 = load i32, ptr %304, align 4, !tbaa !9
  %306 = load ptr, ptr %35, align 8, !tbaa !5
  %307 = load ptr, ptr %36, align 8, !tbaa !5
  %308 = load ptr, ptr %27, align 8, !tbaa !5
  %309 = load ptr, ptr %26, align 8, !tbaa !5
  %310 = load ptr, ptr %22, align 8, !tbaa !5
  %311 = load i32, ptr %310, align 4, !tbaa !9
  %312 = load ptr, ptr %23, align 8, !tbaa !5
  call void @libmetis__InduceRowPartFromColumnPart(i32 noundef %305, ptr noundef %306, ptr noundef %307, ptr noundef %308, ptr noundef %309, i32 noundef %311, ptr noundef %312)
  call void (ptr, ...) @gk_free(ptr noundef %35, ptr noundef %36, ptr noundef null)
  br label %313

313:                                              ; preds = %303, %54
  %314 = load i32, ptr %29, align 4, !tbaa !9
  %315 = icmp ne i32 %314, 0
  br i1 %315, label %316, label %327

316:                                              ; preds = %313
  %317 = load ptr, ptr %15, align 8, !tbaa !5
  %318 = load i32, ptr %317, align 4, !tbaa !9
  %319 = load ptr, ptr %16, align 8, !tbaa !5
  %320 = load i32, ptr %319, align 4, !tbaa !9
  %321 = load ptr, ptr %17, align 8, !tbaa !5
  %322 = load ptr, ptr %18, align 8, !tbaa !5
  %323 = load ptr, ptr %26, align 8, !tbaa !5
  %324 = load ptr, ptr %27, align 8, !tbaa !5
  call void @libmetis__ChangeMesh2FNumbering2(i32 noundef %318, i32 noundef %320, ptr noundef %321, ptr noundef %322, ptr noundef %323, ptr noundef %324)
  %325 = load ptr, ptr %24, align 8, !tbaa !5
  %326 = getelementptr inbounds i32, ptr %325, i64 17
  store i32 1, ptr %326, align 4, !tbaa !9
  br label %327

327:                                              ; preds = %316, %313
  %328 = load ptr, ptr %33, align 8, !tbaa !5
  %329 = call i32 @METIS_Free(ptr noundef %328)
  %330 = load ptr, ptr %34, align 8, !tbaa !5
  %331 = call i32 @METIS_Free(ptr noundef %330)
  %332 = call i32 (...) @gk_siguntrap()
  call void @gk_malloc_cleanup(i32 noundef 0)
  %333 = load i32, ptr %28, align 4, !tbaa !9
  %334 = call i32 @libmetis__metis_rcode(i32 noundef %333)
  store i32 %334, ptr %14, align 4
  store i32 1, ptr %40, align 4
  br label %335

335:                                              ; preds = %327, %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  %336 = load i32, ptr %14, align 4
  ret i32 %336
}

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

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

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

declare void @gk_free(ptr 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 returns_twice "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 speculatable willreturn memory(none) }
attributes #4 = { 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { nounwind returns_twice }

!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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }

@gk_jbufs = external thread_local global [0 x [1 x %struct.__jmp_buf_tag]], align 8
@gk_cur_jbufs = external thread_local local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [25 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [25 x i8], align 1

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

declare i32 @gk_malloc_init(...) local_unnamed_addr #1

declare i32 @gk_sigtrap(...) local_unnamed_addr #1

; Function Attrs: nounwind returns_twice
declare i32 @_setjmp(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #3

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

; Function Attrs: nounwind
declare i32 @raise(i32 noundef) local_unnamed_addr #4

declare i32 @METIS_PartGraphKway(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @METIS_PartGraphRecursive(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @libmetis__InduceRowPartFromColumnPart(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

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

declare i32 @METIS_Free(ptr noundef) local_unnamed_addr #1

declare i32 @gk_siguntrap(...) local_unnamed_addr #1

declare void @gk_malloc_cleanup(i32 noundef) local_unnamed_addr #1

declare i32 @libmetis__metis_rcode(i32 noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local i32 @METIS_PartMeshDual(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12) local_unnamed_addr #5 {
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #6
  store ptr null, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #6
  store ptr null, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #6
  store ptr null, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #6
  store ptr null, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #6
  store i32 1, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #6
  store i32 0, ptr %19, align 4, !tbaa !9
  %20 = call i32 (...) @gk_malloc_init() #6
  %.not = icmp eq i32 %20, 0
  br i1 %.not, label %155, label %21

21:                                               ; preds = %13
  %22 = call i32 (...) @gk_sigtrap() #6
  %23 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @gk_jbufs)
  %24 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @gk_cur_jbufs)
  %25 = load i32, ptr %24, align 4, !tbaa !9
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [0 x [1 x %struct.__jmp_buf_tag]], ptr %23, i64 0, i64 %26
  %28 = call i32 @_setjmp(ptr noundef nonnull %27) #7
  %.not100 = icmp eq i32 %28, 0
  br i1 %.not100, label %29, label %.critedge

29:                                               ; preds = %21
  %30 = icmp eq ptr %9, null
  br i1 %30, label %.thread106, label %31

31:                                               ; preds = %29
  %32 = getelementptr inbounds i8, ptr %9, i64 68
  %33 = load i32, ptr %32, align 4, !tbaa !9
  %34 = load i32, ptr %9, align 4, !tbaa !9
  %35 = icmp eq i32 %34, -1
  %spec.select105 = select i1 %35, i32 1, i32 %34
  switch i32 %33, label %36 [
    i32 -1, label %.thread106
    i32 0, label %.thread106
  ]

36:                                               ; preds = %31
  %37 = load i32, ptr %0, align 4, !tbaa !9
  call void @libmetis__ChangeMesh2CNumbering(i32 noundef %37, ptr noundef %2, ptr noundef %3) #6
  store i32 0, ptr %32, align 4, !tbaa !9
  br label %.thread106

.thread106:                                       ; preds = %31, %31, %29, %36
  %.not101108 = phi i1 [ false, %36 ], [ true, %29 ], [ true, %31 ], [ true, %31 ]
  %38 = phi i32 [ %spec.select105, %36 ], [ 1, %29 ], [ %spec.select105, %31 ], [ %spec.select105, %31 ]
  %39 = call i32 @METIS_MeshToDual(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %6, ptr noundef nonnull %19, ptr noundef nonnull %14, ptr noundef nonnull %15) #6
  %.not102 = icmp eq i32 %39, 1
  br i1 %.not102, label %42, label %40

40:                                               ; preds = %.thread106
  %41 = call i32 @raise(i32 noundef 15) #6
  br label %42

42:                                               ; preds = %40, %.thread106
  %43 = icmp eq i32 %38, 1
  %44 = load ptr, ptr %14, align 8, !tbaa !5
  %45 = load ptr, ptr %15, align 8, !tbaa !5
  br i1 %43, label %46, label %48

46:                                               ; preds = %42
  %47 = call i32 @METIS_PartGraphKway(ptr noundef %0, ptr noundef nonnull %18, ptr noundef %44, ptr noundef %45, ptr noundef %4, ptr noundef %5, ptr noundef null, ptr noundef %7, ptr noundef %8, ptr noundef null, ptr noundef %9, ptr noundef %10, ptr noundef %11) #6
  br label %50

48:                                               ; preds = %42
  %49 = call i32 @METIS_PartGraphRecursive(ptr noundef %0, ptr noundef nonnull %18, ptr noundef %44, ptr noundef %45, ptr noundef %4, ptr noundef %5, ptr noundef null, ptr noundef %7, ptr noundef %8, ptr noundef null, ptr noundef %9, ptr noundef %10, ptr noundef %11) #6
  br label %50

50:                                               ; preds = %48, %46
  %.0 = phi i32 [ %47, %46 ], [ %49, %48 ]
  %.not103 = icmp eq i32 %.0, 1
  br i1 %.not103, label %53, label %51

51:                                               ; preds = %50
  %52 = call i32 @raise(i32 noundef 15) #6
  br label %53

53:                                               ; preds = %51, %50
  %54 = load i32, ptr %1, align 4, !tbaa !9
  %55 = add nsw i32 %54, 1
  %56 = sext i32 %55 to i64
  %57 = call ptr @libmetis__ismalloc(i64 noundef %56, i32 noundef 0, ptr noundef nonnull @.str) #6
  store ptr %57, ptr %16, align 8, !tbaa !5
  %58 = load i32, ptr %0, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds i32, ptr %2, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !9
  %62 = sext i32 %61 to i64
  %63 = call ptr @libmetis__imalloc(i64 noundef %62, ptr noundef nonnull @.str.1) #6
  store ptr %63, ptr %17, align 8, !tbaa !5
  %64 = load i32, ptr %0, align 4, !tbaa !9
  %65 = icmp sgt i32 %64, 0
  br i1 %65, label %.lr.ph115, label %.preheader109

.lr.ph115:                                        ; preds = %53
  %.pre = load i32, ptr %2, align 4, !tbaa !9
  br label %72

.loopexit110.loopexit:                            ; preds = %.lr.ph
  %.pre153 = load i32, ptr %0, align 4, !tbaa !9
  br label %.loopexit110

.loopexit110:                                     ; preds = %.loopexit110.loopexit, %72
  %66 = phi i32 [ %.pre153, %.loopexit110.loopexit ], [ %73, %72 ]
  %67 = phi i32 [ %85, %.loopexit110.loopexit ], [ %76, %72 ]
  %68 = sext i32 %66 to i64
  %69 = icmp slt i64 %indvars.iv.next134, %68
  br i1 %69, label %72, label %.preheader109, !llvm.loop !11

.preheader109:                                    ; preds = %.loopexit110, %53
  %70 = load i32, ptr %1, align 4, !tbaa !9
  %71 = icmp sgt i32 %70, 1
  br i1 %71, label %.lr.ph117.preheader, label %.preheader

.lr.ph117.preheader:                              ; preds = %.preheader109
  %load_initial = load i32, ptr %57, align 4
  br label %.lr.ph117

72:                                               ; preds = %.lr.ph115, %.loopexit110
  %73 = phi i32 [ %64, %.lr.ph115 ], [ %66, %.loopexit110 ]
  %74 = phi i32 [ %.pre, %.lr.ph115 ], [ %67, %.loopexit110 ]
  %indvars.iv133 = phi i64 [ 0, %.lr.ph115 ], [ %indvars.iv.next134, %.loopexit110 ]
  %indvars.iv.next134 = add nuw nsw i64 %indvars.iv133, 1
  %75 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv.next134
  %76 = load i32, ptr %75, align 4, !tbaa !9
  %77 = icmp slt i32 %74, %76
  br i1 %77, label %.lr.ph.preheader, label %.loopexit110

.lr.ph.preheader:                                 ; preds = %72
  %78 = sext i32 %74 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ %78, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %79 = getelementptr inbounds i32, ptr %3, i64 %indvars.iv
  %80 = load i32, ptr %79, align 4, !tbaa !9
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds i32, ptr %57, i64 %81
  %83 = load i32, ptr %82, align 4, !tbaa !9
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %82, align 4, !tbaa !9
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %85 = load i32, ptr %75, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = icmp slt i64 %indvars.iv.next, %86
  br i1 %87, label %.lr.ph, label %.loopexit110.loopexit, !llvm.loop !13

.preheader:                                       ; preds = %.lr.ph117, %.preheader109
  %.lcssa111 = phi i32 [ %70, %.preheader109 ], [ %99, %.lr.ph117 ]
  %88 = icmp sgt i32 %.lcssa111, 0
  br i1 %88, label %.lr.ph119, label %._crit_edge

.lr.ph119:                                        ; preds = %.preheader
  %89 = zext nneg i32 %.lcssa111 to i64
  %min.iters.check = icmp ult i32 %.lcssa111, 8
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph119
  %indvars.iv140.ph = phi i64 [ %89, %.lr.ph119 ], [ %ind.end, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph119
  %n.vec = and i64 %89, 2147483640
  %ind.end = and i64 %89, 7
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = sub i64 %89, %index
  %90 = getelementptr i32, ptr %57, i64 %offset.idx
  %91 = getelementptr i8, ptr %90, i64 -16
  %92 = getelementptr i8, ptr %90, i64 -32
  %wide.load = load <4 x i32>, ptr %91, align 4, !tbaa !9
  %wide.load160 = load <4 x i32>, ptr %92, align 4, !tbaa !9
  %93 = getelementptr i8, ptr %90, i64 -12
  %94 = getelementptr i8, ptr %90, i64 -28
  store <4 x i32> %wide.load, ptr %93, align 4, !tbaa !9
  store <4 x i32> %wide.load160, ptr %94, align 4, !tbaa !9
  %index.next = add nuw i64 %index, 8
  %95 = icmp eq i64 %index.next, %n.vec
  br i1 %95, label %middle.block, label %vector.body, !llvm.loop !14

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %89
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

.lr.ph117:                                        ; preds = %.lr.ph117.preheader, %.lr.ph117
  %store_forwarded = phi i32 [ %load_initial, %.lr.ph117.preheader ], [ %98, %.lr.ph117 ]
  %indvars.iv136 = phi i64 [ 1, %.lr.ph117.preheader ], [ %indvars.iv.next137, %.lr.ph117 ]
  %96 = getelementptr i32, ptr %57, i64 %indvars.iv136
  %97 = load i32, ptr %96, align 4, !tbaa !9
  %98 = add nsw i32 %97, %store_forwarded
  store i32 %98, ptr %96, align 4, !tbaa !9
  %indvars.iv.next137 = add nuw nsw i64 %indvars.iv136, 1
  %99 = load i32, ptr %1, align 4, !tbaa !9
  %100 = sext i32 %99 to i64
  %101 = icmp slt i64 %indvars.iv.next137, %100
  br i1 %101, label %.lr.ph117, label %.preheader, !llvm.loop !17

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv140 = phi i64 [ %indvars.iv.next141, %scalar.ph ], [ %indvars.iv140.ph, %scalar.ph.preheader ]
  %102 = getelementptr i32, ptr %57, i64 %indvars.iv140
  %103 = getelementptr i8, ptr %102, i64 -4
  %104 = load i32, ptr %103, align 4, !tbaa !9
  store i32 %104, ptr %102, align 4, !tbaa !9
  %indvars.iv.next141 = add nsw i64 %indvars.iv140, -1
  %105 = icmp ugt i64 %indvars.iv140, 1
  br i1 %105, label %scalar.ph, label %._crit_edge, !llvm.loop !18

._crit_edge:                                      ; preds = %scalar.ph, %middle.block, %.preheader
  store i32 0, ptr %57, align 4, !tbaa !9
  %106 = load i32, ptr %0, align 4, !tbaa !9
  %107 = icmp sgt i32 %106, 0
  br i1 %107, label %.lr.ph126.preheader, label %._crit_edge127

.lr.ph126.preheader:                              ; preds = %._crit_edge
  %.pre154 = load i32, ptr %2, align 4, !tbaa !9
  br label %.lr.ph126

.loopexit.loopexit:                               ; preds = %.lr.ph122
  %.pre155 = load i32, ptr %0, align 4, !tbaa !9
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %.lr.ph126
  %108 = phi i32 [ %.pre155, %.loopexit.loopexit ], [ %112, %.lr.ph126 ]
  %109 = phi i32 [ %127, %.loopexit.loopexit ], [ %115, %.lr.ph126 ]
  %110 = sext i32 %108 to i64
  %111 = icmp slt i64 %indvars.iv.next147, %110
  br i1 %111, label %.lr.ph126, label %._crit_edge127, !llvm.loop !19

.lr.ph126:                                        ; preds = %.lr.ph126.preheader, %.loopexit
  %112 = phi i32 [ %106, %.lr.ph126.preheader ], [ %108, %.loopexit ]
  %113 = phi i32 [ %.pre154, %.lr.ph126.preheader ], [ %109, %.loopexit ]
  %indvars.iv146 = phi i64 [ 0, %.lr.ph126.preheader ], [ %indvars.iv.next147, %.loopexit ]
  %indvars.iv.next147 = add nuw nsw i64 %indvars.iv146, 1
  %114 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv.next147
  %115 = load i32, ptr %114, align 4, !tbaa !9
  %116 = icmp slt i32 %113, %115
  br i1 %116, label %.lr.ph122.preheader, label %.loopexit

.lr.ph122.preheader:                              ; preds = %.lr.ph126
  %117 = sext i32 %113 to i64
  %118 = trunc nuw nsw i64 %indvars.iv146 to i32
  br label %.lr.ph122

.lr.ph122:                                        ; preds = %.lr.ph122.preheader, %.lr.ph122
  %indvars.iv143 = phi i64 [ %117, %.lr.ph122.preheader ], [ %indvars.iv.next144, %.lr.ph122 ]
  %119 = getelementptr inbounds i32, ptr %3, i64 %indvars.iv143
  %120 = load i32, ptr %119, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds i32, ptr %57, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !9
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %122, align 4, !tbaa !9
  %125 = sext i32 %123 to i64
  %126 = getelementptr inbounds i32, ptr %63, i64 %125
  store i32 %118, ptr %126, align 4, !tbaa !9
  %indvars.iv.next144 = add nsw i64 %indvars.iv143, 1
  %127 = load i32, ptr %114, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = icmp slt i64 %indvars.iv.next144, %128
  br i1 %129, label %.lr.ph122, label %.loopexit.loopexit, !llvm.loop !20

._crit_edge127:                                   ; preds = %.loopexit, %._crit_edge
  %130 = load i32, ptr %1, align 4, !tbaa !9
  %131 = icmp sgt i32 %130, 0
  br i1 %131, label %.lr.ph130.preheader, label %._crit_edge131

.lr.ph130.preheader:                              ; preds = %._crit_edge127
  %132 = zext nneg i32 %130 to i64
  %min.iters.check166 = icmp ult i32 %130, 8
  br i1 %min.iters.check166, label %.lr.ph130.preheader183, label %vector.ph167

vector.ph167:                                     ; preds = %.lr.ph130.preheader
  %n.vec169 = and i64 %132, 2147483640
  %ind.end170 = and i64 %132, 7
  br label %vector.body172

vector.body172:                                   ; preds = %vector.body172, %vector.ph167
  %index173 = phi i64 [ 0, %vector.ph167 ], [ %index.next181, %vector.body172 ]
  %offset.idx174 = sub i64 %132, %index173
  %133 = getelementptr i32, ptr %57, i64 %offset.idx174
  %134 = getelementptr i8, ptr %133, i64 -16
  %135 = getelementptr i8, ptr %133, i64 -32
  %wide.load175 = load <4 x i32>, ptr %134, align 4, !tbaa !9
  %wide.load177 = load <4 x i32>, ptr %135, align 4, !tbaa !9
  %136 = getelementptr i8, ptr %133, i64 -12
  %137 = getelementptr i8, ptr %133, i64 -28
  store <4 x i32> %wide.load175, ptr %136, align 4, !tbaa !9
  store <4 x i32> %wide.load177, ptr %137, align 4, !tbaa !9
  %index.next181 = add nuw i64 %index173, 8
  %138 = icmp eq i64 %index.next181, %n.vec169
  br i1 %138, label %middle.block164, label %vector.body172, !llvm.loop !21

middle.block164:                                  ; preds = %vector.body172
  %cmp.n182 = icmp eq i64 %n.vec169, %132
  br i1 %cmp.n182, label %._crit_edge131, label %.lr.ph130.preheader183

.lr.ph130.preheader183:                           ; preds = %middle.block164, %.lr.ph130.preheader
  %indvars.iv150.ph = phi i64 [ %132, %.lr.ph130.preheader ], [ %ind.end170, %middle.block164 ]
  br label %.lr.ph130

.lr.ph130:                                        ; preds = %.lr.ph130.preheader183, %.lr.ph130
  %indvars.iv150 = phi i64 [ %indvars.iv.next151, %.lr.ph130 ], [ %indvars.iv150.ph, %.lr.ph130.preheader183 ]
  %139 = getelementptr i32, ptr %57, i64 %indvars.iv150
  %140 = getelementptr i8, ptr %139, i64 -4
  %141 = load i32, ptr %140, align 4, !tbaa !9
  store i32 %141, ptr %139, align 4, !tbaa !9
  %indvars.iv.next151 = add nsw i64 %indvars.iv150, -1
  %142 = icmp ugt i64 %indvars.iv150, 1
  br i1 %142, label %.lr.ph130, label %._crit_edge131, !llvm.loop !22

._crit_edge131:                                   ; preds = %.lr.ph130, %middle.block164, %._crit_edge127
  store i32 0, ptr %57, align 4, !tbaa !9
  %143 = load i32, ptr %1, align 4, !tbaa !9
  %144 = load i32, ptr %7, align 4, !tbaa !9
  call void @libmetis__InduceRowPartFromColumnPart(i32 noundef %143, ptr noundef nonnull %57, ptr noundef %63, ptr noundef %12, ptr noundef %11, i32 noundef %144, ptr noundef %8)
  call void (ptr, ...) @gk_free(ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef null) #6
  br i1 %.not101108, label %.critedge, label %145

145:                                              ; preds = %._crit_edge131
  %146 = load i32, ptr %0, align 4, !tbaa !9
  %147 = load i32, ptr %1, align 4, !tbaa !9
  call void @libmetis__ChangeMesh2FNumbering2(i32 noundef %146, i32 noundef %147, ptr noundef %2, ptr noundef %3, ptr noundef %11, ptr noundef %12) #6
  %148 = getelementptr inbounds i8, ptr %9, i64 68
  store i32 1, ptr %148, align 4, !tbaa !9
  br label %.critedge

.critedge:                                        ; preds = %21, %145, %._crit_edge131
  %149 = load ptr, ptr %14, align 8, !tbaa !5
  %150 = call i32 @METIS_Free(ptr noundef %149) #6
  %151 = load ptr, ptr %15, align 8, !tbaa !5
  %152 = call i32 @METIS_Free(ptr noundef %151) #6
  %153 = call i32 (...) @gk_siguntrap() #6
  call void @gk_malloc_cleanup(i32 noundef 0) #6
  %154 = call i32 @libmetis__metis_rcode(i32 noundef %28) #6
  br label %155

155:                                              ; preds = %13, %.critedge
  %.093 = phi i32 [ %154, %.critedge ], [ -3, %13 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  ret i32 %.093
}

declare i32 @METIS_MeshToDual(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @libmetis__ismalloc(i64 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

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

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

!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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12, !15, !16}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12, !16, !15}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12, !15, !16}
!22 = distinct !{!22, !12, !16, !15}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,SROAPass,SimplifyCFGPass