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

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

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

@gk_jbufs = external thread_local global [0 x [1 x %struct.__jmp_buf_tag]], align 8
@gk_cur_jbufs = external thread_local global i32, align 4

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

35:                                               ; preds = %13
  store i32 -3, ptr %14, align 4
  store i32 1, ptr %32, align 4
  br label %147

36:                                               ; preds = %13
  %37 = call i32 (...) @gk_sigtrap()
  %38 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @gk_jbufs)
  %39 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @gk_cur_jbufs)
  %40 = load i32, ptr %39, align 4, !tbaa !9
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [0 x [1 x %struct.__jmp_buf_tag]], ptr %38, i64 0, i64 %41
  %43 = getelementptr inbounds [1 x %struct.__jmp_buf_tag], ptr %42, i64 0, i64 0
  %44 = call i32 @_setjmp(ptr noundef %43) #6
  store i32 %44, ptr %28, align 4, !tbaa !9
  %45 = icmp ne i32 %44, 0
  br i1 %45, label %46, label %47

46:                                               ; preds = %36
  br label %134

47:                                               ; preds = %36
  %48 = load ptr, ptr %25, align 8, !tbaa !5
  %49 = load ptr, ptr %16, align 8, !tbaa !5
  %50 = load i32, ptr %49, align 4, !tbaa !9
  %51 = load ptr, ptr %22, align 8, !tbaa !5
  %52 = load i32, ptr %51, align 4, !tbaa !9
  %53 = load ptr, ptr %23, align 8, !tbaa !5
  %54 = load ptr, ptr %24, align 8, !tbaa !5
  %55 = call ptr @libmetis__SetupCtrl(i32 noundef 0, ptr noundef %48, i32 noundef %50, i32 noundef %52, ptr noundef %53, ptr noundef %54)
  store ptr %55, ptr %31, align 8, !tbaa !5
  %56 = load ptr, ptr %31, align 8, !tbaa !5
  %57 = icmp ne ptr %56, null
  br i1 %57, label %60, label %58

58:                                               ; preds = %47
  %59 = call i32 (...) @gk_siguntrap()
  store i32 -2, ptr %14, align 4
  store i32 1, ptr %32, align 4
  br label %147

60:                                               ; preds = %47
  %61 = load ptr, ptr %31, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.ctrl_t, ptr %61, i32 0, i32 18
  %63 = load i32, ptr %62, align 8, !tbaa !11
  %64 = icmp eq i32 %63, 1
  br i1 %64, label %65, label %70

65:                                               ; preds = %60
  %66 = load ptr, ptr %15, align 8, !tbaa !5
  %67 = load i32, ptr %66, align 4, !tbaa !9
  %68 = load ptr, ptr %17, align 8, !tbaa !5
  %69 = load ptr, ptr %18, align 8, !tbaa !5
  call void @libmetis__Change2CNumbering(i32 noundef %67, ptr noundef %68, ptr noundef %69)
  store i32 1, ptr %29, align 4, !tbaa !9
  br label %70

70:                                               ; preds = %65, %60
  %71 = load ptr, ptr %31, align 8, !tbaa !5
  %72 = load ptr, ptr %15, align 8, !tbaa !5
  %73 = load i32, ptr %72, align 4, !tbaa !9
  %74 = load ptr, ptr %16, align 8, !tbaa !5
  %75 = load i32, ptr %74, align 4, !tbaa !9
  %76 = load ptr, ptr %17, align 8, !tbaa !5
  %77 = load ptr, ptr %18, align 8, !tbaa !5
  %78 = load ptr, ptr %19, align 8, !tbaa !5
  %79 = load ptr, ptr %20, align 8, !tbaa !5
  %80 = load ptr, ptr %21, align 8, !tbaa !5
  %81 = call ptr @libmetis__SetupGraph(ptr noundef %71, i32 noundef %73, i32 noundef %75, ptr noundef %76, ptr noundef %77, ptr noundef %78, ptr noundef %79, ptr noundef %80)
  store ptr %81, ptr %30, align 8, !tbaa !5
  %82 = load ptr, ptr %31, align 8, !tbaa !5
  %83 = load ptr, ptr %30, align 8, !tbaa !5
  call void @libmetis__AllocateWorkSpace(ptr noundef %82, ptr noundef %83)
  %84 = load ptr, ptr %31, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.ctrl_t, ptr %84, i32 0, i32 2
  %86 = load i32, ptr %85, align 8, !tbaa !16
  %87 = and i32 %86, 2
  %88 = icmp ne i32 %87, 0
  br i1 %88, label %89, label %91

89:                                               ; preds = %70
  %90 = load ptr, ptr %31, align 8, !tbaa !5
  call void @libmetis__InitTimers(ptr noundef %90)
  br label %91

91:                                               ; preds = %89, %70
  %92 = load ptr, ptr %31, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.ctrl_t, ptr %92, i32 0, i32 2
  %94 = load i32, ptr %93, align 8, !tbaa !16
  %95 = and i32 %94, 2
  %96 = icmp ne i32 %95, 0
  br i1 %96, label %97, label %103

97:                                               ; preds = %91
  %98 = call double @gk_CPUSeconds()
  %99 = load ptr, ptr %31, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.ctrl_t, ptr %99, i32 0, i32 27
  %101 = load double, ptr %100, align 8, !tbaa !17
  %102 = fsub double %101, %98
  store double %102, ptr %100, align 8, !tbaa !17
  br label %103

103:                                              ; preds = %97, %91
  %104 = load ptr, ptr %31, align 8, !tbaa !5
  %105 = load ptr, ptr %30, align 8, !tbaa !5
  %106 = load ptr, ptr %22, align 8, !tbaa !5
  %107 = load i32, ptr %106, align 4, !tbaa !9
  %108 = load ptr, ptr %27, align 8, !tbaa !5
  %109 = load ptr, ptr %31, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.ctrl_t, ptr %109, i32 0, i32 24
  %111 = load ptr, ptr %110, align 8, !tbaa !18
  %112 = call i32 @libmetis__MlevelRecursiveBisection(ptr noundef %104, ptr noundef %105, i32 noundef %107, ptr noundef %108, ptr noundef %111, i32 noundef 0)
  %113 = load ptr, ptr %26, align 8, !tbaa !5
  store i32 %112, ptr %113, align 4, !tbaa !9
  %114 = load ptr, ptr %31, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.ctrl_t, ptr %114, i32 0, i32 2
  %116 = load i32, ptr %115, align 8, !tbaa !16
  %117 = and i32 %116, 2
  %118 = icmp ne i32 %117, 0
  br i1 %118, label %119, label %125

119:                                              ; preds = %103
  %120 = call double @gk_CPUSeconds()
  %121 = load ptr, ptr %31, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.ctrl_t, ptr %121, i32 0, i32 27
  %123 = load double, ptr %122, align 8, !tbaa !17
  %124 = fadd double %123, %120
  store double %124, ptr %122, align 8, !tbaa !17
  br label %125

125:                                              ; preds = %119, %103
  %126 = load ptr, ptr %31, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.ctrl_t, ptr %126, i32 0, i32 2
  %128 = load i32, ptr %127, align 8, !tbaa !16
  %129 = and i32 %128, 2
  %130 = icmp ne i32 %129, 0
  br i1 %130, label %131, label %133

131:                                              ; preds = %125
  %132 = load ptr, ptr %31, align 8, !tbaa !5
  call void @libmetis__PrintTimers(ptr noundef %132)
  br label %133

133:                                              ; preds = %131, %125
  call void @libmetis__FreeCtrl(ptr noundef %31)
  br label %134

134:                                              ; preds = %133, %46
  %135 = load i32, ptr %29, align 4, !tbaa !9
  %136 = icmp ne i32 %135, 0
  br i1 %136, label %137, label %143

137:                                              ; preds = %134
  %138 = load ptr, ptr %15, align 8, !tbaa !5
  %139 = load i32, ptr %138, align 4, !tbaa !9
  %140 = load ptr, ptr %17, align 8, !tbaa !5
  %141 = load ptr, ptr %18, align 8, !tbaa !5
  %142 = load ptr, ptr %27, align 8, !tbaa !5
  call void @libmetis__Change2FNumbering(i32 noundef %139, ptr noundef %140, ptr noundef %141, ptr noundef %142)
  br label %143

143:                                              ; preds = %137, %134
  %144 = call i32 (...) @gk_siguntrap()
  call void @gk_malloc_cleanup(i32 noundef 0)
  %145 = load i32, ptr %28, align 4, !tbaa !9
  %146 = call i32 @libmetis__metis_rcode(i32 noundef %145)
  store i32 %146, ptr %14, align 4
  store i32 1, ptr %32, align 4
  br label %147

147:                                              ; preds = %143, %58, %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  %148 = load i32, ptr %14, align 4
  ret i32 %148
}

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

declare i32 @gk_malloc_init(...) #2

declare i32 @gk_sigtrap(...) #2

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

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

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

declare i32 @gk_siguntrap(...) #2

declare void @libmetis__Change2CNumbering(i32 noundef, ptr noundef, ptr noundef) #2

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

declare void @libmetis__AllocateWorkSpace(ptr noundef, ptr noundef) #2

declare void @libmetis__InitTimers(ptr noundef) #2

declare double @gk_CPUSeconds() #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @libmetis__MlevelRecursiveBisection(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef) #0

declare void @libmetis__PrintTimers(ptr noundef) #2

declare void @libmetis__FreeCtrl(ptr noundef) #2

declare void @libmetis__Change2FNumbering(i32 noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare void @gk_malloc_cleanup(i32 noundef) #2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 72}
!12 = !{!"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, !13, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !13, i64 128, !14, i64 136, !14, i64 144, !14, i64 152, !14, i64 160, !14, i64 168, !14, i64 176, !14, i64 184, !14, i64 192, !14, i64 200, !14, i64 208, !14, i64 216, !14, i64 224, !6, i64 232, !15, i64 240, !15, i64 248, !15, 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}
!13 = !{!"float", !7, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!12, !10, i64 8}
!17 = !{!12, !14, i64 136}
!18 = !{!12, !6, i64 112}


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

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

@gk_jbufs = external thread_local global [0 x [1 x %struct.__jmp_buf_tag]], align 8
@gk_cur_jbufs = external thread_local local_unnamed_addr global i32, align 4

; Function Attrs: nounwind uwtable
define dso_local i32 @METIS_PartGraphRecursive(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr nocapture noundef readonly %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr nocapture noundef writeonly %11, ptr noundef %12) local_unnamed_addr #0 {
  %14 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #5
  %15 = call i32 (...) @gk_malloc_init() #5
  %.not = icmp eq i32 %15, 0
  br i1 %.not, label %66, label %16

16:                                               ; preds = %13
  %17 = call i32 (...) @gk_sigtrap() #5
  %18 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @gk_jbufs)
  %19 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @gk_cur_jbufs)
  %20 = load i32, ptr %19, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [0 x [1 x %struct.__jmp_buf_tag]], ptr %18, i64 0, i64 %21
  %23 = call i32 @_setjmp(ptr noundef nonnull %22) #6
  %.not28 = icmp eq i32 %23, 0
  br i1 %.not28, label %24, label %.critedge

24:                                               ; preds = %16
  %25 = load i32, ptr %1, align 4, !tbaa !5
  %26 = load i32, ptr %7, align 4, !tbaa !5
  %27 = call ptr @libmetis__SetupCtrl(i32 noundef 0, ptr noundef %10, i32 noundef %25, i32 noundef %26, ptr noundef %8, ptr noundef %9) #5
  store ptr %27, ptr %14, align 8, !tbaa !9
  %.not29 = icmp eq ptr %27, null
  br i1 %.not29, label %28, label %30

28:                                               ; preds = %24
  %29 = call i32 (...) @gk_siguntrap() #5
  br label %66

30:                                               ; preds = %24
  %31 = getelementptr inbounds i8, ptr %27, i64 72
  %32 = load i32, ptr %31, align 8, !tbaa !11
  %.not35 = icmp eq i32 %32, 1
  br i1 %.not35, label %33, label %35

33:                                               ; preds = %30
  %34 = load i32, ptr %0, align 4, !tbaa !5
  call void @libmetis__Change2CNumbering(i32 noundef %34, ptr noundef %2, ptr noundef %3) #5
  br label %35

35:                                               ; preds = %33, %30
  %36 = load i32, ptr %0, align 4, !tbaa !5
  %37 = load i32, ptr %1, align 4, !tbaa !5
  %38 = call ptr @libmetis__SetupGraph(ptr noundef nonnull %27, i32 noundef %36, i32 noundef %37, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #5
  call void @libmetis__AllocateWorkSpace(ptr noundef nonnull %27, ptr noundef %38) #5
  %39 = getelementptr inbounds i8, ptr %27, i64 8
  %40 = load i32, ptr %39, align 8, !tbaa !16
  %41 = and i32 %40, 2
  %.not30 = icmp eq i32 %41, 0
  br i1 %.not30, label %.thread, label %42

42:                                               ; preds = %35
  call void @libmetis__InitTimers(ptr noundef nonnull %27) #5
  %.pre = load i32, ptr %39, align 8, !tbaa !16
  %.pre37 = and i32 %.pre, 2
  %43 = icmp eq i32 %.pre37, 0
  br i1 %43, label %.thread, label %44

44:                                               ; preds = %42
  %45 = call double @gk_CPUSeconds() #5
  %46 = getelementptr inbounds i8, ptr %27, i64 136
  %47 = load double, ptr %46, align 8, !tbaa !17
  %48 = fsub double %47, %45
  store double %48, ptr %46, align 8, !tbaa !17
  br label %.thread

.thread:                                          ; preds = %35, %44, %42
  %49 = load i32, ptr %7, align 4, !tbaa !5
  %50 = getelementptr inbounds i8, ptr %27, i64 112
  %51 = load ptr, ptr %50, align 8, !tbaa !18
  %52 = call i32 @libmetis__MlevelRecursiveBisection(ptr noundef nonnull %27, ptr noundef %38, i32 noundef %49, ptr noundef %12, ptr noundef %51, i32 noundef 0)
  store i32 %52, ptr %11, align 4, !tbaa !5
  %53 = load i32, ptr %39, align 8, !tbaa !16
  %54 = and i32 %53, 2
  %.not32 = icmp eq i32 %54, 0
  br i1 %.not32, label %.thread41, label %55

55:                                               ; preds = %.thread
  %56 = call double @gk_CPUSeconds() #5
  %57 = getelementptr inbounds i8, ptr %27, i64 136
  %58 = load double, ptr %57, align 8, !tbaa !17
  %59 = fadd double %56, %58
  store double %59, ptr %57, align 8, !tbaa !17
  %.pre36 = load i32, ptr %39, align 8, !tbaa !16
  %.pre38 = and i32 %.pre36, 2
  %60 = icmp eq i32 %.pre38, 0
  br i1 %60, label %.thread41, label %61

61:                                               ; preds = %55
  call void @libmetis__PrintTimers(ptr noundef nonnull %27) #5
  br label %.thread41

.thread41:                                        ; preds = %.thread, %61, %55
  call void @libmetis__FreeCtrl(ptr noundef nonnull %14) #5
  br i1 %.not35, label %62, label %.critedge

62:                                               ; preds = %.thread41
  %63 = load i32, ptr %0, align 4, !tbaa !5
  call void @libmetis__Change2FNumbering(i32 noundef %63, ptr noundef %2, ptr noundef %3, ptr noundef %12) #5
  br label %.critedge

.critedge:                                        ; preds = %16, %62, %.thread41
  %64 = call i32 (...) @gk_siguntrap() #5
  call void @gk_malloc_cleanup(i32 noundef 0) #5
  %65 = call i32 @libmetis__metis_rcode(i32 noundef %23) #5
  br label %66

66:                                               ; preds = %13, %.critedge, %28
  %.0 = phi i32 [ %65, %.critedge ], [ -2, %28 ], [ -3, %13 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  ret i32 %.0
}

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

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

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

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

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

declare ptr @libmetis__SetupCtrl(i32 noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare void @libmetis__Change2CNumbering(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @libmetis__SetupGraph(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @libmetis__AllocateWorkSpace(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @libmetis__InitTimers(ptr noundef) local_unnamed_addr #2

declare double @gk_CPUSeconds() local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @libmetis__MlevelRecursiveBisection(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare void @libmetis__PrintTimers(ptr noundef) local_unnamed_addr #2

declare void @libmetis__FreeCtrl(ptr noundef) local_unnamed_addr #2

declare void @libmetis__Change2FNumbering(i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @gk_malloc_cleanup(i32 noundef) local_unnamed_addr #2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 72}
!12 = !{!"ctrl_t", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !6, i64 48, !6, i64 52, !6, i64 56, !6, i64 60, !6, i64 64, !6, i64 68, !6, i64 72, !10, i64 80, !6, i64 88, !6, i64 92, !13, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !13, i64 128, !14, i64 136, !14, i64 144, !14, i64 152, !14, i64 160, !14, i64 168, !14, i64 176, !14, i64 184, !14, i64 192, !14, i64 200, !14, i64 208, !14, i64 216, !14, i64 224, !10, i64 232, !15, i64 240, !15, i64 248, !15, 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}
!13 = !{!"float", !7, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!12, !6, i64 8}
!17 = !{!12, !14, i64 136}
!18 = !{!12, !10, i64 112}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass