; LLVM IR from ekoontz/graphlab :: src/graphlab/extern/metis/libmetis/mmatch.ll_libmetis (MCMatch_RM)

; 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.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 }
%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 }

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__MCMatch_RM(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, 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
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.controldef, ptr %20, i32 0, i32 1
  %22 = load i64, ptr %21, align 8, !tbaa !9
  %23 = and i64 %22, 1
  %24 = icmp ne i64 %23, 0
  br i1 %24, label %25, label %31

25:                                               ; preds = %2
  %26 = call double @gk_CPUSeconds()
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.controldef, ptr %27, i32 0, i32 14
  %29 = load double, ptr %28, align 8, !tbaa !15
  %30 = fsub double %29, %26
  store double %30, ptr %28, align 8, !tbaa !15
  br label %31

31:                                               ; preds = %25, %2
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.graphdef, ptr %32, i32 0, i32 0
  %34 = load i64, ptr %33, align 8, !tbaa !16
  store i64 %34, ptr %9, align 8, !tbaa !19
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.graphdef, ptr %35, i32 0, i32 28
  %37 = load i64, ptr %36, align 8, !tbaa !20
  store i64 %37, ptr %10, align 8, !tbaa !19
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.graphdef, ptr %38, i32 0, i32 2
  %40 = load ptr, ptr %39, align 8, !tbaa !21
  store ptr %40, ptr %13, align 8, !tbaa !5
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.graphdef, ptr %41, i32 0, i32 29
  %43 = load ptr, ptr %42, align 8, !tbaa !22
  store ptr %43, ptr %19, align 8, !tbaa !5
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.graphdef, ptr %44, i32 0, i32 5
  %46 = load ptr, ptr %45, align 8, !tbaa !23
  store ptr %46, ptr %14, align 8, !tbaa !5
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.graphdef, ptr %47, i32 0, i32 6
  %49 = load ptr, ptr %48, align 8, !tbaa !24
  store ptr %49, ptr %15, align 8, !tbaa !5
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.graphdef, ptr %50, i32 0, i32 15
  %52 = load ptr, ptr %51, align 8, !tbaa !25
  store ptr %52, ptr %17, align 8, !tbaa !5
  %53 = load i64, ptr %9, align 8, !tbaa !19
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = load i64, ptr %9, align 8, !tbaa !19
  %56 = call ptr @libmetis__idxwspacemalloc(ptr noundef %54, i64 noundef %55)
  %57 = call ptr @libmetis__idxset(i64 noundef %53, i64 noundef -1, ptr noundef %56)
  store ptr %57, ptr %16, align 8, !tbaa !5
  %58 = load ptr, ptr %3, align 8, !tbaa !5
  %59 = load i64, ptr %9, align 8, !tbaa !19
  %60 = call ptr @libmetis__idxwspacemalloc(ptr noundef %58, i64 noundef %59)
  store ptr %60, ptr %18, align 8, !tbaa !5
  %61 = load i64, ptr %9, align 8, !tbaa !19
  %62 = load ptr, ptr %18, align 8, !tbaa !5
  call void @libmetis__RandomPermute(i64 noundef %61, ptr noundef %62, i64 noundef 1)
  store i64 0, ptr %11, align 8, !tbaa !19
  store i64 0, ptr %6, align 8, !tbaa !19
  br label %63

63:                                               ; preds = %142, %31
  %64 = load i64, ptr %6, align 8, !tbaa !19
  %65 = load i64, ptr %9, align 8, !tbaa !19
  %66 = icmp slt i64 %64, %65
  br i1 %66, label %67, label %145

67:                                               ; preds = %63
  %68 = load ptr, ptr %18, align 8, !tbaa !5
  %69 = load i64, ptr %6, align 8, !tbaa !19
  %70 = getelementptr inbounds i64, ptr %68, i64 %69
  %71 = load i64, ptr %70, align 8, !tbaa !19
  store i64 %71, ptr %5, align 8, !tbaa !19
  %72 = load ptr, ptr %16, align 8, !tbaa !5
  %73 = load i64, ptr %5, align 8, !tbaa !19
  %74 = getelementptr inbounds i64, ptr %72, i64 %73
  %75 = load i64, ptr %74, align 8, !tbaa !19
  %76 = icmp eq i64 %75, -1
  br i1 %76, label %77, label %141

77:                                               ; preds = %67
  %78 = load i64, ptr %5, align 8, !tbaa !19
  store i64 %78, ptr %12, align 8, !tbaa !19
  %79 = load ptr, ptr %13, align 8, !tbaa !5
  %80 = load i64, ptr %5, align 8, !tbaa !19
  %81 = getelementptr inbounds i64, ptr %79, i64 %80
  %82 = load i64, ptr %81, align 8, !tbaa !19
  store i64 %82, ptr %7, align 8, !tbaa !19
  br label %83

83:                                               ; preds = %121, %77
  %84 = load i64, ptr %7, align 8, !tbaa !19
  %85 = load ptr, ptr %13, align 8, !tbaa !5
  %86 = load i64, ptr %5, align 8, !tbaa !19
  %87 = add nsw i64 %86, 1
  %88 = getelementptr inbounds i64, ptr %85, i64 %87
  %89 = load i64, ptr %88, align 8, !tbaa !19
  %90 = icmp slt i64 %84, %89
  br i1 %90, label %91, label %124

91:                                               ; preds = %83
  %92 = load ptr, ptr %14, align 8, !tbaa !5
  %93 = load i64, ptr %7, align 8, !tbaa !19
  %94 = getelementptr inbounds i64, ptr %92, i64 %93
  %95 = load i64, ptr %94, align 8, !tbaa !19
  store i64 %95, ptr %8, align 8, !tbaa !19
  %96 = load ptr, ptr %16, align 8, !tbaa !5
  %97 = load i64, ptr %8, align 8, !tbaa !19
  %98 = getelementptr inbounds i64, ptr %96, i64 %97
  %99 = load i64, ptr %98, align 8, !tbaa !19
  %100 = icmp eq i64 %99, -1
  br i1 %100, label %101, label %120

101:                                              ; preds = %91
  %102 = load i64, ptr %10, align 8, !tbaa !19
  %103 = load ptr, ptr %19, align 8, !tbaa !5
  %104 = load i64, ptr %5, align 8, !tbaa !19
  %105 = load i64, ptr %10, align 8, !tbaa !19
  %106 = mul nsw i64 %104, %105
  %107 = getelementptr inbounds float, ptr %103, i64 %106
  %108 = load ptr, ptr %19, align 8, !tbaa !5
  %109 = load i64, ptr %8, align 8, !tbaa !19
  %110 = load i64, ptr %10, align 8, !tbaa !19
  %111 = mul nsw i64 %109, %110
  %112 = getelementptr inbounds float, ptr %108, i64 %111
  %113 = load ptr, ptr %3, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.controldef, ptr %113, i32 0, i32 6
  %115 = load float, ptr %114, align 8, !tbaa !26
  %116 = call i64 @libmetis__AreAllVwgtsBelowFast(i64 noundef %102, ptr noundef %107, ptr noundef %112, float noundef %115)
  %117 = icmp ne i64 %116, 0
  br i1 %117, label %118, label %120

118:                                              ; preds = %101
  %119 = load i64, ptr %8, align 8, !tbaa !19
  store i64 %119, ptr %12, align 8, !tbaa !19
  br label %124

120:                                              ; preds = %101, %91
  br label %121

121:                                              ; preds = %120
  %122 = load i64, ptr %7, align 8, !tbaa !19
  %123 = add nsw i64 %122, 1
  store i64 %123, ptr %7, align 8, !tbaa !19
  br label %83, !llvm.loop !27

124:                                              ; preds = %118, %83
  %125 = load i64, ptr %11, align 8, !tbaa !19
  %126 = add nsw i64 %125, 1
  store i64 %126, ptr %11, align 8, !tbaa !19
  %127 = load ptr, ptr %17, align 8, !tbaa !5
  %128 = load i64, ptr %12, align 8, !tbaa !19
  %129 = getelementptr inbounds i64, ptr %127, i64 %128
  store i64 %125, ptr %129, align 8, !tbaa !19
  %130 = load ptr, ptr %17, align 8, !tbaa !5
  %131 = load i64, ptr %5, align 8, !tbaa !19
  %132 = getelementptr inbounds i64, ptr %130, i64 %131
  store i64 %125, ptr %132, align 8, !tbaa !19
  %133 = load i64, ptr %12, align 8, !tbaa !19
  %134 = load ptr, ptr %16, align 8, !tbaa !5
  %135 = load i64, ptr %5, align 8, !tbaa !19
  %136 = getelementptr inbounds i64, ptr %134, i64 %135
  store i64 %133, ptr %136, align 8, !tbaa !19
  %137 = load i64, ptr %5, align 8, !tbaa !19
  %138 = load ptr, ptr %16, align 8, !tbaa !5
  %139 = load i64, ptr %12, align 8, !tbaa !19
  %140 = getelementptr inbounds i64, ptr %138, i64 %139
  store i64 %137, ptr %140, align 8, !tbaa !19
  br label %141

141:                                              ; preds = %124, %67
  br label %142

142:                                              ; preds = %141
  %143 = load i64, ptr %6, align 8, !tbaa !19
  %144 = add nsw i64 %143, 1
  store i64 %144, ptr %6, align 8, !tbaa !19
  br label %63, !llvm.loop !29

145:                                              ; preds = %63
  %146 = load ptr, ptr %3, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.controldef, ptr %146, i32 0, i32 1
  %148 = load i64, ptr %147, align 8, !tbaa !9
  %149 = and i64 %148, 1
  %150 = icmp ne i64 %149, 0
  br i1 %150, label %151, label %157

151:                                              ; preds = %145
  %152 = call double @gk_CPUSeconds()
  %153 = load ptr, ptr %3, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.controldef, ptr %153, i32 0, i32 14
  %155 = load double, ptr %154, align 8, !tbaa !15
  %156 = fadd double %155, %152
  store double %156, ptr %154, align 8, !tbaa !15
  br label %157

157:                                              ; preds = %151, %145
  %158 = load ptr, ptr %3, align 8, !tbaa !5
  %159 = load ptr, ptr %4, align 8, !tbaa !5
  %160 = load i64, ptr %11, align 8, !tbaa !19
  %161 = load ptr, ptr %16, align 8, !tbaa !5
  %162 = load ptr, ptr %18, align 8, !tbaa !5
  call void @libmetis__CreateCoarseGraph(ptr noundef %158, ptr noundef %159, i64 noundef %160, ptr noundef %161, ptr noundef %162)
  %163 = load ptr, ptr %3, align 8, !tbaa !5
  %164 = load i64, ptr %9, align 8, !tbaa !19
  call void @libmetis__idxwspacefree(ptr noundef %163, i64 noundef %164)
  %165 = load ptr, ptr %3, align 8, !tbaa !5
  %166 = load i64, ptr %9, align 8, !tbaa !19
  call void @libmetis__idxwspacefree(ptr noundef %165, i64 noundef %166)
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #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 double @gk_CPUSeconds() #2

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

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

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

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

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

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


; 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"

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__MCMatch_RM(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = getelementptr inbounds i8, ptr %0, i64 8
  %4 = load i64, ptr %3, align 8, !tbaa !5
  %5 = and i64 %4, 1
  %.not = icmp eq i64 %5, 0
  br i1 %.not, label %11, label %6

6:                                                ; preds = %2
  %7 = tail call double @gk_CPUSeconds() #2
  %8 = getelementptr inbounds i8, ptr %0, i64 168
  %9 = load double, ptr %8, align 8, !tbaa !14
  %10 = fsub double %9, %7
  store double %10, ptr %8, align 8, !tbaa !14
  br label %11

11:                                               ; preds = %6, %2
  %12 = load i64, ptr %1, align 8, !tbaa !15
  %13 = getelementptr inbounds i8, ptr %1, i64 208
  %14 = load i64, ptr %13, align 8, !tbaa !18
  %15 = getelementptr inbounds i8, ptr %1, i64 16
  %16 = load ptr, ptr %15, align 8, !tbaa !19
  %17 = getelementptr inbounds i8, ptr %1, i64 216
  %18 = load ptr, ptr %17, align 8, !tbaa !20
  %19 = getelementptr inbounds i8, ptr %1, i64 40
  %20 = load ptr, ptr %19, align 8, !tbaa !21
  %21 = getelementptr inbounds i8, ptr %1, i64 104
  %22 = load ptr, ptr %21, align 8, !tbaa !22
  %23 = tail call ptr @libmetis__idxwspacemalloc(ptr noundef nonnull %0, i64 noundef %12) #2
  %24 = tail call ptr @libmetis__idxset(i64 noundef %12, i64 noundef -1, ptr noundef %23) #2
  %25 = tail call ptr @libmetis__idxwspacemalloc(ptr noundef nonnull %0, i64 noundef %12) #2
  tail call void @libmetis__RandomPermute(i64 noundef %12, ptr noundef %25, i64 noundef 1) #2
  %26 = icmp sgt i64 %12, 0
  br i1 %26, label %.lr.ph76, label %._crit_edge77

.lr.ph76:                                         ; preds = %11
  %27 = getelementptr inbounds i8, ptr %0, i64 48
  br label %28

28:                                               ; preds = %.lr.ph76, %61
  %.074 = phi i64 [ 0, %.lr.ph76 ], [ %62, %61 ]
  %.06573 = phi i64 [ 0, %.lr.ph76 ], [ %.1, %61 ]
  %29 = getelementptr inbounds i64, ptr %25, i64 %.074
  %30 = load i64, ptr %29, align 8, !tbaa !23
  %31 = getelementptr inbounds i64, ptr %24, i64 %30
  %32 = load i64, ptr %31, align 8, !tbaa !23
  %33 = icmp eq i64 %32, -1
  br i1 %33, label %34, label %61

34:                                               ; preds = %28
  %35 = getelementptr inbounds i64, ptr %16, i64 %30
  %36 = load i64, ptr %35, align 8, !tbaa !23
  %37 = mul nsw i64 %30, %14
  %38 = getelementptr inbounds float, ptr %18, i64 %37
  %39 = getelementptr i8, ptr %35, i64 8
  %40 = load i64, ptr %39, align 8, !tbaa !23
  %41 = icmp slt i64 %36, %40
  br i1 %41, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %34, %53
  %42 = phi i64 [ %54, %53 ], [ %40, %34 ]
  %.06470 = phi i64 [ %55, %53 ], [ %36, %34 ]
  %43 = getelementptr inbounds i64, ptr %20, i64 %.06470
  %44 = load i64, ptr %43, align 8, !tbaa !23
  %45 = getelementptr inbounds i64, ptr %24, i64 %44
  %46 = load i64, ptr %45, align 8, !tbaa !23
  %47 = icmp eq i64 %46, -1
  br i1 %47, label %48, label %53

48:                                               ; preds = %.lr.ph
  %49 = mul nsw i64 %44, %14
  %50 = getelementptr inbounds float, ptr %18, i64 %49
  %51 = load float, ptr %27, align 8, !tbaa !24
  %52 = tail call i64 @libmetis__AreAllVwgtsBelowFast(i64 noundef %14, ptr noundef %38, ptr noundef %50, float noundef %51)
  %.not69 = icmp eq i64 %52, 0
  br i1 %.not69, label %._crit_edge79, label %._crit_edge

._crit_edge79:                                    ; preds = %48
  %.pre = load i64, ptr %39, align 8, !tbaa !23
  br label %53

53:                                               ; preds = %._crit_edge79, %.lr.ph
  %54 = phi i64 [ %.pre, %._crit_edge79 ], [ %42, %.lr.ph ]
  %55 = add nsw i64 %.06470, 1
  %56 = icmp slt i64 %55, %54
  br i1 %56, label %.lr.ph, label %._crit_edge, !llvm.loop !25

._crit_edge:                                      ; preds = %53, %48, %34
  %.066 = phi i64 [ %30, %34 ], [ %44, %48 ], [ %30, %53 ]
  %57 = add nsw i64 %.06573, 1
  %58 = getelementptr inbounds i64, ptr %22, i64 %.066
  store i64 %.06573, ptr %58, align 8, !tbaa !23
  %59 = getelementptr inbounds i64, ptr %22, i64 %30
  store i64 %.06573, ptr %59, align 8, !tbaa !23
  store i64 %.066, ptr %31, align 8, !tbaa !23
  %60 = getelementptr inbounds i64, ptr %24, i64 %.066
  store i64 %30, ptr %60, align 8, !tbaa !23
  br label %61

61:                                               ; preds = %28, %._crit_edge
  %.1 = phi i64 [ %57, %._crit_edge ], [ %.06573, %28 ]
  %62 = add nuw nsw i64 %.074, 1
  %exitcond.not = icmp eq i64 %62, %12
  br i1 %exitcond.not, label %._crit_edge77, label %28, !llvm.loop !27

._crit_edge77:                                    ; preds = %61, %11
  %.065.lcssa = phi i64 [ 0, %11 ], [ %.1, %61 ]
  %63 = load i64, ptr %3, align 8, !tbaa !5
  %64 = and i64 %63, 1
  %.not68 = icmp eq i64 %64, 0
  br i1 %.not68, label %70, label %65

65:                                               ; preds = %._crit_edge77
  %66 = tail call double @gk_CPUSeconds() #2
  %67 = getelementptr inbounds i8, ptr %0, i64 168
  %68 = load double, ptr %67, align 8, !tbaa !14
  %69 = fadd double %66, %68
  store double %69, ptr %67, align 8, !tbaa !14
  br label %70

70:                                               ; preds = %65, %._crit_edge77
  tail call void @libmetis__CreateCoarseGraph(ptr noundef nonnull %0, ptr noundef nonnull %1, i64 noundef %.065.lcssa, ptr noundef %24, ptr noundef %25) #2
  tail call void @libmetis__idxwspacefree(ptr noundef nonnull %0, i64 noundef %12) #2
  tail call void @libmetis__idxwspacefree(ptr noundef nonnull %0, i64 noundef %12) #2
  ret void
}

declare double @gk_CPUSeconds() local_unnamed_addr #1

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

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

declare void @libmetis__RandomPermute(i64 noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

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

declare void @libmetis__CreateCoarseGraph(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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


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