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

; 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.3 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [34 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 i64 @libmetis__idxsum(i64 noundef, 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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__MlevelNestedDissectionCC(ptr noundef %0, ptr noundef %1, ptr noundef %2, float noundef %3, i64 noundef %4) #2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca float, align 4
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca [2 x i64], align 16
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, 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
  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 float %3, ptr %9, align 4, !tbaa !9
  store i64 %4, ptr %10, align 8, !tbaa !11
  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 16, 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
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #3
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.graphdef, ptr %25, i32 0, i32 0
  %27 = load i64, ptr %26, align 8, !tbaa !13
  store i64 %27, ptr %13, align 8, !tbaa !11
  %28 = load i64, ptr %13, align 8, !tbaa !11
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.graphdef, ptr %29, i32 0, i32 3
  %31 = load ptr, ptr %30, align 8, !tbaa !16
  %32 = call i64 @libmetis__idxsum(i64 noundef %28, ptr noundef %31, i64 noundef 1)
  store i64 %32, ptr %15, align 8, !tbaa !11
  %33 = load i64, ptr %15, align 8, !tbaa !11
  %34 = sdiv i64 %33, 2
  %35 = getelementptr inbounds [2 x i64], ptr %16, i64 0, i64 0
  store i64 %34, ptr %35, align 16, !tbaa !11
  %36 = load i64, ptr %15, align 8, !tbaa !11
  %37 = getelementptr inbounds [2 x i64], ptr %16, i64 0, i64 0
  %38 = load i64, ptr %37, align 16, !tbaa !11
  %39 = sub nsw i64 %36, %38
  %40 = getelementptr inbounds [2 x i64], ptr %16, i64 0, i64 1
  store i64 %39, ptr %40, align 8, !tbaa !11
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = getelementptr inbounds [2 x i64], ptr %16, i64 0, i64 0
  %44 = load float, ptr %9, align 4, !tbaa !9
  call void @libmetis__MlevelNodeBisectionMultiple(ptr noundef %41, ptr noundef %42, ptr noundef %43, float noundef %44)
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.controldef, ptr %45, i32 0, i32 1
  %47 = load i64, ptr %46, align 8, !tbaa !17
  %48 = and i64 %47, 128
  %49 = icmp ne i64 %48, 0
  br i1 %49, label %50, label %70

50:                                               ; preds = %5
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.graphdef, ptr %51, i32 0, i32 0
  %53 = load i64, ptr %52, align 8, !tbaa !13
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.graphdef, ptr %54, i32 0, i32 19
  %56 = load ptr, ptr %55, align 8, !tbaa !21
  %57 = getelementptr inbounds i64, ptr %56, i64 0
  %58 = load i64, ptr %57, align 8, !tbaa !11
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.graphdef, ptr %59, i32 0, i32 19
  %61 = load ptr, ptr %60, align 8, !tbaa !21
  %62 = getelementptr inbounds i64, ptr %61, i64 1
  %63 = load i64, ptr %62, align 8, !tbaa !11
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.graphdef, ptr %64, i32 0, i32 19
  %66 = load ptr, ptr %65, align 8, !tbaa !21
  %67 = getelementptr inbounds i64, ptr %66, i64 2
  %68 = load i64, ptr %67, align 8, !tbaa !11
  %69 = call i32 (ptr, ...) @mprintf(ptr noundef @.str.3, i64 noundef %53, i64 noundef %58, i64 noundef %63, i64 noundef %68)
  br label %70

70:                                               ; preds = %50, %5
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.graphdef, ptr %71, i32 0, i32 20
  %73 = load i64, ptr %72, align 8, !tbaa !22
  store i64 %73, ptr %14, align 8, !tbaa !11
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.graphdef, ptr %74, i32 0, i32 22
  %76 = load ptr, ptr %75, align 8, !tbaa !23
  store ptr %76, ptr %21, align 8, !tbaa !5
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.graphdef, ptr %77, i32 0, i32 14
  %79 = load ptr, ptr %78, align 8, !tbaa !24
  store ptr %79, ptr %20, align 8, !tbaa !5
  store i64 0, ptr %11, align 8, !tbaa !11
  br label %80

80:                                               ; preds = %96, %70
  %81 = load i64, ptr %11, align 8, !tbaa !11
  %82 = load i64, ptr %14, align 8, !tbaa !11
  %83 = icmp slt i64 %81, %82
  br i1 %83, label %84, label %99

84:                                               ; preds = %80
  %85 = load i64, ptr %10, align 8, !tbaa !11
  %86 = add nsw i64 %85, -1
  store i64 %86, ptr %10, align 8, !tbaa !11
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = load ptr, ptr %20, align 8, !tbaa !5
  %89 = load ptr, ptr %21, align 8, !tbaa !5
  %90 = load i64, ptr %11, align 8, !tbaa !11
  %91 = getelementptr inbounds i64, ptr %89, i64 %90
  %92 = load i64, ptr %91, align 8, !tbaa !11
  %93 = getelementptr inbounds i64, ptr %88, i64 %92
  %94 = load i64, ptr %93, align 8, !tbaa !11
  %95 = getelementptr inbounds i64, ptr %87, i64 %94
  store i64 %86, ptr %95, align 8, !tbaa !11
  br label %96

96:                                               ; preds = %84
  %97 = load i64, ptr %11, align 8, !tbaa !11
  %98 = add nsw i64 %97, 1
  store i64 %98, ptr %11, align 8, !tbaa !11
  br label %80, !llvm.loop !25

99:                                               ; preds = %80
  %100 = load i64, ptr %13, align 8, !tbaa !11
  %101 = add nsw i64 %100, 1
  %102 = call ptr @libmetis__idxmalloc(i64 noundef %101, ptr noundef @.str.4)
  store ptr %102, ptr %22, align 8, !tbaa !5
  %103 = load i64, ptr %13, align 8, !tbaa !11
  %104 = call ptr @libmetis__idxmalloc(i64 noundef %103, ptr noundef @.str.5)
  store ptr %104, ptr %23, align 8, !tbaa !5
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = load ptr, ptr %7, align 8, !tbaa !5
  %107 = load ptr, ptr %22, align 8, !tbaa !5
  %108 = load ptr, ptr %23, align 8, !tbaa !5
  %109 = call i64 @libmetis__FindComponents(ptr noundef %105, ptr noundef %106, ptr noundef %107, ptr noundef %108)
  store i64 %109, ptr %18, align 8, !tbaa !11
  %110 = load i64, ptr %18, align 8, !tbaa !11
  %111 = mul i64 %110, 248
  %112 = call ptr @gk_malloc(i64 noundef %111, ptr noundef @.str.6)
  store ptr %112, ptr %24, align 8, !tbaa !5
  %113 = load ptr, ptr %6, align 8, !tbaa !5
  %114 = load ptr, ptr %7, align 8, !tbaa !5
  %115 = load ptr, ptr %24, align 8, !tbaa !5
  %116 = load i64, ptr %18, align 8, !tbaa !11
  %117 = load ptr, ptr %22, align 8, !tbaa !5
  %118 = load ptr, ptr %23, align 8, !tbaa !5
  %119 = call i64 @libmetis__SplitGraphOrderCC(ptr noundef %113, ptr noundef %114, ptr noundef %115, i64 noundef %116, ptr noundef %117, ptr noundef %118)
  store i64 %119, ptr %17, align 8, !tbaa !11
  call void (ptr, ...) @gk_free(ptr noundef %22, ptr noundef %23, ptr noundef null)
  %120 = load ptr, ptr %7, align 8, !tbaa !5
  call void @libmetis__FreeGraph(ptr noundef %120, i32 noundef 0)
  store i64 0, ptr %11, align 8, !tbaa !11
  store i64 0, ptr %19, align 8, !tbaa !11
  br label %121

121:                                              ; preds = %162, %99
  %122 = load i64, ptr %11, align 8, !tbaa !11
  %123 = load i64, ptr %17, align 8, !tbaa !11
  %124 = icmp slt i64 %122, %123
  br i1 %124, label %125, label %165

125:                                              ; preds = %121
  %126 = load ptr, ptr %24, align 8, !tbaa !5
  %127 = load i64, ptr %11, align 8, !tbaa !11
  %128 = getelementptr inbounds %struct.graphdef, ptr %126, i64 %127
  %129 = getelementptr inbounds %struct.graphdef, ptr %128, i32 0, i32 6
  %130 = load ptr, ptr %129, align 8, !tbaa !27
  %131 = icmp eq ptr %130, null
  br i1 %131, label %132, label %144

132:                                              ; preds = %125
  %133 = load ptr, ptr %6, align 8, !tbaa !5
  %134 = load ptr, ptr %24, align 8, !tbaa !5
  %135 = load i64, ptr %11, align 8, !tbaa !11
  %136 = getelementptr inbounds %struct.graphdef, ptr %134, i64 %135
  %137 = load ptr, ptr %8, align 8, !tbaa !5
  %138 = load i64, ptr %10, align 8, !tbaa !11
  %139 = load i64, ptr %19, align 8, !tbaa !11
  %140 = sub nsw i64 %138, %139
  call void @libmetis__MMDOrder(ptr noundef %133, ptr noundef %136, ptr noundef %137, i64 noundef %140)
  %141 = load ptr, ptr %24, align 8, !tbaa !5
  %142 = load i64, ptr %11, align 8, !tbaa !11
  %143 = getelementptr inbounds %struct.graphdef, ptr %141, i64 %142
  call void @libmetis__FreeGraph(ptr noundef %143, i32 noundef 0)
  br label %154

144:                                              ; preds = %125
  %145 = load ptr, ptr %6, align 8, !tbaa !5
  %146 = load ptr, ptr %24, align 8, !tbaa !5
  %147 = load i64, ptr %11, align 8, !tbaa !11
  %148 = getelementptr inbounds %struct.graphdef, ptr %146, i64 %147
  %149 = load ptr, ptr %8, align 8, !tbaa !5
  %150 = load float, ptr %9, align 4, !tbaa !9
  %151 = load i64, ptr %10, align 8, !tbaa !11
  %152 = load i64, ptr %19, align 8, !tbaa !11
  %153 = sub nsw i64 %151, %152
  call void @libmetis__MlevelNestedDissectionCC(ptr noundef %145, ptr noundef %148, ptr noundef %149, float noundef %150, i64 noundef %153)
  br label %154

154:                                              ; preds = %144, %132
  %155 = load ptr, ptr %24, align 8, !tbaa !5
  %156 = load i64, ptr %11, align 8, !tbaa !11
  %157 = getelementptr inbounds %struct.graphdef, ptr %155, i64 %156
  %158 = getelementptr inbounds %struct.graphdef, ptr %157, i32 0, i32 0
  %159 = load i64, ptr %158, align 8, !tbaa !13
  %160 = load i64, ptr %19, align 8, !tbaa !11
  %161 = add nsw i64 %160, %159
  store i64 %161, ptr %19, align 8, !tbaa !11
  br label %162

162:                                              ; preds = %154
  %163 = load i64, ptr %11, align 8, !tbaa !11
  %164 = add nsw i64 %163, 1
  store i64 %164, ptr %11, align 8, !tbaa !11
  br label %121, !llvm.loop !28

165:                                              ; preds = %121
  call void (ptr, ...) @gk_free(ptr noundef %24, ptr noundef null)
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  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 16, 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
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local void @libmetis__MlevelNodeBisectionMultiple(ptr noundef, ptr noundef, ptr noundef, float noundef) #2

declare i32 @mprintf(ptr noundef, ...) #1

declare void @libmetis__FreeGraph(ptr noundef, i32 noundef) #1

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

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

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

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

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, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !12, i64 0}
!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 = !{!14, !6, i64 24}
!17 = !{!18, !12, i64 8}
!18 = !{!"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, !19, i64 88, !20, i64 152, !20, i64 160, !20, i64 168, !20, i64 176, !20, i64 184, !20, i64 192, !20, i64 200, !20, i64 208, !20, i64 216, !20, i64 224, !20, i64 232, !20, i64 240, !20, i64 248, !20, i64 256, !20, i64 264, !20, i64 272}
!19 = !{!"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}
!20 = !{!"double", !7, i64 0}
!21 = !{!14, !6, i64 136}
!22 = !{!14, !12, i64 144}
!23 = !{!14, !6, i64 160}
!24 = !{!14, !6, i64 96}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!14, !6, i64 48}
!28 = distinct !{!28, !26}


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

@.str.3 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [34 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 i64 @libmetis__idxsum(i64 noundef, ptr noundef, i64 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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__MlevelNestedDissectionCC(ptr noundef %0, ptr noundef %1, ptr noundef %2, float noundef %3, i64 noundef %4) local_unnamed_addr #2 {
  %6 = alloca [2 x i64], align 16
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #3
  %10 = load i64, ptr %1, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %1, i64 24
  %12 = load ptr, ptr %11, align 8, !tbaa !12
  %13 = tail call i64 @libmetis__idxsum(i64 noundef %10, ptr noundef %12, i64 noundef 1) #3
  %14 = sdiv i64 %13, 2
  store i64 %14, ptr %6, align 16, !tbaa !13
  %15 = sub nsw i64 %13, %14
  %16 = getelementptr inbounds i8, ptr %6, i64 8
  store i64 %15, ptr %16, align 8, !tbaa !13
  call void @libmetis__MlevelNodeBisectionMultiple(ptr noundef %0, ptr noundef nonnull %1, ptr noundef nonnull %6, float noundef %3)
  %17 = getelementptr inbounds i8, ptr %0, i64 8
  %18 = load i64, ptr %17, align 8, !tbaa !14
  %19 = and i64 %18, 128
  %.not = icmp eq i64 %19, 0
  br i1 %.not, label %30, label %20

20:                                               ; preds = %5
  %21 = load i64, ptr %1, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %1, i64 136
  %23 = load ptr, ptr %22, align 8, !tbaa !19
  %24 = load i64, ptr %23, align 8, !tbaa !13
  %25 = getelementptr inbounds i8, ptr %23, i64 8
  %26 = load i64, ptr %25, align 8, !tbaa !13
  %27 = getelementptr inbounds i8, ptr %23, i64 16
  %28 = load i64, ptr %27, align 8, !tbaa !13
  %29 = call i32 (ptr, ...) @mprintf(ptr noundef nonnull @.str.3, i64 noundef %21, i64 noundef %24, i64 noundef %26, i64 noundef %28) #3
  br label %30

30:                                               ; preds = %20, %5
  %31 = getelementptr inbounds i8, ptr %1, i64 144
  %32 = load i64, ptr %31, align 8, !tbaa !20
  %33 = getelementptr inbounds i8, ptr %1, i64 160
  %34 = load ptr, ptr %33, align 8, !tbaa !21
  %35 = getelementptr inbounds i8, ptr %1, i64 96
  %36 = load ptr, ptr %35, align 8, !tbaa !22
  %37 = icmp sgt i64 %32, 0
  br i1 %37, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %30
  %xtraiter = and i64 %32, 3
  %38 = icmp ult i64 %32, 4
  br i1 %38, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %32, 9223372036854775804
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %.053 = phi i64 [ %4, %.lr.ph.preheader.new ], [ %60, %.lr.ph ]
  %.05052 = phi i64 [ 0, %.lr.ph.preheader.new ], [ %66, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %39 = add nsw i64 %.053, -1
  %40 = getelementptr inbounds i64, ptr %34, i64 %.05052
  %41 = load i64, ptr %40, align 8, !tbaa !13
  %42 = getelementptr inbounds i64, ptr %36, i64 %41
  %43 = load i64, ptr %42, align 8, !tbaa !13
  %44 = getelementptr inbounds i64, ptr %2, i64 %43
  store i64 %39, ptr %44, align 8, !tbaa !13
  %45 = or disjoint i64 %.05052, 1
  %46 = add nsw i64 %.053, -2
  %47 = getelementptr inbounds i64, ptr %34, i64 %45
  %48 = load i64, ptr %47, align 8, !tbaa !13
  %49 = getelementptr inbounds i64, ptr %36, i64 %48
  %50 = load i64, ptr %49, align 8, !tbaa !13
  %51 = getelementptr inbounds i64, ptr %2, i64 %50
  store i64 %46, ptr %51, align 8, !tbaa !13
  %52 = or disjoint i64 %.05052, 2
  %53 = add nsw i64 %.053, -3
  %54 = getelementptr inbounds i64, ptr %34, i64 %52
  %55 = load i64, ptr %54, align 8, !tbaa !13
  %56 = getelementptr inbounds i64, ptr %36, i64 %55
  %57 = load i64, ptr %56, align 8, !tbaa !13
  %58 = getelementptr inbounds i64, ptr %2, i64 %57
  store i64 %53, ptr %58, align 8, !tbaa !13
  %59 = or disjoint i64 %.05052, 3
  %60 = add nsw i64 %.053, -4
  %61 = getelementptr inbounds i64, ptr %34, i64 %59
  %62 = load i64, ptr %61, align 8, !tbaa !13
  %63 = getelementptr inbounds i64, ptr %36, i64 %62
  %64 = load i64, ptr %63, align 8, !tbaa !13
  %65 = getelementptr inbounds i64, ptr %2, i64 %64
  store i64 %60, ptr %65, align 8, !tbaa !13
  %66 = add nuw nsw i64 %.05052, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !23

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph, %.lr.ph.preheader
  %.lcssa.ph = phi i64 [ poison, %.lr.ph.preheader ], [ %60, %.lr.ph ]
  %.053.unr = phi i64 [ %4, %.lr.ph.preheader ], [ %60, %.lr.ph ]
  %.05052.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %66, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil
  %.053.epil = phi i64 [ %67, %.lr.ph.epil ], [ %.053.unr, %._crit_edge.loopexit.unr-lcssa ]
  %.05052.epil = phi i64 [ %73, %.lr.ph.epil ], [ %.05052.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %67 = add nsw i64 %.053.epil, -1
  %68 = getelementptr inbounds i64, ptr %34, i64 %.05052.epil
  %69 = load i64, ptr %68, align 8, !tbaa !13
  %70 = getelementptr inbounds i64, ptr %36, i64 %69
  %71 = load i64, ptr %70, align 8, !tbaa !13
  %72 = getelementptr inbounds i64, ptr %2, i64 %71
  store i64 %67, ptr %72, align 8, !tbaa !13
  %73 = add nuw nsw i64 %.05052.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.lr.ph.epil, !llvm.loop !25

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil, %30
  %.0.lcssa = phi i64 [ %4, %30 ], [ %.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %67, %.lr.ph.epil ]
  %74 = add nsw i64 %10, 1
  %75 = call ptr @libmetis__idxmalloc(i64 noundef %74, ptr noundef nonnull @.str.4) #3
  store ptr %75, ptr %7, align 8, !tbaa !27
  %76 = call ptr @libmetis__idxmalloc(i64 noundef %10, ptr noundef nonnull @.str.5) #3
  store ptr %76, ptr %8, align 8, !tbaa !27
  %77 = call i64 @libmetis__FindComponents(ptr noundef %0, ptr noundef nonnull %1, ptr noundef %75, ptr noundef %76) #3
  %78 = mul i64 %77, 248
  %79 = call ptr @gk_malloc(i64 noundef %78, ptr noundef nonnull @.str.6) #3
  store ptr %79, ptr %9, align 8, !tbaa !27
  %80 = call i64 @libmetis__SplitGraphOrderCC(ptr noundef %0, ptr noundef nonnull %1, ptr noundef %79, i64 noundef %77, ptr noundef %75, ptr noundef %76)
  call void (ptr, ...) @gk_free(ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef null) #3
  call void @libmetis__FreeGraph(ptr noundef nonnull %1, i32 noundef 0) #3
  %81 = icmp sgt i64 %80, 0
  br i1 %81, label %.lr.ph57, label %._crit_edge58

.lr.ph57:                                         ; preds = %._crit_edge, %92
  %82 = phi ptr [ %93, %92 ], [ %79, %._crit_edge ]
  %.155 = phi i64 [ %97, %92 ], [ 0, %._crit_edge ]
  %.05154 = phi i64 [ %96, %92 ], [ 0, %._crit_edge ]
  %83 = getelementptr inbounds %struct.graphdef, ptr %82, i64 %.155
  %84 = getelementptr inbounds i8, ptr %83, i64 48
  %85 = load ptr, ptr %84, align 8, !tbaa !28
  %86 = icmp eq ptr %85, null
  %87 = sub nsw i64 %.0.lcssa, %.05154
  br i1 %86, label %88, label %91

88:                                               ; preds = %.lr.ph57
  call void @libmetis__MMDOrder(ptr noundef %0, ptr noundef nonnull %83, ptr noundef %2, i64 noundef %87)
  %89 = load ptr, ptr %9, align 8, !tbaa !27
  %90 = getelementptr inbounds %struct.graphdef, ptr %89, i64 %.155
  call void @libmetis__FreeGraph(ptr noundef %90, i32 noundef 0) #3
  br label %92

91:                                               ; preds = %.lr.ph57
  call void @libmetis__MlevelNestedDissectionCC(ptr noundef %0, ptr noundef nonnull %83, ptr noundef %2, float noundef %3, i64 noundef %87)
  %.pre = load ptr, ptr %9, align 8, !tbaa !27
  br label %92

92:                                               ; preds = %91, %88
  %93 = phi ptr [ %.pre, %91 ], [ %89, %88 ]
  %94 = getelementptr inbounds %struct.graphdef, ptr %93, i64 %.155
  %95 = load i64, ptr %94, align 8, !tbaa !5
  %96 = add nsw i64 %95, %.05154
  %97 = add nuw nsw i64 %.155, 1
  %exitcond59.not = icmp eq i64 %97, %80
  br i1 %exitcond59.not, label %._crit_edge58, label %.lr.ph57, !llvm.loop !29

._crit_edge58:                                    ; preds = %92, %._crit_edge
  call void (ptr, ...) @gk_free(ptr noundef nonnull %9, ptr noundef null) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #3
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local void @libmetis__MlevelNodeBisectionMultiple(ptr noundef, ptr noundef, ptr noundef, float noundef) local_unnamed_addr #2

declare i32 @mprintf(ptr noundef, ...) local_unnamed_addr #1

declare void @libmetis__FreeGraph(ptr noundef, i32 noundef) local_unnamed_addr #1

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

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

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

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

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 = { 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 0}
!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 = !{!6, !10, i64 24}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !7, i64 8}
!15 = !{!"controldef", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !16, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !17, i64 88, !18, i64 152, !18, i64 160, !18, i64 168, !18, i64 176, !18, i64 184, !18, i64 192, !18, i64 200, !18, i64 208, !18, i64 216, !18, i64 224, !18, i64 232, !18, i64 240, !18, i64 248, !18, i64 256, !18, i64 264, !18, i64 272}
!16 = !{!"float", !8, i64 0}
!17 = !{!"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}
!18 = !{!"double", !8, i64 0}
!19 = !{!6, !10, i64 136}
!20 = !{!6, !7, i64 144}
!21 = !{!6, !10, i64 160}
!22 = !{!6, !10, i64 96}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.unroll.disable"}
!27 = !{!10, !10, i64 0}
!28 = !{!6, !10, i64 48}
!29 = distinct !{!29, !24}


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