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

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

34:                                               ; preds = %13
  %35 = load ptr, ptr %14, align 8, !tbaa !5
  %36 = load i64, ptr %35, align 8, !tbaa !9
  %37 = load ptr, ptr %16, align 8, !tbaa !5
  %38 = load ptr, ptr %17, align 8, !tbaa !5
  call void @libmetis__Change2CNumbering(i64 noundef %36, ptr noundef %37, ptr noundef %38)
  br label %39

39:                                               ; preds = %34, %13
  %40 = load ptr, ptr %14, align 8, !tbaa !5
  %41 = load i64, ptr %40, align 8, !tbaa !9
  %42 = load ptr, ptr %15, align 8, !tbaa !5
  %43 = load i64, ptr %42, align 8, !tbaa !9
  %44 = load ptr, ptr %16, align 8, !tbaa !5
  %45 = load ptr, ptr %17, align 8, !tbaa !5
  %46 = load ptr, ptr %18, align 8, !tbaa !5
  %47 = load ptr, ptr %19, align 8, !tbaa !5
  %48 = load ptr, ptr %20, align 8, !tbaa !5
  %49 = load i64, ptr %48, align 8, !tbaa !9
  call void @libmetis__SetUpGraph(ptr noundef %29, i64 noundef 2, i64 noundef %41, i64 noundef %43, ptr noundef %44, ptr noundef %45, ptr noundef %46, ptr noundef %47, i64 noundef %49)
  %50 = load ptr, ptr %24, align 8, !tbaa !5
  %51 = getelementptr inbounds i64, ptr %50, i64 0
  %52 = load i64, ptr %51, align 8, !tbaa !9
  %53 = icmp eq i64 %52, 0
  br i1 %53, label %54, label %59

54:                                               ; preds = %39
  %55 = getelementptr inbounds %struct.controldef, ptr %30, i32 0, i32 2
  store i64 5, ptr %55, align 8, !tbaa !11
  %56 = getelementptr inbounds %struct.controldef, ptr %30, i32 0, i32 3
  store i64 2, ptr %56, align 8, !tbaa !16
  %57 = getelementptr inbounds %struct.controldef, ptr %30, i32 0, i32 4
  store i64 1, ptr %57, align 8, !tbaa !17
  %58 = getelementptr inbounds %struct.controldef, ptr %30, i32 0, i32 1
  store i64 0, ptr %58, align 8, !tbaa !18
  br label %76

59:                                               ; preds = %39
  %60 = load ptr, ptr %24, align 8, !tbaa !5
  %61 = getelementptr inbounds i64, ptr %60, i64 1
  %62 = load i64, ptr %61, align 8, !tbaa !9
  %63 = getelementptr inbounds %struct.controldef, ptr %30, i32 0, i32 2
  store i64 %62, ptr %63, align 8, !tbaa !11
  %64 = load ptr, ptr %24, align 8, !tbaa !5
  %65 = getelementptr inbounds i64, ptr %64, i64 2
  %66 = load i64, ptr %65, align 8, !tbaa !9
  %67 = getelementptr inbounds %struct.controldef, ptr %30, i32 0, i32 3
  store i64 %66, ptr %67, align 8, !tbaa !16
  %68 = load ptr, ptr %24, align 8, !tbaa !5
  %69 = getelementptr inbounds i64, ptr %68, i64 3
  %70 = load i64, ptr %69, align 8, !tbaa !9
  %71 = getelementptr inbounds %struct.controldef, ptr %30, i32 0, i32 4
  store i64 %70, ptr %71, align 8, !tbaa !17
  %72 = load ptr, ptr %24, align 8, !tbaa !5
  %73 = getelementptr inbounds i64, ptr %72, i64 4
  %74 = load i64, ptr %73, align 8, !tbaa !9
  %75 = getelementptr inbounds %struct.controldef, ptr %30, i32 0, i32 1
  store i64 %74, ptr %75, align 8, !tbaa !18
  br label %76

76:                                               ; preds = %59, %54
  %77 = getelementptr inbounds %struct.controldef, ptr %30, i32 0, i32 7
  store i64 2, ptr %77, align 8, !tbaa !19
  %78 = load ptr, ptr %14, align 8, !tbaa !5
  %79 = load i64, ptr %78, align 8, !tbaa !9
  %80 = load ptr, ptr %22, align 8, !tbaa !5
  %81 = load i64, ptr %80, align 8, !tbaa !9
  %82 = trunc i64 %81 to i32
  %83 = call i32 @gk_log2(i32 noundef %82)
  %84 = mul nsw i32 20, %83
  %85 = sext i32 %84 to i64
  %86 = sdiv i64 %79, %85
  %87 = load ptr, ptr %22, align 8, !tbaa !5
  %88 = load i64, ptr %87, align 8, !tbaa !9
  %89 = mul nsw i64 30, %88
  %90 = icmp sge i64 %86, %89
  br i1 %90, label %91, label %101

91:                                               ; preds = %76
  %92 = load ptr, ptr %14, align 8, !tbaa !5
  %93 = load i64, ptr %92, align 8, !tbaa !9
  %94 = load ptr, ptr %22, align 8, !tbaa !5
  %95 = load i64, ptr %94, align 8, !tbaa !9
  %96 = trunc i64 %95 to i32
  %97 = call i32 @gk_log2(i32 noundef %96)
  %98 = mul nsw i32 20, %97
  %99 = sext i32 %98 to i64
  %100 = sdiv i64 %93, %99
  br label %105

101:                                              ; preds = %76
  %102 = load ptr, ptr %22, align 8, !tbaa !5
  %103 = load i64, ptr %102, align 8, !tbaa !9
  %104 = mul nsw i64 30, %103
  br label %105

105:                                              ; preds = %101, %91
  %106 = phi i64 [ %100, %91 ], [ %104, %101 ]
  %107 = getelementptr inbounds %struct.controldef, ptr %30, i32 0, i32 0
  store i64 %106, ptr %107, align 8, !tbaa !20
  %108 = getelementptr inbounds %struct.controldef, ptr %30, i32 0, i32 6
  store float 0.000000e+00, ptr %108, align 8, !tbaa !21
  call void @libmetis__InitRandom(i64 noundef -1)
  %109 = load ptr, ptr %22, align 8, !tbaa !5
  %110 = load i64, ptr %109, align 8, !tbaa !9
  call void @libmetis__AllocateWorkSpace(ptr noundef %30, ptr noundef %29, i64 noundef %110)
  %111 = getelementptr inbounds %struct.controldef, ptr %30, 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 %116

115:                                              ; preds = %105
  call void @libmetis__InitTimers(ptr noundef %30)
  br label %116

116:                                              ; preds = %115, %105
  %117 = getelementptr inbounds %struct.controldef, ptr %30, i32 0, i32 1
  %118 = load i64, ptr %117, align 8, !tbaa !18
  %119 = and i64 %118, 1
  %120 = icmp ne i64 %119, 0
  br i1 %120, label %121, label %126

121:                                              ; preds = %116
  %122 = call double @gk_CPUSeconds()
  %123 = getelementptr inbounds %struct.controldef, ptr %30, i32 0, i32 12
  %124 = load double, ptr %123, align 8, !tbaa !22
  %125 = fsub double %124, %122
  store double %125, ptr %123, align 8, !tbaa !22
  br label %126

126:                                              ; preds = %121, %116
  %127 = load ptr, ptr %22, align 8, !tbaa !5
  %128 = load i64, ptr %127, align 8, !tbaa !9
  %129 = load ptr, ptr %26, align 8, !tbaa !5
  %130 = load ptr, ptr %23, align 8, !tbaa !5
  %131 = call i64 @MCMlevelKWayRefinement(ptr noundef %30, ptr noundef %29, i64 noundef %128, ptr noundef %129, ptr noundef %130)
  %132 = load ptr, ptr %25, align 8, !tbaa !5
  store i64 %131, ptr %132, align 8, !tbaa !9
  %133 = getelementptr inbounds %struct.controldef, ptr %30, i32 0, i32 1
  %134 = load i64, ptr %133, align 8, !tbaa !18
  %135 = and i64 %134, 1
  %136 = icmp ne i64 %135, 0
  br i1 %136, label %137, label %142

137:                                              ; preds = %126
  %138 = call double @gk_CPUSeconds()
  %139 = getelementptr inbounds %struct.controldef, ptr %30, i32 0, i32 12
  %140 = load double, ptr %139, align 8, !tbaa !22
  %141 = fadd double %140, %138
  store double %141, ptr %139, align 8, !tbaa !22
  br label %142

142:                                              ; preds = %137, %126
  %143 = getelementptr inbounds %struct.controldef, ptr %30, i32 0, i32 1
  %144 = load i64, ptr %143, align 8, !tbaa !18
  %145 = and i64 %144, 1
  %146 = icmp ne i64 %145, 0
  br i1 %146, label %147, label %148

147:                                              ; preds = %142
  call void @libmetis__PrintTimers(ptr noundef %30)
  br label %148

148:                                              ; preds = %147, %142
  call void @libmetis__FreeWorkSpace(ptr noundef %30, ptr noundef %29)
  %149 = load ptr, ptr %21, align 8, !tbaa !5
  %150 = load i64, ptr %149, align 8, !tbaa !9
  %151 = icmp eq i64 %150, 1
  br i1 %151, label %152, label %158

152:                                              ; preds = %148
  %153 = load ptr, ptr %14, align 8, !tbaa !5
  %154 = load i64, ptr %153, align 8, !tbaa !9
  %155 = load ptr, ptr %16, align 8, !tbaa !5
  %156 = load ptr, ptr %17, align 8, !tbaa !5
  %157 = load ptr, ptr %26, align 8, !tbaa !5
  call void @libmetis__Change2FNumbering(i64 noundef %154, ptr noundef %155, ptr noundef %156, ptr noundef %157)
  br label %158

158:                                              ; preds = %152, %148
  call void @llvm.lifetime.end.p0(i64 280, ptr %30) #3
  call void @llvm.lifetime.end.p0(i64 248, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #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 @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 void @libmetis__InitRandom(i64 noundef) #2

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

declare void @libmetis__InitTimers(ptr noundef) #2

declare double @gk_CPUSeconds() #2

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

declare void @libmetis__PrintTimers(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 = !{!12, !13, i64 48}
!22 = !{!12, !15, i64 152}


; 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_mCRefineGraphKway(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr nocapture noundef readonly %6, ptr nocapture noundef readonly %7, ptr nocapture noundef readonly %8, ptr noundef %9, ptr nocapture noundef readonly %10, ptr nocapture noundef writeonly %11, ptr noundef %12) local_unnamed_addr #0 {
  %14 = alloca %struct.graphdef, align 8
  %15 = alloca %struct.controldef, align 8
  call void @llvm.lifetime.start.p0(i64 248, ptr nonnull %14) #3
  call void @llvm.lifetime.start.p0(i64 280, ptr nonnull %15) #3
  %16 = load i64, ptr %7, align 8, !tbaa !5
  %17 = icmp eq i64 %16, 1
  br i1 %17, label %18, label %20

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

20:                                               ; preds = %18, %13
  %21 = load i64, ptr %0, align 8, !tbaa !5
  %22 = load i64, ptr %1, align 8, !tbaa !5
  %23 = load i64, ptr %6, align 8, !tbaa !5
  call void @libmetis__SetUpGraph(ptr noundef nonnull %14, i64 noundef 2, i64 noundef %21, i64 noundef %22, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, i64 noundef %23) #3
  %24 = load i64, ptr %10, align 8, !tbaa !5
  %25 = icmp eq i64 %24, 0
  br i1 %25, label %33, label %26

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

33:                                               ; preds = %20, %26
  %.sink36 = phi i64 [ %30, %26 ], [ 1, %20 ]
  %.sink = phi i64 [ %32, %26 ], [ 0, %20 ]
  %34 = phi <2 x i64> [ %28, %26 ], [ <i64 5, i64 2>, %20 ]
  %35 = getelementptr inbounds i8, ptr %15, i64 16
  store <2 x i64> %34, ptr %35, align 8
  %36 = getelementptr inbounds i8, ptr %15, i64 32
  store i64 %.sink36, ptr %36, align 8
  %37 = getelementptr inbounds i8, ptr %15, i64 8
  store i64 %.sink, ptr %37, align 8
  %38 = getelementptr inbounds i8, ptr %15, i64 56
  store i64 2, ptr %38, align 8, !tbaa !9
  %39 = load i64, ptr %0, align 8, !tbaa !5
  %40 = load i64, ptr %8, align 8, !tbaa !5
  %41 = trunc i64 %40 to i32
  %42 = call i32 @gk_log2(i32 noundef %41) #3
  %43 = mul nsw i32 %42, 20
  %44 = sext i32 %43 to i64
  %45 = sdiv i64 %39, %44
  %46 = load i64, ptr %8, align 8, !tbaa !5
  %47 = mul nsw i64 %46, 30
  %.not = icmp slt i64 %45, %47
  br i1 %.not, label %55, label %48

48:                                               ; preds = %33
  %49 = load i64, ptr %0, align 8, !tbaa !5
  %50 = trunc i64 %46 to i32
  %51 = call i32 @gk_log2(i32 noundef %50) #3
  %52 = mul nsw i32 %51, 20
  %53 = sext i32 %52 to i64
  %54 = sdiv i64 %49, %53
  br label %55

55:                                               ; preds = %33, %48
  %56 = phi i64 [ %54, %48 ], [ %47, %33 ]
  store i64 %56, ptr %15, align 8, !tbaa !15
  %57 = getelementptr inbounds i8, ptr %15, i64 48
  store float 0.000000e+00, ptr %57, align 8, !tbaa !16
  call void @libmetis__InitRandom(i64 noundef -1) #3
  %58 = load i64, ptr %8, align 8, !tbaa !5
  call void @libmetis__AllocateWorkSpace(ptr noundef nonnull %15, ptr noundef nonnull %14, i64 noundef %58) #3
  %59 = load i64, ptr %37, align 8, !tbaa !17
  %60 = and i64 %59, 1
  %.not32 = icmp eq i64 %60, 0
  br i1 %.not32, label %.thread, label %61

61:                                               ; preds = %55
  call void @libmetis__InitTimers(ptr noundef nonnull %15) #3
  %.pre = load i64, ptr %37, align 8, !tbaa !17
  %.pre40 = and i64 %.pre, 1
  %62 = icmp eq i64 %.pre40, 0
  br i1 %62, label %.thread, label %63

63:                                               ; preds = %61
  %64 = call double @gk_CPUSeconds() #3
  %65 = getelementptr inbounds i8, ptr %15, i64 152
  %66 = load double, ptr %65, align 8, !tbaa !18
  %67 = fsub double %66, %64
  store double %67, ptr %65, align 8, !tbaa !18
  br label %.thread

.thread:                                          ; preds = %55, %63, %61
  %68 = load i64, ptr %8, align 8, !tbaa !5
  %69 = call i64 @MCMlevelKWayRefinement(ptr noundef nonnull %15, ptr noundef nonnull %14, i64 noundef %68, ptr noundef %12, ptr noundef %9)
  store i64 %69, ptr %11, align 8, !tbaa !5
  %70 = load i64, ptr %37, align 8, !tbaa !17
  %71 = and i64 %70, 1
  %.not34 = icmp eq i64 %71, 0
  br i1 %.not34, label %.thread44, label %72

72:                                               ; preds = %.thread
  %73 = call double @gk_CPUSeconds() #3
  %74 = getelementptr inbounds i8, ptr %15, i64 152
  %75 = load double, ptr %74, align 8, !tbaa !18
  %76 = fadd double %73, %75
  store double %76, ptr %74, align 8, !tbaa !18
  %.pre39 = load i64, ptr %37, align 8, !tbaa !17
  %.pre41 = and i64 %.pre39, 1
  %77 = icmp eq i64 %.pre41, 0
  br i1 %77, label %.thread44, label %78

78:                                               ; preds = %72
  call void @libmetis__PrintTimers(ptr noundef nonnull %15) #3
  br label %.thread44

.thread44:                                        ; preds = %.thread, %78, %72
  call void @libmetis__FreeWorkSpace(ptr noundef nonnull %15, ptr noundef nonnull %14) #3
  %79 = load i64, ptr %7, align 8, !tbaa !5
  %80 = icmp eq i64 %79, 1
  br i1 %80, label %81, label %83

81:                                               ; preds = %.thread44
  %82 = load i64, ptr %0, align 8, !tbaa !5
  call void @libmetis__Change2FNumbering(i64 noundef %82, ptr noundef %2, ptr noundef %3, ptr noundef %12) #3
  br label %83

83:                                               ; preds = %81, %.thread44
  call void @llvm.lifetime.end.p0(i64 280, ptr nonnull %15) #3
  call void @llvm.lifetime.end.p0(i64 248, ptr nonnull %14) #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 @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 void @libmetis__InitRandom(i64 noundef) local_unnamed_addr #2

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

declare void @libmetis__InitTimers(ptr noundef) local_unnamed_addr #2

declare double @gk_CPUSeconds() local_unnamed_addr #2

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

declare void @libmetis__PrintTimers(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 = !{!10, !11, i64 48}
!17 = !{!10, !6, i64 8}
!18 = !{!10, !14, i64 152}


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