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

; 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 [18 x i8], align 1

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

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

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

declare void @libmetis__InitRandom(i64 noundef) #1

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

declare void @libmetis__InitTimers(ptr noundef) #1

declare double @gk_CPUSeconds() #1

declare void @libmetis__PrintTimers(ptr noundef) #1

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

declare void @libmetis__Change2FNumbering(i64 noundef, ptr noundef, ptr noundef, ptr 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 @METIS_mCHPartGraphRecursive(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) #2 {
  %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
  %31 = alloca ptr, 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) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.start.p0(i64 248, ptr %29) #4
  call void @llvm.lifetime.start.p0(i64 280, ptr %30) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #4
  %32 = load ptr, ptr %21, align 8, !tbaa !5
  %33 = load i64, ptr %32, align 8, !tbaa !9
  %34 = icmp eq i64 %33, 1
  br i1 %34, label %35, label %40

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

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

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

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

77:                                               ; preds = %60, %55
  %78 = getelementptr inbounds %struct.controldef, ptr %30, i32 0, i32 7
  store i64 1, ptr %78, align 8, !tbaa !19
  %79 = getelementptr inbounds %struct.controldef, ptr %30, i32 0, i32 0
  store i64 100, ptr %79, align 8, !tbaa !20
  %80 = getelementptr inbounds %struct.controldef, ptr %30, i32 0, i32 0
  %81 = load i64, ptr %80, align 8, !tbaa !20
  %82 = sitofp i64 %81 to double
  %83 = fmul double 1.000000e+00, %82
  %84 = fdiv double 1.500000e+00, %83
  %85 = fptrunc double %84 to float
  %86 = getelementptr inbounds %struct.controldef, ptr %30, i32 0, i32 6
  store float %85, ptr %86, align 8, !tbaa !21
  %87 = load ptr, ptr %15, align 8, !tbaa !5
  %88 = load i64, ptr %87, align 8, !tbaa !9
  %89 = call ptr @gk_fmalloc(i64 noundef %88, ptr noundef @.str)
  store ptr %89, ptr %31, align 8, !tbaa !5
  %90 = load ptr, ptr %31, align 8, !tbaa !5
  %91 = load ptr, ptr %23, align 8, !tbaa !5
  %92 = load ptr, ptr %15, align 8, !tbaa !5
  %93 = load i64, ptr %92, align 8, !tbaa !9
  %94 = mul i64 4, %93
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %90, ptr align 1 %91, i64 %94, i1 false)
  call void @libmetis__InitRandom(i64 noundef -1)
  %95 = load ptr, ptr %22, align 8, !tbaa !5
  %96 = load i64, ptr %95, align 8, !tbaa !9
  call void @libmetis__AllocateWorkSpace(ptr noundef %30, ptr noundef %29, i64 noundef %96)
  %97 = getelementptr inbounds %struct.controldef, ptr %30, 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 %102

101:                                              ; preds = %77
  call void @libmetis__InitTimers(ptr noundef %30)
  br label %102

102:                                              ; preds = %101, %77
  %103 = getelementptr inbounds %struct.controldef, ptr %30, i32 0, i32 1
  %104 = load i64, ptr %103, align 8, !tbaa !18
  %105 = and i64 %104, 1
  %106 = icmp ne i64 %105, 0
  br i1 %106, label %107, label %112

107:                                              ; preds = %102
  %108 = call double @gk_CPUSeconds()
  %109 = getelementptr inbounds %struct.controldef, ptr %30, i32 0, i32 12
  %110 = load double, ptr %109, align 8, !tbaa !22
  %111 = fsub double %110, %108
  store double %111, ptr %109, align 8, !tbaa !22
  br label %112

112:                                              ; preds = %107, %102
  %113 = load ptr, ptr %22, align 8, !tbaa !5
  %114 = load i64, ptr %113, align 8, !tbaa !9
  %115 = load ptr, ptr %26, align 8, !tbaa !5
  %116 = load ptr, ptr %31, align 8, !tbaa !5
  %117 = call i64 @libmetis__MCHMlevelRecursiveBisection(ptr noundef %30, ptr noundef %29, i64 noundef %114, ptr noundef %115, ptr noundef %116, i64 noundef 0)
  %118 = load ptr, ptr %25, align 8, !tbaa !5
  store i64 %117, ptr %118, align 8, !tbaa !9
  %119 = getelementptr inbounds %struct.controldef, ptr %30, i32 0, i32 1
  %120 = load i64, ptr %119, align 8, !tbaa !18
  %121 = and i64 %120, 1
  %122 = icmp ne i64 %121, 0
  br i1 %122, label %123, label %128

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

128:                                              ; preds = %123, %112
  %129 = getelementptr inbounds %struct.controldef, ptr %30, i32 0, i32 1
  %130 = load i64, ptr %129, align 8, !tbaa !18
  %131 = and i64 %130, 1
  %132 = icmp ne i64 %131, 0
  br i1 %132, label %133, label %134

133:                                              ; preds = %128
  call void @libmetis__PrintTimers(ptr noundef %30)
  br label %134

134:                                              ; preds = %133, %128
  call void @libmetis__FreeWorkSpace(ptr noundef %30, ptr noundef %29)
  call void (ptr, ...) @gk_free(ptr noundef %31, ptr noundef null)
  %135 = load ptr, ptr %21, align 8, !tbaa !5
  %136 = load i64, ptr %135, align 8, !tbaa !9
  %137 = icmp eq i64 %136, 1
  br i1 %137, label %138, label %144

138:                                              ; preds = %134
  %139 = load ptr, ptr %14, align 8, !tbaa !5
  %140 = load i64, ptr %139, align 8, !tbaa !9
  %141 = load ptr, ptr %16, align 8, !tbaa !5
  %142 = load ptr, ptr %17, align 8, !tbaa !5
  %143 = load ptr, ptr %26, align 8, !tbaa !5
  call void @libmetis__Change2FNumbering(i64 noundef %140, ptr noundef %141, ptr noundef %142, ptr noundef %143)
  br label %144

144:                                              ; preds = %138, %134
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 280, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 248, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  ret void
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #3

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

declare void @gk_free(ptr noundef, ...) #1

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 }

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

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

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

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 #1

declare void @libmetis__InitRandom(i64 noundef) local_unnamed_addr #1

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

declare void @libmetis__InitTimers(ptr noundef) local_unnamed_addr #1

declare double @gk_CPUSeconds() local_unnamed_addr #1

declare void @libmetis__PrintTimers(ptr noundef) local_unnamed_addr #1

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

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

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

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

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

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

34:                                               ; preds = %21, %27
  %.sink31 = phi i64 [ %31, %27 ], [ 1, %21 ]
  %.sink = phi i64 [ %33, %27 ], [ 0, %21 ]
  %35 = phi <2 x i64> [ %29, %27 ], [ <i64 3, i64 1>, %21 ]
  %36 = getelementptr inbounds i8, ptr %15, i64 16
  store <2 x i64> %35, ptr %36, align 8
  %37 = getelementptr inbounds i8, ptr %15, i64 32
  store i64 %.sink31, ptr %37, align 8
  %38 = getelementptr inbounds i8, ptr %15, i64 8
  store i64 %.sink, ptr %38, align 8
  %39 = getelementptr inbounds i8, ptr %15, i64 56
  store i64 1, ptr %39, align 8, !tbaa !9
  store i64 100, ptr %15, align 8, !tbaa !15
  %40 = getelementptr inbounds i8, ptr %15, i64 48
  store float 0x3F8EB851E0000000, ptr %40, align 8, !tbaa !16
  %41 = load i64, ptr %1, align 8, !tbaa !5
  %42 = call ptr @gk_fmalloc(i64 noundef %41, ptr noundef nonnull @.str) #4
  store ptr %42, ptr %16, align 8, !tbaa !17
  %43 = load i64, ptr %1, align 8, !tbaa !5
  %44 = shl i64 %43, 2
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %42, ptr align 1 %9, i64 %44, i1 false)
  call void @libmetis__InitRandom(i64 noundef -1) #4
  %45 = load i64, ptr %8, align 8, !tbaa !5
  call void @libmetis__AllocateWorkSpace(ptr noundef nonnull %15, ptr noundef nonnull %14, i64 noundef %45) #4
  %46 = load i64, ptr %38, align 8, !tbaa !18
  %47 = and i64 %46, 1
  %.not = icmp eq i64 %47, 0
  br i1 %.not, label %.thread, label %48

48:                                               ; preds = %34
  call void @libmetis__InitTimers(ptr noundef nonnull %15) #4
  %.pre = load i64, ptr %38, align 8, !tbaa !18
  %.pre35 = and i64 %.pre, 1
  %49 = icmp eq i64 %.pre35, 0
  br i1 %49, label %.thread, label %50

50:                                               ; preds = %48
  %51 = call double @gk_CPUSeconds() #4
  %52 = getelementptr inbounds i8, ptr %15, i64 152
  %53 = load double, ptr %52, align 8, !tbaa !19
  %54 = fsub double %53, %51
  store double %54, ptr %52, align 8, !tbaa !19
  br label %.thread

.thread:                                          ; preds = %34, %50, %48
  %55 = load i64, ptr %8, align 8, !tbaa !5
  %56 = call i64 @libmetis__MCHMlevelRecursiveBisection(ptr noundef nonnull %15, ptr noundef nonnull %14, i64 noundef %55, ptr noundef %12, ptr noundef %42, i64 noundef 0)
  store i64 %56, ptr %11, align 8, !tbaa !5
  %57 = load i64, ptr %38, align 8, !tbaa !18
  %58 = and i64 %57, 1
  %.not29 = icmp eq i64 %58, 0
  br i1 %.not29, label %.thread39, label %59

59:                                               ; preds = %.thread
  %60 = call double @gk_CPUSeconds() #4
  %61 = getelementptr inbounds i8, ptr %15, i64 152
  %62 = load double, ptr %61, align 8, !tbaa !19
  %63 = fadd double %60, %62
  store double %63, ptr %61, align 8, !tbaa !19
  %.pre34 = load i64, ptr %38, align 8, !tbaa !18
  %.pre36 = and i64 %.pre34, 1
  %64 = icmp eq i64 %.pre36, 0
  br i1 %64, label %.thread39, label %65

65:                                               ; preds = %59
  call void @libmetis__PrintTimers(ptr noundef nonnull %15) #4
  br label %.thread39

.thread39:                                        ; preds = %.thread, %65, %59
  call void @libmetis__FreeWorkSpace(ptr noundef nonnull %15, ptr noundef nonnull %14) #4
  call void (ptr, ...) @gk_free(ptr noundef nonnull %16, ptr noundef null) #4
  %66 = load i64, ptr %7, align 8, !tbaa !5
  %67 = icmp eq i64 %66, 1
  br i1 %67, label %68, label %70

68:                                               ; preds = %.thread39
  %69 = load i64, ptr %0, align 8, !tbaa !5
  call void @libmetis__Change2FNumbering(i64 noundef %69, ptr noundef %2, ptr noundef %3, ptr noundef %12) #4
  br label %70

70:                                               ; preds = %68, %.thread39
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 280, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 248, ptr nonnull %14) #4
  ret void
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #3

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

declare void @gk_free(ptr noundef, ...) local_unnamed_addr #1

attributes #0 = { mustprogress 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 = !{!13, !13, i64 0}
!18 = !{!10, !6, i64 8}
!19 = !{!10, !14, i64 152}


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