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

; 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

declare double @gk_CPUSeconds() #1

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

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

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

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

declare void @libmetis__idxwspacefree(ptr noundef, i64 noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__Match_HEM(ptr noundef %0, ptr noundef %1) #2 {
  %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 2
  %37 = load ptr, ptr %36, align 8, !tbaa !20
  store ptr %37, ptr %13, align 8, !tbaa !5
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.graphdef, ptr %38, i32 0, i32 3
  %40 = load ptr, ptr %39, align 8, !tbaa !21
  store ptr %40, ptr %14, align 8, !tbaa !5
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.graphdef, ptr %41, i32 0, i32 5
  %43 = load ptr, ptr %42, align 8, !tbaa !22
  store ptr %43, ptr %15, align 8, !tbaa !5
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.graphdef, ptr %44, i32 0, i32 6
  %46 = load ptr, ptr %45, align 8, !tbaa !23
  store ptr %46, ptr %16, align 8, !tbaa !5
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.graphdef, ptr %47, i32 0, i32 15
  %49 = load ptr, ptr %48, align 8, !tbaa !24
  store ptr %49, ptr %18, align 8, !tbaa !5
  %50 = load i64, ptr %9, align 8, !tbaa !19
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = load i64, ptr %9, align 8, !tbaa !19
  %53 = call ptr @libmetis__idxwspacemalloc(ptr noundef %51, i64 noundef %52)
  %54 = call ptr @libmetis__idxset(i64 noundef %50, i64 noundef -1, ptr noundef %53)
  store ptr %54, ptr %17, align 8, !tbaa !5
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = load i64, ptr %9, align 8, !tbaa !19
  %57 = call ptr @libmetis__idxwspacemalloc(ptr noundef %55, i64 noundef %56)
  store ptr %57, ptr %19, align 8, !tbaa !5
  %58 = load i64, ptr %9, align 8, !tbaa !19
  %59 = load ptr, ptr %19, align 8, !tbaa !5
  call void @libmetis__RandomPermute(i64 noundef %58, ptr noundef %59, i64 noundef 1)
  store i64 0, ptr %10, align 8, !tbaa !19
  store i64 0, ptr %6, align 8, !tbaa !19
  br label %60

60:                                               ; preds = %150, %31
  %61 = load i64, ptr %6, align 8, !tbaa !19
  %62 = load i64, ptr %9, align 8, !tbaa !19
  %63 = icmp slt i64 %61, %62
  br i1 %63, label %64, label %153

64:                                               ; preds = %60
  %65 = load ptr, ptr %19, align 8, !tbaa !5
  %66 = load i64, ptr %6, align 8, !tbaa !19
  %67 = getelementptr inbounds i64, ptr %65, i64 %66
  %68 = load i64, ptr %67, align 8, !tbaa !19
  store i64 %68, ptr %5, align 8, !tbaa !19
  %69 = load ptr, ptr %17, align 8, !tbaa !5
  %70 = load i64, ptr %5, align 8, !tbaa !19
  %71 = getelementptr inbounds i64, ptr %69, i64 %70
  %72 = load i64, ptr %71, align 8, !tbaa !19
  %73 = icmp eq i64 %72, -1
  br i1 %73, label %74, label %149

74:                                               ; preds = %64
  %75 = load i64, ptr %5, align 8, !tbaa !19
  store i64 %75, ptr %11, align 8, !tbaa !19
  store i64 0, ptr %12, align 8, !tbaa !19
  %76 = load ptr, ptr %13, align 8, !tbaa !5
  %77 = load i64, ptr %5, align 8, !tbaa !19
  %78 = getelementptr inbounds i64, ptr %76, i64 %77
  %79 = load i64, ptr %78, align 8, !tbaa !19
  store i64 %79, ptr %7, align 8, !tbaa !19
  br label %80

80:                                               ; preds = %129, %74
  %81 = load i64, ptr %7, align 8, !tbaa !19
  %82 = load ptr, ptr %13, align 8, !tbaa !5
  %83 = load i64, ptr %5, align 8, !tbaa !19
  %84 = add nsw i64 %83, 1
  %85 = getelementptr inbounds i64, ptr %82, i64 %84
  %86 = load i64, ptr %85, align 8, !tbaa !19
  %87 = icmp slt i64 %81, %86
  br i1 %87, label %88, label %132

88:                                               ; preds = %80
  %89 = load ptr, ptr %15, align 8, !tbaa !5
  %90 = load i64, ptr %7, align 8, !tbaa !19
  %91 = getelementptr inbounds i64, ptr %89, i64 %90
  %92 = load i64, ptr %91, align 8, !tbaa !19
  store i64 %92, ptr %8, align 8, !tbaa !19
  %93 = load ptr, ptr %17, align 8, !tbaa !5
  %94 = load i64, ptr %8, align 8, !tbaa !19
  %95 = getelementptr inbounds i64, ptr %93, i64 %94
  %96 = load i64, ptr %95, align 8, !tbaa !19
  %97 = icmp eq i64 %96, -1
  br i1 %97, label %98, label %128

98:                                               ; preds = %88
  %99 = load i64, ptr %12, align 8, !tbaa !19
  %100 = load ptr, ptr %16, align 8, !tbaa !5
  %101 = load i64, ptr %7, align 8, !tbaa !19
  %102 = getelementptr inbounds i64, ptr %100, i64 %101
  %103 = load i64, ptr %102, align 8, !tbaa !19
  %104 = icmp slt i64 %99, %103
  br i1 %104, label %105, label %128

105:                                              ; preds = %98
  %106 = load ptr, ptr %14, align 8, !tbaa !5
  %107 = load i64, ptr %5, align 8, !tbaa !19
  %108 = getelementptr inbounds i64, ptr %106, i64 %107
  %109 = load i64, ptr %108, align 8, !tbaa !19
  %110 = load ptr, ptr %14, align 8, !tbaa !5
  %111 = load i64, ptr %8, align 8, !tbaa !19
  %112 = getelementptr inbounds i64, ptr %110, i64 %111
  %113 = load i64, ptr %112, align 8, !tbaa !19
  %114 = add nsw i64 %109, %113
  %115 = load ptr, ptr %3, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.controldef, ptr %115, i32 0, i32 5
  %117 = load i64, ptr %116, align 8, !tbaa !25
  %118 = icmp sle i64 %114, %117
  br i1 %118, label %119, label %128

119:                                              ; preds = %105
  %120 = load ptr, ptr %16, align 8, !tbaa !5
  %121 = load i64, ptr %7, align 8, !tbaa !19
  %122 = getelementptr inbounds i64, ptr %120, i64 %121
  %123 = load i64, ptr %122, align 8, !tbaa !19
  store i64 %123, ptr %12, align 8, !tbaa !19
  %124 = load ptr, ptr %15, align 8, !tbaa !5
  %125 = load i64, ptr %7, align 8, !tbaa !19
  %126 = getelementptr inbounds i64, ptr %124, i64 %125
  %127 = load i64, ptr %126, align 8, !tbaa !19
  store i64 %127, ptr %11, align 8, !tbaa !19
  br label %128

128:                                              ; preds = %119, %105, %98, %88
  br label %129

129:                                              ; preds = %128
  %130 = load i64, ptr %7, align 8, !tbaa !19
  %131 = add nsw i64 %130, 1
  store i64 %131, ptr %7, align 8, !tbaa !19
  br label %80, !llvm.loop !26

132:                                              ; preds = %80
  %133 = load i64, ptr %10, align 8, !tbaa !19
  %134 = add nsw i64 %133, 1
  store i64 %134, ptr %10, align 8, !tbaa !19
  %135 = load ptr, ptr %18, align 8, !tbaa !5
  %136 = load i64, ptr %11, align 8, !tbaa !19
  %137 = getelementptr inbounds i64, ptr %135, i64 %136
  store i64 %133, ptr %137, align 8, !tbaa !19
  %138 = load ptr, ptr %18, align 8, !tbaa !5
  %139 = load i64, ptr %5, align 8, !tbaa !19
  %140 = getelementptr inbounds i64, ptr %138, i64 %139
  store i64 %133, ptr %140, align 8, !tbaa !19
  %141 = load i64, ptr %11, align 8, !tbaa !19
  %142 = load ptr, ptr %17, align 8, !tbaa !5
  %143 = load i64, ptr %5, align 8, !tbaa !19
  %144 = getelementptr inbounds i64, ptr %142, i64 %143
  store i64 %141, ptr %144, align 8, !tbaa !19
  %145 = load i64, ptr %5, align 8, !tbaa !19
  %146 = load ptr, ptr %17, align 8, !tbaa !5
  %147 = load i64, ptr %11, align 8, !tbaa !19
  %148 = getelementptr inbounds i64, ptr %146, i64 %147
  store i64 %145, ptr %148, align 8, !tbaa !19
  br label %149

149:                                              ; preds = %132, %64
  br label %150

150:                                              ; preds = %149
  %151 = load i64, ptr %6, align 8, !tbaa !19
  %152 = add nsw i64 %151, 1
  store i64 %152, ptr %6, align 8, !tbaa !19
  br label %60, !llvm.loop !28

153:                                              ; preds = %60
  %154 = load ptr, ptr %3, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.controldef, ptr %154, i32 0, i32 1
  %156 = load i64, ptr %155, align 8, !tbaa !9
  %157 = and i64 %156, 1
  %158 = icmp ne i64 %157, 0
  br i1 %158, label %159, label %165

159:                                              ; preds = %153
  %160 = call double @gk_CPUSeconds()
  %161 = load ptr, ptr %3, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.controldef, ptr %161, i32 0, i32 14
  %163 = load double, ptr %162, align 8, !tbaa !15
  %164 = fadd double %163, %160
  store double %164, ptr %162, align 8, !tbaa !15
  br label %165

165:                                              ; preds = %159, %153
  %166 = load ptr, ptr %3, align 8, !tbaa !5
  %167 = load ptr, ptr %4, align 8, !tbaa !5
  %168 = load i64, ptr %10, align 8, !tbaa !19
  %169 = load ptr, ptr %17, align 8, !tbaa !5
  %170 = load ptr, ptr %19, align 8, !tbaa !5
  call void @libmetis__CreateCoarseGraph(ptr noundef %166, ptr noundef %167, i64 noundef %168, ptr noundef %169, ptr noundef %170)
  %171 = load ptr, ptr %3, align 8, !tbaa !5
  %172 = load i64, ptr %9, align 8, !tbaa !19
  call void @libmetis__idxwspacefree(ptr noundef %171, i64 noundef %172)
  %173 = load ptr, ptr %3, align 8, !tbaa !5
  %174 = load i64, ptr %9, align 8, !tbaa !19
  call void @libmetis__idxwspacefree(ptr noundef %173, i64 noundef %174)
  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
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 #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, !6, i64 16}
!21 = !{!17, !6, i64 24}
!22 = !{!17, !6, i64 40}
!23 = !{!17, !6, i64 48}
!24 = !{!17, !6, i64 104}
!25 = !{!10, !11, i64 40}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}


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

declare double @gk_CPUSeconds() local_unnamed_addr #0

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

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

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

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

declare void @libmetis__idxwspacefree(ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__Match_HEM(ptr noundef %0, ptr noundef %1) local_unnamed_addr #1 {
  %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 16
  %14 = load ptr, ptr %13, align 8, !tbaa !18
  %15 = getelementptr inbounds i8, ptr %1, i64 24
  %16 = load ptr, ptr %15, align 8, !tbaa !19
  %17 = getelementptr inbounds i8, ptr %1, i64 40
  %18 = load ptr, ptr %17, align 8, !tbaa !20
  %19 = getelementptr inbounds i8, ptr %1, i64 48
  %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.ph83, label %._crit_edge84

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

28:                                               ; preds = %.lr.ph83, %63
  %.081 = phi i64 [ 0, %.lr.ph83 ], [ %64, %63 ]
  %.06780 = phi i64 [ 0, %.lr.ph83 ], [ %.1, %63 ]
  %29 = getelementptr inbounds i64, ptr %25, i64 %.081
  %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 %63

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

.lr.ph:                                           ; preds = %34
  %40 = getelementptr inbounds i64, ptr %16, i64 %30
  br label %41

41:                                               ; preds = %.lr.ph, %57
  %.06679 = phi i64 [ %36, %.lr.ph ], [ %58, %57 ]
  %.06878 = phi i64 [ %30, %.lr.ph ], [ %.169, %57 ]
  %.07077 = phi i64 [ 0, %.lr.ph ], [ %.171, %57 ]
  %42 = getelementptr inbounds i64, ptr %18, i64 %.06679
  %43 = load i64, ptr %42, align 8, !tbaa !23
  %44 = getelementptr inbounds i64, ptr %24, i64 %43
  %45 = load i64, ptr %44, align 8, !tbaa !23
  %46 = icmp eq i64 %45, -1
  br i1 %46, label %47, label %57

47:                                               ; preds = %41
  %48 = getelementptr inbounds i64, ptr %20, i64 %.06679
  %49 = load i64, ptr %48, align 8, !tbaa !23
  %50 = icmp slt i64 %.07077, %49
  br i1 %50, label %51, label %57

51:                                               ; preds = %47
  %52 = load i64, ptr %40, align 8, !tbaa !23
  %53 = getelementptr inbounds i64, ptr %16, i64 %43
  %54 = load i64, ptr %53, align 8, !tbaa !23
  %55 = add nsw i64 %54, %52
  %56 = load i64, ptr %27, align 8, !tbaa !24
  %.not75 = icmp sgt i64 %55, %56
  %spec.select = select i1 %.not75, i64 %.07077, i64 %49
  %spec.select76 = select i1 %.not75, i64 %.06878, i64 %43
  br label %57

57:                                               ; preds = %51, %41, %47
  %.171 = phi i64 [ %.07077, %47 ], [ %.07077, %41 ], [ %spec.select, %51 ]
  %.169 = phi i64 [ %.06878, %47 ], [ %.06878, %41 ], [ %spec.select76, %51 ]
  %58 = add nsw i64 %.06679, 1
  %exitcond.not = icmp eq i64 %58, %38
  br i1 %exitcond.not, label %._crit_edge, label %41, !llvm.loop !25

._crit_edge:                                      ; preds = %57, %34
  %.068.lcssa = phi i64 [ %30, %34 ], [ %.169, %57 ]
  %59 = add nsw i64 %.06780, 1
  %60 = getelementptr inbounds i64, ptr %22, i64 %.068.lcssa
  store i64 %.06780, ptr %60, align 8, !tbaa !23
  %61 = getelementptr inbounds i64, ptr %22, i64 %30
  store i64 %.06780, ptr %61, align 8, !tbaa !23
  store i64 %.068.lcssa, ptr %31, align 8, !tbaa !23
  %62 = getelementptr inbounds i64, ptr %24, i64 %.068.lcssa
  store i64 %30, ptr %62, align 8, !tbaa !23
  br label %63

63:                                               ; preds = %28, %._crit_edge
  %.1 = phi i64 [ %59, %._crit_edge ], [ %.06780, %28 ]
  %64 = add nuw nsw i64 %.081, 1
  %exitcond86.not = icmp eq i64 %64, %12
  br i1 %exitcond86.not, label %._crit_edge84, label %28, !llvm.loop !27

._crit_edge84:                                    ; preds = %63, %11
  %.067.lcssa = phi i64 [ 0, %11 ], [ %.1, %63 ]
  %65 = load i64, ptr %3, align 8, !tbaa !5
  %66 = and i64 %65, 1
  %.not74 = icmp eq i64 %66, 0
  br i1 %.not74, label %72, label %67

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

72:                                               ; preds = %67, %._crit_edge84
  tail call void @libmetis__CreateCoarseGraph(ptr noundef nonnull %0, ptr noundef nonnull %1, i64 noundef %.067.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
}

attributes #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 = { 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 #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, !12, i64 16}
!19 = !{!16, !12, i64 24}
!20 = !{!16, !12, i64 40}
!21 = !{!16, !12, i64 48}
!22 = !{!16, !12, i64 104}
!23 = !{!7, !7, i64 0}
!24 = !{!6, !7, i64 40}
!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,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass