; LLVM IR from GGiecold-zz/Cluster_Ensembles :: src/Cluster_Ensembles/Hypergraph_Partitioning/metis-5.1.0/libmetis (pmetis)

; 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.ctrl_t = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, i32, i32, float, ptr, ptr, ptr, float, double, double, double, double, double, double, double, double, double, double, double, double, ptr, i64, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.graph_t = type { i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, ptr, ptr, i32, i32, ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

; 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 void @libmetis__wspacepush(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @libmetis__MultilevelBisect(ptr noundef %0, ptr noundef %1, ptr noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  store ptr null, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  store float 0.000000e+00, ptr %13, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  store float 0.000000e+00, ptr %14, align 4, !tbaa !11
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  call void @libmetis__Setup2WayBalMultipliers(ptr noundef %15, ptr noundef %16, ptr noundef %17)
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  call void @libmetis__wspacepush(ptr noundef %18)
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.ctrl_t, ptr %19, i32 0, i32 16
  %21 = load i32, ptr %20, align 8, !tbaa !13
  %22 = icmp sgt i32 %21, 1
  br i1 %22, label %23, label %29

23:                                               ; preds = %3
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.graph_t, ptr %25, i32 0, i32 0
  %27 = load i32, ptr %26, align 8, !tbaa !17
  %28 = call ptr @libmetis__iwspacemalloc(ptr noundef %24, i32 noundef %27)
  store ptr %28, ptr %11, align 8, !tbaa !5
  br label %29

29:                                               ; preds = %23, %3
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %30

30:                                               ; preds = %120, %29
  %31 = load i32, ptr %7, align 4, !tbaa !9
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.ctrl_t, ptr %32, i32 0, i32 16
  %34 = load i32, ptr %33, align 8, !tbaa !13
  %35 = icmp slt i32 %31, %34
  br i1 %35, label %36, label %123

36:                                               ; preds = %30
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = call ptr @libmetis__CoarsenGraph(ptr noundef %37, ptr noundef %38)
  store ptr %39, ptr %12, align 8, !tbaa !5
  %40 = load ptr, ptr %12, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.graph_t, ptr %40, i32 0, i32 0
  %42 = load i32, ptr %41, align 8, !tbaa !17
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.ctrl_t, ptr %43, i32 0, i32 6
  %45 = load i32, ptr %44, align 8, !tbaa !19
  %46 = icmp sle i32 %42, %45
  %47 = zext i1 %46 to i64
  %48 = select i1 %46, i32 5, i32 7
  store i32 %48, ptr %8, align 4, !tbaa !9
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = load ptr, ptr %12, align 8, !tbaa !5
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = load i32, ptr %8, align 4, !tbaa !9
  call void @libmetis__Init2WayPartition(ptr noundef %49, ptr noundef %50, ptr noundef %51, i32 noundef %52)
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = load ptr, ptr %12, align 8, !tbaa !5
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  call void @libmetis__Refine2Way(ptr noundef %53, ptr noundef %54, ptr noundef %55, ptr noundef %56)
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.graph_t, ptr %57, i32 0, i32 17
  %59 = load i32, ptr %58, align 8, !tbaa !20
  store i32 %59, ptr %10, align 4, !tbaa !9
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.ctrl_t, ptr %61, i32 0, i32 25
  %63 = load ptr, ptr %62, align 8, !tbaa !21
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.ctrl_t, ptr %64, i32 0, i32 23
  %66 = load ptr, ptr %65, align 8, !tbaa !22
  %67 = call float @libmetis__ComputeLoadImbalanceDiff(ptr noundef %60, i32 noundef 2, ptr noundef %63, ptr noundef %66)
  store float %67, ptr %14, align 4, !tbaa !11
  %68 = load i32, ptr %7, align 4, !tbaa !9
  %69 = icmp eq i32 %68, 0
  br i1 %69, label %86, label %70

70:                                               ; preds = %36
  %71 = load float, ptr %14, align 4, !tbaa !11
  %72 = fpext float %71 to double
  %73 = fcmp ole double %72, 5.000000e-04
  br i1 %73, label %74, label %78

74:                                               ; preds = %70
  %75 = load i32, ptr %9, align 4, !tbaa !9
  %76 = load i32, ptr %10, align 4, !tbaa !9
  %77 = icmp sgt i32 %75, %76
  br i1 %77, label %86, label %78

78:                                               ; preds = %74, %70
  %79 = load float, ptr %13, align 4, !tbaa !11
  %80 = fpext float %79 to double
  %81 = fcmp ogt double %80, 5.000000e-04
  br i1 %81, label %82, label %106

82:                                               ; preds = %78
  %83 = load float, ptr %14, align 4, !tbaa !11
  %84 = load float, ptr %13, align 4, !tbaa !11
  %85 = fcmp olt float %83, %84
  br i1 %85, label %86, label %106

86:                                               ; preds = %82, %74, %36
  %87 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %87, ptr %9, align 4, !tbaa !9
  %88 = load float, ptr %14, align 4, !tbaa !11
  store float %88, ptr %13, align 4, !tbaa !11
  %89 = load i32, ptr %7, align 4, !tbaa !9
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.ctrl_t, ptr %90, i32 0, i32 16
  %92 = load i32, ptr %91, align 8, !tbaa !13
  %93 = sub nsw i32 %92, 1
  %94 = icmp slt i32 %89, %93
  br i1 %94, label %95, label %105

95:                                               ; preds = %86
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.graph_t, ptr %96, i32 0, i32 0
  %98 = load i32, ptr %97, align 8, !tbaa !17
  %99 = sext i32 %98 to i64
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.graph_t, ptr %100, i32 0, i32 19
  %102 = load ptr, ptr %101, align 8, !tbaa !23
  %103 = load ptr, ptr %11, align 8, !tbaa !5
  %104 = call ptr @libmetis__icopy(i64 noundef %99, ptr noundef %102, ptr noundef %103)
  br label %105

105:                                              ; preds = %95, %86
  br label %106

106:                                              ; preds = %105, %82, %78
  %107 = load i32, ptr %9, align 4, !tbaa !9
  %108 = icmp eq i32 %107, 0
  br i1 %108, label %109, label %110

109:                                              ; preds = %106
  br label %123

110:                                              ; preds = %106
  %111 = load i32, ptr %7, align 4, !tbaa !9
  %112 = load ptr, ptr %4, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.ctrl_t, ptr %112, i32 0, i32 16
  %114 = load i32, ptr %113, align 8, !tbaa !13
  %115 = sub nsw i32 %114, 1
  %116 = icmp slt i32 %111, %115
  br i1 %116, label %117, label %119

117:                                              ; preds = %110
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  call void @libmetis__FreeRData(ptr noundef %118)
  br label %119

119:                                              ; preds = %117, %110
  br label %120

120:                                              ; preds = %119
  %121 = load i32, ptr %7, align 4, !tbaa !9
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %7, align 4, !tbaa !9
  br label %30, !llvm.loop !24

123:                                              ; preds = %109, %30
  %124 = load i32, ptr %9, align 4, !tbaa !9
  %125 = load i32, ptr %10, align 4, !tbaa !9
  %126 = icmp ne i32 %124, %125
  br i1 %126, label %127, label %139

127:                                              ; preds = %123
  %128 = load ptr, ptr %5, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.graph_t, ptr %128, i32 0, i32 0
  %130 = load i32, ptr %129, align 8, !tbaa !17
  %131 = sext i32 %130 to i64
  %132 = load ptr, ptr %11, align 8, !tbaa !5
  %133 = load ptr, ptr %5, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.graph_t, ptr %133, i32 0, i32 19
  %135 = load ptr, ptr %134, align 8, !tbaa !23
  %136 = call ptr @libmetis__icopy(i64 noundef %131, ptr noundef %132, ptr noundef %135)
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = load ptr, ptr %5, align 8, !tbaa !5
  call void @libmetis__Compute2WayPartitionParams(ptr noundef %137, ptr noundef %138)
  br label %139

139:                                              ; preds = %127, %123
  %140 = load ptr, ptr %4, align 8, !tbaa !5
  call void @libmetis__wspacepop(ptr noundef %140)
  %141 = load i32, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, 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
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  ret i32 %141
}

declare void @libmetis__wspacepop(ptr noundef) #1

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

declare ptr @libmetis__iwspacemalloc(ptr noundef, i32 noundef) #1

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

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

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

declare float @libmetis__ComputeLoadImbalanceDiff(ptr noundef, i32 noundef, ptr noundef, ptr noundef) #1

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

declare void @libmetis__FreeRData(ptr noundef) #1

declare void @libmetis__Compute2WayPartitionParams(ptr noundef, 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 = { 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, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !10, i64 64}
!14 = !{!"ctrl_t", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !6, i64 80, !10, i64 88, !10, i64 92, !12, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !12, 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, !6, i64 232, !16, i64 240, !16, i64 248, !16, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !6, i64 320}
!15 = !{!"double", !7, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!18, !10, i64 0}
!18 = !{!"graph_t", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !6, i64 96, !6, i64 104, !10, i64 112, !10, i64 116, !6, i64 120, !6, i64 128, !10, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208}
!19 = !{!14, !10, i64 24}
!20 = !{!18, !10, i64 112}
!21 = !{!14, !6, i64 120}
!22 = !{!14, !6, i64 104}
!23 = !{!18, !6, i64 120}
!24 = distinct !{!24, !25}
!25 = !{!"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"

declare void @libmetis__wspacepush(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i32 @libmetis__MultilevelBisect(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #1 {
  tail call void @libmetis__Setup2WayBalMultipliers(ptr noundef %0, ptr noundef %1, ptr noundef %2) #2
  tail call void @libmetis__wspacepush(ptr noundef %0) #2
  %4 = getelementptr inbounds i8, ptr %0, i64 64
  %5 = load i32, ptr %4, align 8, !tbaa !5
  %6 = icmp sgt i32 %5, 1
  br i1 %6, label %7, label %10

7:                                                ; preds = %3
  %8 = load i32, ptr %1, align 8, !tbaa !14
  %9 = tail call ptr @libmetis__iwspacemalloc(ptr noundef nonnull %0, i32 noundef %8) #2
  %.pre = load i32, ptr %4, align 8, !tbaa !5
  br label %10

10:                                               ; preds = %7, %3
  %11 = phi i32 [ %.pre, %7 ], [ %5, %3 ]
  %.053 = phi ptr [ %9, %7 ], [ null, %3 ]
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %13, label %._crit_edge.thread

13:                                               ; preds = %10
  %14 = getelementptr inbounds i8, ptr %0, i64 24
  %15 = getelementptr inbounds i8, ptr %1, i64 112
  %16 = getelementptr inbounds i8, ptr %0, i64 120
  %17 = getelementptr inbounds i8, ptr %0, i64 104
  %18 = getelementptr inbounds i8, ptr %1, i64 120
  %19 = tail call ptr @libmetis__CoarsenGraph(ptr noundef nonnull %0, ptr noundef %1) #2
  %20 = load i32, ptr %19, align 8, !tbaa !14
  %21 = load i32, ptr %14, align 8, !tbaa !16
  %.not.peel = icmp sgt i32 %20, %21
  %22 = select i1 %.not.peel, i32 7, i32 5
  tail call void @libmetis__Init2WayPartition(ptr noundef nonnull %0, ptr noundef nonnull %19, ptr noundef %2, i32 noundef %22) #2
  tail call void @libmetis__Refine2Way(ptr noundef nonnull %0, ptr noundef %1, ptr noundef nonnull %19, ptr noundef %2) #2
  %23 = load i32, ptr %15, align 8, !tbaa !17
  %24 = load ptr, ptr %16, align 8, !tbaa !18
  %25 = load ptr, ptr %17, align 8, !tbaa !19
  %26 = tail call float @libmetis__ComputeLoadImbalanceDiff(ptr noundef %1, i32 noundef 2, ptr noundef %24, ptr noundef %25) #2
  %27 = load i32, ptr %4, align 8, !tbaa !5
  %28 = icmp sgt i32 %27, 1
  br i1 %28, label %29, label %34

29:                                               ; preds = %13
  %30 = load i32, ptr %1, align 8, !tbaa !14
  %31 = sext i32 %30 to i64
  %32 = load ptr, ptr %18, align 8, !tbaa !20
  %33 = tail call ptr @libmetis__icopy(i64 noundef %31, ptr noundef %32, ptr noundef %.053) #2
  br label %34

34:                                               ; preds = %29, %13
  %35 = icmp eq i32 %23, 0
  br i1 %35, label %._crit_edge.thread, label %36

36:                                               ; preds = %34
  %37 = load i32, ptr %4, align 8, !tbaa !5
  %38 = icmp sgt i32 %37, 1
  br i1 %38, label %39, label %._crit_edge.thread

39:                                               ; preds = %36
  tail call void @libmetis__FreeRData(ptr noundef nonnull %1) #2
  %.pre71 = load i32, ptr %4, align 8, !tbaa !5
  %40 = icmp sgt i32 %.pre71, 1
  br i1 %40, label %.peel.next, label %._crit_edge.thread

.peel.next:                                       ; preds = %39, %71
  %.062 = phi float [ %.178, %71 ], [ %26, %39 ]
  %.05261 = phi i32 [ %73, %71 ], [ 1, %39 ]
  %.05660 = phi i32 [ %.15777, %71 ], [ %23, %39 ]
  %41 = tail call ptr @libmetis__CoarsenGraph(ptr noundef nonnull %0, ptr noundef nonnull %1) #2
  %42 = load i32, ptr %41, align 8, !tbaa !14
  %43 = load i32, ptr %14, align 8, !tbaa !16
  %.not = icmp sgt i32 %42, %43
  %44 = select i1 %.not, i32 7, i32 5
  tail call void @libmetis__Init2WayPartition(ptr noundef nonnull %0, ptr noundef nonnull %41, ptr noundef %2, i32 noundef %44) #2
  tail call void @libmetis__Refine2Way(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %41, ptr noundef %2) #2
  %45 = load i32, ptr %15, align 8, !tbaa !17
  %46 = load ptr, ptr %16, align 8, !tbaa !18
  %47 = load ptr, ptr %17, align 8, !tbaa !19
  %48 = tail call float @libmetis__ComputeLoadImbalanceDiff(ptr noundef nonnull %1, i32 noundef 2, ptr noundef %46, ptr noundef %47) #2
  %49 = fpext float %48 to double
  %50 = fcmp ole double %49, 5.000000e-04
  %51 = icmp sgt i32 %.05660, %45
  %or.cond = select i1 %50, i1 %51, i1 false
  br i1 %or.cond, label %56, label %52

52:                                               ; preds = %.peel.next
  %53 = fpext float %.062 to double
  %54 = fcmp ogt double %53, 5.000000e-04
  %55 = fcmp olt float %48, %.062
  %or.cond59 = and i1 %54, %55
  br i1 %or.cond59, label %56, label %.thread74

56:                                               ; preds = %52, %.peel.next
  %57 = load i32, ptr %4, align 8, !tbaa !5
  %58 = add nsw i32 %57, -1
  %59 = icmp slt i32 %.05261, %58
  br i1 %59, label %60, label %65

60:                                               ; preds = %56
  %61 = load i32, ptr %1, align 8, !tbaa !14
  %62 = sext i32 %61 to i64
  %63 = load ptr, ptr %18, align 8, !tbaa !20
  %64 = tail call ptr @libmetis__icopy(i64 noundef %62, ptr noundef %63, ptr noundef %.053) #2
  br label %65

65:                                               ; preds = %56, %60
  %66 = icmp eq i32 %45, 0
  br i1 %66, label %._crit_edge, label %.thread74

.thread74:                                        ; preds = %52, %65
  %.178 = phi float [ %48, %65 ], [ %.062, %52 ]
  %.15777 = phi i32 [ %45, %65 ], [ %.05660, %52 ]
  %67 = load i32, ptr %4, align 8, !tbaa !5
  %68 = add nsw i32 %67, -1
  %69 = icmp slt i32 %.05261, %68
  br i1 %69, label %70, label %71

70:                                               ; preds = %.thread74
  tail call void @libmetis__FreeRData(ptr noundef nonnull %1) #2
  %.pre73 = load i32, ptr %4, align 8, !tbaa !5
  br label %71

71:                                               ; preds = %.thread74, %70
  %72 = phi i32 [ %67, %.thread74 ], [ %.pre73, %70 ]
  %73 = add nuw nsw i32 %.05261, 1
  %74 = icmp slt i32 %73, %72
  br i1 %74, label %.peel.next, label %._crit_edge, !llvm.loop !21

._crit_edge:                                      ; preds = %71, %65
  %.2 = phi i32 [ 0, %65 ], [ %.15777, %71 ]
  %.155 = phi i32 [ 0, %65 ], [ %45, %71 ]
  %.not58 = icmp eq i32 %.2, %.155
  br i1 %.not58, label %._crit_edge.thread, label %75

75:                                               ; preds = %._crit_edge
  %76 = load i32, ptr %1, align 8, !tbaa !14
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds i8, ptr %1, i64 120
  %79 = load ptr, ptr %78, align 8, !tbaa !20
  %80 = tail call ptr @libmetis__icopy(i64 noundef %77, ptr noundef %.053, ptr noundef %79) #2
  tail call void @libmetis__Compute2WayPartitionParams(ptr noundef nonnull %0, ptr noundef nonnull %1) #2
  br label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %36, %39, %34, %10, %75, %._crit_edge
  %.282 = phi i32 [ %.2, %75 ], [ %.2, %._crit_edge ], [ %23, %39 ], [ 0, %34 ], [ 0, %10 ], [ %23, %36 ]
  tail call void @libmetis__wspacepop(ptr noundef nonnull %0) #2
  ret i32 %.282
}

declare void @libmetis__wspacepop(ptr noundef) local_unnamed_addr #0

declare void @libmetis__Setup2WayBalMultipliers(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare ptr @libmetis__iwspacemalloc(ptr noundef, i32 noundef) local_unnamed_addr #0

declare ptr @libmetis__CoarsenGraph(ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @libmetis__Init2WayPartition(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare void @libmetis__Refine2Way(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare float @libmetis__ComputeLoadImbalanceDiff(ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare ptr @libmetis__icopy(i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @libmetis__FreeRData(ptr noundef) local_unnamed_addr #0

declare void @libmetis__Compute2WayPartitionParams(ptr noundef, ptr noundef) local_unnamed_addr #0

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { 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 64}
!6 = !{!"ctrl_t", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !7, i64 64, !7, i64 68, !7, i64 72, !10, i64 80, !7, i64 88, !7, i64 92, !11, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !11, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !12, i64 176, !12, i64 184, !12, i64 192, !12, i64 200, !12, i64 208, !12, i64 216, !12, i64 224, !10, i64 232, !13, i64 240, !13, i64 248, !13, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !10, i64 312, !10, i64 320}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!"double", !8, i64 0}
!13 = !{!"long", !8, i64 0}
!14 = !{!15, !7, i64 0}
!15 = !{!"graph_t", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !7, i64 72, !7, i64 76, !7, i64 80, !7, i64 84, !7, i64 88, !10, i64 96, !10, i64 104, !7, i64 112, !7, i64 116, !10, i64 120, !10, i64 128, !7, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208}
!16 = !{!6, !7, i64 24}
!17 = !{!15, !7, i64 112}
!18 = !{!6, !10, i64 120}
!19 = !{!6, !10, i64 104}
!20 = !{!15, !10, i64 120}
!21 = distinct !{!21, !22, !23}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!"llvm.loop.peeled.count", i32 1}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass