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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.ctrl_t = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, i32, i32, float, ptr, ptr, ptr, float, double, double, double, double, double, double, double, double, double, double, double, double, ptr, i64, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%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.4 = external hidden unnamed_addr constant [139 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [21 x i8], align 1
@__PRETTY_FUNCTION__.libmetis__SplitGraphOrder = external hidden unnamed_addr constant [76 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 double @gk_CPUSeconds() #1

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.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__SplitGraphOrder(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #3 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca [3 x i32], align 4
  %19 = alloca [3 x i32], align 4
  %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 [2 x ptr], align 16
  %29 = alloca [2 x ptr], align 16
  %30 = alloca [2 x ptr], align 16
  %31 = alloca [2 x ptr], align 16
  %32 = alloca [2 x ptr], align 16
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  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 4, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 12, 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
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %31) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %32) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #4
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  call void @libmetis__wspacepush(ptr noundef %37)
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.ctrl_t, ptr %38, i32 0, i32 2
  %40 = load i32, ptr %39, align 8, !tbaa !9
  %41 = and i32 %40, 2
  %42 = icmp ne i32 %41, 0
  br i1 %42, label %43, label %49

43:                                               ; preds = %4
  %44 = call double @gk_CPUSeconds()
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.ctrl_t, ptr %45, i32 0, i32 35
  %47 = load double, ptr %46, align 8, !tbaa !15
  %48 = fsub double %47, %44
  store double %48, ptr %46, align 8, !tbaa !15
  br label %49

49:                                               ; preds = %43, %4
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.graph_t, ptr %50, i32 0, i32 0
  %52 = load i32, ptr %51, align 8, !tbaa !16
  store i32 %52, ptr %17, align 4, !tbaa !18
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.graph_t, ptr %53, i32 0, i32 3
  %55 = load ptr, ptr %54, align 8, !tbaa !19
  store ptr %55, ptr %20, align 8, !tbaa !5
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.graph_t, ptr %56, i32 0, i32 4
  %58 = load ptr, ptr %57, align 8, !tbaa !20
  store ptr %58, ptr %21, align 8, !tbaa !5
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.graph_t, ptr %59, i32 0, i32 6
  %61 = load ptr, ptr %60, align 8, !tbaa !21
  store ptr %61, ptr %22, align 8, !tbaa !5
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.graph_t, ptr %62, i32 0, i32 7
  %64 = load ptr, ptr %63, align 8, !tbaa !22
  store ptr %64, ptr %23, align 8, !tbaa !5
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.graph_t, ptr %65, i32 0, i32 15
  %67 = load ptr, ptr %66, align 8, !tbaa !23
  store ptr %67, ptr %24, align 8, !tbaa !5
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.graph_t, ptr %68, i32 0, i32 19
  %70 = load ptr, ptr %69, align 8, !tbaa !24
  store ptr %70, ptr %25, align 8, !tbaa !5
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.graph_t, ptr %71, i32 0, i32 22
  %73 = load ptr, ptr %72, align 8, !tbaa !25
  store ptr %73, ptr %26, align 8, !tbaa !5
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.graph_t, ptr %74, i32 0, i32 23
  %76 = load ptr, ptr %75, align 8, !tbaa !26
  store ptr %76, ptr %27, align 8, !tbaa !5
  %77 = load ptr, ptr %26, align 8, !tbaa !5
  %78 = icmp ne ptr %77, null
  br i1 %78, label %86, label %79

79:                                               ; preds = %49
  %80 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, i32 noundef 445, ptr noundef @.str.4)
  %81 = load ptr, ptr %26, align 8, !tbaa !5
  %82 = icmp ne ptr %81, null
  br i1 %82, label %83, label %84

83:                                               ; preds = %79
  br label %85

84:                                               ; preds = %79
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.4, i32 noundef 445, ptr noundef @__PRETTY_FUNCTION__.libmetis__SplitGraphOrder) #5
  unreachable

85:                                               ; preds = %83
  br label %86

86:                                               ; preds = %85, %49
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = load i32, ptr %17, align 4, !tbaa !18
  %89 = call ptr @libmetis__iwspacemalloc(ptr noundef %87, i32 noundef %88)
  store ptr %89, ptr %33, align 8, !tbaa !5
  %90 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 2
  store i32 0, ptr %90, align 4, !tbaa !18
  %91 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 1
  store i32 0, ptr %91, align 4, !tbaa !18
  %92 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 0
  store i32 0, ptr %92, align 4, !tbaa !18
  %93 = getelementptr inbounds [3 x i32], ptr %18, i64 0, i64 2
  store i32 0, ptr %93, align 4, !tbaa !18
  %94 = getelementptr inbounds [3 x i32], ptr %18, i64 0, i64 1
  store i32 0, ptr %94, align 4, !tbaa !18
  %95 = getelementptr inbounds [3 x i32], ptr %18, i64 0, i64 0
  store i32 0, ptr %95, align 4, !tbaa !18
  store i32 0, ptr %9, align 4, !tbaa !18
  br label %96

96:                                               ; preds = %132, %86
  %97 = load i32, ptr %9, align 4, !tbaa !18
  %98 = load i32, ptr %17, align 4, !tbaa !18
  %99 = icmp slt i32 %97, %98
  br i1 %99, label %100, label %135

100:                                              ; preds = %96
  %101 = load ptr, ptr %25, align 8, !tbaa !5
  %102 = load i32, ptr %9, align 4, !tbaa !18
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds i32, ptr %101, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !18
  store i32 %105, ptr %12, align 4, !tbaa !18
  %106 = load i32, ptr %12, align 4, !tbaa !18
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [3 x i32], ptr %18, i64 0, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !18
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %108, align 4, !tbaa !18
  %111 = load ptr, ptr %33, align 8, !tbaa !5
  %112 = load i32, ptr %9, align 4, !tbaa !18
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds i32, ptr %111, i64 %113
  store i32 %109, ptr %114, align 4, !tbaa !18
  %115 = load ptr, ptr %20, align 8, !tbaa !5
  %116 = load i32, ptr %9, align 4, !tbaa !18
  %117 = add nsw i32 %116, 1
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds i32, ptr %115, i64 %118
  %120 = load i32, ptr %119, align 4, !tbaa !18
  %121 = load ptr, ptr %20, align 8, !tbaa !5
  %122 = load i32, ptr %9, align 4, !tbaa !18
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds i32, ptr %121, i64 %123
  %125 = load i32, ptr %124, align 4, !tbaa !18
  %126 = sub nsw i32 %120, %125
  %127 = load i32, ptr %12, align 4, !tbaa !18
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 %128
  %130 = load i32, ptr %129, align 4, !tbaa !18
  %131 = add nsw i32 %130, %126
  store i32 %131, ptr %129, align 4, !tbaa !18
  br label %132

132:                                              ; preds = %100
  %133 = load i32, ptr %9, align 4, !tbaa !18
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %9, align 4, !tbaa !18
  br label %96, !llvm.loop !27

135:                                              ; preds = %96
  %136 = load ptr, ptr %6, align 8, !tbaa !5
  %137 = getelementptr inbounds [3 x i32], ptr %18, i64 0, i64 0
  %138 = load i32, ptr %137, align 4, !tbaa !18
  %139 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 0
  %140 = load i32, ptr %139, align 4, !tbaa !18
  %141 = call ptr @libmetis__SetupSplitGraph(ptr noundef %136, i32 noundef %138, i32 noundef %140)
  store ptr %141, ptr %35, align 8, !tbaa !5
  %142 = load ptr, ptr %35, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.graph_t, ptr %142, i32 0, i32 3
  %144 = load ptr, ptr %143, align 8, !tbaa !19
  %145 = getelementptr inbounds [2 x ptr], ptr %28, i64 0, i64 0
  store ptr %144, ptr %145, align 16, !tbaa !5
  %146 = load ptr, ptr %35, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.graph_t, ptr %146, i32 0, i32 4
  %148 = load ptr, ptr %147, align 8, !tbaa !20
  %149 = getelementptr inbounds [2 x ptr], ptr %29, i64 0, i64 0
  store ptr %148, ptr %149, align 16, !tbaa !5
  %150 = load ptr, ptr %35, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.graph_t, ptr %150, i32 0, i32 6
  %152 = load ptr, ptr %151, align 8, !tbaa !21
  %153 = getelementptr inbounds [2 x ptr], ptr %30, i64 0, i64 0
  store ptr %152, ptr %153, align 16, !tbaa !5
  %154 = load ptr, ptr %35, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.graph_t, ptr %154, i32 0, i32 7
  %156 = load ptr, ptr %155, align 8, !tbaa !22
  %157 = getelementptr inbounds [2 x ptr], ptr %31, i64 0, i64 0
  store ptr %156, ptr %157, align 16, !tbaa !5
  %158 = load ptr, ptr %35, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.graph_t, ptr %158, i32 0, i32 15
  %160 = load ptr, ptr %159, align 8, !tbaa !23
  %161 = getelementptr inbounds [2 x ptr], ptr %32, i64 0, i64 0
  store ptr %160, ptr %161, align 16, !tbaa !5
  %162 = load ptr, ptr %6, align 8, !tbaa !5
  %163 = getelementptr inbounds [3 x i32], ptr %18, i64 0, i64 1
  %164 = load i32, ptr %163, align 4, !tbaa !18
  %165 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 1
  %166 = load i32, ptr %165, align 4, !tbaa !18
  %167 = call ptr @libmetis__SetupSplitGraph(ptr noundef %162, i32 noundef %164, i32 noundef %166)
  store ptr %167, ptr %36, align 8, !tbaa !5
  %168 = load ptr, ptr %36, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.graph_t, ptr %168, i32 0, i32 3
  %170 = load ptr, ptr %169, align 8, !tbaa !19
  %171 = getelementptr inbounds [2 x ptr], ptr %28, i64 0, i64 1
  store ptr %170, ptr %171, align 8, !tbaa !5
  %172 = load ptr, ptr %36, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.graph_t, ptr %172, i32 0, i32 4
  %174 = load ptr, ptr %173, align 8, !tbaa !20
  %175 = getelementptr inbounds [2 x ptr], ptr %29, i64 0, i64 1
  store ptr %174, ptr %175, align 8, !tbaa !5
  %176 = load ptr, ptr %36, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.graph_t, ptr %176, i32 0, i32 6
  %178 = load ptr, ptr %177, align 8, !tbaa !21
  %179 = getelementptr inbounds [2 x ptr], ptr %30, i64 0, i64 1
  store ptr %178, ptr %179, align 8, !tbaa !5
  %180 = load ptr, ptr %36, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.graph_t, ptr %180, i32 0, i32 7
  %182 = load ptr, ptr %181, align 8, !tbaa !22
  %183 = getelementptr inbounds [2 x ptr], ptr %31, i64 0, i64 1
  store ptr %182, ptr %183, align 8, !tbaa !5
  %184 = load ptr, ptr %36, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.graph_t, ptr %184, i32 0, i32 15
  %186 = load ptr, ptr %185, align 8, !tbaa !23
  %187 = getelementptr inbounds [2 x ptr], ptr %32, i64 0, i64 1
  store ptr %186, ptr %187, align 8, !tbaa !5
  store i32 0, ptr %10, align 4, !tbaa !18
  br label %188

188:                                              ; preds = %227, %135
  %189 = load i32, ptr %10, align 4, !tbaa !18
  %190 = load ptr, ptr %6, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.graph_t, ptr %190, i32 0, i32 21
  %192 = load i32, ptr %191, align 8, !tbaa !29
  %193 = icmp slt i32 %189, %192
  br i1 %193, label %194, label %230

194:                                              ; preds = %188
  %195 = load ptr, ptr %27, align 8, !tbaa !5
  %196 = load i32, ptr %10, align 4, !tbaa !18
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds i32, ptr %195, i64 %197
  %199 = load i32, ptr %198, align 4, !tbaa !18
  store i32 %199, ptr %9, align 4, !tbaa !18
  %200 = load ptr, ptr %20, align 8, !tbaa !5
  %201 = load i32, ptr %9, align 4, !tbaa !18
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds i32, ptr %200, i64 %202
  %204 = load i32, ptr %203, align 4, !tbaa !18
  store i32 %204, ptr %11, align 4, !tbaa !18
  br label %205

205:                                              ; preds = %223, %194
  %206 = load i32, ptr %11, align 4, !tbaa !18
  %207 = load ptr, ptr %20, align 8, !tbaa !5
  %208 = load i32, ptr %9, align 4, !tbaa !18
  %209 = add nsw i32 %208, 1
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds i32, ptr %207, i64 %210
  %212 = load i32, ptr %211, align 4, !tbaa !18
  %213 = icmp slt i32 %206, %212
  br i1 %213, label %214, label %226

214:                                              ; preds = %205
  %215 = load ptr, ptr %26, align 8, !tbaa !5
  %216 = load ptr, ptr %22, align 8, !tbaa !5
  %217 = load i32, ptr %11, align 4, !tbaa !18
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds i32, ptr %216, i64 %218
  %220 = load i32, ptr %219, align 4, !tbaa !18
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds i32, ptr %215, i64 %221
  store i32 1, ptr %222, align 4, !tbaa !18
  br label %223

223:                                              ; preds = %214
  %224 = load i32, ptr %11, align 4, !tbaa !18
  %225 = add nsw i32 %224, 1
  store i32 %225, ptr %11, align 4, !tbaa !18
  br label %205, !llvm.loop !30

226:                                              ; preds = %205
  br label %227

227:                                              ; preds = %226
  %228 = load i32, ptr %10, align 4, !tbaa !18
  %229 = add nsw i32 %228, 1
  store i32 %229, ptr %10, align 4, !tbaa !18
  br label %188, !llvm.loop !31

230:                                              ; preds = %188
  %231 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 1
  store i32 0, ptr %231, align 4, !tbaa !18
  %232 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 0
  store i32 0, ptr %232, align 4, !tbaa !18
  %233 = getelementptr inbounds [3 x i32], ptr %18, i64 0, i64 1
  store i32 0, ptr %233, align 4, !tbaa !18
  %234 = getelementptr inbounds [3 x i32], ptr %18, i64 0, i64 0
  store i32 0, ptr %234, align 4, !tbaa !18
  %235 = getelementptr inbounds [2 x ptr], ptr %28, i64 0, i64 1
  %236 = load ptr, ptr %235, align 8, !tbaa !5
  %237 = getelementptr inbounds i32, ptr %236, i64 0
  store i32 0, ptr %237, align 4, !tbaa !18
  %238 = getelementptr inbounds [2 x ptr], ptr %28, i64 0, i64 0
  %239 = load ptr, ptr %238, align 16, !tbaa !5
  %240 = getelementptr inbounds i32, ptr %239, i64 0
  store i32 0, ptr %240, align 4, !tbaa !18
  store i32 0, ptr %9, align 4, !tbaa !18
  br label %241

241:                                              ; preds = %402, %230
  %242 = load i32, ptr %9, align 4, !tbaa !18
  %243 = load i32, ptr %17, align 4, !tbaa !18
  %244 = icmp slt i32 %242, %243
  br i1 %244, label %245, label %405

245:                                              ; preds = %241
  %246 = load ptr, ptr %25, align 8, !tbaa !5
  %247 = load i32, ptr %9, align 4, !tbaa !18
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds i32, ptr %246, i64 %248
  %250 = load i32, ptr %249, align 4, !tbaa !18
  store i32 %250, ptr %16, align 4, !tbaa !18
  %251 = icmp eq i32 %250, 2
  br i1 %251, label %252, label %253

252:                                              ; preds = %245
  br label %402

253:                                              ; preds = %245
  %254 = load ptr, ptr %20, align 8, !tbaa !5
  %255 = load i32, ptr %9, align 4, !tbaa !18
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds i32, ptr %254, i64 %256
  %258 = load i32, ptr %257, align 4, !tbaa !18
  store i32 %258, ptr %14, align 4, !tbaa !18
  %259 = load ptr, ptr %20, align 8, !tbaa !5
  %260 = load i32, ptr %9, align 4, !tbaa !18
  %261 = add nsw i32 %260, 1
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds i32, ptr %259, i64 %262
  %264 = load i32, ptr %263, align 4, !tbaa !18
  store i32 %264, ptr %15, align 4, !tbaa !18
  %265 = load ptr, ptr %26, align 8, !tbaa !5
  %266 = load i32, ptr %9, align 4, !tbaa !18
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds i32, ptr %265, i64 %267
  %269 = load i32, ptr %268, align 4, !tbaa !18
  %270 = icmp eq i32 %269, -1
  br i1 %270, label %271, label %313

271:                                              ; preds = %253
  %272 = load i32, ptr %16, align 4, !tbaa !18
  %273 = sext i32 %272 to i64
  %274 = getelementptr inbounds [2 x ptr], ptr %30, i64 0, i64 %273
  %275 = load ptr, ptr %274, align 8, !tbaa !5
  %276 = load i32, ptr %16, align 4, !tbaa !18
  %277 = sext i32 %276 to i64
  %278 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 %277
  %279 = load i32, ptr %278, align 4, !tbaa !18
  %280 = sext i32 %279 to i64
  %281 = getelementptr inbounds i32, ptr %275, i64 %280
  %282 = load i32, ptr %14, align 4, !tbaa !18
  %283 = sext i32 %282 to i64
  %284 = sub i64 0, %283
  %285 = getelementptr inbounds i32, ptr %281, i64 %284
  store ptr %285, ptr %34, align 8, !tbaa !5
  %286 = load i32, ptr %14, align 4, !tbaa !18
  store i32 %286, ptr %11, align 4, !tbaa !18
  br label %287

287:                                              ; preds = %301, %271
  %288 = load i32, ptr %11, align 4, !tbaa !18
  %289 = load i32, ptr %15, align 4, !tbaa !18
  %290 = icmp slt i32 %288, %289
  br i1 %290, label %291, label %304

291:                                              ; preds = %287
  %292 = load ptr, ptr %22, align 8, !tbaa !5
  %293 = load i32, ptr %11, align 4, !tbaa !18
  %294 = sext i32 %293 to i64
  %295 = getelementptr inbounds i32, ptr %292, i64 %294
  %296 = load i32, ptr %295, align 4, !tbaa !18
  %297 = load ptr, ptr %34, align 8, !tbaa !5
  %298 = load i32, ptr %11, align 4, !tbaa !18
  %299 = sext i32 %298 to i64
  %300 = getelementptr inbounds i32, ptr %297, i64 %299
  store i32 %296, ptr %300, align 4, !tbaa !18
  br label %301

301:                                              ; preds = %291
  %302 = load i32, ptr %11, align 4, !tbaa !18
  %303 = add nsw i32 %302, 1
  store i32 %303, ptr %11, align 4, !tbaa !18
  br label %287, !llvm.loop !32

304:                                              ; preds = %287
  %305 = load i32, ptr %15, align 4, !tbaa !18
  %306 = load i32, ptr %14, align 4, !tbaa !18
  %307 = sub nsw i32 %305, %306
  %308 = load i32, ptr %16, align 4, !tbaa !18
  %309 = sext i32 %308 to i64
  %310 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 %309
  %311 = load i32, ptr %310, align 4, !tbaa !18
  %312 = add nsw i32 %311, %307
  store i32 %312, ptr %310, align 4, !tbaa !18
  br label %356

313:                                              ; preds = %253
  %314 = load i32, ptr %16, align 4, !tbaa !18
  %315 = sext i32 %314 to i64
  %316 = getelementptr inbounds [2 x ptr], ptr %30, i64 0, i64 %315
  %317 = load ptr, ptr %316, align 8, !tbaa !5
  store ptr %317, ptr %34, align 8, !tbaa !5
  %318 = load i32, ptr %16, align 4, !tbaa !18
  %319 = sext i32 %318 to i64
  %320 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 %319
  %321 = load i32, ptr %320, align 4, !tbaa !18
  store i32 %321, ptr %13, align 4, !tbaa !18
  %322 = load i32, ptr %14, align 4, !tbaa !18
  store i32 %322, ptr %11, align 4, !tbaa !18
  br label %323

323:                                              ; preds = %348, %313
  %324 = load i32, ptr %11, align 4, !tbaa !18
  %325 = load i32, ptr %15, align 4, !tbaa !18
  %326 = icmp slt i32 %324, %325
  br i1 %326, label %327, label %351

327:                                              ; preds = %323
  %328 = load ptr, ptr %22, align 8, !tbaa !5
  %329 = load i32, ptr %11, align 4, !tbaa !18
  %330 = sext i32 %329 to i64
  %331 = getelementptr inbounds i32, ptr %328, i64 %330
  %332 = load i32, ptr %331, align 4, !tbaa !18
  store i32 %332, ptr %12, align 4, !tbaa !18
  %333 = load ptr, ptr %25, align 8, !tbaa !5
  %334 = load i32, ptr %12, align 4, !tbaa !18
  %335 = sext i32 %334 to i64
  %336 = getelementptr inbounds i32, ptr %333, i64 %335
  %337 = load i32, ptr %336, align 4, !tbaa !18
  %338 = load i32, ptr %16, align 4, !tbaa !18
  %339 = icmp eq i32 %337, %338
  br i1 %339, label %340, label %347

340:                                              ; preds = %327
  %341 = load i32, ptr %12, align 4, !tbaa !18
  %342 = load ptr, ptr %34, align 8, !tbaa !5
  %343 = load i32, ptr %13, align 4, !tbaa !18
  %344 = add nsw i32 %343, 1
  store i32 %344, ptr %13, align 4, !tbaa !18
  %345 = sext i32 %343 to i64
  %346 = getelementptr inbounds i32, ptr %342, i64 %345
  store i32 %341, ptr %346, align 4, !tbaa !18
  br label %347

347:                                              ; preds = %340, %327
  br label %348

348:                                              ; preds = %347
  %349 = load i32, ptr %11, align 4, !tbaa !18
  %350 = add nsw i32 %349, 1
  store i32 %350, ptr %11, align 4, !tbaa !18
  br label %323, !llvm.loop !33

351:                                              ; preds = %323
  %352 = load i32, ptr %13, align 4, !tbaa !18
  %353 = load i32, ptr %16, align 4, !tbaa !18
  %354 = sext i32 %353 to i64
  %355 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 %354
  store i32 %352, ptr %355, align 4, !tbaa !18
  br label %356

356:                                              ; preds = %351, %304
  %357 = load ptr, ptr %21, align 8, !tbaa !5
  %358 = load i32, ptr %9, align 4, !tbaa !18
  %359 = sext i32 %358 to i64
  %360 = getelementptr inbounds i32, ptr %357, i64 %359
  %361 = load i32, ptr %360, align 4, !tbaa !18
  %362 = load i32, ptr %16, align 4, !tbaa !18
  %363 = sext i32 %362 to i64
  %364 = getelementptr inbounds [2 x ptr], ptr %29, i64 0, i64 %363
  %365 = load ptr, ptr %364, align 8, !tbaa !5
  %366 = load i32, ptr %16, align 4, !tbaa !18
  %367 = sext i32 %366 to i64
  %368 = getelementptr inbounds [3 x i32], ptr %18, i64 0, i64 %367
  %369 = load i32, ptr %368, align 4, !tbaa !18
  %370 = sext i32 %369 to i64
  %371 = getelementptr inbounds i32, ptr %365, i64 %370
  store i32 %361, ptr %371, align 4, !tbaa !18
  %372 = load ptr, ptr %24, align 8, !tbaa !5
  %373 = load i32, ptr %9, align 4, !tbaa !18
  %374 = sext i32 %373 to i64
  %375 = getelementptr inbounds i32, ptr %372, i64 %374
  %376 = load i32, ptr %375, align 4, !tbaa !18
  %377 = load i32, ptr %16, align 4, !tbaa !18
  %378 = sext i32 %377 to i64
  %379 = getelementptr inbounds [2 x ptr], ptr %32, i64 0, i64 %378
  %380 = load ptr, ptr %379, align 8, !tbaa !5
  %381 = load i32, ptr %16, align 4, !tbaa !18
  %382 = sext i32 %381 to i64
  %383 = getelementptr inbounds [3 x i32], ptr %18, i64 0, i64 %382
  %384 = load i32, ptr %383, align 4, !tbaa !18
  %385 = sext i32 %384 to i64
  %386 = getelementptr inbounds i32, ptr %380, i64 %385
  store i32 %376, ptr %386, align 4, !tbaa !18
  %387 = load i32, ptr %16, align 4, !tbaa !18
  %388 = sext i32 %387 to i64
  %389 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 %388
  %390 = load i32, ptr %389, align 4, !tbaa !18
  %391 = load i32, ptr %16, align 4, !tbaa !18
  %392 = sext i32 %391 to i64
  %393 = getelementptr inbounds [2 x ptr], ptr %28, i64 0, i64 %392
  %394 = load ptr, ptr %393, align 8, !tbaa !5
  %395 = load i32, ptr %16, align 4, !tbaa !18
  %396 = sext i32 %395 to i64
  %397 = getelementptr inbounds [3 x i32], ptr %18, i64 0, i64 %396
  %398 = load i32, ptr %397, align 4, !tbaa !18
  %399 = add nsw i32 %398, 1
  store i32 %399, ptr %397, align 4, !tbaa !18
  %400 = sext i32 %399 to i64
  %401 = getelementptr inbounds i32, ptr %394, i64 %400
  store i32 %390, ptr %401, align 4, !tbaa !18
  br label %402

402:                                              ; preds = %356, %252
  %403 = load i32, ptr %9, align 4, !tbaa !18
  %404 = add nsw i32 %403, 1
  store i32 %404, ptr %9, align 4, !tbaa !18
  br label %241, !llvm.loop !34

405:                                              ; preds = %241
  store i32 0, ptr %16, align 4, !tbaa !18
  br label %406

406:                                              ; preds = %447, %405
  %407 = load i32, ptr %16, align 4, !tbaa !18
  %408 = icmp slt i32 %407, 2
  br i1 %408, label %409, label %450

409:                                              ; preds = %406
  %410 = load i32, ptr %16, align 4, !tbaa !18
  %411 = sext i32 %410 to i64
  %412 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 %411
  %413 = load i32, ptr %412, align 4, !tbaa !18
  store i32 %413, ptr %15, align 4, !tbaa !18
  %414 = load i32, ptr %15, align 4, !tbaa !18
  %415 = sext i32 %414 to i64
  %416 = load i32, ptr %16, align 4, !tbaa !18
  %417 = sext i32 %416 to i64
  %418 = getelementptr inbounds [2 x ptr], ptr %31, i64 0, i64 %417
  %419 = load ptr, ptr %418, align 8, !tbaa !5
  %420 = call ptr @libmetis__iset(i64 noundef %415, i32 noundef 1, ptr noundef %419)
  %421 = load i32, ptr %16, align 4, !tbaa !18
  %422 = sext i32 %421 to i64
  %423 = getelementptr inbounds [2 x ptr], ptr %30, i64 0, i64 %422
  %424 = load ptr, ptr %423, align 8, !tbaa !5
  store ptr %424, ptr %34, align 8, !tbaa !5
  store i32 0, ptr %9, align 4, !tbaa !18
  br label %425

425:                                              ; preds = %443, %409
  %426 = load i32, ptr %9, align 4, !tbaa !18
  %427 = load i32, ptr %15, align 4, !tbaa !18
  %428 = icmp slt i32 %426, %427
  br i1 %428, label %429, label %446

429:                                              ; preds = %425
  %430 = load ptr, ptr %33, align 8, !tbaa !5
  %431 = load ptr, ptr %34, align 8, !tbaa !5
  %432 = load i32, ptr %9, align 4, !tbaa !18
  %433 = sext i32 %432 to i64
  %434 = getelementptr inbounds i32, ptr %431, i64 %433
  %435 = load i32, ptr %434, align 4, !tbaa !18
  %436 = sext i32 %435 to i64
  %437 = getelementptr inbounds i32, ptr %430, i64 %436
  %438 = load i32, ptr %437, align 4, !tbaa !18
  %439 = load ptr, ptr %34, align 8, !tbaa !5
  %440 = load i32, ptr %9, align 4, !tbaa !18
  %441 = sext i32 %440 to i64
  %442 = getelementptr inbounds i32, ptr %439, i64 %441
  store i32 %438, ptr %442, align 4, !tbaa !18
  br label %443

443:                                              ; preds = %429
  %444 = load i32, ptr %9, align 4, !tbaa !18
  %445 = add nsw i32 %444, 1
  store i32 %445, ptr %9, align 4, !tbaa !18
  br label %425, !llvm.loop !35

446:                                              ; preds = %425
  br label %447

447:                                              ; preds = %446
  %448 = load i32, ptr %16, align 4, !tbaa !18
  %449 = add nsw i32 %448, 1
  store i32 %449, ptr %16, align 4, !tbaa !18
  br label %406, !llvm.loop !36

450:                                              ; preds = %406
  %451 = getelementptr inbounds [3 x i32], ptr %18, i64 0, i64 0
  %452 = load i32, ptr %451, align 4, !tbaa !18
  %453 = load ptr, ptr %35, align 8, !tbaa !5
  %454 = getelementptr inbounds %struct.graph_t, ptr %453, i32 0, i32 0
  store i32 %452, ptr %454, align 8, !tbaa !16
  %455 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 0
  %456 = load i32, ptr %455, align 4, !tbaa !18
  %457 = load ptr, ptr %35, align 8, !tbaa !5
  %458 = getelementptr inbounds %struct.graph_t, ptr %457, i32 0, i32 1
  store i32 %456, ptr %458, align 4, !tbaa !37
  %459 = getelementptr inbounds [3 x i32], ptr %18, i64 0, i64 1
  %460 = load i32, ptr %459, align 4, !tbaa !18
  %461 = load ptr, ptr %36, align 8, !tbaa !5
  %462 = getelementptr inbounds %struct.graph_t, ptr %461, i32 0, i32 0
  store i32 %460, ptr %462, align 8, !tbaa !16
  %463 = getelementptr inbounds [3 x i32], ptr %19, i64 0, i64 1
  %464 = load i32, ptr %463, align 4, !tbaa !18
  %465 = load ptr, ptr %36, align 8, !tbaa !5
  %466 = getelementptr inbounds %struct.graph_t, ptr %465, i32 0, i32 1
  store i32 %464, ptr %466, align 4, !tbaa !37
  %467 = load ptr, ptr %35, align 8, !tbaa !5
  call void @libmetis__SetupGraph_tvwgt(ptr noundef %467)
  %468 = load ptr, ptr %36, align 8, !tbaa !5
  call void @libmetis__SetupGraph_tvwgt(ptr noundef %468)
  %469 = load ptr, ptr %5, align 8, !tbaa !5
  %470 = getelementptr inbounds %struct.ctrl_t, ptr %469, i32 0, i32 2
  %471 = load i32, ptr %470, align 8, !tbaa !9
  %472 = and i32 %471, 2
  %473 = icmp ne i32 %472, 0
  br i1 %473, label %474, label %480

474:                                              ; preds = %450
  %475 = call double @gk_CPUSeconds()
  %476 = load ptr, ptr %5, align 8, !tbaa !5
  %477 = getelementptr inbounds %struct.ctrl_t, ptr %476, i32 0, i32 35
  %478 = load double, ptr %477, align 8, !tbaa !15
  %479 = fadd double %478, %475
  store double %479, ptr %477, align 8, !tbaa !15
  br label %480

480:                                              ; preds = %474, %450
  %481 = load ptr, ptr %35, align 8, !tbaa !5
  %482 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %481, ptr %482, align 8, !tbaa !5
  %483 = load ptr, ptr %36, align 8, !tbaa !5
  %484 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %483, ptr %484, align 8, !tbaa !5
  %485 = load ptr, ptr %5, align 8, !tbaa !5
  call void @libmetis__wspacepop(ptr noundef %485)
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  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 12, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, 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
  ret void
}

declare void @libmetis__wspacepush(ptr noundef) #1

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

declare void @libmetis__wspacepop(ptr noundef) #1

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

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

declare void @libmetis__SetupGraph_tvwgt(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 = { 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 = { 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 #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 8}
!10 = !{!"ctrl_t", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !6, i64 80, !11, i64 88, !11, i64 92, !12, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !12, i64 128, !13, i64 136, !13, i64 144, !13, i64 152, !13, i64 160, !13, i64 168, !13, i64 176, !13, i64 184, !13, i64 192, !13, i64 200, !13, i64 208, !13, i64 216, !13, i64 224, !6, i64 232, !14, i64 240, !14, i64 248, !14, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !6, i64 320}
!11 = !{!"int", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!10, !13, i64 200}
!16 = !{!17, !11, i64 0}
!17 = !{!"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}
!18 = !{!11, !11, i64 0}
!19 = !{!17, !6, i64 16}
!20 = !{!17, !6, i64 24}
!21 = !{!17, !6, i64 40}
!22 = !{!17, !6, i64 48}
!23 = !{!17, !6, i64 96}
!24 = !{!17, !6, i64 120}
!25 = !{!17, !6, i64 144}
!26 = !{!17, !6, i64 152}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!17, !11, i64 136}
!30 = distinct !{!30, !28}
!31 = distinct !{!31, !28}
!32 = distinct !{!32, !28}
!33 = distinct !{!33, !28}
!34 = distinct !{!34, !28}
!35 = distinct !{!35, !28}
!36 = distinct !{!36, !28}
!37 = !{!17, !11, i64 4}


; 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.4 = external hidden unnamed_addr constant [139 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [21 x i8], align 1
@__PRETTY_FUNCTION__.libmetis__SplitGraphOrder = external hidden unnamed_addr constant [76 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 double @gk_CPUSeconds() local_unnamed_addr #1

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__SplitGraphOrder(ptr noundef %0, ptr noundef %1, ptr nocapture noundef writeonly %2, ptr nocapture noundef writeonly %3) local_unnamed_addr #4 {
  %5 = alloca [3 x i32], align 4
  %6 = alloca [3 x i32], align 4
  %7 = alloca [2 x ptr], align 16
  %8 = alloca [2 x ptr], align 16
  %9 = alloca [2 x ptr], align 16
  %10 = alloca [2 x ptr], align 16
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #5
  tail call void @libmetis__wspacepush(ptr noundef %0) #5
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  %12 = load i32, ptr %11, align 8, !tbaa !5
  %13 = and i32 %12, 2
  %.not = icmp eq i32 %13, 0
  br i1 %.not, label %19, label %14

14:                                               ; preds = %4
  %15 = tail call double @gk_CPUSeconds() #5
  %16 = getelementptr inbounds i8, ptr %0, i64 200
  %17 = load double, ptr %16, align 8, !tbaa !14
  %18 = fsub double %17, %15
  store double %18, ptr %16, align 8, !tbaa !14
  br label %19

19:                                               ; preds = %14, %4
  %20 = load i32, ptr %1, align 8, !tbaa !15
  %21 = getelementptr inbounds i8, ptr %1, i64 16
  %22 = load ptr, ptr %21, align 8, !tbaa !17
  %23 = getelementptr inbounds i8, ptr %1, i64 24
  %24 = load ptr, ptr %23, align 8, !tbaa !18
  %25 = getelementptr inbounds i8, ptr %1, i64 40
  %26 = load ptr, ptr %25, align 8, !tbaa !19
  %27 = ptrtoint ptr %26 to i64
  %28 = getelementptr inbounds i8, ptr %1, i64 96
  %29 = load ptr, ptr %28, align 8, !tbaa !20
  %30 = getelementptr inbounds i8, ptr %1, i64 120
  %31 = load ptr, ptr %30, align 8, !tbaa !21
  %32 = getelementptr inbounds i8, ptr %1, i64 144
  %33 = load ptr, ptr %32, align 8, !tbaa !22
  %34 = getelementptr inbounds i8, ptr %1, i64 152
  %35 = load ptr, ptr %34, align 8, !tbaa !23
  %.not143 = icmp eq ptr %33, null
  br i1 %.not143, label %36, label %38

36:                                               ; preds = %19
  %37 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef 445, ptr noundef nonnull @.str.4)
  tail call void @__assert_fail(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.4, i32 noundef 445, ptr noundef nonnull @__PRETTY_FUNCTION__.libmetis__SplitGraphOrder) #6
  unreachable

38:                                               ; preds = %19
  %39 = tail call ptr @libmetis__iwspacemalloc(ptr noundef nonnull %0, i32 noundef %20) #5
  %40 = getelementptr inbounds i8, ptr %6, i64 8
  store i32 0, ptr %40, align 4, !tbaa !24
  %41 = getelementptr inbounds i8, ptr %6, i64 4
  store i32 0, ptr %41, align 4, !tbaa !24
  store i32 0, ptr %6, align 4, !tbaa !24
  %42 = getelementptr inbounds i8, ptr %5, i64 8
  store i32 0, ptr %42, align 4, !tbaa !24
  %43 = getelementptr inbounds i8, ptr %5, i64 4
  store i32 0, ptr %43, align 4, !tbaa !24
  store i32 0, ptr %5, align 4, !tbaa !24
  %44 = icmp sgt i32 %20, 0
  br i1 %44, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %38
  %wide.trip.count = zext nneg i32 %20 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %45 = getelementptr inbounds i32, ptr %31, i64 %indvars.iv
  %46 = load i32, ptr %45, align 4, !tbaa !24
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [3 x i32], ptr %5, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !24
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %48, align 4, !tbaa !24
  %51 = getelementptr inbounds i32, ptr %39, i64 %indvars.iv
  store i32 %49, ptr %51, align 4, !tbaa !24
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %52 = getelementptr inbounds i32, ptr %22, i64 %indvars.iv.next
  %53 = load i32, ptr %52, align 4, !tbaa !24
  %54 = getelementptr inbounds i32, ptr %22, i64 %indvars.iv
  %55 = load i32, ptr %54, align 4, !tbaa !24
  %56 = sub i32 %53, %55
  %57 = getelementptr inbounds [3 x i32], ptr %6, i64 0, i64 %47
  %58 = load i32, ptr %57, align 4, !tbaa !24
  %59 = add nsw i32 %56, %58
  store i32 %59, ptr %57, align 4, !tbaa !24
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !25

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %.pre = load i32, ptr %5, align 4, !tbaa !24
  %.pre202 = load i32, ptr %6, align 4, !tbaa !24
  %.pre203 = load i32, ptr %43, align 4, !tbaa !24
  %.pre204 = load i32, ptr %41, align 4, !tbaa !24
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %38
  %60 = phi i32 [ %.pre204, %._crit_edge.loopexit ], [ 0, %38 ]
  %61 = phi i32 [ %.pre203, %._crit_edge.loopexit ], [ 0, %38 ]
  %62 = phi i32 [ %.pre202, %._crit_edge.loopexit ], [ 0, %38 ]
  %63 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ 0, %38 ]
  %64 = tail call ptr @libmetis__SetupSplitGraph(ptr noundef nonnull %1, i32 noundef %63, i32 noundef %62) #5
  %65 = getelementptr inbounds i8, ptr %64, i64 16
  %66 = load ptr, ptr %65, align 8, !tbaa !17
  store ptr %66, ptr %7, align 16, !tbaa !27
  %67 = getelementptr inbounds i8, ptr %64, i64 24
  %68 = load ptr, ptr %67, align 8, !tbaa !18
  store ptr %68, ptr %8, align 16, !tbaa !27
  %69 = getelementptr inbounds i8, ptr %64, i64 40
  %70 = load ptr, ptr %69, align 8, !tbaa !19
  store ptr %70, ptr %9, align 16, !tbaa !27
  %71 = getelementptr inbounds i8, ptr %64, i64 48
  %72 = load ptr, ptr %71, align 8, !tbaa !28
  %73 = getelementptr inbounds i8, ptr %64, i64 96
  %74 = load ptr, ptr %73, align 8, !tbaa !20
  store ptr %74, ptr %10, align 16, !tbaa !27
  %75 = tail call ptr @libmetis__SetupSplitGraph(ptr noundef nonnull %1, i32 noundef %61, i32 noundef %60) #5
  %76 = getelementptr inbounds i8, ptr %75, i64 16
  %77 = load ptr, ptr %76, align 8, !tbaa !17
  %78 = getelementptr inbounds i8, ptr %7, i64 8
  store ptr %77, ptr %78, align 8, !tbaa !27
  %79 = getelementptr inbounds i8, ptr %75, i64 24
  %80 = load ptr, ptr %79, align 8, !tbaa !18
  %81 = getelementptr inbounds i8, ptr %8, i64 8
  store ptr %80, ptr %81, align 8, !tbaa !27
  %82 = getelementptr inbounds i8, ptr %75, i64 40
  %83 = load ptr, ptr %82, align 8, !tbaa !19
  %84 = getelementptr inbounds i8, ptr %9, i64 8
  store ptr %83, ptr %84, align 8, !tbaa !27
  %85 = getelementptr inbounds i8, ptr %75, i64 48
  %86 = load ptr, ptr %85, align 8, !tbaa !28
  %87 = getelementptr inbounds i8, ptr %75, i64 96
  %88 = load ptr, ptr %87, align 8, !tbaa !20
  %89 = getelementptr inbounds i8, ptr %10, i64 8
  store ptr %88, ptr %89, align 8, !tbaa !27
  %90 = getelementptr inbounds i8, ptr %1, i64 136
  %91 = load i32, ptr %90, align 8, !tbaa !29
  %92 = icmp sgt i32 %91, 0
  br i1 %92, label %.lr.ph153, label %._crit_edge154

.lr.ph153:                                        ; preds = %._crit_edge, %._crit_edge150
  %93 = phi i32 [ %110, %._crit_edge150 ], [ %91, %._crit_edge ]
  %indvars.iv176 = phi i64 [ %indvars.iv.next177, %._crit_edge150 ], [ 0, %._crit_edge ]
  %94 = getelementptr inbounds i32, ptr %35, i64 %indvars.iv176
  %95 = load i32, ptr %94, align 4, !tbaa !24
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds i32, ptr %22, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !24
  %99 = getelementptr i8, ptr %97, i64 4
  %100 = load i32, ptr %99, align 4, !tbaa !24
  %101 = icmp slt i32 %98, %100
  br i1 %101, label %.lr.ph149.preheader, label %._crit_edge150

.lr.ph149.preheader:                              ; preds = %.lr.ph153
  %102 = sext i32 %98 to i64
  br label %.lr.ph149

.lr.ph149:                                        ; preds = %.lr.ph149.preheader, %.lr.ph149
  %indvars.iv173 = phi i64 [ %102, %.lr.ph149.preheader ], [ %indvars.iv.next174, %.lr.ph149 ]
  %103 = getelementptr inbounds i32, ptr %26, i64 %indvars.iv173
  %104 = load i32, ptr %103, align 4, !tbaa !24
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds i32, ptr %33, i64 %105
  store i32 1, ptr %106, align 4, !tbaa !24
  %indvars.iv.next174 = add nsw i64 %indvars.iv173, 1
  %107 = load i32, ptr %99, align 4, !tbaa !24
  %108 = sext i32 %107 to i64
  %109 = icmp slt i64 %indvars.iv.next174, %108
  br i1 %109, label %.lr.ph149, label %._crit_edge150.loopexit, !llvm.loop !30

._crit_edge150.loopexit:                          ; preds = %.lr.ph149
  %.pre205 = load i32, ptr %90, align 8, !tbaa !29
  br label %._crit_edge150

._crit_edge150:                                   ; preds = %._crit_edge150.loopexit, %.lr.ph153
  %110 = phi i32 [ %.pre205, %._crit_edge150.loopexit ], [ %93, %.lr.ph153 ]
  %indvars.iv.next177 = add nuw nsw i64 %indvars.iv176, 1
  %111 = sext i32 %110 to i64
  %112 = icmp slt i64 %indvars.iv.next177, %111
  br i1 %112, label %.lr.ph153, label %._crit_edge154, !llvm.loop !31

._crit_edge154:                                   ; preds = %._crit_edge150, %._crit_edge
  store i32 0, ptr %41, align 4, !tbaa !24
  store i32 0, ptr %6, align 4, !tbaa !24
  store i32 0, ptr %43, align 4, !tbaa !24
  store i32 0, ptr %5, align 4, !tbaa !24
  store i32 0, ptr %77, align 4, !tbaa !24
  store i32 0, ptr %66, align 4, !tbaa !24
  br i1 %44, label %.lr.ph166.preheader, label %.preheader.thread

.preheader.thread:                                ; preds = %._crit_edge154
  %113 = tail call ptr @libmetis__iset(i64 noundef 0, i32 noundef 1, ptr noundef %72) #5
  br label %._crit_edge170

.lr.ph166.preheader:                              ; preds = %._crit_edge154
  %wide.trip.count192 = zext nneg i32 %20 to i64
  %invariant.gep = getelementptr i8, ptr %26, i64 4
  br label %.lr.ph166

.preheader:                                       ; preds = %225
  %.pre206 = load i32, ptr %6, align 4, !tbaa !24
  %114 = sext i32 %.pre206 to i64
  %115 = tail call ptr @libmetis__iset(i64 noundef %114, i32 noundef 1, ptr noundef %72) #5
  %116 = icmp sgt i32 %.pre206, 0
  br i1 %116, label %.lr.ph169.preheader, label %._crit_edge170

.lr.ph166:                                        ; preds = %.lr.ph166.preheader, %225
  %indvars.iv189 = phi i64 [ 0, %.lr.ph166.preheader ], [ %indvars.iv.next190, %225 ]
  %117 = getelementptr inbounds i32, ptr %31, i64 %indvars.iv189
  %118 = load i32, ptr %117, align 4, !tbaa !24
  %119 = icmp eq i32 %118, 2
  br i1 %119, label %225, label %120

120:                                              ; preds = %.lr.ph166
  %121 = getelementptr inbounds i32, ptr %22, i64 %indvars.iv189
  %122 = load i32, ptr %121, align 4, !tbaa !24
  %123 = getelementptr inbounds i8, ptr %121, i64 4
  %124 = load i32, ptr %123, align 4, !tbaa !24
  %125 = getelementptr inbounds i32, ptr %33, i64 %indvars.iv189
  %126 = load i32, ptr %125, align 4, !tbaa !24
  %127 = icmp eq i32 %126, -1
  %128 = sext i32 %118 to i64
  %129 = getelementptr inbounds [2 x ptr], ptr %9, i64 0, i64 %128
  %130 = load ptr, ptr %129, align 8, !tbaa !27
  %131 = ptrtoint ptr %130 to i64
  %132 = getelementptr inbounds [3 x i32], ptr %6, i64 0, i64 %128
  %133 = load i32, ptr %132, align 4, !tbaa !24
  br i1 %127, label %134, label %171

134:                                              ; preds = %120
  %135 = sext i32 %133 to i64
  %136 = getelementptr i32, ptr %130, i64 %135
  %137 = sext i32 %122 to i64
  %138 = sub nsw i64 0, %137
  %139 = getelementptr inbounds i32, ptr %136, i64 %138
  %140 = icmp slt i32 %122, %124
  br i1 %140, label %.lr.ph162.preheader, label %._crit_edge163

.lr.ph162.preheader:                              ; preds = %134
  %wide.trip.count187 = sext i32 %124 to i64
  %141 = sub nsw i64 %wide.trip.count187, %137
  %min.iters.check = icmp ult i64 %141, 8
  br i1 %min.iters.check, label %.lr.ph162.preheader208, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph162.preheader
  %142 = shl nsw i64 %135, 2
  %143 = shl nsw i64 %137, 2
  %144 = add i64 %142, %131
  %145 = add i64 %143, %27
  %146 = sub i64 %144, %145
  %diff.check = icmp ult i64 %146, 32
  br i1 %diff.check, label %.lr.ph162.preheader208, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %141, -8
  %ind.end = add nsw i64 %n.vec, %137
  %invariant.gep221 = getelementptr i32, ptr %26, i64 %137
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %gep222 = getelementptr i32, ptr %invariant.gep221, i64 %index
  %147 = getelementptr inbounds i8, ptr %gep222, i64 16
  %wide.load = load <4 x i32>, ptr %gep222, align 4, !tbaa !24
  %wide.load207 = load <4 x i32>, ptr %147, align 4, !tbaa !24
  %148 = getelementptr inbounds i32, ptr %136, i64 %index
  %149 = getelementptr inbounds i8, ptr %148, i64 16
  store <4 x i32> %wide.load, ptr %148, align 4, !tbaa !24
  store <4 x i32> %wide.load207, ptr %149, align 4, !tbaa !24
  %index.next = add nuw i64 %index, 8
  %150 = icmp eq i64 %index.next, %n.vec
  br i1 %150, label %middle.block, label %vector.body, !llvm.loop !32

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %141, %n.vec
  br i1 %cmp.n, label %._crit_edge163, label %.lr.ph162.preheader208

.lr.ph162.preheader208:                           ; preds = %middle.block, %vector.memcheck, %.lr.ph162.preheader
  %indvars.iv184.ph = phi i64 [ %137, %vector.memcheck ], [ %137, %.lr.ph162.preheader ], [ %ind.end, %middle.block ]
  %151 = sub nsw i64 %wide.trip.count187, %indvars.iv184.ph
  %xtraiter209 = and i64 %151, 3
  %lcmp.mod210.not = icmp eq i64 %xtraiter209, 0
  br i1 %lcmp.mod210.not, label %.lr.ph162.prol.loopexit, label %.lr.ph162.prol

.lr.ph162.prol:                                   ; preds = %.lr.ph162.preheader208, %.lr.ph162.prol
  %indvars.iv184.prol = phi i64 [ %indvars.iv.next185.prol, %.lr.ph162.prol ], [ %indvars.iv184.ph, %.lr.ph162.preheader208 ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph162.prol ], [ 0, %.lr.ph162.preheader208 ]
  %152 = getelementptr inbounds i32, ptr %26, i64 %indvars.iv184.prol
  %153 = load i32, ptr %152, align 4, !tbaa !24
  %154 = getelementptr inbounds i32, ptr %139, i64 %indvars.iv184.prol
  store i32 %153, ptr %154, align 4, !tbaa !24
  %indvars.iv.next185.prol = add nsw i64 %indvars.iv184.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter209
  br i1 %prol.iter.cmp.not, label %.lr.ph162.prol.loopexit, label %.lr.ph162.prol, !llvm.loop !35

.lr.ph162.prol.loopexit:                          ; preds = %.lr.ph162.prol, %.lr.ph162.preheader208
  %indvars.iv184.unr = phi i64 [ %indvars.iv184.ph, %.lr.ph162.preheader208 ], [ %indvars.iv.next185.prol, %.lr.ph162.prol ]
  %155 = sub nsw i64 %indvars.iv184.ph, %wide.trip.count187
  %156 = icmp ugt i64 %155, -4
  br i1 %156, label %._crit_edge163, label %.lr.ph162

.lr.ph162:                                        ; preds = %.lr.ph162.prol.loopexit, %.lr.ph162
  %indvars.iv184 = phi i64 [ %indvars.iv.next185.3, %.lr.ph162 ], [ %indvars.iv184.unr, %.lr.ph162.prol.loopexit ]
  %157 = getelementptr inbounds i32, ptr %26, i64 %indvars.iv184
  %158 = load i32, ptr %157, align 4, !tbaa !24
  %159 = getelementptr inbounds i32, ptr %139, i64 %indvars.iv184
  store i32 %158, ptr %159, align 4, !tbaa !24
  %indvars.iv.next185 = add nsw i64 %indvars.iv184, 1
  %160 = getelementptr inbounds i32, ptr %26, i64 %indvars.iv.next185
  %161 = load i32, ptr %160, align 4, !tbaa !24
  %162 = getelementptr inbounds i32, ptr %139, i64 %indvars.iv.next185
  store i32 %161, ptr %162, align 4, !tbaa !24
  %indvars.iv.next185.1 = add nsw i64 %indvars.iv184, 2
  %163 = getelementptr inbounds i32, ptr %26, i64 %indvars.iv.next185.1
  %164 = load i32, ptr %163, align 4, !tbaa !24
  %165 = getelementptr inbounds i32, ptr %139, i64 %indvars.iv.next185.1
  store i32 %164, ptr %165, align 4, !tbaa !24
  %indvars.iv.next185.2 = add nsw i64 %indvars.iv184, 3
  %166 = getelementptr inbounds i32, ptr %26, i64 %indvars.iv.next185.2
  %167 = load i32, ptr %166, align 4, !tbaa !24
  %168 = getelementptr inbounds i32, ptr %139, i64 %indvars.iv.next185.2
  store i32 %167, ptr %168, align 4, !tbaa !24
  %indvars.iv.next185.3 = add nsw i64 %indvars.iv184, 4
  %exitcond188.not.3 = icmp eq i64 %indvars.iv.next185.3, %wide.trip.count187
  br i1 %exitcond188.not.3, label %._crit_edge163, label %.lr.ph162, !llvm.loop !37

._crit_edge163:                                   ; preds = %.lr.ph162.prol.loopexit, %.lr.ph162, %middle.block, %134
  %169 = sub i32 %124, %122
  %170 = add nsw i32 %169, %133
  br label %._crit_edge159

171:                                              ; preds = %120
  %172 = icmp slt i32 %122, %124
  br i1 %172, label %.lr.ph158.preheader, label %._crit_edge159

.lr.ph158.preheader:                              ; preds = %171
  %173 = sext i32 %122 to i64
  %wide.trip.count182 = sext i32 %124 to i64
  %174 = sub nsw i64 %wide.trip.count182, %173
  %xtraiter = and i64 %174, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph158.prol.loopexit, label %.lr.ph158.prol

.lr.ph158.prol:                                   ; preds = %.lr.ph158.preheader
  %175 = getelementptr inbounds i32, ptr %26, i64 %173
  %176 = load i32, ptr %175, align 4, !tbaa !24
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds i32, ptr %31, i64 %177
  %179 = load i32, ptr %178, align 4, !tbaa !24
  %180 = icmp eq i32 %179, %118
  br i1 %180, label %181, label %.lr.ph158.prol.loopexit.unr-lcssa

181:                                              ; preds = %.lr.ph158.prol
  %182 = add nsw i32 %133, 1
  %183 = sext i32 %133 to i64
  %184 = getelementptr inbounds i32, ptr %130, i64 %183
  store i32 %176, ptr %184, align 4, !tbaa !24
  br label %.lr.ph158.prol.loopexit.unr-lcssa

.lr.ph158.prol.loopexit.unr-lcssa:                ; preds = %181, %.lr.ph158.prol
  %.1138.prol = phi i32 [ %182, %181 ], [ %133, %.lr.ph158.prol ]
  %indvars.iv.next180.prol = add nsw i64 %173, 1
  br label %.lr.ph158.prol.loopexit

.lr.ph158.prol.loopexit:                          ; preds = %.lr.ph158.prol.loopexit.unr-lcssa, %.lr.ph158.preheader
  %.1138.lcssa.unr = phi i32 [ poison, %.lr.ph158.preheader ], [ %.1138.prol, %.lr.ph158.prol.loopexit.unr-lcssa ]
  %indvars.iv179.unr = phi i64 [ %173, %.lr.ph158.preheader ], [ %indvars.iv.next180.prol, %.lr.ph158.prol.loopexit.unr-lcssa ]
  %.0137155.unr = phi i32 [ %133, %.lr.ph158.preheader ], [ %.1138.prol, %.lr.ph158.prol.loopexit.unr-lcssa ]
  %185 = add nsw i64 %wide.trip.count182, -1
  %186 = icmp eq i64 %185, %173
  br i1 %186, label %._crit_edge159, label %.lr.ph158

.lr.ph158:                                        ; preds = %.lr.ph158.prol.loopexit, %206
  %indvars.iv179 = phi i64 [ %indvars.iv.next180.1, %206 ], [ %indvars.iv179.unr, %.lr.ph158.prol.loopexit ]
  %.0137155 = phi i32 [ %.1138.1, %206 ], [ %.0137155.unr, %.lr.ph158.prol.loopexit ]
  %187 = getelementptr inbounds i32, ptr %26, i64 %indvars.iv179
  %188 = load i32, ptr %187, align 4, !tbaa !24
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds i32, ptr %31, i64 %189
  %191 = load i32, ptr %190, align 4, !tbaa !24
  %192 = icmp eq i32 %191, %118
  br i1 %192, label %193, label %.lr.ph158.1

193:                                              ; preds = %.lr.ph158
  %194 = add nsw i32 %.0137155, 1
  %195 = sext i32 %.0137155 to i64
  %196 = getelementptr inbounds i32, ptr %130, i64 %195
  store i32 %188, ptr %196, align 4, !tbaa !24
  br label %.lr.ph158.1

.lr.ph158.1:                                      ; preds = %.lr.ph158, %193
  %.1138 = phi i32 [ %194, %193 ], [ %.0137155, %.lr.ph158 ]
  %gep = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv179
  %197 = load i32, ptr %gep, align 4, !tbaa !24
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds i32, ptr %31, i64 %198
  %200 = load i32, ptr %199, align 4, !tbaa !24
  %201 = icmp eq i32 %200, %118
  br i1 %201, label %202, label %206

202:                                              ; preds = %.lr.ph158.1
  %203 = add nsw i32 %.1138, 1
  %204 = sext i32 %.1138 to i64
  %205 = getelementptr inbounds i32, ptr %130, i64 %204
  store i32 %197, ptr %205, align 4, !tbaa !24
  br label %206

206:                                              ; preds = %202, %.lr.ph158.1
  %.1138.1 = phi i32 [ %203, %202 ], [ %.1138, %.lr.ph158.1 ]
  %indvars.iv.next180.1 = add nsw i64 %indvars.iv179, 2
  %exitcond183.not.1 = icmp eq i64 %indvars.iv.next180.1, %wide.trip.count182
  br i1 %exitcond183.not.1, label %._crit_edge159, label %.lr.ph158, !llvm.loop !38

._crit_edge159:                                   ; preds = %.lr.ph158.prol.loopexit, %206, %171, %._crit_edge163
  %.0137.lcssa.sink = phi i32 [ %170, %._crit_edge163 ], [ %133, %171 ], [ %.1138.lcssa.unr, %.lr.ph158.prol.loopexit ], [ %.1138.1, %206 ]
  store i32 %.0137.lcssa.sink, ptr %132, align 4, !tbaa !24
  %207 = getelementptr inbounds i32, ptr %24, i64 %indvars.iv189
  %208 = load i32, ptr %207, align 4, !tbaa !24
  %209 = getelementptr inbounds [2 x ptr], ptr %8, i64 0, i64 %128
  %210 = load ptr, ptr %209, align 8, !tbaa !27
  %211 = getelementptr inbounds [3 x i32], ptr %5, i64 0, i64 %128
  %212 = load i32, ptr %211, align 4, !tbaa !24
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds i32, ptr %210, i64 %213
  store i32 %208, ptr %214, align 4, !tbaa !24
  %215 = getelementptr inbounds i32, ptr %29, i64 %indvars.iv189
  %216 = load i32, ptr %215, align 4, !tbaa !24
  %217 = getelementptr inbounds [2 x ptr], ptr %10, i64 0, i64 %128
  %218 = load ptr, ptr %217, align 8, !tbaa !27
  %219 = getelementptr inbounds i32, ptr %218, i64 %213
  store i32 %216, ptr %219, align 4, !tbaa !24
  %220 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 %128
  %221 = load ptr, ptr %220, align 8, !tbaa !27
  %222 = add nsw i32 %212, 1
  store i32 %222, ptr %211, align 4, !tbaa !24
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds i32, ptr %221, i64 %223
  store i32 %.0137.lcssa.sink, ptr %224, align 4, !tbaa !24
  br label %225

225:                                              ; preds = %.lr.ph166, %._crit_edge159
  %indvars.iv.next190 = add nuw nsw i64 %indvars.iv189, 1
  %exitcond193.not = icmp eq i64 %indvars.iv.next190, %wide.trip.count192
  br i1 %exitcond193.not, label %.preheader, label %.lr.ph166, !llvm.loop !39

.lr.ph169.preheader:                              ; preds = %.preheader
  %wide.trip.count197 = zext nneg i32 %.pre206 to i64
  %xtraiter211 = and i64 %wide.trip.count197, 3
  %226 = icmp ult i32 %.pre206, 4
  br i1 %226, label %._crit_edge170.loopexit.unr-lcssa, label %.lr.ph169.preheader.new

.lr.ph169.preheader.new:                          ; preds = %.lr.ph169.preheader
  %unroll_iter = and i64 %wide.trip.count197, 2147483644
  br label %.lr.ph169

.lr.ph169:                                        ; preds = %.lr.ph169, %.lr.ph169.preheader.new
  %indvars.iv194 = phi i64 [ 0, %.lr.ph169.preheader.new ], [ %indvars.iv.next195.3, %.lr.ph169 ]
  %niter = phi i64 [ 0, %.lr.ph169.preheader.new ], [ %niter.next.3, %.lr.ph169 ]
  %227 = getelementptr inbounds i32, ptr %70, i64 %indvars.iv194
  %228 = load i32, ptr %227, align 4, !tbaa !24
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds i32, ptr %39, i64 %229
  %231 = load i32, ptr %230, align 4, !tbaa !24
  store i32 %231, ptr %227, align 4, !tbaa !24
  %indvars.iv.next195 = or disjoint i64 %indvars.iv194, 1
  %232 = getelementptr inbounds i32, ptr %70, i64 %indvars.iv.next195
  %233 = load i32, ptr %232, align 4, !tbaa !24
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds i32, ptr %39, i64 %234
  %236 = load i32, ptr %235, align 4, !tbaa !24
  store i32 %236, ptr %232, align 4, !tbaa !24
  %indvars.iv.next195.1214 = or disjoint i64 %indvars.iv194, 2
  %237 = getelementptr inbounds i32, ptr %70, i64 %indvars.iv.next195.1214
  %238 = load i32, ptr %237, align 4, !tbaa !24
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds i32, ptr %39, i64 %239
  %241 = load i32, ptr %240, align 4, !tbaa !24
  store i32 %241, ptr %237, align 4, !tbaa !24
  %indvars.iv.next195.2 = or disjoint i64 %indvars.iv194, 3
  %242 = getelementptr inbounds i32, ptr %70, i64 %indvars.iv.next195.2
  %243 = load i32, ptr %242, align 4, !tbaa !24
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds i32, ptr %39, i64 %244
  %246 = load i32, ptr %245, align 4, !tbaa !24
  store i32 %246, ptr %242, align 4, !tbaa !24
  %indvars.iv.next195.3 = add nuw nsw i64 %indvars.iv194, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge170.loopexit.unr-lcssa, label %.lr.ph169, !llvm.loop !40

._crit_edge170.loopexit.unr-lcssa:                ; preds = %.lr.ph169, %.lr.ph169.preheader
  %indvars.iv194.unr = phi i64 [ 0, %.lr.ph169.preheader ], [ %indvars.iv.next195.3, %.lr.ph169 ]
  %lcmp.mod212.not = icmp eq i64 %xtraiter211, 0
  br i1 %lcmp.mod212.not, label %._crit_edge170, label %.lr.ph169.epil

.lr.ph169.epil:                                   ; preds = %._crit_edge170.loopexit.unr-lcssa, %.lr.ph169.epil
  %indvars.iv194.epil = phi i64 [ %indvars.iv.next195.epil, %.lr.ph169.epil ], [ %indvars.iv194.unr, %._crit_edge170.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph169.epil ], [ 0, %._crit_edge170.loopexit.unr-lcssa ]
  %247 = getelementptr inbounds i32, ptr %70, i64 %indvars.iv194.epil
  %248 = load i32, ptr %247, align 4, !tbaa !24
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds i32, ptr %39, i64 %249
  %251 = load i32, ptr %250, align 4, !tbaa !24
  store i32 %251, ptr %247, align 4, !tbaa !24
  %indvars.iv.next195.epil = add nuw nsw i64 %indvars.iv194.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter211
  br i1 %epil.iter.cmp.not, label %._crit_edge170, label %.lr.ph169.epil, !llvm.loop !41

._crit_edge170:                                   ; preds = %._crit_edge170.loopexit.unr-lcssa, %.lr.ph169.epil, %.preheader.thread, %.preheader
  %252 = phi i32 [ 0, %.preheader.thread ], [ %.pre206, %.preheader ], [ %.pre206, %.lr.ph169.epil ], [ %.pre206, %._crit_edge170.loopexit.unr-lcssa ]
  %253 = load i32, ptr %41, align 4, !tbaa !24
  %254 = sext i32 %253 to i64
  %255 = tail call ptr @libmetis__iset(i64 noundef %254, i32 noundef 1, ptr noundef %86) #5
  %256 = icmp sgt i32 %253, 0
  br i1 %256, label %.lr.ph169.preheader.1, label %._crit_edge170.1

.lr.ph169.preheader.1:                            ; preds = %._crit_edge170
  %wide.trip.count197.1 = zext nneg i32 %253 to i64
  %xtraiter216 = and i64 %wide.trip.count197.1, 3
  %257 = icmp ult i32 %253, 4
  br i1 %257, label %._crit_edge170.1.loopexit.unr-lcssa, label %.lr.ph169.preheader.1.new

.lr.ph169.preheader.1.new:                        ; preds = %.lr.ph169.preheader.1
  %unroll_iter219 = and i64 %wide.trip.count197.1, 2147483644
  br label %.lr.ph169.1

.lr.ph169.1:                                      ; preds = %.lr.ph169.1, %.lr.ph169.preheader.1.new
  %indvars.iv194.1 = phi i64 [ 0, %.lr.ph169.preheader.1.new ], [ %indvars.iv.next195.1.3, %.lr.ph169.1 ]
  %niter220 = phi i64 [ 0, %.lr.ph169.preheader.1.new ], [ %niter220.next.3, %.lr.ph169.1 ]
  %258 = getelementptr inbounds i32, ptr %83, i64 %indvars.iv194.1
  %259 = load i32, ptr %258, align 4, !tbaa !24
  %260 = sext i32 %259 to i64
  %261 = getelementptr inbounds i32, ptr %39, i64 %260
  %262 = load i32, ptr %261, align 4, !tbaa !24
  store i32 %262, ptr %258, align 4, !tbaa !24
  %indvars.iv.next195.1 = or disjoint i64 %indvars.iv194.1, 1
  %263 = getelementptr inbounds i32, ptr %83, i64 %indvars.iv.next195.1
  %264 = load i32, ptr %263, align 4, !tbaa !24
  %265 = sext i32 %264 to i64
  %266 = getelementptr inbounds i32, ptr %39, i64 %265
  %267 = load i32, ptr %266, align 4, !tbaa !24
  store i32 %267, ptr %263, align 4, !tbaa !24
  %indvars.iv.next195.1.1 = or disjoint i64 %indvars.iv194.1, 2
  %268 = getelementptr inbounds i32, ptr %83, i64 %indvars.iv.next195.1.1
  %269 = load i32, ptr %268, align 4, !tbaa !24
  %270 = sext i32 %269 to i64
  %271 = getelementptr inbounds i32, ptr %39, i64 %270
  %272 = load i32, ptr %271, align 4, !tbaa !24
  store i32 %272, ptr %268, align 4, !tbaa !24
  %indvars.iv.next195.1.2 = or disjoint i64 %indvars.iv194.1, 3
  %273 = getelementptr inbounds i32, ptr %83, i64 %indvars.iv.next195.1.2
  %274 = load i32, ptr %273, align 4, !tbaa !24
  %275 = sext i32 %274 to i64
  %276 = getelementptr inbounds i32, ptr %39, i64 %275
  %277 = load i32, ptr %276, align 4, !tbaa !24
  store i32 %277, ptr %273, align 4, !tbaa !24
  %indvars.iv.next195.1.3 = add nuw nsw i64 %indvars.iv194.1, 4
  %niter220.next.3 = add i64 %niter220, 4
  %niter220.ncmp.3 = icmp eq i64 %niter220.next.3, %unroll_iter219
  br i1 %niter220.ncmp.3, label %._crit_edge170.1.loopexit.unr-lcssa, label %.lr.ph169.1, !llvm.loop !40

._crit_edge170.1.loopexit.unr-lcssa:              ; preds = %.lr.ph169.1, %.lr.ph169.preheader.1
  %indvars.iv194.1.unr = phi i64 [ 0, %.lr.ph169.preheader.1 ], [ %indvars.iv.next195.1.3, %.lr.ph169.1 ]
  %lcmp.mod218.not = icmp eq i64 %xtraiter216, 0
  br i1 %lcmp.mod218.not, label %._crit_edge170.1, label %.lr.ph169.1.epil

.lr.ph169.1.epil:                                 ; preds = %._crit_edge170.1.loopexit.unr-lcssa, %.lr.ph169.1.epil
  %indvars.iv194.1.epil = phi i64 [ %indvars.iv.next195.1.epil, %.lr.ph169.1.epil ], [ %indvars.iv194.1.unr, %._crit_edge170.1.loopexit.unr-lcssa ]
  %epil.iter217 = phi i64 [ %epil.iter217.next, %.lr.ph169.1.epil ], [ 0, %._crit_edge170.1.loopexit.unr-lcssa ]
  %278 = getelementptr inbounds i32, ptr %83, i64 %indvars.iv194.1.epil
  %279 = load i32, ptr %278, align 4, !tbaa !24
  %280 = sext i32 %279 to i64
  %281 = getelementptr inbounds i32, ptr %39, i64 %280
  %282 = load i32, ptr %281, align 4, !tbaa !24
  store i32 %282, ptr %278, align 4, !tbaa !24
  %indvars.iv.next195.1.epil = add nuw nsw i64 %indvars.iv194.1.epil, 1
  %epil.iter217.next = add i64 %epil.iter217, 1
  %epil.iter217.cmp.not = icmp eq i64 %epil.iter217.next, %xtraiter216
  br i1 %epil.iter217.cmp.not, label %._crit_edge170.1, label %.lr.ph169.1.epil, !llvm.loop !42

._crit_edge170.1:                                 ; preds = %._crit_edge170.1.loopexit.unr-lcssa, %.lr.ph169.1.epil, %._crit_edge170
  %283 = load i32, ptr %5, align 4, !tbaa !24
  store i32 %283, ptr %64, align 8, !tbaa !15
  %284 = getelementptr inbounds i8, ptr %64, i64 4
  store i32 %252, ptr %284, align 4, !tbaa !43
  %285 = load i32, ptr %43, align 4, !tbaa !24
  store i32 %285, ptr %75, align 8, !tbaa !15
  %286 = getelementptr inbounds i8, ptr %75, i64 4
  store i32 %253, ptr %286, align 4, !tbaa !43
  tail call void @libmetis__SetupGraph_tvwgt(ptr noundef nonnull %64) #5
  tail call void @libmetis__SetupGraph_tvwgt(ptr noundef nonnull %75) #5
  %287 = load i32, ptr %11, align 8, !tbaa !5
  %288 = and i32 %287, 2
  %.not144 = icmp eq i32 %288, 0
  br i1 %.not144, label %294, label %289

289:                                              ; preds = %._crit_edge170.1
  %290 = tail call double @gk_CPUSeconds() #5
  %291 = getelementptr inbounds i8, ptr %0, i64 200
  %292 = load double, ptr %291, align 8, !tbaa !14
  %293 = fadd double %290, %292
  store double %293, ptr %291, align 8, !tbaa !14
  br label %294

294:                                              ; preds = %289, %._crit_edge170.1
  store ptr %64, ptr %2, align 8, !tbaa !27
  store ptr %75, ptr %3, align 8, !tbaa !27
  tail call void @libmetis__wspacepop(ptr noundef nonnull %0) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #5
  ret void
}

declare void @libmetis__wspacepush(ptr noundef) local_unnamed_addr #1

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

declare void @libmetis__wspacepop(ptr noundef) local_unnamed_addr #1

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

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

declare void @libmetis__SetupGraph_tvwgt(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 = { 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 #3 = { 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 #4 = { 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 #5 = { nounwind }
attributes #6 = { 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 8}
!6 = !{!"ctrl_t", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !7, i64 64, !7, i64 68, !7, i64 72, !10, i64 80, !7, i64 88, !7, i64 92, !11, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !11, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !12, i64 176, !12, i64 184, !12, i64 192, !12, i64 200, !12, i64 208, !12, i64 216, !12, i64 224, !10, i64 232, !13, i64 240, !13, i64 248, !13, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !10, i64 312, !10, i64 320}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!"double", !8, i64 0}
!13 = !{!"long", !8, i64 0}
!14 = !{!6, !12, i64 200}
!15 = !{!16, !7, i64 0}
!16 = !{!"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}
!17 = !{!16, !10, i64 16}
!18 = !{!16, !10, i64 24}
!19 = !{!16, !10, i64 40}
!20 = !{!16, !10, i64 96}
!21 = !{!16, !10, i64 120}
!22 = !{!16, !10, i64 144}
!23 = !{!16, !10, i64 152}
!24 = !{!7, !7, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!10, !10, i64 0}
!28 = !{!16, !10, i64 48}
!29 = !{!16, !7, i64 136}
!30 = distinct !{!30, !26}
!31 = distinct !{!31, !26}
!32 = distinct !{!32, !26, !33, !34}
!33 = !{!"llvm.loop.isvectorized", i32 1}
!34 = !{!"llvm.loop.unroll.runtime.disable"}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.unroll.disable"}
!37 = distinct !{!37, !26, !33}
!38 = distinct !{!38, !26}
!39 = distinct !{!39, !26}
!40 = distinct !{!40, !26}
!41 = distinct !{!41, !36}
!42 = distinct !{!42, !36}
!43 = !{!16, !7, i64 4}


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