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

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

%struct.graph_t = type { i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, ptr, ptr, i32, i32, ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [37 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [139 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [22 x i8], align 1
@__PRETTY_FUNCTION__.libmetis__FindPartitionInducedComponents = external hidden unnamed_addr constant [85 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @libmetis__FindPartitionInducedComponents(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #0 {
  %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 i32, align 4
  %19 = alloca 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 i32, align 4
  %26 = alloca i32, align 4
  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
  store i32 0, ptr %14, align 4, !tbaa !9
  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 4, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 4, 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 4, ptr %25) #4
  store i32 0, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #4
  store i32 0, ptr %26, align 4, !tbaa !9
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.graph_t, ptr %27, i32 0, i32 0
  %29 = load i32, ptr %28, align 8, !tbaa !11
  store i32 %29, ptr %15, align 4, !tbaa !9
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.graph_t, ptr %30, i32 0, i32 3
  %32 = load ptr, ptr %31, align 8, !tbaa !13
  store ptr %32, ptr %20, align 8, !tbaa !5
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.graph_t, ptr %33, i32 0, i32 6
  %35 = load ptr, ptr %34, align 8, !tbaa !14
  store ptr %35, ptr %21, align 8, !tbaa !5
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = icmp eq ptr %36, null
  br i1 %37, label %38, label %46

38:                                               ; preds = %4
  %39 = load i32, ptr %15, align 4, !tbaa !9
  %40 = add nsw i32 %39, 1
  %41 = sext i32 %40 to i64
  %42 = call ptr @libmetis__imalloc(i64 noundef %41, ptr noundef @.str)
  store ptr %42, ptr %7, align 8, !tbaa !5
  %43 = load i32, ptr %15, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = call ptr @libmetis__imalloc(i64 noundef %44, ptr noundef @.str.1)
  store ptr %45, ptr %8, align 8, !tbaa !5
  store i32 1, ptr %25, align 4, !tbaa !9
  br label %46

46:                                               ; preds = %38, %4
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = icmp eq ptr %47, null
  br i1 %48, label %49, label %53

49:                                               ; preds = %46
  %50 = load i32, ptr %15, align 4, !tbaa !9
  %51 = sext i32 %50 to i64
  %52 = call ptr @libmetis__ismalloc(i64 noundef %51, i32 noundef 0, ptr noundef @.str.2)
  store ptr %52, ptr %6, align 8, !tbaa !5
  store i32 1, ptr %26, align 4, !tbaa !9
  br label %53

53:                                               ; preds = %49, %46
  %54 = load i32, ptr %15, align 4, !tbaa !9
  %55 = sext i32 %54 to i64
  %56 = load i32, ptr %15, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = call ptr @libmetis__imalloc(i64 noundef %57, ptr noundef @.str.3)
  %59 = call ptr @libmetis__iincset(i64 noundef %55, i32 noundef 0, ptr noundef %58)
  store ptr %59, ptr %23, align 8, !tbaa !5
  %60 = load i32, ptr %15, align 4, !tbaa !9
  %61 = sext i32 %60 to i64
  %62 = load i32, ptr %15, align 4, !tbaa !9
  %63 = sext i32 %62 to i64
  %64 = call ptr @libmetis__imalloc(i64 noundef %63, ptr noundef @.str.4)
  %65 = call ptr @libmetis__iincset(i64 noundef %61, i32 noundef 0, ptr noundef %64)
  store ptr %65, ptr %24, align 8, !tbaa !5
  %66 = load i32, ptr %15, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = call ptr @libmetis__ismalloc(i64 noundef %67, i32 noundef 0, ptr noundef @.str.5)
  store ptr %68, ptr %22, align 8, !tbaa !5
  store i32 -1, ptr %19, align 4, !tbaa !9
  store i32 0, ptr %17, align 4, !tbaa !9
  store i32 0, ptr %16, align 4, !tbaa !9
  %69 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %69, ptr %18, align 4, !tbaa !9
  br label %70

70:                                               ; preds = %200, %53
  %71 = load i32, ptr %18, align 4, !tbaa !9
  %72 = icmp sgt i32 %71, 0
  br i1 %72, label %73, label %201

73:                                               ; preds = %70
  %74 = load i32, ptr %16, align 4, !tbaa !9
  %75 = load i32, ptr %17, align 4, !tbaa !9
  %76 = icmp eq i32 %74, %75
  br i1 %76, label %77, label %124

77:                                               ; preds = %73
  %78 = load i32, ptr %16, align 4, !tbaa !9
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = load i32, ptr %19, align 4, !tbaa !9
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %19, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds i32, ptr %79, i64 %82
  store i32 %78, ptr %83, align 4, !tbaa !9
  %84 = load ptr, ptr %22, align 8, !tbaa !5
  %85 = load ptr, ptr %24, align 8, !tbaa !5
  %86 = getelementptr inbounds i32, ptr %85, i64 0
  %87 = load i32, ptr %86, align 4, !tbaa !9
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds i32, ptr %84, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !9
  %91 = icmp eq i32 %90, 0
  br i1 %91, label %105, label %92

92:                                               ; preds = %77
  %93 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef 70, ptr noundef @.str.7)
  %94 = load ptr, ptr %22, align 8, !tbaa !5
  %95 = load ptr, ptr %24, align 8, !tbaa !5
  %96 = getelementptr inbounds i32, ptr %95, i64 0
  %97 = load i32, ptr %96, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds i32, ptr %94, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !9
  %101 = icmp eq i32 %100, 0
  br i1 %101, label %102, label %103

102:                                              ; preds = %92
  br label %104

103:                                              ; preds = %92
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.7, i32 noundef 70, ptr noundef @__PRETTY_FUNCTION__.libmetis__FindPartitionInducedComponents) #5
  unreachable

104:                                              ; preds = %102
  br label %105

105:                                              ; preds = %104, %77
  %106 = load ptr, ptr %24, align 8, !tbaa !5
  %107 = getelementptr inbounds i32, ptr %106, i64 0
  %108 = load i32, ptr %107, align 4, !tbaa !9
  store i32 %108, ptr %9, align 4, !tbaa !9
  %109 = load i32, ptr %9, align 4, !tbaa !9
  %110 = load ptr, ptr %8, align 8, !tbaa !5
  %111 = load i32, ptr %17, align 4, !tbaa !9
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %17, align 4, !tbaa !9
  %113 = sext i32 %111 to i64
  %114 = getelementptr inbounds i32, ptr %110, i64 %113
  store i32 %109, ptr %114, align 4, !tbaa !9
  %115 = load ptr, ptr %22, align 8, !tbaa !5
  %116 = load i32, ptr %9, align 4, !tbaa !9
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds i32, ptr %115, i64 %117
  store i32 1, ptr %118, align 4, !tbaa !9
  %119 = load ptr, ptr %6, align 8, !tbaa !5
  %120 = load i32, ptr %9, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds i32, ptr %119, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !9
  store i32 %123, ptr %14, align 4, !tbaa !9
  br label %124

124:                                              ; preds = %105, %73
  %125 = load ptr, ptr %8, align 8, !tbaa !5
  %126 = load i32, ptr %16, align 4, !tbaa !9
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %16, align 4, !tbaa !9
  %128 = sext i32 %126 to i64
  %129 = getelementptr inbounds i32, ptr %125, i64 %128
  %130 = load i32, ptr %129, align 4, !tbaa !9
  store i32 %130, ptr %9, align 4, !tbaa !9
  %131 = load ptr, ptr %23, align 8, !tbaa !5
  %132 = load i32, ptr %9, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds i32, ptr %131, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !9
  store i32 %135, ptr %13, align 4, !tbaa !9
  %136 = load ptr, ptr %24, align 8, !tbaa !5
  %137 = load i32, ptr %18, align 4, !tbaa !9
  %138 = add nsw i32 %137, -1
  store i32 %138, ptr %18, align 4, !tbaa !9
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds i32, ptr %136, i64 %139
  %141 = load i32, ptr %140, align 4, !tbaa !9
  %142 = load ptr, ptr %24, align 8, !tbaa !5
  %143 = load i32, ptr %13, align 4, !tbaa !9
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds i32, ptr %142, i64 %144
  store i32 %141, ptr %145, align 4, !tbaa !9
  store i32 %141, ptr %11, align 4, !tbaa !9
  %146 = load i32, ptr %13, align 4, !tbaa !9
  %147 = load ptr, ptr %23, align 8, !tbaa !5
  %148 = load i32, ptr %11, align 4, !tbaa !9
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds i32, ptr %147, i64 %149
  store i32 %146, ptr %150, align 4, !tbaa !9
  %151 = load ptr, ptr %20, align 8, !tbaa !5
  %152 = load i32, ptr %9, align 4, !tbaa !9
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds i32, ptr %151, i64 %153
  %155 = load i32, ptr %154, align 4, !tbaa !9
  store i32 %155, ptr %11, align 4, !tbaa !9
  br label %156

156:                                              ; preds = %197, %124
  %157 = load i32, ptr %11, align 4, !tbaa !9
  %158 = load ptr, ptr %20, align 8, !tbaa !5
  %159 = load i32, ptr %9, align 4, !tbaa !9
  %160 = add nsw i32 %159, 1
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds i32, ptr %158, i64 %161
  %163 = load i32, ptr %162, align 4, !tbaa !9
  %164 = icmp slt i32 %157, %163
  br i1 %164, label %165, label %200

165:                                              ; preds = %156
  %166 = load ptr, ptr %21, align 8, !tbaa !5
  %167 = load i32, ptr %11, 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
  store i32 %170, ptr %13, align 4, !tbaa !9
  %171 = load ptr, ptr %6, align 8, !tbaa !5
  %172 = load i32, ptr %13, align 4, !tbaa !9
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds i32, ptr %171, i64 %173
  %175 = load i32, ptr %174, align 4, !tbaa !9
  %176 = load i32, ptr %14, align 4, !tbaa !9
  %177 = icmp eq i32 %175, %176
  br i1 %177, label %178, label %196

178:                                              ; preds = %165
  %179 = load ptr, ptr %22, align 8, !tbaa !5
  %180 = load i32, ptr %13, align 4, !tbaa !9
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds i32, ptr %179, i64 %181
  %183 = load i32, ptr %182, align 4, !tbaa !9
  %184 = icmp ne i32 %183, 0
  br i1 %184, label %196, label %185

185:                                              ; preds = %178
  %186 = load i32, ptr %13, align 4, !tbaa !9
  %187 = load ptr, ptr %8, align 8, !tbaa !5
  %188 = load i32, ptr %17, align 4, !tbaa !9
  %189 = add nsw i32 %188, 1
  store i32 %189, ptr %17, align 4, !tbaa !9
  %190 = sext i32 %188 to i64
  %191 = getelementptr inbounds i32, ptr %187, i64 %190
  store i32 %186, ptr %191, align 4, !tbaa !9
  %192 = load ptr, ptr %22, align 8, !tbaa !5
  %193 = load i32, ptr %13, align 4, !tbaa !9
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds i32, ptr %192, i64 %194
  store i32 1, ptr %195, align 4, !tbaa !9
  br label %196

196:                                              ; preds = %185, %178, %165
  br label %197

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

200:                                              ; preds = %156
  br label %70, !llvm.loop !17

201:                                              ; preds = %70
  %202 = load i32, ptr %16, align 4, !tbaa !9
  %203 = load ptr, ptr %7, align 8, !tbaa !5
  %204 = load i32, ptr %19, align 4, !tbaa !9
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr %19, align 4, !tbaa !9
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds i32, ptr %203, i64 %206
  store i32 %202, ptr %207, align 4, !tbaa !9
  %208 = load i32, ptr %25, align 4, !tbaa !9
  %209 = icmp ne i32 %208, 0
  br i1 %209, label %210, label %211

210:                                              ; preds = %201
  call void (ptr, ...) @gk_free(ptr noundef %7, ptr noundef %8, ptr noundef null)
  br label %211

211:                                              ; preds = %210, %201
  %212 = load i32, ptr %26, align 4, !tbaa !9
  %213 = icmp ne i32 %212, 0
  br i1 %213, label %214, label %215

214:                                              ; preds = %211
  call void (ptr, ...) @gk_free(ptr noundef %6, ptr noundef null)
  br label %215

215:                                              ; preds = %214, %211
  call void (ptr, ...) @gk_free(ptr noundef %23, ptr noundef %24, ptr noundef %22, ptr noundef null)
  %216 = load i32, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 4, 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 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
  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 i32 %216
}

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

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

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

declare ptr @libmetis__iincset(i64 noundef, i32 noundef, ptr 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

declare void @gk_free(ptr noundef, ...) #2

; 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, !6, i64 16}
!14 = !{!12, !6, i64 40}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


; 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 [37 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [139 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [22 x i8], align 1
@__PRETTY_FUNCTION__.libmetis__FindPartitionInducedComponents = external hidden unnamed_addr constant [85 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -2147483647, -2147483648) i32 @libmetis__FindPartitionInducedComponents(ptr nocapture noundef readonly %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  store ptr %3, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  %11 = load i32, ptr %0, align 8, !tbaa !9
  %12 = getelementptr inbounds i8, ptr %0, i64 16
  %13 = load ptr, ptr %12, align 8, !tbaa !12
  %14 = getelementptr inbounds i8, ptr %0, i64 40
  %15 = load ptr, ptr %14, align 8, !tbaa !13
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %16, label %22

16:                                               ; preds = %4
  %17 = add nsw i32 %11, 1
  %18 = sext i32 %17 to i64
  %19 = tail call ptr @libmetis__imalloc(i64 noundef %18, ptr noundef nonnull @.str) #5
  store ptr %19, ptr %6, align 8, !tbaa !5
  %20 = sext i32 %11 to i64
  %21 = tail call ptr @libmetis__imalloc(i64 noundef %20, ptr noundef nonnull @.str.1) #5
  store ptr %21, ptr %7, align 8, !tbaa !5
  br label %22

22:                                               ; preds = %16, %4
  %23 = phi ptr [ %21, %16 ], [ %3, %4 ]
  %24 = phi ptr [ %19, %16 ], [ %2, %4 ]
  %.not55 = icmp eq ptr %1, null
  %25 = sext i32 %11 to i64
  br i1 %.not55, label %26, label %._crit_edge77

26:                                               ; preds = %22
  %27 = tail call ptr @libmetis__ismalloc(i64 noundef %25, i32 noundef 0, ptr noundef nonnull @.str.2) #5
  store ptr %27, ptr %5, align 8, !tbaa !5
  br label %._crit_edge77

._crit_edge77:                                    ; preds = %22, %26
  %28 = phi ptr [ %27, %26 ], [ %1, %22 ]
  %29 = tail call ptr @libmetis__imalloc(i64 noundef %25, ptr noundef nonnull @.str.3) #5
  %30 = tail call ptr @libmetis__iincset(i64 noundef %25, i32 noundef 0, ptr noundef %29) #5
  store ptr %30, ptr %9, align 8, !tbaa !5
  %31 = tail call ptr @libmetis__imalloc(i64 noundef %25, ptr noundef nonnull @.str.4) #5
  %32 = tail call ptr @libmetis__iincset(i64 noundef %25, i32 noundef 0, ptr noundef %31) #5
  store ptr %32, ptr %10, align 8, !tbaa !5
  %33 = tail call ptr @libmetis__ismalloc(i64 noundef %25, i32 noundef 0, ptr noundef nonnull @.str.5) #5
  store ptr %33, ptr %8, align 8, !tbaa !5
  %34 = icmp sgt i32 %11, 0
  br i1 %34, label %.lr.ph66, label %._crit_edge

.lr.ph66:                                         ; preds = %._crit_edge77
  %35 = zext nneg i32 %11 to i64
  br label %36

.loopexit:                                        ; preds = %98, %65
  %.2.lcssa = phi i32 [ %.150, %65 ], [ %.3, %98 ]
  %exitcond.not = icmp eq i64 %indvars.iv.next73, %35
  br i1 %exitcond.not, label %._crit_edge.loopexit, label %36, !llvm.loop !14

36:                                               ; preds = %.lr.ph66, %.loopexit
  %indvars.iv72 = phi i64 [ 0, %.lr.ph66 ], [ %indvars.iv.next73, %.loopexit ]
  %indvars.iv70 = phi i64 [ %35, %.lr.ph66 ], [ %indvars.iv.next71, %.loopexit ]
  %.04765 = phi i32 [ -1, %.lr.ph66 ], [ %.1, %.loopexit ]
  %.04963 = phi i32 [ 0, %.lr.ph66 ], [ %.2.lcssa, %.loopexit ]
  %.05261 = phi i32 [ 0, %.lr.ph66 ], [ %.153, %.loopexit ]
  %37 = zext i32 %.04963 to i64
  %38 = icmp eq i64 %indvars.iv72, %37
  br i1 %38, label %39, label %65

39:                                               ; preds = %36
  %40 = add nsw i32 %.04765, 1
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds i32, ptr %24, i64 %41
  %43 = trunc nuw nsw i64 %indvars.iv72 to i32
  store i32 %43, ptr %42, align 4, !tbaa !16
  %44 = load i32, ptr %32, align 4, !tbaa !16
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds i32, ptr %33, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !16
  %48 = icmp eq i32 %47, 0
  br i1 %48, label %57, label %49

49:                                               ; preds = %39
  %50 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 70, ptr noundef nonnull @.str.7)
  %51 = load i32, ptr %32, align 4, !tbaa !16
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds i32, ptr %33, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !16
  %55 = icmp eq i32 %54, 0
  br i1 %55, label %57, label %56

56:                                               ; preds = %49
  tail call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.7, i32 noundef 70, ptr noundef nonnull @__PRETTY_FUNCTION__.libmetis__FindPartitionInducedComponents) #6
  unreachable

57:                                               ; preds = %49, %39
  %.pre-phi = phi i64 [ %52, %49 ], [ %45, %39 ]
  %58 = phi i32 [ %51, %49 ], [ %44, %39 ]
  %59 = add nsw i32 %.04963, 1
  %60 = sext i32 %.04963 to i64
  %61 = getelementptr inbounds i32, ptr %23, i64 %60
  store i32 %58, ptr %61, align 4, !tbaa !16
  %62 = getelementptr inbounds i32, ptr %33, i64 %.pre-phi
  store i32 1, ptr %62, align 4, !tbaa !16
  %63 = getelementptr inbounds i32, ptr %28, i64 %.pre-phi
  %64 = load i32, ptr %63, align 4, !tbaa !16
  br label %65

65:                                               ; preds = %57, %36
  %.153 = phi i32 [ %64, %57 ], [ %.05261, %36 ]
  %.150 = phi i32 [ %59, %57 ], [ %.04963, %36 ]
  %.1 = phi i32 [ %40, %57 ], [ %.04765, %36 ]
  %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1
  %66 = getelementptr inbounds i32, ptr %23, i64 %indvars.iv72
  %67 = load i32, ptr %66, align 4, !tbaa !16
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds i32, ptr %30, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !16
  %indvars.iv.next71 = add nsw i64 %indvars.iv70, -1
  %71 = getelementptr inbounds i32, ptr %32, i64 %indvars.iv.next71
  %72 = load i32, ptr %71, align 4, !tbaa !16
  %73 = sext i32 %70 to i64
  %74 = getelementptr inbounds i32, ptr %32, i64 %73
  store i32 %72, ptr %74, align 4, !tbaa !16
  %75 = sext i32 %72 to i64
  %76 = getelementptr inbounds i32, ptr %30, i64 %75
  store i32 %70, ptr %76, align 4, !tbaa !16
  %77 = getelementptr inbounds i32, ptr %13, i64 %68
  %78 = load i32, ptr %77, align 4, !tbaa !16
  %79 = getelementptr i8, ptr %77, i64 4
  %80 = load i32, ptr %79, align 4, !tbaa !16
  %81 = icmp slt i32 %78, %80
  br i1 %81, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %65
  %82 = sext i32 %78 to i64
  br label %83

83:                                               ; preds = %.lr.ph, %98
  %84 = phi i32 [ %80, %.lr.ph ], [ %99, %98 ]
  %indvars.iv = phi i64 [ %82, %.lr.ph ], [ %indvars.iv.next, %98 ]
  %.259 = phi i32 [ %.150, %.lr.ph ], [ %.3, %98 ]
  %85 = getelementptr inbounds i32, ptr %15, i64 %indvars.iv
  %86 = load i32, ptr %85, align 4, !tbaa !16
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds i32, ptr %28, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !16
  %90 = icmp eq i32 %89, %.153
  br i1 %90, label %91, label %98

91:                                               ; preds = %83
  %92 = getelementptr inbounds i32, ptr %33, i64 %87
  %93 = load i32, ptr %92, align 4, !tbaa !16
  %.not56 = icmp eq i32 %93, 0
  br i1 %.not56, label %94, label %98

94:                                               ; preds = %91
  %95 = add nsw i32 %.259, 1
  %96 = sext i32 %.259 to i64
  %97 = getelementptr inbounds i32, ptr %23, i64 %96
  store i32 %86, ptr %97, align 4, !tbaa !16
  store i32 1, ptr %92, align 4, !tbaa !16
  %.pre = load i32, ptr %79, align 4, !tbaa !16
  br label %98

98:                                               ; preds = %83, %91, %94
  %99 = phi i32 [ %84, %91 ], [ %.pre, %94 ], [ %84, %83 ]
  %.3 = phi i32 [ %.259, %91 ], [ %95, %94 ], [ %.259, %83 ]
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %100 = sext i32 %99 to i64
  %101 = icmp slt i64 %indvars.iv.next, %100
  br i1 %101, label %83, label %.loopexit, !llvm.loop !17

._crit_edge.loopexit:                             ; preds = %.loopexit
  %102 = add nsw i32 %.1, 1
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %._crit_edge77
  %.051.lcssa = phi i32 [ 0, %._crit_edge77 ], [ %11, %._crit_edge.loopexit ]
  %.047.lcssa = phi i32 [ 0, %._crit_edge77 ], [ %102, %._crit_edge.loopexit ]
  %103 = sext i32 %.047.lcssa to i64
  %104 = getelementptr inbounds i32, ptr %24, i64 %103
  store i32 %.051.lcssa, ptr %104, align 4, !tbaa !16
  br i1 %.not, label %105, label %106

105:                                              ; preds = %._crit_edge
  call void (ptr, ...) @gk_free(ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef null) #5
  br label %106

106:                                              ; preds = %105, %._crit_edge
  br i1 %.not55, label %107, label %108

107:                                              ; preds = %106
  call void (ptr, ...) @gk_free(ptr noundef nonnull %5, ptr noundef null) #5
  br label %108

108:                                              ; preds = %107, %106
  call void (ptr, ...) @gk_free(ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %8, ptr noundef null) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  ret i32 %.047.lcssa
}

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

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

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

declare ptr @libmetis__iincset(i64 noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

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

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

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

; Function Attrs: mustprogress 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 = { mustprogress 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 = { 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 #4 = { 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 #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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"graph_t", !11, i64 0, !11, i64 4, !11, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !11, i64 72, !11, i64 76, !11, i64 80, !11, i64 84, !11, i64 88, !6, i64 96, !6, i64 104, !11, i64 112, !11, i64 116, !6, i64 120, !6, i64 128, !11, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !6, i64 16}
!13 = !{!10, !6, i64 40}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!11, !11, i64 0}
!17 = distinct !{!17, !15}


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