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

; 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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__MlevelNestedDissectionP(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, i64 noundef %4, i64 noundef %5, ptr noundef %6) #2 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca [2 x i64], align 16
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca %struct.graphdef, align 8
  %24 = alloca %struct.graphdef, align 8
  %25 = alloca float, align 4
  %26 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store i64 %3, ptr %11, align 8, !tbaa !9
  store i64 %4, ptr %12, align 8, !tbaa !9
  store i64 %5, ptr %13, align 8, !tbaa !9
  store ptr %6, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 16, 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 248, ptr %23) #3
  call void @llvm.lifetime.start.p0(i64 248, ptr %24) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #3
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.graphdef, ptr %27, i32 0, i32 0
  %29 = load i64, ptr %28, align 8, !tbaa !11
  store i64 %29, ptr %17, align 8, !tbaa !9
  %30 = load i64, ptr %17, align 8, !tbaa !9
  %31 = icmp eq i64 %30, 0
  br i1 %31, label %32, label %34

32:                                               ; preds = %7
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  call void @libmetis__FreeGraph(ptr noundef %33, i32 noundef 0)
  store i32 1, ptr %26, align 4
  br label %217

34:                                               ; preds = %7
  %35 = load i64, ptr %17, align 8, !tbaa !9
  %36 = load ptr, ptr %9, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.graphdef, ptr %36, i32 0, i32 3
  %38 = load ptr, ptr %37, align 8, !tbaa !14
  %39 = call i64 @libmetis__idxsum(i64 noundef %35, ptr noundef %38, i64 noundef 1)
  store i64 %39, ptr %19, align 8, !tbaa !9
  %40 = load i64, ptr %19, align 8, !tbaa !9
  %41 = sdiv i64 %40, 2
  %42 = getelementptr inbounds [2 x i64], ptr %20, i64 0, i64 0
  store i64 %41, ptr %42, align 16, !tbaa !9
  %43 = load i64, ptr %19, align 8, !tbaa !9
  %44 = getelementptr inbounds [2 x i64], ptr %20, i64 0, i64 0
  %45 = load i64, ptr %44, align 16, !tbaa !9
  %46 = sub nsw i64 %43, %45
  %47 = getelementptr inbounds [2 x i64], ptr %20, i64 0, i64 1
  store i64 %46, ptr %47, align 8, !tbaa !9
  %48 = load i64, ptr %13, align 8, !tbaa !9
  %49 = load i64, ptr %12, align 8, !tbaa !9
  %50 = sub nsw i64 %49, 1
  %51 = icmp sge i64 %48, %50
  br i1 %51, label %52, label %53

52:                                               ; preds = %34
  store float 0x3FF19999A0000000, ptr %25, align 4, !tbaa !15
  br label %54

53:                                               ; preds = %34
  store float 0x3FF0CCCCC0000000, ptr %25, align 4, !tbaa !15
  br label %54

54:                                               ; preds = %53, %52
  %55 = load ptr, ptr %8, align 8, !tbaa !5
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = getelementptr inbounds [2 x i64], ptr %20, i64 0, i64 0
  %58 = load float, ptr %25, align 4, !tbaa !15
  call void @libmetis__MlevelNodeBisectionMultiple(ptr noundef %55, ptr noundef %56, ptr noundef %57, float noundef %58)
  %59 = load ptr, ptr %8, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.controldef, ptr %59, i32 0, i32 1
  %61 = load i64, ptr %60, align 8, !tbaa !17
  %62 = and i64 %61, 128
  %63 = icmp ne i64 %62, 0
  br i1 %63, label %64, label %84

64:                                               ; preds = %54
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.graphdef, ptr %65, i32 0, i32 0
  %67 = load i64, ptr %66, align 8, !tbaa !11
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.graphdef, ptr %68, i32 0, i32 19
  %70 = load ptr, ptr %69, align 8, !tbaa !21
  %71 = getelementptr inbounds i64, ptr %70, i64 0
  %72 = load i64, ptr %71, align 8, !tbaa !9
  %73 = load ptr, ptr %9, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.graphdef, ptr %73, i32 0, i32 19
  %75 = load ptr, ptr %74, align 8, !tbaa !21
  %76 = getelementptr inbounds i64, ptr %75, i64 1
  %77 = load i64, ptr %76, align 8, !tbaa !9
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.graphdef, ptr %78, i32 0, i32 19
  %80 = load ptr, ptr %79, align 8, !tbaa !21
  %81 = getelementptr inbounds i64, ptr %80, i64 2
  %82 = load i64, ptr %81, align 8, !tbaa !9
  %83 = call i32 (ptr, ...) @mprintf(ptr noundef @.str.3, i64 noundef %67, i64 noundef %72, i64 noundef %77, i64 noundef %82)
  br label %84

84:                                               ; preds = %64, %54
  %85 = load i64, ptr %13, align 8, !tbaa !9
  %86 = load i64, ptr %12, align 8, !tbaa !9
  %87 = sub nsw i64 %86, 1
  %88 = icmp slt i64 %85, %87
  br i1 %88, label %89, label %130

89:                                               ; preds = %84
  %90 = load ptr, ptr %9, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.graphdef, ptr %90, i32 0, i32 19
  %92 = load ptr, ptr %91, align 8, !tbaa !21
  %93 = getelementptr inbounds i64, ptr %92, i64 2
  %94 = load i64, ptr %93, align 8, !tbaa !9
  %95 = load ptr, ptr %14, align 8, !tbaa !5
  %96 = load i64, ptr %12, align 8, !tbaa !9
  %97 = mul nsw i64 2, %96
  %98 = sub nsw i64 %97, 2
  %99 = load i64, ptr %13, align 8, !tbaa !9
  %100 = sub nsw i64 %98, %99
  %101 = getelementptr inbounds i64, ptr %95, i64 %100
  store i64 %94, ptr %101, align 8, !tbaa !9
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.graphdef, ptr %102, i32 0, i32 19
  %104 = load ptr, ptr %103, align 8, !tbaa !21
  %105 = getelementptr inbounds i64, ptr %104, i64 1
  %106 = load i64, ptr %105, align 8, !tbaa !9
  %107 = load ptr, ptr %14, align 8, !tbaa !5
  %108 = load i64, ptr %12, align 8, !tbaa !9
  %109 = mul nsw i64 2, %108
  %110 = sub nsw i64 %109, 2
  %111 = load i64, ptr %13, align 8, !tbaa !9
  %112 = mul nsw i64 2, %111
  %113 = add nsw i64 %112, 1
  %114 = sub nsw i64 %110, %113
  %115 = getelementptr inbounds i64, ptr %107, i64 %114
  store i64 %106, ptr %115, align 8, !tbaa !9
  %116 = load ptr, ptr %9, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.graphdef, ptr %116, i32 0, i32 19
  %118 = load ptr, ptr %117, align 8, !tbaa !21
  %119 = getelementptr inbounds i64, ptr %118, i64 0
  %120 = load i64, ptr %119, align 8, !tbaa !9
  %121 = load ptr, ptr %14, align 8, !tbaa !5
  %122 = load i64, ptr %12, align 8, !tbaa !9
  %123 = mul nsw i64 2, %122
  %124 = sub nsw i64 %123, 2
  %125 = load i64, ptr %13, align 8, !tbaa !9
  %126 = mul nsw i64 2, %125
  %127 = add nsw i64 %126, 2
  %128 = sub nsw i64 %124, %127
  %129 = getelementptr inbounds i64, ptr %121, i64 %128
  store i64 %120, ptr %129, align 8, !tbaa !9
  br label %130

130:                                              ; preds = %89, %84
  %131 = load ptr, ptr %9, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.graphdef, ptr %131, i32 0, i32 20
  %133 = load i64, ptr %132, align 8, !tbaa !22
  store i64 %133, ptr %18, align 8, !tbaa !9
  %134 = load ptr, ptr %9, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.graphdef, ptr %134, i32 0, i32 22
  %136 = load ptr, ptr %135, align 8, !tbaa !23
  store ptr %136, ptr %22, align 8, !tbaa !5
  %137 = load ptr, ptr %9, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.graphdef, ptr %137, i32 0, i32 14
  %139 = load ptr, ptr %138, align 8, !tbaa !24
  store ptr %139, ptr %21, align 8, !tbaa !5
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %140

140:                                              ; preds = %156, %130
  %141 = load i64, ptr %15, align 8, !tbaa !9
  %142 = load i64, ptr %18, align 8, !tbaa !9
  %143 = icmp slt i64 %141, %142
  br i1 %143, label %144, label %159

144:                                              ; preds = %140
  %145 = load i64, ptr %11, align 8, !tbaa !9
  %146 = add nsw i64 %145, -1
  store i64 %146, ptr %11, align 8, !tbaa !9
  %147 = load ptr, ptr %10, align 8, !tbaa !5
  %148 = load ptr, ptr %21, align 8, !tbaa !5
  %149 = load ptr, ptr %22, align 8, !tbaa !5
  %150 = load i64, ptr %15, align 8, !tbaa !9
  %151 = getelementptr inbounds i64, ptr %149, i64 %150
  %152 = load i64, ptr %151, align 8, !tbaa !9
  %153 = getelementptr inbounds i64, ptr %148, i64 %152
  %154 = load i64, ptr %153, align 8, !tbaa !9
  %155 = getelementptr inbounds i64, ptr %147, i64 %154
  store i64 %146, ptr %155, align 8, !tbaa !9
  br label %156

156:                                              ; preds = %144
  %157 = load i64, ptr %15, align 8, !tbaa !9
  %158 = add nsw i64 %157, 1
  store i64 %158, ptr %15, align 8, !tbaa !9
  br label %140, !llvm.loop !25

159:                                              ; preds = %140
  %160 = load ptr, ptr %8, align 8, !tbaa !5
  %161 = load ptr, ptr %9, align 8, !tbaa !5
  call void @libmetis__SplitGraphOrder(ptr noundef %160, ptr noundef %161, ptr noundef %23, ptr noundef %24)
  %162 = load ptr, ptr %9, align 8, !tbaa !5
  call void @libmetis__FreeGraph(ptr noundef %162, i32 noundef 0)
  %163 = getelementptr inbounds %struct.graphdef, ptr %24, i32 0, i32 0
  %164 = load i64, ptr %163, align 8, !tbaa !11
  %165 = icmp sgt i64 %164, 200
  br i1 %165, label %173, label %166

166:                                              ; preds = %159
  %167 = load i64, ptr %13, align 8, !tbaa !9
  %168 = mul nsw i64 2, %167
  %169 = add nsw i64 %168, 1
  %170 = load i64, ptr %12, align 8, !tbaa !9
  %171 = sub nsw i64 %170, 1
  %172 = icmp slt i64 %169, %171
  br i1 %172, label %173, label %182

173:                                              ; preds = %166, %159
  %174 = load ptr, ptr %8, align 8, !tbaa !5
  %175 = load ptr, ptr %10, align 8, !tbaa !5
  %176 = load i64, ptr %11, align 8, !tbaa !9
  %177 = load i64, ptr %12, align 8, !tbaa !9
  %178 = load i64, ptr %13, align 8, !tbaa !9
  %179 = mul nsw i64 2, %178
  %180 = add nsw i64 %179, 1
  %181 = load ptr, ptr %14, align 8, !tbaa !5
  call void @libmetis__MlevelNestedDissectionP(ptr noundef %174, ptr noundef %24, ptr noundef %175, i64 noundef %176, i64 noundef %177, i64 noundef %180, ptr noundef %181)
  br label %186

182:                                              ; preds = %166
  %183 = load ptr, ptr %8, align 8, !tbaa !5
  %184 = load ptr, ptr %10, align 8, !tbaa !5
  %185 = load i64, ptr %11, align 8, !tbaa !9
  call void @libmetis__MMDOrder(ptr noundef %183, ptr noundef %24, ptr noundef %184, i64 noundef %185)
  call void @libmetis__FreeGraph(ptr noundef %24, i32 noundef 0)
  br label %186

186:                                              ; preds = %182, %173
  %187 = getelementptr inbounds %struct.graphdef, ptr %23, i32 0, i32 0
  %188 = load i64, ptr %187, align 8, !tbaa !11
  %189 = icmp sgt i64 %188, 200
  br i1 %189, label %197, label %190

190:                                              ; preds = %186
  %191 = load i64, ptr %13, align 8, !tbaa !9
  %192 = mul nsw i64 2, %191
  %193 = add nsw i64 %192, 2
  %194 = load i64, ptr %12, align 8, !tbaa !9
  %195 = sub nsw i64 %194, 1
  %196 = icmp slt i64 %193, %195
  br i1 %196, label %197, label %209

197:                                              ; preds = %190, %186
  %198 = load ptr, ptr %8, align 8, !tbaa !5
  %199 = load ptr, ptr %10, align 8, !tbaa !5
  %200 = load i64, ptr %11, align 8, !tbaa !9
  %201 = getelementptr inbounds %struct.graphdef, ptr %24, i32 0, i32 0
  %202 = load i64, ptr %201, align 8, !tbaa !11
  %203 = sub nsw i64 %200, %202
  %204 = load i64, ptr %12, align 8, !tbaa !9
  %205 = load i64, ptr %13, align 8, !tbaa !9
  %206 = mul nsw i64 2, %205
  %207 = add nsw i64 %206, 2
  %208 = load ptr, ptr %14, align 8, !tbaa !5
  call void @libmetis__MlevelNestedDissectionP(ptr noundef %198, ptr noundef %23, ptr noundef %199, i64 noundef %203, i64 noundef %204, i64 noundef %207, ptr noundef %208)
  br label %216

209:                                              ; preds = %190
  %210 = load ptr, ptr %8, align 8, !tbaa !5
  %211 = load ptr, ptr %10, align 8, !tbaa !5
  %212 = load i64, ptr %11, align 8, !tbaa !9
  %213 = getelementptr inbounds %struct.graphdef, ptr %24, i32 0, i32 0
  %214 = load i64, ptr %213, align 8, !tbaa !11
  %215 = sub nsw i64 %212, %214
  call void @libmetis__MMDOrder(ptr noundef %210, ptr noundef %23, ptr noundef %211, i64 noundef %215)
  call void @libmetis__FreeGraph(ptr noundef %23, i32 noundef 0)
  br label %216

216:                                              ; preds = %209, %197
  store i32 0, ptr %26, align 4
  br label %217

217:                                              ; preds = %216, %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 248, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 248, 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 16, 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 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  %218 = load i32, ptr %26, align 4
  switch i32 %218, label %220 [
    i32 0, label %219
    i32 1, label %219
  ]

219:                                              ; preds = %217, %217
  ret void

220:                                              ; preds = %217
  unreachable
}

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

declare void @libmetis__MlevelNodeBisectionMultiple(ptr noundef, ptr noundef, ptr noundef, float noundef) #1

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

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

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


; 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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__MlevelNestedDissectionP(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, i64 noundef %4, i64 noundef %5, ptr noundef %6) local_unnamed_addr #2 {
  %8 = alloca [2 x i64], align 16
  %9 = alloca %struct.graphdef, align 8
  %10 = alloca %struct.graphdef, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 248, ptr nonnull %9) #3
  call void @llvm.lifetime.start.p0(i64 248, ptr nonnull %10) #3
  %11 = load i64, ptr %1, align 8, !tbaa !5
  %12 = icmp eq i64 %11, 0
  br i1 %12, label %13, label %14

13:                                               ; preds = %7
  tail call void @libmetis__FreeGraph(ptr noundef nonnull %1, i32 noundef 0) #3
  br label %109

14:                                               ; preds = %7
  %15 = getelementptr inbounds i8, ptr %1, i64 24
  %16 = load ptr, ptr %15, align 8, !tbaa !12
  %17 = tail call i64 @libmetis__idxsum(i64 noundef %11, ptr noundef %16, i64 noundef 1) #3
  %18 = sdiv i64 %17, 2
  store i64 %18, ptr %8, align 16, !tbaa !13
  %19 = sub nsw i64 %17, %18
  %20 = getelementptr inbounds i8, ptr %8, i64 8
  store i64 %19, ptr %20, align 8, !tbaa !13
  %21 = add nsw i64 %4, -1
  %.not = icmp sgt i64 %21, %5
  %. = select i1 %.not, float 0x3FF0CCCCC0000000, float 0x3FF19999A0000000
  call void @libmetis__MlevelNodeBisectionMultiple(ptr noundef %0, ptr noundef nonnull %1, ptr noundef nonnull %8, float noundef %.) #3
  %22 = getelementptr inbounds i8, ptr %0, i64 8
  %23 = load i64, ptr %22, align 8, !tbaa !14
  %24 = and i64 %23, 128
  %.not70 = icmp eq i64 %24, 0
  br i1 %.not70, label %35, label %25

25:                                               ; preds = %14
  %26 = load i64, ptr %1, align 8, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %1, i64 136
  %28 = load ptr, ptr %27, align 8, !tbaa !19
  %29 = load i64, ptr %28, align 8, !tbaa !13
  %30 = getelementptr inbounds i8, ptr %28, i64 8
  %31 = load i64, ptr %30, align 8, !tbaa !13
  %32 = getelementptr inbounds i8, ptr %28, i64 16
  %33 = load i64, ptr %32, align 8, !tbaa !13
  %34 = call i32 (ptr, ...) @mprintf(ptr noundef nonnull @.str.3, i64 noundef %26, i64 noundef %29, i64 noundef %31, i64 noundef %33) #3
  br label %35

35:                                               ; preds = %25, %14
  br i1 %.not, label %36, label %54

36:                                               ; preds = %35
  %37 = getelementptr inbounds i8, ptr %1, i64 136
  %38 = load ptr, ptr %37, align 8, !tbaa !19
  %39 = getelementptr inbounds i8, ptr %38, i64 16
  %40 = load i64, ptr %39, align 8, !tbaa !13
  %41 = shl nsw i64 %4, 1
  %42 = add nsw i64 %41, -2
  %43 = sub nsw i64 %42, %5
  %44 = getelementptr inbounds i64, ptr %6, i64 %43
  store i64 %40, ptr %44, align 8, !tbaa !13
  %45 = getelementptr inbounds i8, ptr %38, i64 8
  %46 = load i64, ptr %45, align 8, !tbaa !13
  %47 = shl nsw i64 %5, 1
  %.neg = xor i64 %47, -1
  %48 = getelementptr i64, ptr %6, i64 %42
  %49 = getelementptr i64, ptr %48, i64 %.neg
  store i64 %46, ptr %49, align 8, !tbaa !13
  %50 = load i64, ptr %38, align 8, !tbaa !13
  %51 = sub i64 %41, %47
  %52 = getelementptr i64, ptr %6, i64 %51
  %53 = getelementptr i8, ptr %52, i64 -32
  store i64 %50, ptr %53, align 8, !tbaa !13
  br label %54

54:                                               ; preds = %36, %35
  %55 = getelementptr inbounds i8, ptr %1, i64 144
  %56 = load i64, ptr %55, align 8, !tbaa !20
  %57 = getelementptr inbounds i8, ptr %1, i64 160
  %58 = load ptr, ptr %57, align 8, !tbaa !21
  %59 = getelementptr inbounds i8, ptr %1, i64 96
  %60 = load ptr, ptr %59, align 8, !tbaa !22
  %61 = icmp sgt i64 %56, 0
  br i1 %61, label %.lr.ph.preheader, label %._crit_edge

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

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

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %.06674 = phi i64 [ %3, %.lr.ph.preheader.new ], [ %84, %.lr.ph ]
  %.06773 = phi i64 [ 0, %.lr.ph.preheader.new ], [ %90, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %63 = add nsw i64 %.06674, -1
  %64 = getelementptr inbounds i64, ptr %58, i64 %.06773
  %65 = load i64, ptr %64, align 8, !tbaa !13
  %66 = getelementptr inbounds i64, ptr %60, i64 %65
  %67 = load i64, ptr %66, align 8, !tbaa !13
  %68 = getelementptr inbounds i64, ptr %2, i64 %67
  store i64 %63, ptr %68, align 8, !tbaa !13
  %69 = or disjoint i64 %.06773, 1
  %70 = add nsw i64 %.06674, -2
  %71 = getelementptr inbounds i64, ptr %58, i64 %69
  %72 = load i64, ptr %71, align 8, !tbaa !13
  %73 = getelementptr inbounds i64, ptr %60, i64 %72
  %74 = load i64, ptr %73, align 8, !tbaa !13
  %75 = getelementptr inbounds i64, ptr %2, i64 %74
  store i64 %70, ptr %75, align 8, !tbaa !13
  %76 = or disjoint i64 %.06773, 2
  %77 = add nsw i64 %.06674, -3
  %78 = getelementptr inbounds i64, ptr %58, i64 %76
  %79 = load i64, ptr %78, align 8, !tbaa !13
  %80 = getelementptr inbounds i64, ptr %60, i64 %79
  %81 = load i64, ptr %80, align 8, !tbaa !13
  %82 = getelementptr inbounds i64, ptr %2, i64 %81
  store i64 %77, ptr %82, align 8, !tbaa !13
  %83 = or disjoint i64 %.06773, 3
  %84 = add nsw i64 %.06674, -4
  %85 = getelementptr inbounds i64, ptr %58, i64 %83
  %86 = load i64, ptr %85, align 8, !tbaa !13
  %87 = getelementptr inbounds i64, ptr %60, i64 %86
  %88 = load i64, ptr %87, align 8, !tbaa !13
  %89 = getelementptr inbounds i64, ptr %2, i64 %88
  store i64 %84, ptr %89, align 8, !tbaa !13
  %90 = add nuw nsw i64 %.06773, 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 ], [ %84, %.lr.ph ]
  %.06674.unr = phi i64 [ %3, %.lr.ph.preheader ], [ %84, %.lr.ph ]
  %.06773.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %90, %.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
  %.06674.epil = phi i64 [ %91, %.lr.ph.epil ], [ %.06674.unr, %._crit_edge.loopexit.unr-lcssa ]
  %.06773.epil = phi i64 [ %97, %.lr.ph.epil ], [ %.06773.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %91 = add nsw i64 %.06674.epil, -1
  %92 = getelementptr inbounds i64, ptr %58, i64 %.06773.epil
  %93 = load i64, ptr %92, align 8, !tbaa !13
  %94 = getelementptr inbounds i64, ptr %60, i64 %93
  %95 = load i64, ptr %94, align 8, !tbaa !13
  %96 = getelementptr inbounds i64, ptr %2, i64 %95
  store i64 %91, ptr %96, align 8, !tbaa !13
  %97 = add nuw nsw i64 %.06773.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, %54
  %.066.lcssa = phi i64 [ %3, %54 ], [ %.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %91, %.lr.ph.epil ]
  call void @libmetis__SplitGraphOrder(ptr noundef %0, ptr noundef nonnull %1, ptr noundef nonnull %9, ptr noundef nonnull %10) #3
  call void @libmetis__FreeGraph(ptr noundef nonnull %1, i32 noundef 0) #3
  %98 = load i64, ptr %10, align 8, !tbaa !5
  %99 = icmp sgt i64 %98, 200
  %.pre = shl nsw i64 %5, 1
  %.pre76 = or disjoint i64 %.pre, 1
  %100 = icmp slt i64 %.pre76, %21
  %or.cond = select i1 %99, i1 true, i1 %100
  br i1 %or.cond, label %._crit_edge._crit_edge, label %101

._crit_edge._crit_edge:                           ; preds = %._crit_edge
  call void @libmetis__MlevelNestedDissectionP(ptr noundef %0, ptr noundef nonnull %10, ptr noundef %2, i64 noundef %.066.lcssa, i64 noundef %4, i64 noundef %.pre76, ptr noundef %6)
  br label %102

101:                                              ; preds = %._crit_edge
  call void @libmetis__MMDOrder(ptr noundef %0, ptr noundef nonnull %10, ptr noundef %2, i64 noundef %.066.lcssa) #3
  call void @libmetis__FreeGraph(ptr noundef nonnull %10, i32 noundef 0) #3
  br label %102

102:                                              ; preds = %101, %._crit_edge._crit_edge
  %103 = load i64, ptr %9, align 8, !tbaa !5
  %104 = icmp sgt i64 %103, 200
  %.pre78 = shl nsw i64 %5, 1
  %.pre80 = add nsw i64 %.pre78, 2
  %105 = icmp slt i64 %.pre80, %21
  %or.cond82 = select i1 %104, i1 true, i1 %105
  %106 = load i64, ptr %10, align 8, !tbaa !5
  %107 = sub nsw i64 %.066.lcssa, %106
  br i1 %or.cond82, label %._crit_edge75, label %108

._crit_edge75:                                    ; preds = %102
  call void @libmetis__MlevelNestedDissectionP(ptr noundef %0, ptr noundef nonnull %9, ptr noundef %2, i64 noundef %107, i64 noundef %4, i64 noundef %.pre80, ptr noundef %6)
  br label %109

108:                                              ; preds = %102
  call void @libmetis__MMDOrder(ptr noundef %0, ptr noundef nonnull %9, ptr noundef %2, i64 noundef %107) #3
  call void @libmetis__FreeGraph(ptr noundef nonnull %9, i32 noundef 0) #3
  br label %109

109:                                              ; preds = %._crit_edge75, %108, %13
  call void @llvm.lifetime.end.p0(i64 248, ptr nonnull %10) #3
  call void @llvm.lifetime.end.p0(i64 248, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #3
  ret void
}

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

declare void @libmetis__MlevelNodeBisectionMultiple(ptr noundef, ptr noundef, ptr noundef, float noundef) local_unnamed_addr #1

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

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

declare void @libmetis__MMDOrder(ptr noundef, ptr noundef, ptr noundef, i64 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 = { 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"}


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