; LLVM IR from siconos/siconos :: externals/lbl/metis4/mkmetis.ll_ (MCMlevelKWayPartitioning)

; 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.controldef = type { i32, i32, i32, i32, i32, i32, float, i32, i32, i32, i32, %struct.workspacedef, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double }
%struct.workspacedef = type { ptr, i32, i32, ptr, ptr, i32, ptr, ptr }
%struct.graphdef = type { ptr, ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [37 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 double @__seconds() #1

; Function Attrs: nounwind uwtable
define dso_local i32 @__MCMlevelKWayPartitioning(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4) #2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca [10 x i32], align 16
  %16 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i32 %2, ptr %8, align 4, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  %19 = call ptr @__MCCoarsen2Way(ptr noundef %17, ptr noundef %18)
  store ptr %19, ptr %14, align 8, !tbaa !5
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.controldef, ptr %20, i32 0, i32 1
  %22 = load i32, ptr %21, align 4, !tbaa !11
  %23 = and i32 %22, 1
  %24 = icmp ne i32 %23, 0
  br i1 %24, label %25, label %31

25:                                               ; preds = %5
  %26 = call double @__seconds()
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.controldef, ptr %27, i32 0, i32 13
  %29 = load double, ptr %28, align 8, !tbaa !16
  %30 = fsub double %29, %26
  store double %30, ptr %28, align 8, !tbaa !16
  br label %31

31:                                               ; preds = %25, %5
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = load ptr, ptr %14, align 8, !tbaa !5
  %34 = load i32, ptr %8, align 4, !tbaa !9
  call void @__MocAllocateKWayPartitionMemory(ptr noundef %32, ptr noundef %33, i32 noundef %34)
  %35 = getelementptr inbounds [10 x i32], ptr %15, i64 0, i64 0
  store i32 1, ptr %35, align 16, !tbaa !9
  %36 = getelementptr inbounds [10 x i32], ptr %15, i64 0, i64 1
  store i32 8, ptr %36, align 4, !tbaa !9
  %37 = getelementptr inbounds [10 x i32], ptr %15, i64 0, i64 2
  store i32 2, ptr %37, align 8, !tbaa !9
  %38 = getelementptr inbounds [10 x i32], ptr %15, i64 0, i64 3
  store i32 1, ptr %38, align 4, !tbaa !9
  %39 = getelementptr inbounds [10 x i32], ptr %15, i64 0, i64 4
  store i32 0, ptr %39, align 16, !tbaa !9
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %40

40:                                               ; preds = %56, %31
  %41 = load i32, ptr %11, align 4, !tbaa !9
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.graphdef, ptr %42, i32 0, i32 24
  %44 = load i32, ptr %43, align 8, !tbaa !17
  %45 = icmp slt i32 %41, %44
  br i1 %45, label %46, label %59

46:                                               ; preds = %40
  %47 = load ptr, ptr %10, align 8, !tbaa !5
  %48 = load i32, ptr %11, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds float, ptr %47, i64 %49
  %51 = load float, ptr %50, align 4, !tbaa !19
  %52 = fpext float %51 to double
  %53 = fcmp ogt double %52, 1.200000e+00
  br i1 %53, label %54, label %55

54:                                               ; preds = %46
  br label %59

55:                                               ; preds = %46
  br label %56

56:                                               ; preds = %55
  %57 = load i32, ptr %11, align 4, !tbaa !9
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %11, align 4, !tbaa !9
  br label %40, !llvm.loop !20

59:                                               ; preds = %54, %40
  %60 = load i32, ptr %11, align 4, !tbaa !9
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.graphdef, ptr %61, i32 0, i32 24
  %63 = load i32, ptr %62, align 8, !tbaa !17
  %64 = icmp eq i32 %60, %63
  br i1 %64, label %65, label %86

65:                                               ; preds = %59
  %66 = load ptr, ptr %14, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.graphdef, ptr %66, i32 0, i32 2
  %68 = load ptr, ptr %14, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.graphdef, ptr %68, i32 0, i32 24
  %70 = load ptr, ptr %14, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.graphdef, ptr %70, i32 0, i32 4
  %72 = load ptr, ptr %71, align 8, !tbaa !22
  %73 = load ptr, ptr %14, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.graphdef, ptr %73, i32 0, i32 7
  %75 = load ptr, ptr %74, align 8, !tbaa !23
  %76 = load ptr, ptr %14, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.graphdef, ptr %76, i32 0, i32 25
  %78 = load ptr, ptr %77, align 8, !tbaa !24
  %79 = load ptr, ptr %14, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.graphdef, ptr %79, i32 0, i32 8
  %81 = load ptr, ptr %80, align 8, !tbaa !25
  %82 = getelementptr inbounds [10 x i32], ptr %15, i64 0, i64 0
  %83 = load ptr, ptr %14, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.graphdef, ptr %83, i32 0, i32 14
  %85 = load ptr, ptr %84, align 8, !tbaa !26
  call void @METIS_mCPartGraphRecursiveInternal(ptr noundef %67, ptr noundef %69, ptr noundef %72, ptr noundef %75, ptr noundef %78, ptr noundef %81, ptr noundef %8, ptr noundef %82, ptr noundef %16, ptr noundef %85)
  br label %108

86:                                               ; preds = %59
  %87 = load ptr, ptr %14, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.graphdef, ptr %87, i32 0, i32 2
  %89 = load ptr, ptr %14, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.graphdef, ptr %89, i32 0, i32 24
  %91 = load ptr, ptr %14, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.graphdef, ptr %91, i32 0, i32 4
  %93 = load ptr, ptr %92, align 8, !tbaa !22
  %94 = load ptr, ptr %14, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.graphdef, ptr %94, i32 0, i32 7
  %96 = load ptr, ptr %95, align 8, !tbaa !23
  %97 = load ptr, ptr %14, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.graphdef, ptr %97, i32 0, i32 25
  %99 = load ptr, ptr %98, align 8, !tbaa !24
  %100 = load ptr, ptr %14, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.graphdef, ptr %100, i32 0, i32 8
  %102 = load ptr, ptr %101, align 8, !tbaa !25
  %103 = load ptr, ptr %10, align 8, !tbaa !5
  %104 = getelementptr inbounds [10 x i32], ptr %15, i64 0, i64 0
  %105 = load ptr, ptr %14, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.graphdef, ptr %105, i32 0, i32 14
  %107 = load ptr, ptr %106, align 8, !tbaa !26
  call void @METIS_mCHPartGraphRecursiveInternal(ptr noundef %88, ptr noundef %90, ptr noundef %93, ptr noundef %96, ptr noundef %99, ptr noundef %102, ptr noundef %8, ptr noundef %103, ptr noundef %104, ptr noundef %16, ptr noundef %107)
  br label %108

108:                                              ; preds = %86, %65
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.controldef, ptr %109, i32 0, i32 1
  %111 = load i32, ptr %110, align 4, !tbaa !11
  %112 = and i32 %111, 1
  %113 = icmp ne i32 %112, 0
  br i1 %113, label %114, label %120

114:                                              ; preds = %108
  %115 = call double @__seconds()
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.controldef, ptr %116, i32 0, i32 13
  %118 = load double, ptr %117, align 8, !tbaa !16
  %119 = fadd double %118, %115
  store double %119, ptr %117, align 8, !tbaa !16
  br label %120

120:                                              ; preds = %114, %108
  %121 = load ptr, ptr %6, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.controldef, ptr %121, i32 0, i32 1
  %123 = load i32, ptr %122, align 4, !tbaa !11
  %124 = and i32 %123, 16
  %125 = icmp ne i32 %124, 0
  br i1 %125, label %126, label %130

126:                                              ; preds = %120
  %127 = load i32, ptr %8, align 4, !tbaa !9
  %128 = load i32, ptr %16, align 4, !tbaa !9
  %129 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %127, i32 noundef %128)
  br label %130

130:                                              ; preds = %126, %120
  %131 = load ptr, ptr %6, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.controldef, ptr %131, i32 0, i32 1
  %133 = load i32, ptr %132, align 4, !tbaa !11
  %134 = and i32 %133, 64
  %135 = icmp ne i32 %134, 0
  br i1 %135, label %136, label %142

136:                                              ; preds = %130
  %137 = load ptr, ptr %14, align 8, !tbaa !5
  %138 = load i32, ptr %8, align 4, !tbaa !9
  %139 = load ptr, ptr %14, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.graphdef, ptr %139, i32 0, i32 14
  %141 = load ptr, ptr %140, align 8, !tbaa !26
  call void @__ComputePartitionInfo(ptr noundef %137, i32 noundef %138, ptr noundef %141)
  br label %142

142:                                              ; preds = %136, %130
  %143 = load ptr, ptr %6, align 8, !tbaa !5
  %144 = load ptr, ptr %7, align 8, !tbaa !5
  %145 = load ptr, ptr %14, align 8, !tbaa !5
  %146 = load i32, ptr %8, align 4, !tbaa !9
  %147 = load ptr, ptr %10, align 8, !tbaa !5
  call void @__MocRefineKWayHorizontal(ptr noundef %143, ptr noundef %144, ptr noundef %145, i32 noundef %146, ptr noundef %147)
  %148 = load ptr, ptr %9, align 8, !tbaa !5
  %149 = load ptr, ptr %7, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.graphdef, ptr %149, i32 0, i32 14
  %151 = load ptr, ptr %150, align 8, !tbaa !26
  %152 = load ptr, ptr %7, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.graphdef, ptr %152, i32 0, i32 2
  %154 = load i32, ptr %153, align 8, !tbaa !27
  %155 = sext i32 %154 to i64
  %156 = mul i64 4, %155
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %148, ptr align 1 %151, i64 %156, i1 false)
  %157 = load ptr, ptr %7, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.graphdef, ptr %157, i32 0, i32 25
  %159 = load ptr, ptr %7, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.graphdef, ptr %159, i32 0, i32 26
  %161 = load ptr, ptr %7, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.graphdef, ptr %161, i32 0, i32 0
  %163 = load ptr, ptr %7, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.graphdef, ptr %163, i32 0, i32 1
  call void (ptr, ...) @GKfree(ptr noundef %158, ptr noundef %160, ptr noundef %162, ptr noundef %164, ptr noundef null)
  %165 = load ptr, ptr %7, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.graphdef, ptr %165, i32 0, i32 12
  %167 = load i32, ptr %166, align 8, !tbaa !28
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  ret i32 %167
}

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

declare ptr @__MCCoarsen2Way(ptr noundef, ptr noundef) #1

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

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

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

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

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

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

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

declare void @GKfree(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 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 4}
!12 = !{!"controldef", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !13, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !14, i64 48, !15, i64 104, !15, i64 112, !15, i64 120, !15, i64 128, !15, i64 136, !15, i64 144, !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}
!13 = !{!"float", !7, i64 0}
!14 = !{!"workspacedef", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16, !6, i64 24, !10, i64 32, !6, i64 40, !6, i64 48}
!15 = !{!"double", !7, i64 0}
!16 = !{!12, !15, i64 112}
!17 = !{!18, !10, i64 176}
!18 = !{!"graphdef", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !10, i64 92, !6, i64 96, !6, i64 104, !10, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !10, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208}
!19 = !{!13, !13, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!18, !6, i64 24}
!23 = !{!18, !6, i64 48}
!24 = !{!18, !6, i64 184}
!25 = !{!18, !6, i64 56}
!26 = !{!18, !6, i64 96}
!27 = !{!18, !10, i64 16}
!28 = !{!18, !10, i64 88}


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

@.str = external hidden unnamed_addr constant [37 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 double @__seconds() local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local i32 @__MCMlevelKWayPartitioning(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr nocapture noundef writeonly %3, ptr noundef %4) local_unnamed_addr #2 {
  %6 = alloca i32, align 4
  %7 = alloca [10 x i32], align 16
  %8 = alloca i32, align 4
  store i32 %2, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  %9 = tail call ptr @__MCCoarsen2Way(ptr noundef %0, ptr noundef %1) #5
  %10 = getelementptr inbounds i8, ptr %0, i64 4
  %11 = load i32, ptr %10, align 4, !tbaa !9
  %12 = and i32 %11, 1
  %.not = icmp eq i32 %12, 0
  br i1 %.not, label %18, label %13

13:                                               ; preds = %5
  %14 = tail call double @__seconds() #5
  %15 = getelementptr inbounds i8, ptr %0, i64 112
  %16 = load double, ptr %15, align 8, !tbaa !15
  %17 = fsub double %16, %14
  store double %17, ptr %15, align 8, !tbaa !15
  br label %18

18:                                               ; preds = %13, %5
  tail call void @__MocAllocateKWayPartitionMemory(ptr noundef nonnull %0, ptr noundef %9, i32 noundef %2) #5
  store <4 x i32> <i32 1, i32 8, i32 2, i32 1>, ptr %7, align 16, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %7, i64 16
  store i32 0, ptr %19, align 16, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %1, i64 176
  %21 = load i32, ptr %20, align 8, !tbaa !16
  %22 = icmp sgt i32 %21, 0
  br i1 %22, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %18
  %wide.trip.count = zext nneg i32 %21 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %27
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %27 ]
  %23 = getelementptr inbounds float, ptr %4, i64 %indvars.iv
  %24 = load float, ptr %23, align 4, !tbaa !18
  %25 = fpext float %24 to double
  %26 = fcmp ogt double %25, 1.200000e+00
  br i1 %26, label %._crit_edge.loopexit, label %27

27:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge.thread, label %.lr.ph, !llvm.loop !19

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %28 = trunc nuw nsw i64 %indvars.iv to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %18
  %.0.lcssa = phi i32 [ 0, %18 ], [ %28, %._crit_edge.loopexit ]
  %29 = icmp eq i32 %.0.lcssa, %21
  br i1 %29, label %._crit_edge.thread, label %42

._crit_edge.thread:                               ; preds = %27, %._crit_edge
  %30 = getelementptr inbounds i8, ptr %9, i64 16
  %31 = getelementptr inbounds i8, ptr %9, i64 176
  %32 = getelementptr inbounds i8, ptr %9, i64 24
  %33 = load ptr, ptr %32, align 8, !tbaa !21
  %34 = getelementptr inbounds i8, ptr %9, i64 48
  %35 = load ptr, ptr %34, align 8, !tbaa !22
  %36 = getelementptr inbounds i8, ptr %9, i64 184
  %37 = load ptr, ptr %36, align 8, !tbaa !23
  %38 = getelementptr inbounds i8, ptr %9, i64 56
  %39 = load ptr, ptr %38, align 8, !tbaa !24
  %40 = getelementptr inbounds i8, ptr %9, i64 96
  %41 = load ptr, ptr %40, align 8, !tbaa !25
  call void @METIS_mCPartGraphRecursiveInternal(ptr noundef nonnull %30, ptr noundef nonnull %31, ptr noundef %33, ptr noundef %35, ptr noundef %37, ptr noundef %39, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef %41) #5
  br label %55

42:                                               ; preds = %._crit_edge
  %43 = getelementptr inbounds i8, ptr %9, i64 16
  %44 = getelementptr inbounds i8, ptr %9, i64 176
  %45 = getelementptr inbounds i8, ptr %9, i64 24
  %46 = load ptr, ptr %45, align 8, !tbaa !21
  %47 = getelementptr inbounds i8, ptr %9, i64 48
  %48 = load ptr, ptr %47, align 8, !tbaa !22
  %49 = getelementptr inbounds i8, ptr %9, i64 184
  %50 = load ptr, ptr %49, align 8, !tbaa !23
  %51 = getelementptr inbounds i8, ptr %9, i64 56
  %52 = load ptr, ptr %51, align 8, !tbaa !24
  %53 = getelementptr inbounds i8, ptr %9, i64 96
  %54 = load ptr, ptr %53, align 8, !tbaa !25
  call void @METIS_mCHPartGraphRecursiveInternal(ptr noundef nonnull %43, ptr noundef nonnull %44, ptr noundef %46, ptr noundef %48, ptr noundef %50, ptr noundef %52, ptr noundef nonnull %6, ptr noundef %4, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef %54) #5
  br label %55

55:                                               ; preds = %42, %._crit_edge.thread
  %56 = load i32, ptr %10, align 4, !tbaa !9
  %57 = and i32 %56, 1
  %.not45 = icmp eq i32 %57, 0
  br i1 %.not45, label %63, label %58

58:                                               ; preds = %55
  %59 = call double @__seconds() #5
  %60 = getelementptr inbounds i8, ptr %0, i64 112
  %61 = load double, ptr %60, align 8, !tbaa !15
  %62 = fadd double %59, %61
  store double %62, ptr %60, align 8, !tbaa !15
  %.pre = load i32, ptr %10, align 4, !tbaa !9
  br label %63

63:                                               ; preds = %58, %55
  %64 = phi i32 [ %.pre, %58 ], [ %56, %55 ]
  %65 = and i32 %64, 16
  %.not46 = icmp eq i32 %65, 0
  br i1 %.not46, label %70, label %66

66:                                               ; preds = %63
  %67 = load i32, ptr %6, align 4, !tbaa !5
  %68 = load i32, ptr %8, align 4, !tbaa !5
  %69 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %67, i32 noundef %68)
  %.pre54 = load i32, ptr %10, align 4, !tbaa !9
  br label %70

70:                                               ; preds = %66, %63
  %71 = phi i32 [ %.pre54, %66 ], [ %64, %63 ]
  %72 = and i32 %71, 64
  %.not47 = icmp eq i32 %72, 0
  br i1 %.not47, label %77, label %73

73:                                               ; preds = %70
  %74 = load i32, ptr %6, align 4, !tbaa !5
  %75 = getelementptr inbounds i8, ptr %9, i64 96
  %76 = load ptr, ptr %75, align 8, !tbaa !25
  call void @__ComputePartitionInfo(ptr noundef nonnull %9, i32 noundef %74, ptr noundef %76) #5
  br label %77

77:                                               ; preds = %73, %70
  %78 = load i32, ptr %6, align 4, !tbaa !5
  call void @__MocRefineKWayHorizontal(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %9, i32 noundef %78, ptr noundef %4) #5
  %79 = getelementptr inbounds i8, ptr %1, i64 96
  %80 = load ptr, ptr %79, align 8, !tbaa !25
  %81 = getelementptr inbounds i8, ptr %1, i64 16
  %82 = load i32, ptr %81, align 8, !tbaa !26
  %83 = sext i32 %82 to i64
  %84 = shl nsw i64 %83, 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %3, ptr align 1 %80, i64 %84, i1 false)
  %85 = getelementptr inbounds i8, ptr %1, i64 184
  %86 = getelementptr inbounds i8, ptr %1, i64 192
  %87 = getelementptr inbounds i8, ptr %1, i64 8
  call void (ptr, ...) @GKfree(ptr noundef nonnull %85, ptr noundef nonnull %86, ptr noundef nonnull %1, ptr noundef nonnull %87, ptr noundef null) #5
  %88 = getelementptr inbounds i8, ptr %1, i64 88
  %89 = load i32, ptr %88, align 8, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #5
  ret i32 %89
}

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

declare ptr @__MCCoarsen2Way(ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

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

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

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

declare void @GKfree(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 = { nofree nounwind "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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 4}
!10 = !{!"controldef", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !11, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !12, i64 48, !14, i64 104, !14, i64 112, !14, i64 120, !14, i64 128, !14, i64 136, !14, i64 144, !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}
!11 = !{!"float", !7, i64 0}
!12 = !{!"workspacedef", !13, i64 0, !6, i64 8, !6, i64 12, !13, i64 16, !13, i64 24, !6, i64 32, !13, i64 40, !13, i64 48}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!10, !14, i64 112}
!16 = !{!17, !6, i64 176}
!17 = !{!"graphdef", !13, i64 0, !13, i64 8, !6, i64 16, !6, i64 20, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !13, i64 72, !13, i64 80, !6, i64 88, !6, i64 92, !13, i64 96, !13, i64 104, !6, i64 112, !13, i64 120, !13, i64 128, !13, i64 136, !13, i64 144, !13, i64 152, !13, i64 160, !13, i64 168, !6, i64 176, !13, i64 184, !13, i64 192, !13, i64 200, !13, i64 208}
!18 = !{!11, !11, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!17, !13, i64 24}
!22 = !{!17, !13, i64 48}
!23 = !{!17, !13, i64 184}
!24 = !{!17, !13, i64 56}
!25 = !{!17, !13, i64 96}
!26 = !{!17, !6, i64 16}
!27 = !{!17, !6, i64 88}


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