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

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

; 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

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__MMDOrder(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 ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = 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 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 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
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  call void @libmetis__wspacepush(ptr noundef %24)
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.graph_t, ptr %25, i32 0, i32 0
  %27 = load i32, ptr %26, align 8, !tbaa !11
  store i32 %27, ptr %12, align 4, !tbaa !9
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.graph_t, ptr %28, i32 0, i32 3
  %30 = load ptr, ptr %29, align 8, !tbaa !13
  store ptr %30, ptr %15, align 8, !tbaa !5
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.graph_t, ptr %31, i32 0, i32 6
  %33 = load ptr, ptr %32, align 8, !tbaa !14
  store ptr %33, ptr %16, align 8, !tbaa !5
  %34 = load ptr, ptr %15, align 8, !tbaa !5
  %35 = load i32, ptr %12, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds i32, ptr %34, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !9
  store i32 %38, ptr %11, align 4, !tbaa !9
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %39

39:                                               ; preds = %50, %4
  %40 = load i32, ptr %9, align 4, !tbaa !9
  %41 = load i32, ptr %11, align 4, !tbaa !9
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %43, label %53

43:                                               ; preds = %39
  %44 = load ptr, ptr %16, align 8, !tbaa !5
  %45 = load i32, ptr %9, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds i32, ptr %44, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !9
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %47, align 4, !tbaa !9
  br label %50

50:                                               ; preds = %43
  %51 = load i32, ptr %9, align 4, !tbaa !9
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %9, align 4, !tbaa !9
  br label %39, !llvm.loop !15

53:                                               ; preds = %39
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %54

54:                                               ; preds = %66, %53
  %55 = load i32, ptr %9, align 4, !tbaa !9
  %56 = load i32, ptr %12, align 4, !tbaa !9
  %57 = add nsw i32 %56, 1
  %58 = icmp slt i32 %55, %57
  br i1 %58, label %59, label %69

59:                                               ; preds = %54
  %60 = load ptr, ptr %15, align 8, !tbaa !5
  %61 = load i32, ptr %9, align 4, !tbaa !9
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds i32, ptr %60, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !9
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %63, align 4, !tbaa !9
  br label %66

66:                                               ; preds = %59
  %67 = load i32, ptr %9, align 4, !tbaa !9
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %9, align 4, !tbaa !9
  br label %54, !llvm.loop !17

69:                                               ; preds = %54
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = load i32, ptr %12, align 4, !tbaa !9
  %72 = add nsw i32 %71, 5
  %73 = call ptr @libmetis__iwspacemalloc(ptr noundef %70, i32 noundef %72)
  store ptr %73, ptr %18, align 8, !tbaa !5
  %74 = load ptr, ptr %5, align 8, !tbaa !5
  %75 = load i32, ptr %12, align 4, !tbaa !9
  %76 = add nsw i32 %75, 5
  %77 = call ptr @libmetis__iwspacemalloc(ptr noundef %74, i32 noundef %76)
  store ptr %77, ptr %19, align 8, !tbaa !5
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = load i32, ptr %12, align 4, !tbaa !9
  %80 = add nsw i32 %79, 5
  %81 = call ptr @libmetis__iwspacemalloc(ptr noundef %78, i32 noundef %80)
  store ptr %81, ptr %20, align 8, !tbaa !5
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = load i32, ptr %12, align 4, !tbaa !9
  %84 = add nsw i32 %83, 5
  %85 = call ptr @libmetis__iwspacemalloc(ptr noundef %82, i32 noundef %84)
  store ptr %85, ptr %21, align 8, !tbaa !5
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = load i32, ptr %12, align 4, !tbaa !9
  %88 = add nsw i32 %87, 5
  %89 = call ptr @libmetis__iwspacemalloc(ptr noundef %86, i32 noundef %88)
  store ptr %89, ptr %22, align 8, !tbaa !5
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  %91 = load i32, ptr %12, align 4, !tbaa !9
  %92 = add nsw i32 %91, 5
  %93 = call ptr @libmetis__iwspacemalloc(ptr noundef %90, i32 noundef %92)
  store ptr %93, ptr %23, align 8, !tbaa !5
  %94 = load i32, ptr %12, align 4, !tbaa !9
  %95 = load ptr, ptr %15, align 8, !tbaa !5
  %96 = load ptr, ptr %16, align 8, !tbaa !5
  %97 = load ptr, ptr %19, align 8, !tbaa !5
  %98 = load ptr, ptr %18, align 8, !tbaa !5
  %99 = load ptr, ptr %20, align 8, !tbaa !5
  %100 = load ptr, ptr %21, align 8, !tbaa !5
  %101 = load ptr, ptr %22, align 8, !tbaa !5
  %102 = load ptr, ptr %23, align 8, !tbaa !5
  call void @libmetis__genmmd(i32 noundef %94, ptr noundef %95, ptr noundef %96, ptr noundef %97, ptr noundef %98, i32 noundef 1, ptr noundef %99, ptr noundef %100, ptr noundef %101, ptr noundef %102, i32 noundef 2147483647, ptr noundef %13)
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.graph_t, ptr %103, i32 0, i32 15
  %105 = load ptr, ptr %104, align 8, !tbaa !18
  store ptr %105, ptr %17, align 8, !tbaa !5
  %106 = load i32, ptr %8, align 4, !tbaa !9
  %107 = load i32, ptr %12, align 4, !tbaa !9
  %108 = sub nsw i32 %106, %107
  store i32 %108, ptr %14, align 4, !tbaa !9
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %109

109:                                              ; preds = %130, %69
  %110 = load i32, ptr %9, align 4, !tbaa !9
  %111 = load i32, ptr %12, align 4, !tbaa !9
  %112 = icmp slt i32 %110, %111
  br i1 %112, label %113, label %133

113:                                              ; preds = %109
  %114 = load i32, ptr %14, align 4, !tbaa !9
  %115 = load ptr, ptr %19, align 8, !tbaa !5
  %116 = load i32, ptr %9, align 4, !tbaa !9
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds i32, ptr %115, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !9
  %120 = add nsw i32 %114, %119
  %121 = sub nsw i32 %120, 1
  %122 = load ptr, ptr %7, align 8, !tbaa !5
  %123 = load ptr, ptr %17, align 8, !tbaa !5
  %124 = load i32, ptr %9, align 4, !tbaa !9
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds i32, ptr %123, i64 %125
  %127 = load i32, ptr %126, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds i32, ptr %122, i64 %128
  store i32 %121, ptr %129, align 4, !tbaa !9
  br label %130

130:                                              ; preds = %113
  %131 = load i32, ptr %9, align 4, !tbaa !9
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %9, align 4, !tbaa !9
  br label %109, !llvm.loop !19

133:                                              ; preds = %109
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %134

134:                                              ; preds = %146, %133
  %135 = load i32, ptr %9, align 4, !tbaa !9
  %136 = load i32, ptr %12, align 4, !tbaa !9
  %137 = add nsw i32 %136, 1
  %138 = icmp slt i32 %135, %137
  br i1 %138, label %139, label %149

139:                                              ; preds = %134
  %140 = load ptr, ptr %15, align 8, !tbaa !5
  %141 = load i32, ptr %9, align 4, !tbaa !9
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds i32, ptr %140, i64 %142
  %144 = load i32, ptr %143, align 4, !tbaa !9
  %145 = add nsw i32 %144, -1
  store i32 %145, ptr %143, align 4, !tbaa !9
  br label %146

146:                                              ; preds = %139
  %147 = load i32, ptr %9, align 4, !tbaa !9
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr %9, align 4, !tbaa !9
  br label %134, !llvm.loop !20

149:                                              ; preds = %134
  %150 = load ptr, ptr %15, align 8, !tbaa !5
  %151 = load i32, ptr %12, align 4, !tbaa !9
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds i32, ptr %150, i64 %152
  %154 = load i32, ptr %153, align 4, !tbaa !9
  store i32 %154, ptr %11, align 4, !tbaa !9
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %155

155:                                              ; preds = %166, %149
  %156 = load i32, ptr %9, align 4, !tbaa !9
  %157 = load i32, ptr %11, align 4, !tbaa !9
  %158 = icmp slt i32 %156, %157
  br i1 %158, label %159, label %169

159:                                              ; preds = %155
  %160 = load ptr, ptr %16, align 8, !tbaa !5
  %161 = load i32, ptr %9, align 4, !tbaa !9
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds i32, ptr %160, i64 %162
  %164 = load i32, ptr %163, align 4, !tbaa !9
  %165 = add nsw i32 %164, -1
  store i32 %165, ptr %163, align 4, !tbaa !9
  br label %166

166:                                              ; preds = %159
  %167 = load i32, ptr %9, align 4, !tbaa !9
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %9, align 4, !tbaa !9
  br label %155, !llvm.loop !21

169:                                              ; preds = %155
  %170 = load ptr, ptr %5, align 8, !tbaa !5
  call void @libmetis__wspacepop(ptr noundef %170)
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, 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
}

declare void @libmetis__wspacepush(ptr noundef) #2

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

declare void @libmetis__wspacepop(ptr noundef) #2

declare void @libmetis__genmmd(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 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, !6, i64 16}
!14 = !{!12, !6, i64 40}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = !{!12, !6, i64 96}
!19 = distinct !{!19, !16}
!20 = distinct !{!20, !16}
!21 = distinct !{!21, !16}


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

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__MMDOrder(ptr noundef %0, ptr nocapture noundef readonly %1, ptr nocapture noundef writeonly %2, i32 noundef %3) local_unnamed_addr #1 {
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #3
  tail call void @libmetis__wspacepush(ptr noundef %0) #3
  %6 = load i32, ptr %1, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %1, i64 16
  %8 = load ptr, ptr %7, align 8, !tbaa !11
  %9 = getelementptr inbounds i8, ptr %1, i64 40
  %10 = load ptr, ptr %9, align 8, !tbaa !12
  %11 = sext i32 %6 to i64
  %12 = getelementptr inbounds i32, ptr %8, i64 %11
  %13 = load i32, ptr %12, align 4, !tbaa !13
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph.preheader, label %.preheader63

.lr.ph.preheader:                                 ; preds = %4
  %wide.trip.count = zext nneg i32 %13 to i64
  %min.iters.check = icmp ult i32 %13, 8
  br i1 %min.iters.check, label %.lr.ph.preheader143, label %vector.ph

.lr.ph.preheader143:                              ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %wide.trip.count, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %15 = getelementptr inbounds i32, ptr %10, i64 %index
  %16 = getelementptr inbounds i8, ptr %15, i64 16
  %wide.load = load <4 x i32>, ptr %15, align 4, !tbaa !13
  %wide.load100 = load <4 x i32>, ptr %16, align 4, !tbaa !13
  %17 = add nsw <4 x i32> %wide.load, <i32 1, i32 1, i32 1, i32 1>
  %18 = add nsw <4 x i32> %wide.load100, <i32 1, i32 1, i32 1, i32 1>
  store <4 x i32> %17, ptr %15, align 4, !tbaa !13
  store <4 x i32> %18, ptr %16, align 4, !tbaa !13
  %index.next = add nuw i64 %index, 8
  %19 = icmp eq i64 %index.next, %n.vec
  br i1 %19, label %middle.block, label %vector.body, !llvm.loop !14

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.preheader63, label %.lr.ph.preheader143

.preheader63:                                     ; preds = %.lr.ph, %middle.block, %4
  %.not65 = icmp slt i32 %6, 0
  br i1 %.not65, label %._crit_edge, label %.lr.ph67.preheader

.lr.ph67.preheader:                               ; preds = %.preheader63
  %20 = add nuw i32 %6, 1
  %wide.trip.count83 = zext i32 %20 to i64
  %min.iters.check103 = icmp ult i32 %6, 7
  br i1 %min.iters.check103, label %.lr.ph67.preheader142, label %vector.ph104

.lr.ph67.preheader142:                            ; preds = %middle.block101, %.lr.ph67.preheader
  %indvars.iv80.ph = phi i64 [ 0, %.lr.ph67.preheader ], [ %n.vec106, %middle.block101 ]
  br label %.lr.ph67

vector.ph104:                                     ; preds = %.lr.ph67.preheader
  %n.vec106 = and i64 %wide.trip.count83, 4294967288
  br label %vector.body108

vector.body108:                                   ; preds = %vector.body108, %vector.ph104
  %index109 = phi i64 [ 0, %vector.ph104 ], [ %index.next112, %vector.body108 ]
  %21 = getelementptr inbounds i32, ptr %8, i64 %index109
  %22 = getelementptr inbounds i8, ptr %21, i64 16
  %wide.load110 = load <4 x i32>, ptr %21, align 4, !tbaa !13
  %wide.load111 = load <4 x i32>, ptr %22, align 4, !tbaa !13
  %23 = add nsw <4 x i32> %wide.load110, <i32 1, i32 1, i32 1, i32 1>
  %24 = add nsw <4 x i32> %wide.load111, <i32 1, i32 1, i32 1, i32 1>
  store <4 x i32> %23, ptr %21, align 4, !tbaa !13
  store <4 x i32> %24, ptr %22, align 4, !tbaa !13
  %index.next112 = add nuw i64 %index109, 8
  %25 = icmp eq i64 %index.next112, %n.vec106
  br i1 %25, label %middle.block101, label %vector.body108, !llvm.loop !18

middle.block101:                                  ; preds = %vector.body108
  %cmp.n113 = icmp eq i64 %n.vec106, %wide.trip.count83
  br i1 %cmp.n113, label %._crit_edge, label %.lr.ph67.preheader142

.lr.ph:                                           ; preds = %.lr.ph.preheader143, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader143 ]
  %26 = getelementptr inbounds i32, ptr %10, i64 %indvars.iv
  %27 = load i32, ptr %26, align 4, !tbaa !13
  %28 = add nsw i32 %27, 1
  store i32 %28, ptr %26, align 4, !tbaa !13
  %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 %.preheader63, label %.lr.ph, !llvm.loop !19

.lr.ph67:                                         ; preds = %.lr.ph67.preheader142, %.lr.ph67
  %indvars.iv80 = phi i64 [ %indvars.iv.next81, %.lr.ph67 ], [ %indvars.iv80.ph, %.lr.ph67.preheader142 ]
  %29 = getelementptr inbounds i32, ptr %8, i64 %indvars.iv80
  %30 = load i32, ptr %29, align 4, !tbaa !13
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr %29, align 4, !tbaa !13
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %exitcond84.not = icmp eq i64 %indvars.iv.next81, %wide.trip.count83
  br i1 %exitcond84.not, label %._crit_edge, label %.lr.ph67, !llvm.loop !20

._crit_edge:                                      ; preds = %.lr.ph67, %middle.block101, %.preheader63
  %32 = add nsw i32 %6, 5
  %33 = tail call ptr @libmetis__iwspacemalloc(ptr noundef %0, i32 noundef %32) #3
  %34 = tail call ptr @libmetis__iwspacemalloc(ptr noundef %0, i32 noundef %32) #3
  %35 = tail call ptr @libmetis__iwspacemalloc(ptr noundef %0, i32 noundef %32) #3
  %36 = tail call ptr @libmetis__iwspacemalloc(ptr noundef %0, i32 noundef %32) #3
  %37 = tail call ptr @libmetis__iwspacemalloc(ptr noundef %0, i32 noundef %32) #3
  %38 = tail call ptr @libmetis__iwspacemalloc(ptr noundef %0, i32 noundef %32) #3
  call void @libmetis__genmmd(i32 noundef %6, ptr noundef %8, ptr noundef %10, ptr noundef %34, ptr noundef %33, i32 noundef 1, ptr noundef %35, ptr noundef %36, ptr noundef %37, ptr noundef %38, i32 noundef 2147483647, ptr noundef nonnull %5) #3
  %39 = getelementptr inbounds i8, ptr %1, i64 96
  %40 = load ptr, ptr %39, align 8, !tbaa !21
  %41 = icmp sgt i32 %6, 0
  br i1 %41, label %.lr.ph70, label %.preheader

.lr.ph70:                                         ; preds = %._crit_edge
  %42 = xor i32 %6, -1
  %43 = add i32 %42, %3
  %wide.trip.count88 = zext nneg i32 %6 to i64
  %xtraiter = and i64 %wide.trip.count88, 3
  %44 = icmp ult i32 %6, 4
  br i1 %44, label %.preheader.loopexit.unr-lcssa, label %.lr.ph70.new

.lr.ph70.new:                                     ; preds = %.lr.ph70
  %unroll_iter = and i64 %wide.trip.count88, 2147483644
  br label %58

.preheader.loopexit.unr-lcssa:                    ; preds = %58, %.lr.ph70
  %indvars.iv85.unr = phi i64 [ 0, %.lr.ph70 ], [ %indvars.iv.next86.3, %58 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader, label %.epil.preheader

.epil.preheader:                                  ; preds = %.preheader.loopexit.unr-lcssa, %.epil.preheader
  %indvars.iv85.epil = phi i64 [ %indvars.iv.next86.epil, %.epil.preheader ], [ %indvars.iv85.unr, %.preheader.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.preheader.loopexit.unr-lcssa ]
  %45 = getelementptr inbounds i32, ptr %34, i64 %indvars.iv85.epil
  %46 = load i32, ptr %45, align 4, !tbaa !13
  %47 = add i32 %43, %46
  %48 = getelementptr inbounds i32, ptr %40, i64 %indvars.iv85.epil
  %49 = load i32, ptr %48, align 4, !tbaa !13
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds i32, ptr %2, i64 %50
  store i32 %47, ptr %51, align 4, !tbaa !13
  %indvars.iv.next86.epil = add nuw nsw i64 %indvars.iv85.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 %.preheader, label %.epil.preheader, !llvm.loop !22

.preheader:                                       ; preds = %.preheader.loopexit.unr-lcssa, %.epil.preheader, %._crit_edge
  br i1 %.not65, label %._crit_edge74, label %.lr.ph73.preheader

.lr.ph73.preheader:                               ; preds = %.preheader
  %52 = add nuw i32 %6, 1
  %wide.trip.count93 = zext i32 %52 to i64
  %min.iters.check116 = icmp ult i32 %6, 7
  br i1 %min.iters.check116, label %.lr.ph73.preheader141, label %vector.ph117

.lr.ph73.preheader141:                            ; preds = %middle.block114, %.lr.ph73.preheader
  %indvars.iv90.ph = phi i64 [ 0, %.lr.ph73.preheader ], [ %n.vec119, %middle.block114 ]
  br label %.lr.ph73

vector.ph117:                                     ; preds = %.lr.ph73.preheader
  %n.vec119 = and i64 %wide.trip.count93, 4294967288
  br label %vector.body121

vector.body121:                                   ; preds = %vector.body121, %vector.ph117
  %index122 = phi i64 [ 0, %vector.ph117 ], [ %index.next125, %vector.body121 ]
  %53 = getelementptr inbounds i32, ptr %8, i64 %index122
  %54 = getelementptr inbounds i8, ptr %53, i64 16
  %wide.load123 = load <4 x i32>, ptr %53, align 4, !tbaa !13
  %wide.load124 = load <4 x i32>, ptr %54, align 4, !tbaa !13
  %55 = add nsw <4 x i32> %wide.load123, <i32 -1, i32 -1, i32 -1, i32 -1>
  %56 = add nsw <4 x i32> %wide.load124, <i32 -1, i32 -1, i32 -1, i32 -1>
  store <4 x i32> %55, ptr %53, align 4, !tbaa !13
  store <4 x i32> %56, ptr %54, align 4, !tbaa !13
  %index.next125 = add nuw i64 %index122, 8
  %57 = icmp eq i64 %index.next125, %n.vec119
  br i1 %57, label %middle.block114, label %vector.body121, !llvm.loop !24

middle.block114:                                  ; preds = %vector.body121
  %cmp.n126 = icmp eq i64 %n.vec119, %wide.trip.count93
  br i1 %cmp.n126, label %._crit_edge74, label %.lr.ph73.preheader141

58:                                               ; preds = %58, %.lr.ph70.new
  %indvars.iv85 = phi i64 [ 0, %.lr.ph70.new ], [ %indvars.iv.next86.3, %58 ]
  %niter = phi i64 [ 0, %.lr.ph70.new ], [ %niter.next.3, %58 ]
  %59 = getelementptr inbounds i32, ptr %34, i64 %indvars.iv85
  %60 = load i32, ptr %59, align 4, !tbaa !13
  %61 = add i32 %43, %60
  %62 = getelementptr inbounds i32, ptr %40, i64 %indvars.iv85
  %63 = load i32, ptr %62, align 4, !tbaa !13
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds i32, ptr %2, i64 %64
  store i32 %61, ptr %65, align 4, !tbaa !13
  %indvars.iv.next86 = or disjoint i64 %indvars.iv85, 1
  %66 = getelementptr inbounds i32, ptr %34, i64 %indvars.iv.next86
  %67 = load i32, ptr %66, align 4, !tbaa !13
  %68 = add i32 %43, %67
  %69 = getelementptr inbounds i32, ptr %40, i64 %indvars.iv.next86
  %70 = load i32, ptr %69, align 4, !tbaa !13
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds i32, ptr %2, i64 %71
  store i32 %68, ptr %72, align 4, !tbaa !13
  %indvars.iv.next86.1 = or disjoint i64 %indvars.iv85, 2
  %73 = getelementptr inbounds i32, ptr %34, i64 %indvars.iv.next86.1
  %74 = load i32, ptr %73, align 4, !tbaa !13
  %75 = add i32 %43, %74
  %76 = getelementptr inbounds i32, ptr %40, i64 %indvars.iv.next86.1
  %77 = load i32, ptr %76, align 4, !tbaa !13
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds i32, ptr %2, i64 %78
  store i32 %75, ptr %79, align 4, !tbaa !13
  %indvars.iv.next86.2 = or disjoint i64 %indvars.iv85, 3
  %80 = getelementptr inbounds i32, ptr %34, i64 %indvars.iv.next86.2
  %81 = load i32, ptr %80, align 4, !tbaa !13
  %82 = add i32 %43, %81
  %83 = getelementptr inbounds i32, ptr %40, i64 %indvars.iv.next86.2
  %84 = load i32, ptr %83, align 4, !tbaa !13
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds i32, ptr %2, i64 %85
  store i32 %82, ptr %86, align 4, !tbaa !13
  %indvars.iv.next86.3 = add nuw nsw i64 %indvars.iv85, 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 %.preheader.loopexit.unr-lcssa, label %58, !llvm.loop !25

.lr.ph73:                                         ; preds = %.lr.ph73.preheader141, %.lr.ph73
  %indvars.iv90 = phi i64 [ %indvars.iv.next91, %.lr.ph73 ], [ %indvars.iv90.ph, %.lr.ph73.preheader141 ]
  %87 = getelementptr inbounds i32, ptr %8, i64 %indvars.iv90
  %88 = load i32, ptr %87, align 4, !tbaa !13
  %89 = add nsw i32 %88, -1
  store i32 %89, ptr %87, align 4, !tbaa !13
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1
  %exitcond94.not = icmp eq i64 %indvars.iv.next91, %wide.trip.count93
  br i1 %exitcond94.not, label %._crit_edge74, label %.lr.ph73, !llvm.loop !26

._crit_edge74:                                    ; preds = %.lr.ph73, %middle.block114, %.preheader
  %90 = load i32, ptr %12, align 4, !tbaa !13
  %91 = icmp sgt i32 %90, 0
  br i1 %91, label %.lr.ph77.preheader, label %._crit_edge78

.lr.ph77.preheader:                               ; preds = %._crit_edge74
  %wide.trip.count98 = zext nneg i32 %90 to i64
  %min.iters.check129 = icmp ult i32 %90, 8
  br i1 %min.iters.check129, label %.lr.ph77.preheader140, label %vector.ph130

vector.ph130:                                     ; preds = %.lr.ph77.preheader
  %n.vec132 = and i64 %wide.trip.count98, 2147483640
  br label %vector.body134

vector.body134:                                   ; preds = %vector.body134, %vector.ph130
  %index135 = phi i64 [ 0, %vector.ph130 ], [ %index.next138, %vector.body134 ]
  %92 = getelementptr inbounds i32, ptr %10, i64 %index135
  %93 = getelementptr inbounds i8, ptr %92, i64 16
  %wide.load136 = load <4 x i32>, ptr %92, align 4, !tbaa !13
  %wide.load137 = load <4 x i32>, ptr %93, align 4, !tbaa !13
  %94 = add nsw <4 x i32> %wide.load136, <i32 -1, i32 -1, i32 -1, i32 -1>
  %95 = add nsw <4 x i32> %wide.load137, <i32 -1, i32 -1, i32 -1, i32 -1>
  store <4 x i32> %94, ptr %92, align 4, !tbaa !13
  store <4 x i32> %95, ptr %93, align 4, !tbaa !13
  %index.next138 = add nuw i64 %index135, 8
  %96 = icmp eq i64 %index.next138, %n.vec132
  br i1 %96, label %middle.block127, label %vector.body134, !llvm.loop !27

middle.block127:                                  ; preds = %vector.body134
  %cmp.n139 = icmp eq i64 %n.vec132, %wide.trip.count98
  br i1 %cmp.n139, label %._crit_edge78, label %.lr.ph77.preheader140

.lr.ph77.preheader140:                            ; preds = %middle.block127, %.lr.ph77.preheader
  %indvars.iv95.ph = phi i64 [ 0, %.lr.ph77.preheader ], [ %n.vec132, %middle.block127 ]
  br label %.lr.ph77

.lr.ph77:                                         ; preds = %.lr.ph77.preheader140, %.lr.ph77
  %indvars.iv95 = phi i64 [ %indvars.iv.next96, %.lr.ph77 ], [ %indvars.iv95.ph, %.lr.ph77.preheader140 ]
  %97 = getelementptr inbounds i32, ptr %10, i64 %indvars.iv95
  %98 = load i32, ptr %97, align 4, !tbaa !13
  %99 = add nsw i32 %98, -1
  store i32 %99, ptr %97, align 4, !tbaa !13
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %exitcond99.not = icmp eq i64 %indvars.iv.next96, %wide.trip.count98
  br i1 %exitcond99.not, label %._crit_edge78, label %.lr.ph77, !llvm.loop !28

._crit_edge78:                                    ; preds = %.lr.ph77, %middle.block127, %._crit_edge74
  call void @libmetis__wspacepop(ptr noundef %0) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #3
  ret void
}

declare void @libmetis__wspacepush(ptr noundef) local_unnamed_addr #2

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

declare void @libmetis__wspacepop(ptr noundef) local_unnamed_addr #2

declare void @libmetis__genmmd(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress 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, !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, !10, i64 16}
!12 = !{!6, !10, i64 40}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15, !16, !17}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!"llvm.loop.isvectorized", i32 1}
!17 = !{!"llvm.loop.unroll.runtime.disable"}
!18 = distinct !{!18, !15, !16, !17}
!19 = distinct !{!19, !15, !17, !16}
!20 = distinct !{!20, !15, !17, !16}
!21 = !{!6, !10, i64 96}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.unroll.disable"}
!24 = distinct !{!24, !15, !16, !17}
!25 = distinct !{!25, !15}
!26 = distinct !{!26, !15, !17, !16}
!27 = distinct !{!27, !15, !16, !17}
!28 = distinct !{!28, !15, !17, !16}


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