; LLVM IR from ekoontz/graphlab :: src/graphlab/extern/metis/libmetis (kfmetis)

; 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.graphdef = type { i64, i64, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, i64, i64, ptr, ptr, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, ptr, ptr, ptr, ptr }
%struct.controldef = type { i64, i64, i64, i64, i64, i64, float, i64, i64, i64, i64, %struct.workspacedef, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double }
%struct.workspacedef = type { ptr, i64, i64, ptr, ptr, i64, ptr, ptr }

; Function Attrs: nounwind uwtable
define dso_local void @METIS_PartFillGraph(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) #0 {
  %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 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 i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca %struct.graphdef, align 8
  %26 = alloca %struct.controldef, align 8
  store ptr %0, ptr %12, align 8, !tbaa !5
  store ptr %1, ptr %13, align 8, !tbaa !5
  store ptr %2, ptr %14, align 8, !tbaa !5
  store ptr %3, ptr %15, align 8, !tbaa !5
  store ptr %4, ptr %16, align 8, !tbaa !5
  store ptr %5, ptr %17, align 8, !tbaa !5
  store ptr %6, ptr %18, align 8, !tbaa !5
  store ptr %7, ptr %19, align 8, !tbaa !5
  store ptr %8, ptr %20, align 8, !tbaa !5
  store ptr %9, ptr %21, align 8, !tbaa !5
  store ptr %10, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.start.p0(i64 248, ptr %25) #3
  call void @llvm.lifetime.start.p0(i64 280, ptr %26) #3
  %27 = load ptr, ptr %12, align 8, !tbaa !5
  %28 = load ptr, ptr %13, align 8, !tbaa !5
  %29 = load ptr, ptr %14, align 8, !tbaa !5
  %30 = load ptr, ptr %15, align 8, !tbaa !5
  %31 = load ptr, ptr %16, align 8, !tbaa !5
  %32 = load ptr, ptr %17, align 8, !tbaa !5
  %33 = load ptr, ptr %18, align 8, !tbaa !5
  %34 = load ptr, ptr %19, align 8, !tbaa !5
  %35 = load ptr, ptr %20, align 8, !tbaa !5
  %36 = load ptr, ptr %21, align 8, !tbaa !5
  %37 = load ptr, ptr %22, align 8, !tbaa !5
  call void @METIS_PartGraphRecursive(ptr noundef %27, ptr noundef %28, ptr noundef %29, ptr noundef %30, ptr noundef %31, ptr noundef %32, ptr noundef %33, ptr noundef %34, ptr noundef %35, ptr noundef %36, ptr noundef %37)
  %38 = load ptr, ptr %18, align 8, !tbaa !5
  %39 = load i64, ptr %38, align 8, !tbaa !9
  %40 = icmp eq i64 %39, 1
  br i1 %40, label %41, label %46

41:                                               ; preds = %11
  %42 = load ptr, ptr %12, align 8, !tbaa !5
  %43 = load i64, ptr %42, align 8, !tbaa !9
  %44 = load ptr, ptr %13, align 8, !tbaa !5
  %45 = load ptr, ptr %14, align 8, !tbaa !5
  call void @libmetis__Change2CNumbering(i64 noundef %43, ptr noundef %44, ptr noundef %45)
  br label %46

46:                                               ; preds = %41, %11
  %47 = load ptr, ptr %12, align 8, !tbaa !5
  %48 = load i64, ptr %47, align 8, !tbaa !9
  %49 = load ptr, ptr %13, align 8, !tbaa !5
  %50 = load ptr, ptr %14, align 8, !tbaa !5
  %51 = load ptr, ptr %15, align 8, !tbaa !5
  %52 = load ptr, ptr %16, align 8, !tbaa !5
  %53 = load ptr, ptr %17, align 8, !tbaa !5
  %54 = load i64, ptr %53, align 8, !tbaa !9
  call void @libmetis__SetUpGraph(ptr noundef %25, i64 noundef 2, i64 noundef %48, i64 noundef 1, ptr noundef %49, ptr noundef %50, ptr noundef %51, ptr noundef %52, i64 noundef %54)
  %55 = load ptr, ptr %20, align 8, !tbaa !5
  %56 = getelementptr inbounds i64, ptr %55, i64 0
  %57 = load i64, ptr %56, align 8, !tbaa !9
  %58 = icmp eq i64 %57, 0
  br i1 %58, label %59, label %64

59:                                               ; preds = %46
  %60 = getelementptr inbounds %struct.controldef, ptr %26, i32 0, i32 2
  store i64 3, ptr %60, align 8, !tbaa !11
  %61 = getelementptr inbounds %struct.controldef, ptr %26, i32 0, i32 3
  store i64 1, ptr %61, align 8, !tbaa !16
  %62 = getelementptr inbounds %struct.controldef, ptr %26, i32 0, i32 4
  store i64 3, ptr %62, align 8, !tbaa !17
  %63 = getelementptr inbounds %struct.controldef, ptr %26, i32 0, i32 1
  store i64 0, ptr %63, align 8, !tbaa !18
  br label %81

64:                                               ; preds = %46
  %65 = load ptr, ptr %20, align 8, !tbaa !5
  %66 = getelementptr inbounds i64, ptr %65, i64 1
  %67 = load i64, ptr %66, align 8, !tbaa !9
  %68 = getelementptr inbounds %struct.controldef, ptr %26, i32 0, i32 2
  store i64 %67, ptr %68, align 8, !tbaa !11
  %69 = load ptr, ptr %20, align 8, !tbaa !5
  %70 = getelementptr inbounds i64, ptr %69, i64 2
  %71 = load i64, ptr %70, align 8, !tbaa !9
  %72 = getelementptr inbounds %struct.controldef, ptr %26, i32 0, i32 3
  store i64 %71, ptr %72, align 8, !tbaa !16
  %73 = load ptr, ptr %20, align 8, !tbaa !5
  %74 = getelementptr inbounds i64, ptr %73, i64 3
  %75 = load i64, ptr %74, align 8, !tbaa !9
  %76 = getelementptr inbounds %struct.controldef, ptr %26, i32 0, i32 4
  store i64 %75, ptr %76, align 8, !tbaa !17
  %77 = load ptr, ptr %20, align 8, !tbaa !5
  %78 = getelementptr inbounds i64, ptr %77, i64 4
  %79 = load i64, ptr %78, align 8, !tbaa !9
  %80 = getelementptr inbounds %struct.controldef, ptr %26, i32 0, i32 1
  store i64 %79, ptr %80, align 8, !tbaa !18
  br label %81

81:                                               ; preds = %64, %59
  %82 = getelementptr inbounds %struct.controldef, ptr %26, i32 0, i32 7
  store i64 2, ptr %82, align 8, !tbaa !19
  %83 = load ptr, ptr %12, align 8, !tbaa !5
  %84 = load i64, ptr %83, align 8, !tbaa !9
  %85 = load ptr, ptr %19, align 8, !tbaa !5
  %86 = load i64, ptr %85, align 8, !tbaa !9
  %87 = trunc i64 %86 to i32
  %88 = call i32 @gk_log2(i32 noundef %87)
  %89 = mul nsw i32 40, %88
  %90 = sext i32 %89 to i64
  %91 = sdiv i64 %84, %90
  %92 = load ptr, ptr %19, align 8, !tbaa !5
  %93 = load i64, ptr %92, align 8, !tbaa !9
  %94 = mul nsw i64 20, %93
  %95 = icmp sge i64 %91, %94
  br i1 %95, label %96, label %106

96:                                               ; preds = %81
  %97 = load ptr, ptr %12, align 8, !tbaa !5
  %98 = load i64, ptr %97, align 8, !tbaa !9
  %99 = load ptr, ptr %19, align 8, !tbaa !5
  %100 = load i64, ptr %99, align 8, !tbaa !9
  %101 = trunc i64 %100 to i32
  %102 = call i32 @gk_log2(i32 noundef %101)
  %103 = mul nsw i32 40, %102
  %104 = sext i32 %103 to i64
  %105 = sdiv i64 %98, %104
  br label %110

106:                                              ; preds = %81
  %107 = load ptr, ptr %19, align 8, !tbaa !5
  %108 = load i64, ptr %107, align 8, !tbaa !9
  %109 = mul nsw i64 20, %108
  br label %110

110:                                              ; preds = %106, %96
  %111 = phi i64 [ %105, %96 ], [ %109, %106 ]
  %112 = getelementptr inbounds %struct.controldef, ptr %26, i32 0, i32 0
  store i64 %111, ptr %112, align 8, !tbaa !20
  %113 = getelementptr inbounds %struct.graphdef, ptr %25, i32 0, i32 3
  %114 = load ptr, ptr %113, align 8, !tbaa !21
  %115 = icmp ne ptr %114, null
  br i1 %115, label %116, label %122

116:                                              ; preds = %110
  %117 = load ptr, ptr %12, align 8, !tbaa !5
  %118 = load i64, ptr %117, align 8, !tbaa !9
  %119 = getelementptr inbounds %struct.graphdef, ptr %25, i32 0, i32 3
  %120 = load ptr, ptr %119, align 8, !tbaa !21
  %121 = call i64 @libmetis__idxsum(i64 noundef %118, ptr noundef %120, i64 noundef 1)
  br label %125

122:                                              ; preds = %110
  %123 = load ptr, ptr %12, align 8, !tbaa !5
  %124 = load i64, ptr %123, align 8, !tbaa !9
  br label %125

125:                                              ; preds = %122, %116
  %126 = phi i64 [ %121, %116 ], [ %124, %122 ]
  %127 = getelementptr inbounds %struct.controldef, ptr %26, i32 0, i32 0
  %128 = load i64, ptr %127, align 8, !tbaa !20
  %129 = sdiv i64 %126, %128
  %130 = sitofp i64 %129 to double
  %131 = fmul double 1.500000e+00, %130
  %132 = fptosi double %131 to i64
  %133 = getelementptr inbounds %struct.controldef, ptr %26, i32 0, i32 5
  store i64 %132, ptr %133, align 8, !tbaa !24
  call void @libmetis__InitRandom(i64 noundef -1)
  %134 = load ptr, ptr %19, align 8, !tbaa !5
  %135 = load i64, ptr %134, align 8, !tbaa !9
  call void @libmetis__AllocateWorkSpace(ptr noundef %26, ptr noundef %25, i64 noundef %135)
  %136 = load ptr, ptr %19, align 8, !tbaa !5
  %137 = load i64, ptr %136, align 8, !tbaa !9
  %138 = load ptr, ptr %22, align 8, !tbaa !5
  call void @BalanceFillIn(ptr noundef %26, ptr noundef %25, i64 noundef %137, ptr noundef %138)
  %139 = load ptr, ptr %22, align 8, !tbaa !5
  %140 = call i64 @libmetis__ComputeCut(ptr noundef %25, ptr noundef %139)
  %141 = load ptr, ptr %21, align 8, !tbaa !5
  store i64 %140, ptr %141, align 8, !tbaa !9
  call void @libmetis__FreeWorkSpace(ptr noundef %26, ptr noundef %25)
  %142 = load ptr, ptr %18, align 8, !tbaa !5
  %143 = load i64, ptr %142, align 8, !tbaa !9
  %144 = icmp eq i64 %143, 1
  br i1 %144, label %145, label %151

145:                                              ; preds = %125
  %146 = load ptr, ptr %12, align 8, !tbaa !5
  %147 = load i64, ptr %146, align 8, !tbaa !9
  %148 = load ptr, ptr %13, align 8, !tbaa !5
  %149 = load ptr, ptr %14, align 8, !tbaa !5
  %150 = load ptr, ptr %22, align 8, !tbaa !5
  call void @libmetis__Change2FNumbering(i64 noundef %147, ptr noundef %148, ptr noundef %149, ptr noundef %150)
  br label %151

151:                                              ; preds = %145, %125
  call void @llvm.lifetime.end.p0(i64 280, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 248, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  ret void
}

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

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

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

declare void @libmetis__SetUpGraph(ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef) #2

declare i32 @gk_log2(i32 noundef) #2

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

declare void @libmetis__InitRandom(i64 noundef) #2

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

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

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

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

declare void @libmetis__Change2FNumbering(i64 noundef, ptr noundef, ptr noundef, 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 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 16}
!12 = !{!"controldef", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !13, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !14, i64 88, !15, i64 152, !15, i64 160, !15, i64 168, !15, i64 176, !15, i64 184, !15, i64 192, !15, i64 200, !15, i64 208, !15, i64 216, !15, i64 224, !15, i64 232, !15, i64 240, !15, i64 248, !15, i64 256, !15, i64 264, !15, i64 272}
!13 = !{!"float", !7, i64 0}
!14 = !{!"workspacedef", !6, i64 0, !10, i64 8, !10, i64 16, !6, i64 24, !6, i64 32, !10, i64 40, !6, i64 48, !6, i64 56}
!15 = !{!"double", !7, i64 0}
!16 = !{!12, !10, i64 24}
!17 = !{!12, !10, i64 32}
!18 = !{!12, !10, i64 8}
!19 = !{!12, !10, i64 56}
!20 = !{!12, !10, i64 0}
!21 = !{!22, !6, i64 24}
!22 = !{!"graphdef", !10, i64 0, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !23, i64 56, !23, i64 60, !23, i64 64, !23, i64 68, !23, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !10, i64 112, !10, i64 120, !6, i64 128, !6, i64 136, !10, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !10, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240}
!23 = !{!"int", !7, i64 0}
!24 = !{!12, !10, i64 40}


; 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.graphdef = type { i64, i64, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, i64, i64, ptr, ptr, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, ptr, ptr, ptr, ptr }
%struct.controldef = type { i64, i64, i64, i64, i64, i64, float, i64, i64, i64, i64, %struct.workspacedef, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double }
%struct.workspacedef = type { ptr, i64, i64, ptr, ptr, i64, ptr, ptr }

; Function Attrs: nounwind uwtable
define dso_local void @METIS_PartFillGraph(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) local_unnamed_addr #0 {
  %12 = alloca %struct.graphdef, align 8
  %13 = alloca %struct.controldef, align 8
  call void @llvm.lifetime.start.p0(i64 248, ptr nonnull %12) #3
  call void @llvm.lifetime.start.p0(i64 280, ptr nonnull %13) #3
  tail call void @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) #3
  %14 = load i64, ptr %6, align 8, !tbaa !5
  %15 = icmp eq i64 %14, 1
  br i1 %15, label %16, label %18

16:                                               ; preds = %11
  %17 = load i64, ptr %0, align 8, !tbaa !5
  tail call void @libmetis__Change2CNumbering(i64 noundef %17, ptr noundef %1, ptr noundef %2) #3
  br label %18

18:                                               ; preds = %16, %11
  %19 = load i64, ptr %0, align 8, !tbaa !5
  %20 = load i64, ptr %5, align 8, !tbaa !5
  call void @libmetis__SetUpGraph(ptr noundef nonnull %12, i64 noundef 2, i64 noundef %19, i64 noundef 1, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i64 noundef %20) #3
  %21 = load i64, ptr %8, align 8, !tbaa !5
  %22 = icmp eq i64 %21, 0
  br i1 %22, label %30, label %23

23:                                               ; preds = %18
  %24 = getelementptr inbounds i8, ptr %8, i64 8
  %25 = load <2 x i64>, ptr %24, align 8, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %8, i64 24
  %27 = load i64, ptr %26, align 8, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %8, i64 32
  %29 = load i64, ptr %28, align 8, !tbaa !5
  br label %30

30:                                               ; preds = %18, %23
  %.sink46 = phi i64 [ %27, %23 ], [ 3, %18 ]
  %.sink = phi i64 [ %29, %23 ], [ 0, %18 ]
  %31 = phi <2 x i64> [ %25, %23 ], [ <i64 3, i64 1>, %18 ]
  %32 = getelementptr inbounds i8, ptr %13, i64 16
  store <2 x i64> %31, ptr %32, align 8
  %33 = getelementptr inbounds i8, ptr %13, i64 32
  store i64 %.sink46, ptr %33, align 8
  %34 = getelementptr inbounds i8, ptr %13, i64 8
  store i64 %.sink, ptr %34, align 8
  %35 = getelementptr inbounds i8, ptr %13, i64 56
  store i64 2, ptr %35, align 8, !tbaa !9
  %36 = load i64, ptr %0, align 8, !tbaa !5
  %37 = load i64, ptr %7, align 8, !tbaa !5
  %38 = trunc i64 %37 to i32
  %39 = call i32 @gk_log2(i32 noundef %38) #3
  %40 = mul nsw i32 %39, 40
  %41 = sext i32 %40 to i64
  %42 = sdiv i64 %36, %41
  %43 = load i64, ptr %7, align 8, !tbaa !5
  %44 = mul nsw i64 %43, 20
  %.not = icmp slt i64 %42, %44
  br i1 %.not, label %52, label %45

45:                                               ; preds = %30
  %46 = load i64, ptr %0, align 8, !tbaa !5
  %47 = trunc i64 %43 to i32
  %48 = call i32 @gk_log2(i32 noundef %47) #3
  %49 = mul nsw i32 %48, 40
  %50 = sext i32 %49 to i64
  %51 = sdiv i64 %46, %50
  br label %52

52:                                               ; preds = %30, %45
  %53 = phi i64 [ %51, %45 ], [ %44, %30 ]
  store i64 %53, ptr %13, align 8, !tbaa !15
  %54 = getelementptr inbounds i8, ptr %12, i64 24
  %55 = load ptr, ptr %54, align 8, !tbaa !16
  %.not45 = icmp eq ptr %55, null
  %56 = load i64, ptr %0, align 8, !tbaa !5
  br i1 %.not45, label %59, label %57

57:                                               ; preds = %52
  %58 = call i64 @libmetis__idxsum(i64 noundef %56, ptr noundef nonnull %55, i64 noundef 1) #3
  br label %59

59:                                               ; preds = %52, %57
  %60 = phi i64 [ %58, %57 ], [ %56, %52 ]
  %61 = sdiv i64 %60, %53
  %62 = sitofp i64 %61 to double
  %63 = fmul double %62, 1.500000e+00
  %64 = fptosi double %63 to i64
  %65 = getelementptr inbounds i8, ptr %13, i64 40
  store i64 %64, ptr %65, align 8, !tbaa !19
  call void @libmetis__InitRandom(i64 noundef -1) #3
  %66 = load i64, ptr %7, align 8, !tbaa !5
  call void @libmetis__AllocateWorkSpace(ptr noundef nonnull %13, ptr noundef nonnull %12, i64 noundef %66) #3
  %67 = load i64, ptr %7, align 8, !tbaa !5
  call void @BalanceFillIn(ptr noundef nonnull %13, ptr noundef nonnull %12, i64 noundef %67, ptr noundef %10)
  %68 = call i64 @libmetis__ComputeCut(ptr noundef nonnull %12, ptr noundef %10) #3
  store i64 %68, ptr %9, align 8, !tbaa !5
  call void @libmetis__FreeWorkSpace(ptr noundef nonnull %13, ptr noundef nonnull %12) #3
  %69 = load i64, ptr %6, align 8, !tbaa !5
  %70 = icmp eq i64 %69, 1
  br i1 %70, label %71, label %73

71:                                               ; preds = %59
  %72 = load i64, ptr %0, align 8, !tbaa !5
  call void @libmetis__Change2FNumbering(i64 noundef %72, ptr noundef %1, ptr noundef %2, ptr noundef %10) #3
  br label %73

73:                                               ; preds = %71, %59
  call void @llvm.lifetime.end.p0(i64 280, ptr nonnull %13) #3
  call void @llvm.lifetime.end.p0(i64 248, ptr nonnull %12) #3
  ret void
}

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

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

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

declare void @libmetis__SetUpGraph(ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

declare i32 @gk_log2(i32 noundef) local_unnamed_addr #2

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

declare void @libmetis__InitRandom(i64 noundef) local_unnamed_addr #2

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

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

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

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

declare void @libmetis__Change2FNumbering(i64 noundef, ptr noundef, ptr noundef, 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 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 56}
!10 = !{!"controldef", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !11, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !12, i64 88, !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, !14, i64 232, !14, i64 240, !14, i64 248, !14, i64 256, !14, i64 264, !14, i64 272}
!11 = !{!"float", !7, i64 0}
!12 = !{!"workspacedef", !13, i64 0, !6, i64 8, !6, i64 16, !13, i64 24, !13, i64 32, !6, i64 40, !13, i64 48, !13, i64 56}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!10, !6, i64 0}
!16 = !{!17, !13, i64 24}
!17 = !{!"graphdef", !6, i64 0, !6, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !18, i64 56, !18, i64 60, !18, i64 64, !18, i64 68, !18, i64 72, !13, i64 80, !13, i64 88, !13, i64 96, !13, i64 104, !6, i64 112, !6, i64 120, !13, i64 128, !13, i64 136, !6, i64 144, !13, i64 152, !13, i64 160, !13, i64 168, !13, i64 176, !13, i64 184, !13, i64 192, !13, i64 200, !6, i64 208, !13, i64 216, !13, i64 224, !13, i64 232, !13, i64 240}
!18 = !{!"int", !7, i64 0}
!19 = !{!10, !6, i64 40}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,MergedLoadStoreMotionPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass