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

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

@.str = external hidden unnamed_addr constant [29 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__MocRefine2Way(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, float noundef %4) #0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca float, align 4
  %11 = alloca i64, align 8
  %12 = alloca [16 x float], align 16
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store float %4, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 64, ptr %12) #3
  store i64 0, ptr %11, align 8, !tbaa !11
  br label %13

13:                                               ; preds = %22, %5
  %14 = load i64, ptr %11, align 8, !tbaa !11
  %15 = load ptr, ptr %8, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.graphdef, ptr %15, i32 0, i32 28
  %17 = load i64, ptr %16, align 8, !tbaa !13
  %18 = icmp slt i64 %14, %17
  br i1 %18, label %19, label %25

19:                                               ; preds = %13
  %20 = load i64, ptr %11, align 8, !tbaa !11
  %21 = getelementptr inbounds [16 x float], ptr %12, i64 0, i64 %20
  store float 1.000000e+00, ptr %21, align 4, !tbaa !9
  br label %22

22:                                               ; preds = %19
  %23 = load i64, ptr %11, align 8, !tbaa !11
  %24 = add nsw i64 %23, 1
  store i64 %24, ptr %11, align 8, !tbaa !11
  br label %13, !llvm.loop !16

25:                                               ; preds = %13
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.controldef, ptr %26, i32 0, i32 1
  %28 = load i64, ptr %27, align 8, !tbaa !18
  %29 = and i64 %28, 1
  %30 = icmp ne i64 %29, 0
  br i1 %30, label %31, label %37

31:                                               ; preds = %25
  %32 = call double @gk_CPUSeconds()
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.controldef, ptr %33, i32 0, i32 17
  %35 = load double, ptr %34, align 8, !tbaa !22
  %36 = fsub double %35, %32
  store double %36, ptr %34, align 8, !tbaa !22
  br label %37

37:                                               ; preds = %31, %25
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = load ptr, ptr %8, align 8, !tbaa !5
  call void @libmetis__MocCompute2WayPartitionParams(ptr noundef %38, ptr noundef %39)
  br label %40

40:                                               ; preds = %121, %37
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.controldef, ptr %41, i32 0, i32 1
  %43 = load i64, ptr %42, align 8, !tbaa !18
  %44 = and i64 %43, 1
  %45 = icmp ne i64 %44, 0
  br i1 %45, label %46, label %52

46:                                               ; preds = %40
  %47 = call double @gk_CPUSeconds()
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.controldef, ptr %48, i32 0, i32 19
  %50 = load double, ptr %49, align 8, !tbaa !23
  %51 = fsub double %50, %47
  store double %51, ptr %49, align 8, !tbaa !23
  br label %52

52:                                               ; preds = %46, %40
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.controldef, ptr %53, i32 0, i32 4
  %55 = load i64, ptr %54, align 8, !tbaa !24
  switch i64 %55, label %71 [
    i64 1, label %56
    i64 2, label %63
  ]

56:                                               ; preds = %52
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  call void @libmetis__MocBalance2Way(ptr noundef %57, ptr noundef %58, ptr noundef %59, float noundef 0x3FF07AE140000000)
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = load ptr, ptr %8, align 8, !tbaa !5
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  call void @libmetis__MocFM_2WayEdgeRefine(ptr noundef %60, ptr noundef %61, ptr noundef %62, i64 noundef 8)
  br label %75

63:                                               ; preds = %52
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = load ptr, ptr %8, align 8, !tbaa !5
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  call void @libmetis__MocBalance2Way(ptr noundef %64, ptr noundef %65, ptr noundef %66, float noundef 0x3FF07AE140000000)
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  %69 = load ptr, ptr %9, align 8, !tbaa !5
  %70 = getelementptr inbounds [16 x float], ptr %12, i64 0, i64 0
  call void @libmetis__MocFM_2WayEdgeRefine2(ptr noundef %67, ptr noundef %68, ptr noundef %69, ptr noundef %70, i64 noundef 8)
  br label %75

71:                                               ; preds = %52
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.controldef, ptr %72, i32 0, i32 4
  %74 = load i64, ptr %73, align 8, !tbaa !24
  call void (ptr, ...) @errexit(ptr noundef @.str, i64 noundef %74)
  br label %75

75:                                               ; preds = %71, %63, %56
  %76 = load ptr, ptr %6, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.controldef, ptr %76, i32 0, i32 1
  %78 = load i64, ptr %77, align 8, !tbaa !18
  %79 = and i64 %78, 1
  %80 = icmp ne i64 %79, 0
  br i1 %80, label %81, label %87

81:                                               ; preds = %75
  %82 = call double @gk_CPUSeconds()
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.controldef, ptr %83, i32 0, i32 19
  %85 = load double, ptr %84, align 8, !tbaa !23
  %86 = fadd double %85, %82
  store double %86, ptr %84, align 8, !tbaa !23
  br label %87

87:                                               ; preds = %81, %75
  %88 = load ptr, ptr %8, align 8, !tbaa !5
  %89 = load ptr, ptr %7, align 8, !tbaa !5
  %90 = icmp eq ptr %88, %89
  br i1 %90, label %91, label %92

91:                                               ; preds = %87
  br label %122

92:                                               ; preds = %87
  %93 = load ptr, ptr %8, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.graphdef, ptr %93, i32 0, i32 32
  %95 = load ptr, ptr %94, align 8, !tbaa !25
  store ptr %95, ptr %8, align 8, !tbaa !5
  %96 = load ptr, ptr %6, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.controldef, ptr %96, i32 0, i32 1
  %98 = load i64, ptr %97, align 8, !tbaa !18
  %99 = and i64 %98, 1
  %100 = icmp ne i64 %99, 0
  br i1 %100, label %101, label %107

101:                                              ; preds = %92
  %102 = call double @gk_CPUSeconds()
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.controldef, ptr %103, i32 0, i32 20
  %105 = load double, ptr %104, align 8, !tbaa !26
  %106 = fsub double %105, %102
  store double %106, ptr %104, align 8, !tbaa !26
  br label %107

107:                                              ; preds = %101, %92
  %108 = load ptr, ptr %6, align 8, !tbaa !5
  %109 = load ptr, ptr %8, align 8, !tbaa !5
  call void @libmetis__MocProject2WayPartition(ptr noundef %108, ptr noundef %109)
  %110 = load ptr, ptr %6, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.controldef, ptr %110, i32 0, i32 1
  %112 = load i64, ptr %111, align 8, !tbaa !18
  %113 = and i64 %112, 1
  %114 = icmp ne i64 %113, 0
  br i1 %114, label %115, label %121

115:                                              ; preds = %107
  %116 = call double @gk_CPUSeconds()
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.controldef, ptr %117, i32 0, i32 20
  %119 = load double, ptr %118, align 8, !tbaa !26
  %120 = fadd double %119, %116
  store double %120, ptr %118, align 8, !tbaa !26
  br label %121

121:                                              ; preds = %115, %107
  br label %40

122:                                              ; preds = %91
  %123 = load ptr, ptr %6, align 8, !tbaa !5
  %124 = load ptr, ptr %8, align 8, !tbaa !5
  %125 = load ptr, ptr %9, align 8, !tbaa !5
  call void @libmetis__MocBalance2Way(ptr noundef %123, ptr noundef %124, ptr noundef %125, float noundef 0x3FF028F5C0000000)
  %126 = load ptr, ptr %6, align 8, !tbaa !5
  %127 = load ptr, ptr %8, align 8, !tbaa !5
  %128 = load ptr, ptr %9, align 8, !tbaa !5
  call void @libmetis__MocFM_2WayEdgeRefine(ptr noundef %126, ptr noundef %127, ptr noundef %128, i64 noundef 8)
  %129 = load ptr, ptr %6, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.controldef, ptr %129, i32 0, i32 1
  %131 = load i64, ptr %130, align 8, !tbaa !18
  %132 = and i64 %131, 1
  %133 = icmp ne i64 %132, 0
  br i1 %133, label %134, label %140

134:                                              ; preds = %122
  %135 = call double @gk_CPUSeconds()
  %136 = load ptr, ptr %6, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.controldef, ptr %136, i32 0, i32 17
  %138 = load double, ptr %137, align 8, !tbaa !22
  %139 = fadd double %138, %135
  store double %139, ptr %137, align 8, !tbaa !22
  br label %140

140:                                              ; preds = %134, %122
  call void @llvm.lifetime.end.p0(i64 64, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #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

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

declare void @libmetis__MocBalance2Way(ptr noundef, ptr noundef, ptr noundef, float noundef) #2

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

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

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

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

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


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

@.str = external hidden unnamed_addr constant [29 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__MocRefine2Way(ptr noundef %0, ptr noundef readnone %1, ptr noundef %2, ptr noundef %3, float noundef %4) local_unnamed_addr #0 {
  %6 = alloca [16 x float], align 16
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %6) #3
  %7 = getelementptr inbounds i8, ptr %2, i64 208
  %8 = load i64, ptr %7, align 8, !tbaa !5
  %9 = icmp sgt i64 %8, 0
  br i1 %9, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %5
  %min.iters.check = icmp ult i64 %8, 8
  br i1 %min.iters.check, label %.lr.ph.preheader49, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %8, 9223372036854775800
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %10 = getelementptr inbounds [16 x float], ptr %6, i64 0, i64 %index
  %11 = getelementptr inbounds i8, ptr %10, i64 16
  store <4 x float> <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>, ptr %10, align 16, !tbaa !12
  store <4 x float> <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>, ptr %11, align 16, !tbaa !12
  %index.next = add nuw i64 %index, 8
  %12 = icmp eq i64 %index.next, %n.vec
  br i1 %12, label %middle.block, label %vector.body, !llvm.loop !14

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %8, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader49

.lr.ph.preheader49:                               ; preds = %middle.block, %.lr.ph.preheader
  %.048.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader49, %.lr.ph
  %.048 = phi i64 [ %14, %.lr.ph ], [ %.048.ph, %.lr.ph.preheader49 ]
  %13 = getelementptr inbounds [16 x float], ptr %6, i64 0, i64 %.048
  store float 1.000000e+00, ptr %13, align 4, !tbaa !12
  %14 = add nuw nsw i64 %.048, 1
  %exitcond.not = icmp eq i64 %14, %8
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !18

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %5
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  %16 = load i64, ptr %15, align 8, !tbaa !19
  %17 = and i64 %16, 1
  %.not = icmp eq i64 %17, 0
  br i1 %.not, label %23, label %18

18:                                               ; preds = %._crit_edge
  %19 = tail call double @gk_CPUSeconds() #3
  %20 = getelementptr inbounds i8, ptr %0, i64 192
  %21 = load double, ptr %20, align 8, !tbaa !23
  %22 = fsub double %21, %19
  store double %22, ptr %20, align 8, !tbaa !23
  br label %23

23:                                               ; preds = %18, %._crit_edge
  tail call void @libmetis__MocCompute2WayPartitionParams(ptr noundef nonnull %0, ptr noundef nonnull %2)
  %24 = getelementptr inbounds i8, ptr %0, i64 208
  %25 = getelementptr inbounds i8, ptr %0, i64 32
  %26 = getelementptr inbounds i8, ptr %0, i64 216
  br label %27

27:                                               ; preds = %.backedge, %23
  %.042 = phi ptr [ %2, %23 ], [ %50, %.backedge ]
  %28 = load i64, ptr %15, align 8, !tbaa !19
  %29 = and i64 %28, 1
  %.not43 = icmp eq i64 %29, 0
  br i1 %.not43, label %34, label %30

30:                                               ; preds = %27
  %31 = call double @gk_CPUSeconds() #3
  %32 = load double, ptr %24, align 8, !tbaa !24
  %33 = fsub double %32, %31
  store double %33, ptr %24, align 8, !tbaa !24
  br label %34

34:                                               ; preds = %30, %27
  %35 = load i64, ptr %25, align 8, !tbaa !25
  switch i64 %35, label %38 [
    i64 1, label %36
    i64 2, label %37
  ]

36:                                               ; preds = %34
  call void @libmetis__MocBalance2Way(ptr noundef nonnull %0, ptr noundef %.042, ptr noundef %3, float noundef 0x3FF07AE140000000) #3
  call void @libmetis__MocFM_2WayEdgeRefine(ptr noundef nonnull %0, ptr noundef %.042, ptr noundef %3, i64 noundef 8) #3
  br label %39

37:                                               ; preds = %34
  call void @libmetis__MocBalance2Way(ptr noundef nonnull %0, ptr noundef %.042, ptr noundef %3, float noundef 0x3FF07AE140000000) #3
  call void @libmetis__MocFM_2WayEdgeRefine2(ptr noundef nonnull %0, ptr noundef %.042, ptr noundef %3, ptr noundef nonnull %6, i64 noundef 8) #3
  br label %39

38:                                               ; preds = %34
  call void (ptr, ...) @errexit(ptr noundef nonnull @.str, i64 noundef %35) #3
  br label %39

39:                                               ; preds = %38, %37, %36
  %40 = load i64, ptr %15, align 8, !tbaa !19
  %41 = and i64 %40, 1
  %.not44 = icmp eq i64 %41, 0
  br i1 %.not44, label %46, label %42

42:                                               ; preds = %39
  %43 = call double @gk_CPUSeconds() #3
  %44 = load double, ptr %24, align 8, !tbaa !24
  %45 = fadd double %43, %44
  store double %45, ptr %24, align 8, !tbaa !24
  br label %46

46:                                               ; preds = %42, %39
  %47 = icmp eq ptr %.042, %1
  br i1 %47, label %64, label %48

48:                                               ; preds = %46
  %49 = getelementptr inbounds i8, ptr %.042, i64 240
  %50 = load ptr, ptr %49, align 8, !tbaa !26
  %51 = load i64, ptr %15, align 8, !tbaa !19
  %52 = and i64 %51, 1
  %.not45 = icmp eq i64 %52, 0
  br i1 %.not45, label %57, label %53

53:                                               ; preds = %48
  %54 = call double @gk_CPUSeconds() #3
  %55 = load double, ptr %26, align 8, !tbaa !27
  %56 = fsub double %55, %54
  store double %56, ptr %26, align 8, !tbaa !27
  br label %57

57:                                               ; preds = %53, %48
  call void @libmetis__MocProject2WayPartition(ptr noundef nonnull %0, ptr noundef %50)
  %58 = load i64, ptr %15, align 8, !tbaa !19
  %59 = and i64 %58, 1
  %.not46 = icmp eq i64 %59, 0
  br i1 %.not46, label %.backedge, label %60

60:                                               ; preds = %57
  %61 = call double @gk_CPUSeconds() #3
  %62 = load double, ptr %26, align 8, !tbaa !27
  %63 = fadd double %61, %62
  store double %63, ptr %26, align 8, !tbaa !27
  br label %.backedge

.backedge:                                        ; preds = %60, %57
  br label %27

64:                                               ; preds = %46
  call void @libmetis__MocBalance2Way(ptr noundef nonnull %0, ptr noundef %.042, ptr noundef %3, float noundef 0x3FF028F5C0000000) #3
  call void @libmetis__MocFM_2WayEdgeRefine(ptr noundef nonnull %0, ptr noundef %.042, ptr noundef %3, i64 noundef 8) #3
  %65 = load i64, ptr %15, align 8, !tbaa !19
  %66 = and i64 %65, 1
  %.not47 = icmp eq i64 %66, 0
  br i1 %.not47, label %72, label %67

67:                                               ; preds = %64
  %68 = call double @gk_CPUSeconds() #3
  %69 = getelementptr inbounds i8, ptr %0, i64 192
  %70 = load double, ptr %69, align 8, !tbaa !23
  %71 = fadd double %68, %70
  store double %71, ptr %69, align 8, !tbaa !23
  br label %72

72:                                               ; preds = %67, %64
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #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 double @gk_CPUSeconds() local_unnamed_addr #2

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

declare void @libmetis__MocBalance2Way(ptr noundef, ptr noundef, ptr noundef, float noundef) local_unnamed_addr #2

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

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

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

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

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


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