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

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

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

@.str = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [138 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [46 x i8], align 1
@__PRETTY_FUNCTION__.libmetis__SetupGraph = external hidden unnamed_addr constant [99 x i8], align 1

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

49:                                               ; preds = %8
  %50 = load ptr, ptr %14, align 8, !tbaa !5
  %51 = load ptr, ptr %22, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.graph_t, ptr %51, i32 0, i32 4
  store ptr %50, ptr %52, align 8, !tbaa !19
  %53 = load ptr, ptr %22, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.graph_t, ptr %53, i32 0, i32 11
  store i32 0, ptr %54, align 4, !tbaa !20
  br label %63

55:                                               ; preds = %8
  %56 = load i32, ptr %11, align 4, !tbaa !9
  %57 = load i32, ptr %10, align 4, !tbaa !9
  %58 = mul nsw i32 %56, %57
  %59 = sext i32 %58 to i64
  %60 = call ptr @libmetis__ismalloc(i64 noundef %59, i32 noundef 1, ptr noundef @.str)
  %61 = load ptr, ptr %22, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.graph_t, ptr %61, i32 0, i32 4
  store ptr %60, ptr %62, align 8, !tbaa !19
  store ptr %60, ptr %14, align 8, !tbaa !5
  br label %63

63:                                               ; preds = %55, %49
  %64 = load i32, ptr %11, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = call ptr @libmetis__imalloc(i64 noundef %65, ptr noundef @.str.1)
  %67 = load ptr, ptr %22, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.graph_t, ptr %67, i32 0, i32 8
  store ptr %66, ptr %68, align 8, !tbaa !21
  %69 = load i32, ptr %11, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = call ptr @libmetis__rmalloc(i64 noundef %70, ptr noundef @.str.2)
  %72 = load ptr, ptr %22, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.graph_t, ptr %72, i32 0, i32 9
  store ptr %71, ptr %73, align 8, !tbaa !22
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %74

74:                                               ; preds = %122, %63
  %75 = load i32, ptr %17, align 4, !tbaa !9
  %76 = load i32, ptr %11, align 4, !tbaa !9
  %77 = icmp slt i32 %75, %76
  br i1 %77, label %78, label %125

78:                                               ; preds = %74
  %79 = load i32, ptr %10, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = load ptr, ptr %14, align 8, !tbaa !5
  %82 = load i32, ptr %17, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds i32, ptr %81, i64 %83
  %85 = load i32, ptr %11, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = call i32 @libmetis__isum(i64 noundef %80, ptr noundef %84, i64 noundef %86)
  %88 = load ptr, ptr %22, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.graph_t, ptr %88, i32 0, i32 8
  %90 = load ptr, ptr %89, align 8, !tbaa !21
  %91 = load i32, ptr %17, align 4, !tbaa !9
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds i32, ptr %90, i64 %92
  store i32 %87, ptr %93, align 4, !tbaa !9
  %94 = load ptr, ptr %22, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.graph_t, ptr %94, i32 0, i32 8
  %96 = load ptr, ptr %95, align 8, !tbaa !21
  %97 = load i32, ptr %17, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds i32, ptr %96, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !9
  %101 = icmp sgt i32 %100, 0
  br i1 %101, label %102, label %110

102:                                              ; preds = %78
  %103 = load ptr, ptr %22, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.graph_t, ptr %103, i32 0, i32 8
  %105 = load ptr, ptr %104, align 8, !tbaa !21
  %106 = load i32, ptr %17, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds i32, ptr %105, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !9
  br label %111

110:                                              ; preds = %78
  br label %111

111:                                              ; preds = %110, %102
  %112 = phi i32 [ %109, %102 ], [ 1, %110 ]
  %113 = sitofp i32 %112 to double
  %114 = fdiv double 1.000000e+00, %113
  %115 = fptrunc double %114 to float
  %116 = load ptr, ptr %22, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.graph_t, ptr %116, i32 0, i32 9
  %118 = load ptr, ptr %117, align 8, !tbaa !22
  %119 = load i32, ptr %17, align 4, !tbaa !9
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds float, ptr %118, i64 %120
  store float %115, ptr %121, align 4, !tbaa !23
  br label %122

122:                                              ; preds = %111
  %123 = load i32, ptr %17, align 4, !tbaa !9
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %17, align 4, !tbaa !9
  br label %74, !llvm.loop !25

125:                                              ; preds = %74
  %126 = load ptr, ptr %9, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.ctrl_t, ptr %126, i32 0, i32 1
  %128 = load i32, ptr %127, align 4, !tbaa !27
  %129 = icmp eq i32 %128, 1
  br i1 %129, label %130, label %201

130:                                              ; preds = %125
  %131 = load ptr, ptr %15, align 8, !tbaa !5
  %132 = icmp ne ptr %131, null
  br i1 %132, label %133, label %139

133:                                              ; preds = %130
  %134 = load ptr, ptr %15, align 8, !tbaa !5
  %135 = load ptr, ptr %22, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.graph_t, ptr %135, i32 0, i32 5
  store ptr %134, ptr %136, align 8, !tbaa !31
  %137 = load ptr, ptr %22, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.graph_t, ptr %137, i32 0, i32 12
  store i32 0, ptr %138, align 8, !tbaa !32
  br label %145

139:                                              ; preds = %130
  %140 = load i32, ptr %10, align 4, !tbaa !9
  %141 = sext i32 %140 to i64
  %142 = call ptr @libmetis__ismalloc(i64 noundef %141, i32 noundef 1, ptr noundef @.str.3)
  %143 = load ptr, ptr %22, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.graph_t, ptr %143, i32 0, i32 5
  store ptr %142, ptr %144, align 8, !tbaa !31
  store ptr %142, ptr %15, align 8, !tbaa !5
  br label %145

145:                                              ; preds = %139, %133
  %146 = load ptr, ptr %22, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.graph_t, ptr %146, i32 0, i32 1
  %148 = load i32, ptr %147, align 4, !tbaa !13
  %149 = sext i32 %148 to i64
  %150 = call ptr @libmetis__imalloc(i64 noundef %149, ptr noundef @.str.4)
  %151 = load ptr, ptr %22, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.graph_t, ptr %151, i32 0, i32 7
  store ptr %150, ptr %152, align 8, !tbaa !33
  store ptr %150, ptr %16, align 8, !tbaa !5
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %153

153:                                              ; preds = %197, %145
  %154 = load i32, ptr %17, align 4, !tbaa !9
  %155 = load i32, ptr %10, align 4, !tbaa !9
  %156 = icmp slt i32 %154, %155
  br i1 %156, label %157, label %200

157:                                              ; preds = %153
  %158 = load ptr, ptr %12, align 8, !tbaa !5
  %159 = load i32, ptr %17, align 4, !tbaa !9
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds i32, ptr %158, i64 %160
  %162 = load i32, ptr %161, align 4, !tbaa !9
  store i32 %162, ptr %18, align 4, !tbaa !9
  br label %163

163:                                              ; preds = %193, %157
  %164 = load i32, ptr %18, align 4, !tbaa !9
  %165 = load ptr, ptr %12, align 8, !tbaa !5
  %166 = load i32, ptr %17, align 4, !tbaa !9
  %167 = add nsw i32 %166, 1
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds i32, ptr %165, i64 %168
  %170 = load i32, ptr %169, align 4, !tbaa !9
  %171 = icmp slt i32 %164, %170
  br i1 %171, label %172, label %196

172:                                              ; preds = %163
  %173 = load ptr, ptr %15, align 8, !tbaa !5
  %174 = load i32, ptr %17, align 4, !tbaa !9
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds i32, ptr %173, i64 %175
  %177 = load i32, ptr %176, align 4, !tbaa !9
  %178 = add nsw i32 1, %177
  %179 = load ptr, ptr %15, align 8, !tbaa !5
  %180 = load ptr, ptr %13, align 8, !tbaa !5
  %181 = load i32, ptr %18, align 4, !tbaa !9
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds i32, ptr %180, i64 %182
  %184 = load i32, ptr %183, align 4, !tbaa !9
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds i32, ptr %179, i64 %185
  %187 = load i32, ptr %186, align 4, !tbaa !9
  %188 = add nsw i32 %178, %187
  %189 = load ptr, ptr %16, align 8, !tbaa !5
  %190 = load i32, ptr %18, align 4, !tbaa !9
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds i32, ptr %189, i64 %191
  store i32 %188, ptr %192, align 4, !tbaa !9
  br label %193

193:                                              ; preds = %172
  %194 = load i32, ptr %18, align 4, !tbaa !9
  %195 = add nsw i32 %194, 1
  store i32 %195, ptr %18, align 4, !tbaa !9
  br label %163, !llvm.loop !34

196:                                              ; preds = %163
  br label %197

197:                                              ; preds = %196
  %198 = load i32, ptr %17, align 4, !tbaa !9
  %199 = add nsw i32 %198, 1
  store i32 %199, ptr %17, align 4, !tbaa !9
  br label %153, !llvm.loop !35

200:                                              ; preds = %153
  br label %219

201:                                              ; preds = %125
  %202 = load ptr, ptr %16, align 8, !tbaa !5
  %203 = icmp ne ptr %202, null
  br i1 %203, label %204, label %210

204:                                              ; preds = %201
  %205 = load ptr, ptr %16, align 8, !tbaa !5
  %206 = load ptr, ptr %22, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.graph_t, ptr %206, i32 0, i32 7
  store ptr %205, ptr %207, align 8, !tbaa !33
  %208 = load ptr, ptr %22, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.graph_t, ptr %208, i32 0, i32 14
  store i32 0, ptr %209, align 8, !tbaa !36
  br label %218

210:                                              ; preds = %201
  %211 = load ptr, ptr %22, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.graph_t, ptr %211, i32 0, i32 1
  %213 = load i32, ptr %212, align 4, !tbaa !13
  %214 = sext i32 %213 to i64
  %215 = call ptr @libmetis__ismalloc(i64 noundef %214, i32 noundef 1, ptr noundef @.str.4)
  %216 = load ptr, ptr %22, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.graph_t, ptr %216, i32 0, i32 7
  store ptr %215, ptr %217, align 8, !tbaa !33
  store ptr %215, ptr %16, align 8, !tbaa !5
  br label %218

218:                                              ; preds = %210, %204
  br label %219

219:                                              ; preds = %218, %200
  %220 = load ptr, ptr %22, align 8, !tbaa !5
  call void @libmetis__SetupGraph_tvwgt(ptr noundef %220)
  %221 = load ptr, ptr %9, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.ctrl_t, ptr %221, i32 0, i32 0
  %223 = load i32, ptr %222, align 8, !tbaa !37
  %224 = icmp eq i32 %223, 0
  br i1 %224, label %230, label %225

225:                                              ; preds = %219
  %226 = load ptr, ptr %9, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.ctrl_t, ptr %226, i32 0, i32 0
  %228 = load i32, ptr %227, align 8, !tbaa !37
  %229 = icmp eq i32 %228, 2
  br i1 %229, label %230, label %232

230:                                              ; preds = %225, %219
  %231 = load ptr, ptr %22, align 8, !tbaa !5
  call void @libmetis__SetupGraph_label(ptr noundef %231)
  br label %232

232:                                              ; preds = %230, %225
  %233 = load ptr, ptr %22, align 8, !tbaa !5
  %234 = load ptr, ptr %9, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.ctrl_t, ptr %234, i32 0, i32 18
  %236 = load i32, ptr %235, align 8, !tbaa !38
  %237 = call i32 @libmetis__CheckGraph(ptr noundef %233, i32 noundef %236, i32 noundef 1)
  %238 = icmp ne i32 %237, 0
  br i1 %238, label %250, label %239

239:                                              ; preds = %232
  %240 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef 90, ptr noundef @.str.6)
  %241 = load ptr, ptr %22, align 8, !tbaa !5
  %242 = load ptr, ptr %9, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.ctrl_t, ptr %242, i32 0, i32 18
  %244 = load i32, ptr %243, align 8, !tbaa !38
  %245 = call i32 @libmetis__CheckGraph(ptr noundef %241, i32 noundef %244, i32 noundef 1)
  %246 = icmp ne i32 %245, 0
  br i1 %246, label %247, label %248

247:                                              ; preds = %239
  br label %249

248:                                              ; preds = %239
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.6, i32 noundef 90, ptr noundef @__PRETTY_FUNCTION__.libmetis__SetupGraph) #5
  unreachable

249:                                              ; preds = %247
  br label %250

250:                                              ; preds = %249, %232
  %251 = load ptr, ptr %22, align 8, !tbaa !5
  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 4, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  ret ptr %251
}

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @libmetis__CreateGraph() #0

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

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

declare ptr @libmetis__rmalloc(i64 noundef, ptr noundef) #2

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

; Function Attrs: nounwind uwtable
declare dso_local void @libmetis__SetupGraph_tvwgt(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @libmetis__SetupGraph_label(ptr noundef) #0

declare i32 @libmetis__CheckGraph(ptr noundef, i32 noundef, i32 noundef) #2

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) #1

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


; 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 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [138 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [46 x i8], align 1
@__PRETTY_FUNCTION__.libmetis__SetupGraph = external hidden unnamed_addr constant [99 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @libmetis__SetupGraph(ptr nocapture noundef readonly %0, i32 noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) local_unnamed_addr #0 {
  %9 = tail call ptr @libmetis__CreateGraph()
  store i32 %1, ptr %9, align 8, !tbaa !5
  %10 = sext i32 %1 to i64
  %11 = getelementptr inbounds i32, ptr %3, i64 %10
  %12 = load i32, ptr %11, align 4, !tbaa !11
  %13 = getelementptr inbounds i8, ptr %9, i64 4
  store i32 %12, ptr %13, align 4, !tbaa !12
  %14 = getelementptr inbounds i8, ptr %9, i64 8
  store i32 %2, ptr %14, align 8, !tbaa !13
  %15 = getelementptr inbounds i8, ptr %9, i64 16
  store ptr %3, ptr %15, align 8, !tbaa !14
  %16 = getelementptr inbounds i8, ptr %9, i64 72
  store i32 0, ptr %16, align 8, !tbaa !15
  %17 = getelementptr inbounds i8, ptr %9, i64 40
  store ptr %4, ptr %17, align 8, !tbaa !16
  %18 = getelementptr inbounds i8, ptr %9, i64 84
  store i32 0, ptr %18, align 4, !tbaa !17
  %.not = icmp eq ptr %5, null
  br i1 %.not, label %21, label %19

19:                                               ; preds = %8
  %20 = getelementptr inbounds i8, ptr %9, i64 76
  store i32 0, ptr %20, align 4, !tbaa !18
  br label %25

21:                                               ; preds = %8
  %22 = mul nsw i32 %2, %1
  %23 = sext i32 %22 to i64
  %24 = tail call ptr @libmetis__ismalloc(i64 noundef %23, i32 noundef 1, ptr noundef nonnull @.str) #5
  br label %25

25:                                               ; preds = %21, %19
  %.sink = phi ptr [ %24, %21 ], [ %5, %19 ]
  %26 = getelementptr inbounds i8, ptr %9, i64 24
  store ptr %.sink, ptr %26, align 8
  %27 = sext i32 %2 to i64
  %28 = tail call ptr @libmetis__imalloc(i64 noundef %27, ptr noundef nonnull @.str.1) #5
  %29 = getelementptr inbounds i8, ptr %9, i64 56
  store ptr %28, ptr %29, align 8, !tbaa !19
  %30 = tail call ptr @libmetis__rmalloc(i64 noundef %27, ptr noundef nonnull @.str.2) #5
  %31 = getelementptr inbounds i8, ptr %9, i64 64
  store ptr %30, ptr %31, align 8, !tbaa !20
  %32 = icmp sgt i32 %2, 0
  br i1 %32, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %25
  %wide.trip.count = zext nneg i32 %2 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 ]
  %33 = getelementptr inbounds i32, ptr %.sink, i64 %indvars.iv
  %34 = tail call i32 @libmetis__isum(i64 noundef %10, ptr noundef %33, i64 noundef %27) #5
  %35 = load ptr, ptr %29, align 8, !tbaa !19
  %36 = getelementptr inbounds i32, ptr %35, i64 %indvars.iv
  store i32 %34, ptr %36, align 4, !tbaa !11
  %spec.select = tail call i32 @llvm.smax.i32(i32 %34, i32 1)
  %37 = uitofp nneg i32 %spec.select to double
  %38 = fdiv double 1.000000e+00, %37
  %39 = fptrunc double %38 to float
  %40 = load ptr, ptr %31, align 8, !tbaa !20
  %41 = getelementptr inbounds float, ptr %40, i64 %indvars.iv
  store float %39, ptr %41, align 4, !tbaa !21
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !23

._crit_edge:                                      ; preds = %.lr.ph, %25
  %42 = getelementptr inbounds i8, ptr %0, i64 4
  %43 = load i32, ptr %42, align 4, !tbaa !25
  %44 = icmp eq i32 %43, 1
  br i1 %44, label %45, label %77

45:                                               ; preds = %._crit_edge
  %.not87 = icmp eq ptr %6, null
  br i1 %.not87, label %48, label %46

46:                                               ; preds = %45
  %47 = getelementptr inbounds i8, ptr %9, i64 80
  store i32 0, ptr %47, align 8, !tbaa !29
  br label %50

48:                                               ; preds = %45
  %49 = tail call ptr @libmetis__ismalloc(i64 noundef %10, i32 noundef 1, ptr noundef nonnull @.str.3) #5
  br label %50

50:                                               ; preds = %48, %46
  %.sink107 = phi ptr [ %49, %48 ], [ %6, %46 ]
  %51 = getelementptr inbounds i8, ptr %9, i64 32
  store ptr %.sink107, ptr %51, align 8
  %52 = load i32, ptr %13, align 4, !tbaa !12
  %53 = sext i32 %52 to i64
  %54 = tail call ptr @libmetis__imalloc(i64 noundef %53, ptr noundef nonnull @.str.4) #5
  %55 = getelementptr inbounds i8, ptr %9, i64 48
  store ptr %54, ptr %55, align 8, !tbaa !30
  %56 = icmp sgt i32 %1, 0
  br i1 %56, label %.lr.ph97.preheader, label %.loopexit90

.lr.ph97.preheader:                               ; preds = %50
  %wide.trip.count105 = zext nneg i32 %1 to i64
  %.pre = load i32, ptr %3, align 4, !tbaa !11
  br label %.lr.ph97

.loopexit:                                        ; preds = %64, %.lr.ph97
  %57 = phi i32 [ %60, %.lr.ph97 ], [ %74, %64 ]
  %exitcond106.not = icmp eq i64 %indvars.iv.next103, %wide.trip.count105
  br i1 %exitcond106.not, label %.loopexit90, label %.lr.ph97, !llvm.loop !31

.lr.ph97:                                         ; preds = %.lr.ph97.preheader, %.loopexit
  %58 = phi i32 [ %.pre, %.lr.ph97.preheader ], [ %57, %.loopexit ]
  %indvars.iv102 = phi i64 [ 0, %.lr.ph97.preheader ], [ %indvars.iv.next103, %.loopexit ]
  %indvars.iv.next103 = add nuw nsw i64 %indvars.iv102, 1
  %59 = getelementptr inbounds i32, ptr %3, i64 %indvars.iv.next103
  %60 = load i32, ptr %59, align 4, !tbaa !11
  %61 = icmp slt i32 %58, %60
  br i1 %61, label %.lr.ph94, label %.loopexit

.lr.ph94:                                         ; preds = %.lr.ph97
  %62 = getelementptr inbounds i32, ptr %.sink107, i64 %indvars.iv102
  %63 = sext i32 %58 to i64
  br label %64

64:                                               ; preds = %.lr.ph94, %64
  %indvars.iv99 = phi i64 [ %63, %.lr.ph94 ], [ %indvars.iv.next100, %64 ]
  %65 = load i32, ptr %62, align 4, !tbaa !11
  %66 = add nsw i32 %65, 1
  %67 = getelementptr inbounds i32, ptr %4, i64 %indvars.iv99
  %68 = load i32, ptr %67, align 4, !tbaa !11
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds i32, ptr %.sink107, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !11
  %72 = add nsw i32 %66, %71
  %73 = getelementptr inbounds i32, ptr %54, i64 %indvars.iv99
  store i32 %72, ptr %73, align 4, !tbaa !11
  %indvars.iv.next100 = add nsw i64 %indvars.iv99, 1
  %74 = load i32, ptr %59, align 4, !tbaa !11
  %75 = sext i32 %74 to i64
  %76 = icmp slt i64 %indvars.iv.next100, %75
  br i1 %76, label %64, label %.loopexit, !llvm.loop !32

77:                                               ; preds = %._crit_edge
  %.not86 = icmp eq ptr %7, null
  br i1 %.not86, label %81, label %78

78:                                               ; preds = %77
  %79 = getelementptr inbounds i8, ptr %9, i64 48
  store ptr %7, ptr %79, align 8, !tbaa !30
  %80 = getelementptr inbounds i8, ptr %9, i64 88
  store i32 0, ptr %80, align 8, !tbaa !33
  br label %.loopexit90

81:                                               ; preds = %77
  %82 = load i32, ptr %13, align 4, !tbaa !12
  %83 = sext i32 %82 to i64
  %84 = tail call ptr @libmetis__ismalloc(i64 noundef %83, i32 noundef 1, ptr noundef nonnull @.str.4) #5
  %85 = getelementptr inbounds i8, ptr %9, i64 48
  store ptr %84, ptr %85, align 8, !tbaa !30
  br label %.loopexit90

.loopexit90:                                      ; preds = %.loopexit, %50, %78, %81
  tail call void @libmetis__SetupGraph_tvwgt(ptr noundef nonnull %9)
  %86 = load i32, ptr %0, align 8, !tbaa !34
  switch i32 %86, label %88 [
    i32 0, label %87
    i32 2, label %87
  ]

87:                                               ; preds = %.loopexit90, %.loopexit90
  tail call void @libmetis__SetupGraph_label(ptr noundef nonnull %9)
  br label %88

88:                                               ; preds = %.loopexit90, %87
  %89 = getelementptr inbounds i8, ptr %0, i64 72
  %90 = load i32, ptr %89, align 8, !tbaa !35
  %91 = tail call i32 @libmetis__CheckGraph(ptr noundef nonnull %9, i32 noundef %90, i32 noundef 1) #5
  %.not88 = icmp eq i32 %91, 0
  br i1 %.not88, label %92, label %97

92:                                               ; preds = %88
  %93 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 90, ptr noundef nonnull @.str.6)
  %94 = load i32, ptr %89, align 8, !tbaa !35
  %95 = tail call i32 @libmetis__CheckGraph(ptr noundef nonnull %9, i32 noundef %94, i32 noundef 1) #5
  %.not89 = icmp eq i32 %95, 0
  br i1 %.not89, label %96, label %97

96:                                               ; preds = %92
  tail call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.6, i32 noundef 90, ptr noundef nonnull @__PRETTY_FUNCTION__.libmetis__SetupGraph) #6
  unreachable

97:                                               ; preds = %92, %88
  ret ptr %9
}

; Function Attrs: nounwind uwtable
declare dso_local ptr @libmetis__CreateGraph() local_unnamed_addr #0

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @libmetis__SetupGraph_tvwgt(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @libmetis__SetupGraph_label(ptr noundef) local_unnamed_addr #0

declare i32 @libmetis__CheckGraph(ptr noundef, i32 noundef, i32 noundef) 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #4

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


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