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

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

%struct.graph_t = type { i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, ptr, ptr, i32, i32, ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.ctrl_t = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, i32, i32, float, ptr, ptr, ptr, float, double, double, double, double, double, double, double, double, double, double, double, double, ptr, i64, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.ckrinfo_t = type { i32, i32, i32, i32 }
%struct.vkrinfo_t = type { i32, i32, i32, i32, i32 }

@.str.1 = external hidden unnamed_addr constant [143 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [16 x i8], align 1
@__PRETTY_FUNCTION__.libmetis__ComputeKWayBoundary = external hidden unnamed_addr constant [63 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__ComputeKWayBoundary(ptr noundef %0, ptr noundef %1, i32 noundef %2) #1 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %12 = load ptr, ptr %5, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.graph_t, ptr %12, i32 0, i32 0
  %14 = load i32, ptr %13, align 8, !tbaa !11
  store i32 %14, ptr %8, align 4, !tbaa !9
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.graph_t, ptr %15, i32 0, i32 23
  %17 = load ptr, ptr %16, align 8, !tbaa !13
  store ptr %17, ptr %10, align 8, !tbaa !5
  %18 = load i32, ptr %8, align 4, !tbaa !9
  %19 = sext i32 %18 to i64
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.graph_t, ptr %20, i32 0, i32 22
  %22 = load ptr, ptr %21, align 8, !tbaa !14
  %23 = call ptr @libmetis__iset(i64 noundef %19, i32 noundef -1, ptr noundef %22)
  store ptr %23, ptr %11, align 8, !tbaa !5
  store i32 0, ptr %9, align 4, !tbaa !9
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.ctrl_t, ptr %24, i32 0, i32 1
  %26 = load i32, ptr %25, align 4, !tbaa !15
  switch i32 %26, label %256 [
    i32 0, label %27
    i32 1, label %146
  ]

27:                                               ; preds = %3
  %28 = load i32, ptr %6, align 4, !tbaa !9
  %29 = icmp eq i32 %28, 1
  br i1 %29, label %30, label %92

30:                                               ; preds = %27
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %31

31:                                               ; preds = %88, %30
  %32 = load i32, ptr %7, align 4, !tbaa !9
  %33 = load i32, ptr %8, align 4, !tbaa !9
  %34 = icmp slt i32 %32, %33
  br i1 %34, label %35, label %91

35:                                               ; preds = %31
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.graph_t, ptr %36, i32 0, i32 26
  %38 = load ptr, ptr %37, align 8, !tbaa !20
  %39 = load i32, ptr %7, align 4, !tbaa !9
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds %struct.ckrinfo_t, ptr %38, i64 %40
  %42 = getelementptr inbounds %struct.ckrinfo_t, ptr %41, i32 0, i32 1
  %43 = load i32, ptr %42, align 4, !tbaa !21
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.graph_t, ptr %44, i32 0, i32 26
  %46 = load ptr, ptr %45, align 8, !tbaa !20
  %47 = load i32, ptr %7, align 4, !tbaa !9
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds %struct.ckrinfo_t, ptr %46, i64 %48
  %50 = getelementptr inbounds %struct.ckrinfo_t, ptr %49, i32 0, i32 0
  %51 = load i32, ptr %50, align 4, !tbaa !23
  %52 = sub nsw i32 %43, %51
  %53 = icmp sge i32 %52, 0
  br i1 %53, label %54, label %87

54:                                               ; preds = %35
  br label %55

55:                                               ; preds = %54
  %56 = load ptr, ptr %11, align 8, !tbaa !5
  %57 = load i32, ptr %7, align 4, !tbaa !9
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds i32, ptr %56, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !9
  %61 = icmp eq i32 %60, -1
  br i1 %61, label %73, label %62

62:                                               ; preds = %55
  %63 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, i32 noundef 524, ptr noundef @.str.1)
  %64 = load ptr, ptr %11, align 8, !tbaa !5
  %65 = load i32, ptr %7, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds i32, ptr %64, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !9
  %69 = icmp eq i32 %68, -1
  br i1 %69, label %70, label %71

70:                                               ; preds = %62
  br label %72

71:                                               ; preds = %62
  call void @__assert_fail(ptr noundef @.str.17, ptr noundef @.str.1, i32 noundef 524, ptr noundef @__PRETTY_FUNCTION__.libmetis__ComputeKWayBoundary) #5
  unreachable

72:                                               ; preds = %70
  br label %73

73:                                               ; preds = %72, %55
  %74 = load i32, ptr %7, align 4, !tbaa !9
  %75 = load ptr, ptr %10, align 8, !tbaa !5
  %76 = load i32, ptr %9, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds i32, ptr %75, i64 %77
  store i32 %74, ptr %78, align 4, !tbaa !9
  %79 = load i32, ptr %9, align 4, !tbaa !9
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %9, align 4, !tbaa !9
  %81 = load ptr, ptr %11, align 8, !tbaa !5
  %82 = load i32, ptr %7, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds i32, ptr %81, i64 %83
  store i32 %79, ptr %84, align 4, !tbaa !9
  br label %85

85:                                               ; preds = %73
  br label %86

86:                                               ; preds = %85
  br label %87

87:                                               ; preds = %86, %35
  br label %88

88:                                               ; preds = %87
  %89 = load i32, ptr %7, align 4, !tbaa !9
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %7, align 4, !tbaa !9
  br label %31, !llvm.loop !24

91:                                               ; preds = %31
  br label %145

92:                                               ; preds = %27
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %93

93:                                               ; preds = %141, %92
  %94 = load i32, ptr %7, align 4, !tbaa !9
  %95 = load i32, ptr %8, align 4, !tbaa !9
  %96 = icmp slt i32 %94, %95
  br i1 %96, label %97, label %144

97:                                               ; preds = %93
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.graph_t, ptr %98, i32 0, i32 26
  %100 = load ptr, ptr %99, align 8, !tbaa !20
  %101 = load i32, ptr %7, align 4, !tbaa !9
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds %struct.ckrinfo_t, ptr %100, i64 %102
  %104 = getelementptr inbounds %struct.ckrinfo_t, ptr %103, i32 0, i32 1
  %105 = load i32, ptr %104, align 4, !tbaa !21
  %106 = icmp sgt i32 %105, 0
  br i1 %106, label %107, label %140

107:                                              ; preds = %97
  br label %108

108:                                              ; preds = %107
  %109 = load ptr, ptr %11, align 8, !tbaa !5
  %110 = load i32, ptr %7, align 4, !tbaa !9
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds i32, ptr %109, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !9
  %114 = icmp eq i32 %113, -1
  br i1 %114, label %126, label %115

115:                                              ; preds = %108
  %116 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, i32 noundef 530, ptr noundef @.str.1)
  %117 = load ptr, ptr %11, align 8, !tbaa !5
  %118 = load i32, ptr %7, align 4, !tbaa !9
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds i32, ptr %117, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !9
  %122 = icmp eq i32 %121, -1
  br i1 %122, label %123, label %124

123:                                              ; preds = %115
  br label %125

124:                                              ; preds = %115
  call void @__assert_fail(ptr noundef @.str.17, ptr noundef @.str.1, i32 noundef 530, ptr noundef @__PRETTY_FUNCTION__.libmetis__ComputeKWayBoundary) #5
  unreachable

125:                                              ; preds = %123
  br label %126

126:                                              ; preds = %125, %108
  %127 = load i32, ptr %7, align 4, !tbaa !9
  %128 = load ptr, ptr %10, align 8, !tbaa !5
  %129 = load i32, ptr %9, align 4, !tbaa !9
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds i32, ptr %128, i64 %130
  store i32 %127, ptr %131, align 4, !tbaa !9
  %132 = load i32, ptr %9, align 4, !tbaa !9
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %9, align 4, !tbaa !9
  %134 = load ptr, ptr %11, align 8, !tbaa !5
  %135 = load i32, ptr %7, align 4, !tbaa !9
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds i32, ptr %134, i64 %136
  store i32 %132, ptr %137, align 4, !tbaa !9
  br label %138

138:                                              ; preds = %126
  br label %139

139:                                              ; preds = %138
  br label %140

140:                                              ; preds = %139, %97
  br label %141

141:                                              ; preds = %140
  %142 = load i32, ptr %7, align 4, !tbaa !9
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %7, align 4, !tbaa !9
  br label %93, !llvm.loop !26

144:                                              ; preds = %93
  br label %145

145:                                              ; preds = %144, %91
  br label %260

146:                                              ; preds = %3
  %147 = load i32, ptr %6, align 4, !tbaa !9
  %148 = icmp eq i32 %147, 1
  br i1 %148, label %149, label %202

149:                                              ; preds = %146
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %150

150:                                              ; preds = %198, %149
  %151 = load i32, ptr %7, align 4, !tbaa !9
  %152 = load i32, ptr %8, align 4, !tbaa !9
  %153 = icmp slt i32 %151, %152
  br i1 %153, label %154, label %201

154:                                              ; preds = %150
  %155 = load ptr, ptr %5, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.graph_t, ptr %155, i32 0, i32 27
  %157 = load ptr, ptr %156, align 8, !tbaa !27
  %158 = load i32, ptr %7, align 4, !tbaa !9
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds %struct.vkrinfo_t, ptr %157, i64 %159
  %161 = getelementptr inbounds %struct.vkrinfo_t, ptr %160, i32 0, i32 2
  %162 = load i32, ptr %161, align 4, !tbaa !28
  %163 = icmp sge i32 %162, 0
  br i1 %163, label %164, label %197

164:                                              ; preds = %154
  br label %165

165:                                              ; preds = %164
  %166 = load ptr, ptr %11, align 8, !tbaa !5
  %167 = load i32, ptr %7, align 4, !tbaa !9
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds i32, ptr %166, i64 %168
  %170 = load i32, ptr %169, align 4, !tbaa !9
  %171 = icmp eq i32 %170, -1
  br i1 %171, label %183, label %172

172:                                              ; preds = %165
  %173 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, i32 noundef 540, ptr noundef @.str.1)
  %174 = load ptr, ptr %11, align 8, !tbaa !5
  %175 = load i32, ptr %7, align 4, !tbaa !9
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds i32, ptr %174, i64 %176
  %178 = load i32, ptr %177, align 4, !tbaa !9
  %179 = icmp eq i32 %178, -1
  br i1 %179, label %180, label %181

180:                                              ; preds = %172
  br label %182

181:                                              ; preds = %172
  call void @__assert_fail(ptr noundef @.str.17, ptr noundef @.str.1, i32 noundef 540, ptr noundef @__PRETTY_FUNCTION__.libmetis__ComputeKWayBoundary) #5
  unreachable

182:                                              ; preds = %180
  br label %183

183:                                              ; preds = %182, %165
  %184 = load i32, ptr %7, align 4, !tbaa !9
  %185 = load ptr, ptr %10, align 8, !tbaa !5
  %186 = load i32, ptr %9, align 4, !tbaa !9
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds i32, ptr %185, i64 %187
  store i32 %184, ptr %188, align 4, !tbaa !9
  %189 = load i32, ptr %9, align 4, !tbaa !9
  %190 = add nsw i32 %189, 1
  store i32 %190, ptr %9, align 4, !tbaa !9
  %191 = load ptr, ptr %11, align 8, !tbaa !5
  %192 = load i32, ptr %7, align 4, !tbaa !9
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds i32, ptr %191, i64 %193
  store i32 %189, ptr %194, align 4, !tbaa !9
  br label %195

195:                                              ; preds = %183
  br label %196

196:                                              ; preds = %195
  br label %197

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

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

201:                                              ; preds = %150
  br label %255

202:                                              ; preds = %146
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %203

203:                                              ; preds = %251, %202
  %204 = load i32, ptr %7, align 4, !tbaa !9
  %205 = load i32, ptr %8, align 4, !tbaa !9
  %206 = icmp slt i32 %204, %205
  br i1 %206, label %207, label %254

207:                                              ; preds = %203
  %208 = load ptr, ptr %5, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.graph_t, ptr %208, i32 0, i32 27
  %210 = load ptr, ptr %209, align 8, !tbaa !27
  %211 = load i32, ptr %7, align 4, !tbaa !9
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds %struct.vkrinfo_t, ptr %210, i64 %212
  %214 = getelementptr inbounds %struct.vkrinfo_t, ptr %213, i32 0, i32 1
  %215 = load i32, ptr %214, align 4, !tbaa !31
  %216 = icmp sgt i32 %215, 0
  br i1 %216, label %217, label %250

217:                                              ; preds = %207
  br label %218

218:                                              ; preds = %217
  %219 = load ptr, ptr %11, align 8, !tbaa !5
  %220 = load i32, ptr %7, align 4, !tbaa !9
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds i32, ptr %219, i64 %221
  %223 = load i32, ptr %222, align 4, !tbaa !9
  %224 = icmp eq i32 %223, -1
  br i1 %224, label %236, label %225

225:                                              ; preds = %218
  %226 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, i32 noundef 546, ptr noundef @.str.1)
  %227 = load ptr, ptr %11, align 8, !tbaa !5
  %228 = load i32, ptr %7, align 4, !tbaa !9
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds i32, ptr %227, i64 %229
  %231 = load i32, ptr %230, align 4, !tbaa !9
  %232 = icmp eq i32 %231, -1
  br i1 %232, label %233, label %234

233:                                              ; preds = %225
  br label %235

234:                                              ; preds = %225
  call void @__assert_fail(ptr noundef @.str.17, ptr noundef @.str.1, i32 noundef 546, ptr noundef @__PRETTY_FUNCTION__.libmetis__ComputeKWayBoundary) #5
  unreachable

235:                                              ; preds = %233
  br label %236

236:                                              ; preds = %235, %218
  %237 = load i32, ptr %7, align 4, !tbaa !9
  %238 = load ptr, ptr %10, align 8, !tbaa !5
  %239 = load i32, ptr %9, align 4, !tbaa !9
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds i32, ptr %238, i64 %240
  store i32 %237, ptr %241, align 4, !tbaa !9
  %242 = load i32, ptr %9, align 4, !tbaa !9
  %243 = add nsw i32 %242, 1
  store i32 %243, ptr %9, align 4, !tbaa !9
  %244 = load ptr, ptr %11, align 8, !tbaa !5
  %245 = load i32, ptr %7, align 4, !tbaa !9
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds i32, ptr %244, i64 %246
  store i32 %242, ptr %247, align 4, !tbaa !9
  br label %248

248:                                              ; preds = %236
  br label %249

249:                                              ; preds = %248
  br label %250

250:                                              ; preds = %249, %207
  br label %251

251:                                              ; preds = %250
  %252 = load i32, ptr %7, align 4, !tbaa !9
  %253 = add nsw i32 %252, 1
  store i32 %253, ptr %7, align 4, !tbaa !9
  br label %203, !llvm.loop !32

254:                                              ; preds = %203
  br label %255

255:                                              ; preds = %254, %201
  br label %260

256:                                              ; preds = %3
  %257 = load ptr, ptr %4, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.ctrl_t, ptr %257, i32 0, i32 1
  %259 = load i32, ptr %258, align 4, !tbaa !15
  call void (i32, ptr, ...) @gk_errexit(i32 noundef 15, ptr noundef @.str.11, i32 noundef %259)
  br label %260

260:                                              ; preds = %256, %255, %145
  %261 = load i32, ptr %9, align 4, !tbaa !9
  %262 = load ptr, ptr %5, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.graph_t, ptr %262, i32 0, i32 21
  store i32 %261, ptr %263, align 8, !tbaa !33
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  ret void
}

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

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

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

declare void @gk_errexit(i32 noundef, ptr noundef, ...) #2

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

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


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

%struct.ckrinfo_t = type { i32, i32, i32, i32 }
%struct.vkrinfo_t = type { i32, i32, i32, i32, i32 }

@.str.1 = external hidden unnamed_addr constant [143 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [16 x i8], align 1
@__PRETTY_FUNCTION__.libmetis__ComputeKWayBoundary = external hidden unnamed_addr constant [63 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__ComputeKWayBoundary(ptr nocapture noundef readonly %0, ptr nocapture noundef %1, i32 noundef %2) local_unnamed_addr #0 {
  %4 = load i32, ptr %1, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %1, i64 152
  %6 = load ptr, ptr %5, align 8, !tbaa !11
  %7 = sext i32 %4 to i64
  %8 = getelementptr inbounds i8, ptr %1, i64 144
  %9 = load ptr, ptr %8, align 8, !tbaa !12
  %10 = tail call ptr @libmetis__iset(i64 noundef %7, i32 noundef -1, ptr noundef %9) #4
  %11 = getelementptr inbounds i8, ptr %0, i64 4
  %12 = load i32, ptr %11, align 4, !tbaa !13
  switch i32 %12, label %104 [
    i32 0, label %13
    i32 1, label %59
  ]

13:                                               ; preds = %3
  %14 = icmp eq i32 %2, 1
  %15 = icmp sgt i32 %4, 0
  br i1 %14, label %.preheader, label %.preheader75

.preheader75:                                     ; preds = %13
  br i1 %15, label %.lr.ph93, label %.loopexit

.lr.ph93:                                         ; preds = %.preheader75
  %16 = getelementptr inbounds i8, ptr %1, i64 176
  %wide.trip.count111 = zext nneg i32 %4 to i64
  br label %39

.preheader:                                       ; preds = %13
  br i1 %15, label %.lr.ph97, label %.loopexit

.lr.ph97:                                         ; preds = %.preheader
  %17 = getelementptr inbounds i8, ptr %1, i64 176
  %wide.trip.count116 = zext nneg i32 %4 to i64
  br label %18

18:                                               ; preds = %.lr.ph97, %38
  %indvars.iv113 = phi i64 [ 0, %.lr.ph97 ], [ %indvars.iv.next114, %38 ]
  %.07195 = phi i32 [ 0, %.lr.ph97 ], [ %.172, %38 ]
  %19 = load ptr, ptr %17, align 8, !tbaa !18
  %20 = getelementptr inbounds %struct.ckrinfo_t, ptr %19, i64 %indvars.iv113
  %21 = getelementptr inbounds i8, ptr %20, i64 4
  %22 = load i32, ptr %21, align 4, !tbaa !19
  %23 = load i32, ptr %20, align 4, !tbaa !21
  %.not = icmp slt i32 %22, %23
  br i1 %.not, label %38, label %24

24:                                               ; preds = %18
  %25 = getelementptr inbounds i32, ptr %10, i64 %indvars.iv113
  %26 = load i32, ptr %25, align 4, !tbaa !22
  %27 = icmp eq i32 %26, -1
  br i1 %27, label %33, label %28

28:                                               ; preds = %24
  %29 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, i32 noundef 524, ptr noundef nonnull @.str.1)
  %30 = load i32, ptr %25, align 4, !tbaa !22
  %31 = icmp eq i32 %30, -1
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  tail call void @__assert_fail(ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.1, i32 noundef 524, ptr noundef nonnull @__PRETTY_FUNCTION__.libmetis__ComputeKWayBoundary) #5
  unreachable

33:                                               ; preds = %28, %24
  %34 = sext i32 %.07195 to i64
  %35 = getelementptr inbounds i32, ptr %6, i64 %34
  %36 = trunc nuw nsw i64 %indvars.iv113 to i32
  store i32 %36, ptr %35, align 4, !tbaa !22
  %37 = add nsw i32 %.07195, 1
  store i32 %.07195, ptr %25, align 4, !tbaa !22
  br label %38

38:                                               ; preds = %18, %33
  %.172 = phi i32 [ %37, %33 ], [ %.07195, %18 ]
  %indvars.iv.next114 = add nuw nsw i64 %indvars.iv113, 1
  %exitcond117.not = icmp eq i64 %indvars.iv.next114, %wide.trip.count116
  br i1 %exitcond117.not, label %.loopexit, label %18, !llvm.loop !23

39:                                               ; preds = %.lr.ph93, %58
  %indvars.iv108 = phi i64 [ 0, %.lr.ph93 ], [ %indvars.iv.next109, %58 ]
  %.27391 = phi i32 [ 0, %.lr.ph93 ], [ %.374, %58 ]
  %40 = load ptr, ptr %16, align 8, !tbaa !18
  %41 = getelementptr inbounds %struct.ckrinfo_t, ptr %40, i64 %indvars.iv108, i32 1
  %42 = load i32, ptr %41, align 4, !tbaa !19
  %43 = icmp sgt i32 %42, 0
  br i1 %43, label %44, label %58

44:                                               ; preds = %39
  %45 = getelementptr inbounds i32, ptr %10, i64 %indvars.iv108
  %46 = load i32, ptr %45, align 4, !tbaa !22
  %47 = icmp eq i32 %46, -1
  br i1 %47, label %53, label %48

48:                                               ; preds = %44
  %49 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, i32 noundef 530, ptr noundef nonnull @.str.1)
  %50 = load i32, ptr %45, align 4, !tbaa !22
  %51 = icmp eq i32 %50, -1
  br i1 %51, label %53, label %52

52:                                               ; preds = %48
  tail call void @__assert_fail(ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.1, i32 noundef 530, ptr noundef nonnull @__PRETTY_FUNCTION__.libmetis__ComputeKWayBoundary) #5
  unreachable

53:                                               ; preds = %48, %44
  %54 = sext i32 %.27391 to i64
  %55 = getelementptr inbounds i32, ptr %6, i64 %54
  %56 = trunc nuw nsw i64 %indvars.iv108 to i32
  store i32 %56, ptr %55, align 4, !tbaa !22
  %57 = add nsw i32 %.27391, 1
  store i32 %.27391, ptr %45, align 4, !tbaa !22
  br label %58

58:                                               ; preds = %39, %53
  %.374 = phi i32 [ %57, %53 ], [ %.27391, %39 ]
  %indvars.iv.next109 = add nuw nsw i64 %indvars.iv108, 1
  %exitcond112.not = icmp eq i64 %indvars.iv.next109, %wide.trip.count111
  br i1 %exitcond112.not, label %.loopexit, label %39, !llvm.loop !25

59:                                               ; preds = %3
  %60 = icmp eq i32 %2, 1
  %61 = icmp sgt i32 %4, 0
  br i1 %60, label %.preheader77, label %.preheader79

.preheader79:                                     ; preds = %59
  br i1 %61, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader79
  %62 = getelementptr inbounds i8, ptr %1, i64 184
  %wide.trip.count = zext nneg i32 %4 to i64
  br label %84

.preheader77:                                     ; preds = %59
  br i1 %61, label %.lr.ph89, label %.loopexit

.lr.ph89:                                         ; preds = %.preheader77
  %63 = getelementptr inbounds i8, ptr %1, i64 184
  %wide.trip.count106 = zext nneg i32 %4 to i64
  br label %64

64:                                               ; preds = %.lr.ph89, %83
  %indvars.iv103 = phi i64 [ 0, %.lr.ph89 ], [ %indvars.iv.next104, %83 ]
  %.487 = phi i32 [ 0, %.lr.ph89 ], [ %.5, %83 ]
  %65 = load ptr, ptr %63, align 8, !tbaa !26
  %66 = getelementptr inbounds %struct.vkrinfo_t, ptr %65, i64 %indvars.iv103, i32 2
  %67 = load i32, ptr %66, align 4, !tbaa !27
  %68 = icmp sgt i32 %67, -1
  br i1 %68, label %69, label %83

69:                                               ; preds = %64
  %70 = getelementptr inbounds i32, ptr %10, i64 %indvars.iv103
  %71 = load i32, ptr %70, align 4, !tbaa !22
  %72 = icmp eq i32 %71, -1
  br i1 %72, label %78, label %73

73:                                               ; preds = %69
  %74 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, i32 noundef 540, ptr noundef nonnull @.str.1)
  %75 = load i32, ptr %70, align 4, !tbaa !22
  %76 = icmp eq i32 %75, -1
  br i1 %76, label %78, label %77

77:                                               ; preds = %73
  tail call void @__assert_fail(ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.1, i32 noundef 540, ptr noundef nonnull @__PRETTY_FUNCTION__.libmetis__ComputeKWayBoundary) #5
  unreachable

78:                                               ; preds = %73, %69
  %79 = sext i32 %.487 to i64
  %80 = getelementptr inbounds i32, ptr %6, i64 %79
  %81 = trunc nuw nsw i64 %indvars.iv103 to i32
  store i32 %81, ptr %80, align 4, !tbaa !22
  %82 = add nsw i32 %.487, 1
  store i32 %.487, ptr %70, align 4, !tbaa !22
  br label %83

83:                                               ; preds = %64, %78
  %.5 = phi i32 [ %82, %78 ], [ %.487, %64 ]
  %indvars.iv.next104 = add nuw nsw i64 %indvars.iv103, 1
  %exitcond107.not = icmp eq i64 %indvars.iv.next104, %wide.trip.count106
  br i1 %exitcond107.not, label %.loopexit, label %64, !llvm.loop !29

84:                                               ; preds = %.lr.ph, %103
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %103 ]
  %.685 = phi i32 [ 0, %.lr.ph ], [ %.7, %103 ]
  %85 = load ptr, ptr %62, align 8, !tbaa !26
  %86 = getelementptr inbounds %struct.vkrinfo_t, ptr %85, i64 %indvars.iv, i32 1
  %87 = load i32, ptr %86, align 4, !tbaa !30
  %88 = icmp sgt i32 %87, 0
  br i1 %88, label %89, label %103

89:                                               ; preds = %84
  %90 = getelementptr inbounds i32, ptr %10, i64 %indvars.iv
  %91 = load i32, ptr %90, align 4, !tbaa !22
  %92 = icmp eq i32 %91, -1
  br i1 %92, label %98, label %93

93:                                               ; preds = %89
  %94 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, i32 noundef 546, ptr noundef nonnull @.str.1)
  %95 = load i32, ptr %90, align 4, !tbaa !22
  %96 = icmp eq i32 %95, -1
  br i1 %96, label %98, label %97

97:                                               ; preds = %93
  tail call void @__assert_fail(ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.1, i32 noundef 546, ptr noundef nonnull @__PRETTY_FUNCTION__.libmetis__ComputeKWayBoundary) #5
  unreachable

98:                                               ; preds = %93, %89
  %99 = sext i32 %.685 to i64
  %100 = getelementptr inbounds i32, ptr %6, i64 %99
  %101 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %101, ptr %100, align 4, !tbaa !22
  %102 = add nsw i32 %.685, 1
  store i32 %.685, ptr %90, align 4, !tbaa !22
  br label %103

103:                                              ; preds = %84, %98
  %.7 = phi i32 [ %102, %98 ], [ %.685, %84 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %84, !llvm.loop !31

104:                                              ; preds = %3
  tail call void (i32, ptr, ...) @gk_errexit(i32 noundef 15, ptr noundef nonnull @.str.11, i32 noundef %12) #4
  br label %.loopexit

.loopexit:                                        ; preds = %103, %83, %58, %38, %.preheader79, %.preheader77, %.preheader75, %.preheader, %104
  %.8 = phi i32 [ 0, %104 ], [ 0, %.preheader ], [ 0, %.preheader75 ], [ 0, %.preheader77 ], [ 0, %.preheader79 ], [ %.172, %38 ], [ %.374, %58 ], [ %.5, %83 ], [ %.7, %103 ]
  %105 = getelementptr inbounds i8, ptr %1, i64 136
  store i32 %.8, ptr %105, align 8, !tbaa !32
  ret void
}

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

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

declare void @gk_errexit(i32 noundef, ptr noundef, ...) local_unnamed_addr #3

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { noreturn nounwind }

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

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


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