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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__McRandomBisection(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) #1 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %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 %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store i32 %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  store i32 0, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 4, 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 %5, align 8, !tbaa !5
  call void @libmetis__wspacepush(ptr noundef %25)
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.graph_t, ptr %26, i32 0, i32 0
  %28 = load i32, ptr %27, align 8, !tbaa !11
  store i32 %28, ptr %13, align 4, !tbaa !9
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.graph_t, ptr %29, i32 0, i32 2
  %31 = load i32, ptr %30, align 8, !tbaa !13
  store i32 %31, ptr %14, align 4, !tbaa !9
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.graph_t, ptr %32, i32 0, i32 4
  %34 = load ptr, ptr %33, align 8, !tbaa !14
  store ptr %34, ptr %24, align 8, !tbaa !5
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  call void @libmetis__Allocate2WayPartitionMemory(ptr noundef %35, ptr noundef %36)
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.graph_t, ptr %37, i32 0, i32 19
  %39 = load ptr, ptr %38, align 8, !tbaa !15
  store ptr %39, ptr %21, align 8, !tbaa !5
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = load i32, ptr %13, align 4, !tbaa !9
  %42 = call ptr @libmetis__iwspacemalloc(ptr noundef %40, i32 noundef %41)
  store ptr %42, ptr %20, align 8, !tbaa !5
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = load i32, ptr %13, align 4, !tbaa !9
  %45 = call ptr @libmetis__iwspacemalloc(ptr noundef %43, i32 noundef %44)
  store ptr %45, ptr %22, align 8, !tbaa !5
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = load i32, ptr %14, align 4, !tbaa !9
  %48 = call ptr @libmetis__iwspacemalloc(ptr noundef %46, i32 noundef %47)
  store ptr %48, ptr %23, align 8, !tbaa !5
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %49

49:                                               ; preds = %146, %4
  %50 = load i32, ptr %18, align 4, !tbaa !9
  %51 = load i32, ptr %8, align 4, !tbaa !9
  %52 = mul nsw i32 2, %51
  %53 = icmp slt i32 %50, %52
  br i1 %53, label %54, label %149

54:                                               ; preds = %49
  %55 = load i32, ptr %13, align 4, !tbaa !9
  %56 = load ptr, ptr %22, align 8, !tbaa !5
  %57 = load i32, ptr %13, align 4, !tbaa !9
  %58 = sdiv i32 %57, 2
  call void @libmetis__irandArrayPermute(i32 noundef %55, ptr noundef %56, i32 noundef %58, i32 noundef 1)
  %59 = load i32, ptr %14, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = load ptr, ptr %23, align 8, !tbaa !5
  %62 = call ptr @libmetis__iset(i64 noundef %60, i32 noundef 0, ptr noundef %61)
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %63

63:                                               ; preds = %94, %54
  %64 = load i32, ptr %10, align 4, !tbaa !9
  %65 = load i32, ptr %13, align 4, !tbaa !9
  %66 = icmp slt i32 %64, %65
  br i1 %66, label %67, label %97

67:                                               ; preds = %63
  %68 = load ptr, ptr %22, align 8, !tbaa !5
  %69 = load i32, ptr %10, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds i32, ptr %68, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !9
  store i32 %72, ptr %9, align 4, !tbaa !9
  %73 = load i32, ptr %14, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = load ptr, ptr %24, align 8, !tbaa !5
  %76 = load i32, ptr %9, align 4, !tbaa !9
  %77 = load i32, ptr %14, align 4, !tbaa !9
  %78 = mul nsw i32 %76, %77
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds i32, ptr %75, i64 %79
  %81 = call i64 @libmetis__iargmax(i64 noundef %74, ptr noundef %80)
  %82 = trunc i64 %81 to i32
  store i32 %82, ptr %19, align 4, !tbaa !9
  %83 = load ptr, ptr %23, align 8, !tbaa !5
  %84 = load i32, ptr %19, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds i32, ptr %83, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !9
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %86, align 4, !tbaa !9
  %89 = srem i32 %87, 2
  %90 = load ptr, ptr %21, align 8, !tbaa !5
  %91 = load i32, ptr %9, align 4, !tbaa !9
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds i32, ptr %90, i64 %92
  store i32 %89, ptr %93, align 4, !tbaa !9
  br label %94

94:                                               ; preds = %67
  %95 = load i32, ptr %10, align 4, !tbaa !9
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %10, align 4, !tbaa !9
  br label %63, !llvm.loop !16

97:                                               ; preds = %63
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  call void @libmetis__Compute2WayPartitionParams(ptr noundef %98, ptr noundef %99)
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = load ptr, ptr %6, align 8, !tbaa !5
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = load ptr, ptr %5, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.ctrl_t, ptr %103, i32 0, i32 17
  %105 = load i32, ptr %104, align 4, !tbaa !18
  call void @libmetis__FM_2WayRefine(ptr noundef %100, ptr noundef %101, ptr noundef %102, i32 noundef %105)
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  %108 = load ptr, ptr %7, align 8, !tbaa !5
  call void @libmetis__Balance2Way(ptr noundef %106, ptr noundef %107, ptr noundef %108)
  %109 = load ptr, ptr %5, align 8, !tbaa !5
  %110 = load ptr, ptr %6, align 8, !tbaa !5
  %111 = load ptr, ptr %7, align 8, !tbaa !5
  %112 = load ptr, ptr %5, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.ctrl_t, ptr %112, i32 0, i32 17
  %114 = load i32, ptr %113, align 4, !tbaa !18
  call void @libmetis__FM_2WayRefine(ptr noundef %109, ptr noundef %110, ptr noundef %111, i32 noundef %114)
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = load ptr, ptr %7, align 8, !tbaa !5
  call void @libmetis__Balance2Way(ptr noundef %115, ptr noundef %116, ptr noundef %117)
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = load ptr, ptr %6, align 8, !tbaa !5
  %120 = load ptr, ptr %7, align 8, !tbaa !5
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.ctrl_t, ptr %121, i32 0, i32 17
  %123 = load i32, ptr %122, align 4, !tbaa !18
  call void @libmetis__FM_2WayRefine(ptr noundef %118, ptr noundef %119, ptr noundef %120, i32 noundef %123)
  %124 = load i32, ptr %18, align 4, !tbaa !9
  %125 = icmp eq i32 %124, 0
  br i1 %125, label %132, label %126

126:                                              ; preds = %97
  %127 = load i32, ptr %16, align 4, !tbaa !9
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.graph_t, ptr %128, i32 0, i32 17
  %130 = load i32, ptr %129, align 8, !tbaa !23
  %131 = icmp sge i32 %127, %130
  br i1 %131, label %132, label %145

132:                                              ; preds = %126, %97
  %133 = load ptr, ptr %6, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.graph_t, ptr %133, i32 0, i32 17
  %135 = load i32, ptr %134, align 8, !tbaa !23
  store i32 %135, ptr %16, align 4, !tbaa !9
  %136 = load i32, ptr %13, align 4, !tbaa !9
  %137 = sext i32 %136 to i64
  %138 = load ptr, ptr %21, align 8, !tbaa !5
  %139 = load ptr, ptr %20, align 8, !tbaa !5
  %140 = call ptr @libmetis__icopy(i64 noundef %137, ptr noundef %138, ptr noundef %139)
  %141 = load i32, ptr %16, align 4, !tbaa !9
  %142 = icmp eq i32 %141, 0
  br i1 %142, label %143, label %144

143:                                              ; preds = %132
  br label %149

144:                                              ; preds = %132
  br label %145

145:                                              ; preds = %144, %126
  br label %146

146:                                              ; preds = %145
  %147 = load i32, ptr %18, align 4, !tbaa !9
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr %18, align 4, !tbaa !9
  br label %49, !llvm.loop !24

149:                                              ; preds = %143, %49
  %150 = load i32, ptr %16, align 4, !tbaa !9
  %151 = load ptr, ptr %6, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.graph_t, ptr %151, i32 0, i32 17
  store i32 %150, ptr %152, align 8, !tbaa !23
  %153 = load i32, ptr %13, align 4, !tbaa !9
  %154 = sext i32 %153 to i64
  %155 = load ptr, ptr %20, align 8, !tbaa !5
  %156 = load ptr, ptr %21, align 8, !tbaa !5
  %157 = call ptr @libmetis__icopy(i64 noundef %154, ptr noundef %155, ptr noundef %156)
  %158 = load ptr, ptr %5, align 8, !tbaa !5
  call void @libmetis__wspacepop(ptr noundef %158)
  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 4, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  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 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, 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
  ret void
}

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

declare void @libmetis__Compute2WayPartitionParams(ptr noundef, ptr noundef) #2

declare void @libmetis__wspacepush(ptr noundef) #2

declare void @libmetis__Allocate2WayPartitionMemory(ptr noundef, ptr noundef) #2

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

declare ptr @libmetis__iset(i64 noundef, i32 noundef, ptr noundef) #2

declare void @libmetis__irandArrayPermute(i32 noundef, ptr noundef, i32 noundef, i32 noundef) #2

declare void @libmetis__Balance2Way(ptr noundef, ptr noundef, ptr noundef) #2

declare void @libmetis__FM_2WayRefine(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #2

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

declare void @libmetis__wspacepop(ptr noundef) #2

declare i64 @libmetis__iargmax(i64 noundef, ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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, !10, i64 0}
!12 = !{!"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}
!13 = !{!12, !10, i64 8}
!14 = !{!12, !6, i64 24}
!15 = !{!12, !6, i64 120}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!19, !10, i64 68}
!19 = !{!"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, !20, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !20, i64 128, !21, i64 136, !21, i64 144, !21, i64 152, !21, i64 160, !21, i64 168, !21, i64 176, !21, i64 184, !21, i64 192, !21, i64 200, !21, i64 208, !21, i64 216, !21, i64 224, !6, i64 232, !22, i64 240, !22, i64 248, !22, 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}
!20 = !{!"float", !7, i64 0}
!21 = !{!"double", !7, i64 0}
!22 = !{!"long", !7, i64 0}
!23 = !{!12, !10, i64 112}
!24 = distinct !{!24, !17}


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

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__McRandomBisection(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) local_unnamed_addr #0 {
  tail call void @libmetis__wspacepush(ptr noundef %0) #3
  %5 = load i32, ptr %1, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %1, i64 8
  %7 = load i32, ptr %6, align 8, !tbaa !11
  %8 = getelementptr inbounds i8, ptr %1, i64 24
  %9 = load ptr, ptr %8, align 8, !tbaa !12
  tail call void @libmetis__Allocate2WayPartitionMemory(ptr noundef %0, ptr noundef nonnull %1) #3
  %10 = getelementptr inbounds i8, ptr %1, i64 120
  %11 = load ptr, ptr %10, align 8, !tbaa !13
  %12 = tail call ptr @libmetis__iwspacemalloc(ptr noundef %0, i32 noundef %5) #3
  %13 = tail call ptr @libmetis__iwspacemalloc(ptr noundef %0, i32 noundef %5) #3
  %14 = tail call ptr @libmetis__iwspacemalloc(ptr noundef %0, i32 noundef %7) #3
  %15 = icmp sgt i32 %3, 0
  br i1 %15, label %.lr.ph76, label %.._crit_edge77_crit_edge

.._crit_edge77_crit_edge:                         ; preds = %4
  %.pre82 = sext i32 %5 to i64
  br label %._crit_edge77

.lr.ph76:                                         ; preds = %4
  %16 = shl nuw i32 %3, 1
  %17 = sdiv i32 %5, 2
  %18 = sext i32 %7 to i64
  %19 = icmp sgt i32 %5, 0
  %20 = getelementptr inbounds i8, ptr %0, i64 68
  %21 = getelementptr inbounds i8, ptr %1, i64 112
  %22 = sext i32 %5 to i64
  %smax = tail call i32 @llvm.smax.i32(i32 %16, i32 1)
  %wide.trip.count = zext nneg i32 %5 to i64
  br label %23

23:                                               ; preds = %.lr.ph76, %45
  %.06774 = phi i32 [ 0, %.lr.ph76 ], [ %.1, %45 ]
  %.06873 = phi i32 [ 0, %.lr.ph76 ], [ %46, %45 ]
  tail call void @libmetis__irandArrayPermute(i32 noundef %5, ptr noundef %13, i32 noundef %17, i32 noundef 1) #3
  %24 = tail call ptr @libmetis__iset(i64 noundef %18, i32 noundef 0, ptr noundef %14) #3
  br i1 %19, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %23, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %23 ]
  %25 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv
  %26 = load i32, ptr %25, align 4, !tbaa !14
  %27 = mul nsw i32 %26, %7
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds i32, ptr %9, i64 %28
  %30 = tail call i64 @libmetis__iargmax(i64 noundef %18, ptr noundef %29) #3
  %sext = shl i64 %30, 32
  %31 = ashr exact i64 %sext, 30
  %32 = getelementptr inbounds i8, ptr %14, i64 %31
  %33 = load i32, ptr %32, align 4, !tbaa !14
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %32, align 4, !tbaa !14
  %35 = srem i32 %33, 2
  %36 = sext i32 %26 to i64
  %37 = getelementptr inbounds i32, ptr %11, i64 %36
  store i32 %35, ptr %37, align 4, !tbaa !14
  %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, label %.lr.ph, !llvm.loop !15

._crit_edge:                                      ; preds = %.lr.ph, %23
  tail call void @libmetis__Compute2WayPartitionParams(ptr noundef %0, ptr noundef nonnull %1) #3
  %38 = load i32, ptr %20, align 4, !tbaa !17
  tail call void @libmetis__FM_2WayRefine(ptr noundef %0, ptr noundef nonnull %1, ptr noundef %2, i32 noundef %38) #3
  tail call void @libmetis__Balance2Way(ptr noundef %0, ptr noundef nonnull %1, ptr noundef %2) #3
  %39 = load i32, ptr %20, align 4, !tbaa !17
  tail call void @libmetis__FM_2WayRefine(ptr noundef %0, ptr noundef nonnull %1, ptr noundef %2, i32 noundef %39) #3
  tail call void @libmetis__Balance2Way(ptr noundef %0, ptr noundef nonnull %1, ptr noundef %2) #3
  %40 = load i32, ptr %20, align 4, !tbaa !17
  tail call void @libmetis__FM_2WayRefine(ptr noundef %0, ptr noundef nonnull %1, ptr noundef %2, i32 noundef %40) #3
  %41 = icmp ne i32 %.06873, 0
  %.pre = load i32, ptr %21, align 8, !tbaa !22
  %.not = icmp slt i32 %.06774, %.pre
  %or.cond = select i1 %41, i1 %.not, i1 false
  br i1 %or.cond, label %45, label %42

42:                                               ; preds = %._crit_edge
  %43 = tail call ptr @libmetis__icopy(i64 noundef %22, ptr noundef %11, ptr noundef %12) #3
  %44 = icmp eq i32 %.pre, 0
  br i1 %44, label %._crit_edge77, label %45

45:                                               ; preds = %._crit_edge, %42
  %.1 = phi i32 [ %.pre, %42 ], [ %.06774, %._crit_edge ]
  %46 = add nuw nsw i32 %.06873, 1
  %exitcond81.not = icmp eq i32 %46, %smax
  br i1 %exitcond81.not, label %._crit_edge77, label %23, !llvm.loop !23

._crit_edge77:                                    ; preds = %45, %42, %.._crit_edge77_crit_edge
  %.pre-phi = phi i64 [ %.pre82, %.._crit_edge77_crit_edge ], [ %22, %42 ], [ %22, %45 ]
  %.2 = phi i32 [ 0, %.._crit_edge77_crit_edge ], [ %.1, %45 ], [ 0, %42 ]
  %47 = getelementptr inbounds i8, ptr %1, i64 112
  store i32 %.2, ptr %47, align 8, !tbaa !22
  %48 = tail call ptr @libmetis__icopy(i64 noundef %.pre-phi, ptr noundef %12, ptr noundef %11) #3
  tail call void @libmetis__wspacepop(ptr noundef %0) #3
  ret void
}

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

declare void @libmetis__wspacepush(ptr noundef) local_unnamed_addr #1

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

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

declare ptr @libmetis__iset(i64 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

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

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

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

declare void @libmetis__wspacepop(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #2

attributes #0 = { 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"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}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 8}
!12 = !{!6, !10, i64 24}
!13 = !{!6, !10, i64 120}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !7, i64 68}
!18 = !{!"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, !19, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !19, i64 128, !20, i64 136, !20, i64 144, !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, !10, i64 232, !21, i64 240, !21, i64 248, !21, 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}
!19 = !{!"float", !8, i64 0}
!20 = !{!"double", !8, i64 0}
!21 = !{!"long", !8, i64 0}
!22 = !{!6, !7, i64 112}
!23 = distinct !{!23, !16}


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