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

@.str.6 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [49 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 void @gk_free(ptr noundef, ...) #1

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

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__MlevelNestedDissectionCC(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) #2 {
  %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 ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = 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 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
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.graph_t, ptr %21, i32 0, i32 0
  %23 = load i32, ptr %22, align 8, !tbaa !11
  store i32 %23, ptr %11, align 4, !tbaa !9
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  call void @libmetis__MlevelNodeBisectionMultiple(ptr noundef %24, ptr noundef %25)
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.ctrl_t, ptr %26, i32 0, i32 2
  %28 = load i32, ptr %27, align 8, !tbaa !13
  %29 = and i32 %28, 64
  %30 = icmp ne i32 %29, 0
  br i1 %30, label %31, label %51

31:                                               ; preds = %4
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.graph_t, ptr %32, i32 0, i32 0
  %34 = load i32, ptr %33, align 8, !tbaa !11
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.graph_t, ptr %35, i32 0, i32 20
  %37 = load ptr, ptr %36, align 8, !tbaa !18
  %38 = getelementptr inbounds i32, ptr %37, i64 0
  %39 = load i32, ptr %38, align 4, !tbaa !9
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.graph_t, ptr %40, i32 0, i32 20
  %42 = load ptr, ptr %41, align 8, !tbaa !18
  %43 = getelementptr inbounds i32, ptr %42, i64 1
  %44 = load i32, ptr %43, align 4, !tbaa !9
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.graph_t, ptr %45, i32 0, i32 20
  %47 = load ptr, ptr %46, align 8, !tbaa !18
  %48 = getelementptr inbounds i32, ptr %47, i64 2
  %49 = load i32, ptr %48, align 4, !tbaa !9
  %50 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef %34, i32 noundef %39, i32 noundef %44, i32 noundef %49)
  br label %51

51:                                               ; preds = %31, %4
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.graph_t, ptr %52, i32 0, i32 21
  %54 = load i32, ptr %53, align 8, !tbaa !19
  store i32 %54, ptr %12, align 4, !tbaa !9
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.graph_t, ptr %55, i32 0, i32 23
  %57 = load ptr, ptr %56, align 8, !tbaa !20
  store ptr %57, ptr %17, align 8, !tbaa !5
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.graph_t, ptr %58, i32 0, i32 15
  %60 = load ptr, ptr %59, align 8, !tbaa !21
  store ptr %60, ptr %16, align 8, !tbaa !5
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %61

61:                                               ; preds = %80, %51
  %62 = load i32, ptr %9, align 4, !tbaa !9
  %63 = load i32, ptr %12, align 4, !tbaa !9
  %64 = icmp slt i32 %62, %63
  br i1 %64, label %65, label %83

65:                                               ; preds = %61
  %66 = load i32, ptr %8, align 4, !tbaa !9
  %67 = add nsw i32 %66, -1
  store i32 %67, ptr %8, align 4, !tbaa !9
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = load ptr, ptr %16, align 8, !tbaa !5
  %70 = load ptr, ptr %17, align 8, !tbaa !5
  %71 = load i32, ptr %9, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds i32, ptr %70, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !9
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds i32, ptr %69, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds i32, ptr %68, i64 %78
  store i32 %67, ptr %79, align 4, !tbaa !9
  br label %80

80:                                               ; preds = %65
  %81 = load i32, ptr %9, align 4, !tbaa !9
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %9, align 4, !tbaa !9
  br label %61, !llvm.loop !22

83:                                               ; preds = %61
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  call void @libmetis__wspacepush(ptr noundef %84)
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = load i32, ptr %11, align 4, !tbaa !9
  %87 = add nsw i32 %86, 1
  %88 = call ptr @libmetis__iwspacemalloc(ptr noundef %85, i32 noundef %87)
  store ptr %88, ptr %18, align 8, !tbaa !5
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = load i32, ptr %11, align 4, !tbaa !9
  %91 = call ptr @libmetis__iwspacemalloc(ptr noundef %89, i32 noundef %90)
  store ptr %91, ptr %19, align 8, !tbaa !5
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = load ptr, ptr %6, align 8, !tbaa !5
  %94 = load ptr, ptr %18, align 8, !tbaa !5
  %95 = load ptr, ptr %19, align 8, !tbaa !5
  %96 = call i32 @libmetis__FindSepInducedComponents(ptr noundef %92, ptr noundef %93, ptr noundef %94, ptr noundef %95)
  store i32 %96, ptr %13, align 4, !tbaa !9
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.ctrl_t, ptr %97, i32 0, i32 2
  %99 = load i32, ptr %98, align 8, !tbaa !13
  %100 = and i32 %99, 1
  %101 = icmp ne i32 %100, 0
  br i1 %101, label %102, label %109

102:                                              ; preds = %83
  %103 = load i32, ptr %13, align 4, !tbaa !9
  %104 = icmp sgt i32 %103, 2
  br i1 %104, label %105, label %108

105:                                              ; preds = %102
  %106 = load i32, ptr %13, align 4, !tbaa !9
  %107 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i32 noundef %106)
  br label %108

108:                                              ; preds = %105, %102
  br label %109

109:                                              ; preds = %108, %83
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = load ptr, ptr %6, align 8, !tbaa !5
  %112 = load i32, ptr %13, align 4, !tbaa !9
  %113 = load ptr, ptr %18, align 8, !tbaa !5
  %114 = load ptr, ptr %19, align 8, !tbaa !5
  %115 = call ptr @libmetis__SplitGraphOrderCC(ptr noundef %110, ptr noundef %111, i32 noundef %112, ptr noundef %113, ptr noundef %114)
  store ptr %115, ptr %20, align 8, !tbaa !5
  %116 = load ptr, ptr %5, align 8, !tbaa !5
  call void @libmetis__wspacepop(ptr noundef %116)
  call void @libmetis__FreeGraph(ptr noundef %6)
  store i32 0, ptr %9, align 4, !tbaa !9
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %117

117:                                              ; preds = %176, %109
  %118 = load i32, ptr %9, align 4, !tbaa !9
  %119 = load i32, ptr %13, align 4, !tbaa !9
  %120 = icmp slt i32 %118, %119
  br i1 %120, label %121, label %179

121:                                              ; preds = %117
  %122 = load ptr, ptr %20, align 8, !tbaa !5
  %123 = load i32, ptr %9, align 4, !tbaa !9
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds ptr, ptr %122, i64 %124
  %126 = load ptr, ptr %125, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.graph_t, ptr %126, i32 0, i32 0
  %128 = load i32, ptr %127, align 8, !tbaa !11
  store i32 %128, ptr %15, align 4, !tbaa !9
  %129 = load ptr, ptr %20, align 8, !tbaa !5
  %130 = load i32, ptr %9, align 4, !tbaa !9
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds ptr, ptr %129, i64 %131
  %133 = load ptr, ptr %132, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.graph_t, ptr %133, i32 0, i32 0
  %135 = load i32, ptr %134, align 8, !tbaa !11
  %136 = icmp sgt i32 %135, 120
  br i1 %136, label %137, label %157

137:                                              ; preds = %121
  %138 = load ptr, ptr %20, align 8, !tbaa !5
  %139 = load i32, ptr %9, align 4, !tbaa !9
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds ptr, ptr %138, i64 %140
  %142 = load ptr, ptr %141, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.graph_t, ptr %142, i32 0, i32 1
  %144 = load i32, ptr %143, align 4, !tbaa !24
  %145 = icmp sgt i32 %144, 0
  br i1 %145, label %146, label %157

146:                                              ; preds = %137
  %147 = load ptr, ptr %5, align 8, !tbaa !5
  %148 = load ptr, ptr %20, align 8, !tbaa !5
  %149 = load i32, ptr %9, align 4, !tbaa !9
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds ptr, ptr %148, i64 %150
  %152 = load ptr, ptr %151, align 8, !tbaa !5
  %153 = load ptr, ptr %7, align 8, !tbaa !5
  %154 = load i32, ptr %8, align 4, !tbaa !9
  %155 = load i32, ptr %14, align 4, !tbaa !9
  %156 = sub nsw i32 %154, %155
  call void @libmetis__MlevelNestedDissectionCC(ptr noundef %147, ptr noundef %152, ptr noundef %153, i32 noundef %156)
  br label %172

157:                                              ; preds = %137, %121
  %158 = load ptr, ptr %5, align 8, !tbaa !5
  %159 = load ptr, ptr %20, align 8, !tbaa !5
  %160 = load i32, ptr %9, align 4, !tbaa !9
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds ptr, ptr %159, i64 %161
  %163 = load ptr, ptr %162, align 8, !tbaa !5
  %164 = load ptr, ptr %7, align 8, !tbaa !5
  %165 = load i32, ptr %8, align 4, !tbaa !9
  %166 = load i32, ptr %14, align 4, !tbaa !9
  %167 = sub nsw i32 %165, %166
  call void @libmetis__MMDOrder(ptr noundef %158, ptr noundef %163, ptr noundef %164, i32 noundef %167)
  %168 = load ptr, ptr %20, align 8, !tbaa !5
  %169 = load i32, ptr %9, align 4, !tbaa !9
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds ptr, ptr %168, i64 %170
  call void @libmetis__FreeGraph(ptr noundef %171)
  br label %172

172:                                              ; preds = %157, %146
  %173 = load i32, ptr %15, align 4, !tbaa !9
  %174 = load i32, ptr %14, align 4, !tbaa !9
  %175 = add nsw i32 %174, %173
  store i32 %175, ptr %14, align 4, !tbaa !9
  br label %176

176:                                              ; preds = %172
  %177 = load i32, ptr %9, align 4, !tbaa !9
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %9, align 4, !tbaa !9
  br label %117, !llvm.loop !25

179:                                              ; preds = %117
  call void (ptr, ...) @gk_free(ptr noundef %20, ptr noundef null)
  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 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

; Function Attrs: nounwind uwtable
declare dso_local void @libmetis__MlevelNodeBisectionMultiple(ptr noundef, ptr noundef) #2

declare void @libmetis__FreeGraph(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @libmetis__MMDOrder(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #2

declare void @libmetis__wspacepush(ptr noundef) #1

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @libmetis__SplitGraphOrderCC(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) #2

declare void @libmetis__wspacepop(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, !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 = !{!14, !10, i64 8}
!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, !15, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !15, i64 128, !16, i64 136, !16, i64 144, !16, i64 152, !16, i64 160, !16, i64 168, !16, i64 176, !16, i64 184, !16, i64 192, !16, i64 200, !16, i64 208, !16, i64 216, !16, i64 224, !6, i64 232, !17, i64 240, !17, i64 248, !17, 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 = !{!"float", !7, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!12, !6, i64 128}
!19 = !{!12, !10, i64 136}
!20 = !{!12, !6, i64 152}
!21 = !{!12, !6, i64 96}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!12, !10, i64 4}
!25 = distinct !{!25, !23}


; 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.6 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [49 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 void @gk_free(ptr noundef, ...) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local void @libmetis__MlevelNestedDissectionCC(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) local_unnamed_addr #3 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %7 = load i32, ptr %1, align 8, !tbaa !9
  tail call void @libmetis__MlevelNodeBisectionMultiple(ptr noundef %0, ptr noundef nonnull %1)
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = load i32, ptr %8, align 8, !tbaa !12
  %10 = and i32 %9, 64
  %.not = icmp eq i32 %10, 0
  br i1 %.not, label %21, label %11

11:                                               ; preds = %4
  %12 = load i32, ptr %1, align 8, !tbaa !9
  %13 = getelementptr inbounds i8, ptr %1, i64 128
  %14 = load ptr, ptr %13, align 8, !tbaa !17
  %15 = load i32, ptr %14, align 4, !tbaa !18
  %16 = getelementptr inbounds i8, ptr %14, i64 4
  %17 = load i32, ptr %16, align 4, !tbaa !18
  %18 = getelementptr inbounds i8, ptr %14, i64 8
  %19 = load i32, ptr %18, align 4, !tbaa !18
  %20 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %12, i32 noundef %15, i32 noundef %17, i32 noundef %19)
  br label %21

21:                                               ; preds = %11, %4
  %22 = getelementptr inbounds i8, ptr %1, i64 136
  %23 = load i32, ptr %22, align 8, !tbaa !19
  %24 = getelementptr inbounds i8, ptr %1, i64 152
  %25 = load ptr, ptr %24, align 8, !tbaa !20
  %26 = getelementptr inbounds i8, ptr %1, i64 96
  %27 = load ptr, ptr %26, align 8, !tbaa !21
  %28 = icmp sgt i32 %23, 0
  br i1 %28, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %21
  %wide.trip.count = zext nneg i32 %23 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %29 = icmp ult i32 %23, 4
  br i1 %29, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.3, %.lr.ph ]
  %.049 = phi i32 [ %3, %.lr.ph.preheader.new ], [ %54, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %30 = add nsw i32 %.049, -1
  %31 = getelementptr inbounds i32, ptr %25, i64 %indvars.iv
  %32 = load i32, ptr %31, align 4, !tbaa !18
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds i32, ptr %27, i64 %33
  %35 = load i32, ptr %34, align 4, !tbaa !18
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds i32, ptr %2, i64 %36
  store i32 %30, ptr %37, align 4, !tbaa !18
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %38 = add nsw i32 %.049, -2
  %39 = getelementptr inbounds i32, ptr %25, i64 %indvars.iv.next
  %40 = load i32, ptr %39, align 4, !tbaa !18
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds i32, ptr %27, i64 %41
  %43 = load i32, ptr %42, align 4, !tbaa !18
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds i32, ptr %2, i64 %44
  store i32 %38, ptr %45, align 4, !tbaa !18
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %46 = add nsw i32 %.049, -3
  %47 = getelementptr inbounds i32, ptr %25, i64 %indvars.iv.next.1
  %48 = load i32, ptr %47, align 4, !tbaa !18
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds i32, ptr %27, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !18
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds i32, ptr %2, i64 %52
  store i32 %46, ptr %53, align 4, !tbaa !18
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %54 = add nsw i32 %.049, -4
  %55 = getelementptr inbounds i32, ptr %25, i64 %indvars.iv.next.2
  %56 = load i32, ptr %55, align 4, !tbaa !18
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds i32, ptr %27, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !18
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds i32, ptr %2, i64 %60
  store i32 %54, ptr %61, align 4, !tbaa !18
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !22

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph, %.lr.ph.preheader
  %.lcssa.ph = phi i32 [ poison, %.lr.ph.preheader ], [ %54, %.lr.ph ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.3, %.lr.ph ]
  %.049.unr = phi i32 [ %3, %.lr.ph.preheader ], [ %54, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph.epil ], [ %indvars.iv.unr, %._crit_edge.loopexit.unr-lcssa ]
  %.049.epil = phi i32 [ %62, %.lr.ph.epil ], [ %.049.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %62 = add nsw i32 %.049.epil, -1
  %63 = getelementptr inbounds i32, ptr %25, i64 %indvars.iv.epil
  %64 = load i32, ptr %63, align 4, !tbaa !18
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds i32, ptr %27, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !18
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds i32, ptr %2, i64 %68
  store i32 %62, ptr %69, align 4, !tbaa !18
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.lr.ph.epil, !llvm.loop !24

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil, %21
  %.0.lcssa = phi i32 [ %3, %21 ], [ %.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %62, %.lr.ph.epil ]
  tail call void @libmetis__wspacepush(ptr noundef %0) #4
  %70 = add nsw i32 %7, 1
  %71 = tail call ptr @libmetis__iwspacemalloc(ptr noundef %0, i32 noundef %70) #4
  %72 = tail call ptr @libmetis__iwspacemalloc(ptr noundef %0, i32 noundef %7) #4
  %73 = tail call i32 @libmetis__FindSepInducedComponents(ptr noundef %0, ptr noundef nonnull %1, ptr noundef %71, ptr noundef %72) #4
  %74 = load i32, ptr %8, align 8, !tbaa !12
  %75 = and i32 %74, 1
  %76 = icmp ne i32 %75, 0
  %77 = icmp sgt i32 %73, 2
  %or.cond = select i1 %76, i1 %77, i1 false
  br i1 %or.cond, label %78, label %80

78:                                               ; preds = %._crit_edge
  %79 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef %73)
  br label %80

80:                                               ; preds = %78, %._crit_edge
  %81 = tail call ptr @libmetis__SplitGraphOrderCC(ptr noundef nonnull %0, ptr noundef nonnull %1, i32 noundef %73, ptr noundef %71, ptr noundef %72)
  store ptr %81, ptr %6, align 8, !tbaa !5
  tail call void @libmetis__wspacepop(ptr noundef nonnull %0) #4
  call void @libmetis__FreeGraph(ptr noundef nonnull %5) #4
  %82 = icmp sgt i32 %73, 0
  br i1 %82, label %.lr.ph53.preheader, label %._crit_edge54

.lr.ph53.preheader:                               ; preds = %80
  %wide.trip.count59 = zext nneg i32 %73 to i64
  br label %.lr.ph53

.lr.ph53:                                         ; preds = %.lr.ph53.preheader, %96
  %indvars.iv56 = phi i64 [ 0, %.lr.ph53.preheader ], [ %indvars.iv.next57, %96 ]
  %.04650 = phi i32 [ 0, %.lr.ph53.preheader ], [ %97, %96 ]
  %83 = getelementptr inbounds ptr, ptr %81, i64 %indvars.iv56
  %84 = load ptr, ptr %83, align 8, !tbaa !5
  %85 = load i32, ptr %84, align 8, !tbaa !9
  %86 = icmp sgt i32 %85, 120
  br i1 %86, label %87, label %93

87:                                               ; preds = %.lr.ph53
  %88 = getelementptr inbounds i8, ptr %84, i64 4
  %89 = load i32, ptr %88, align 4, !tbaa !26
  %90 = icmp sgt i32 %89, 0
  br i1 %90, label %91, label %93

91:                                               ; preds = %87
  %92 = sub nsw i32 %.0.lcssa, %.04650
  call void @libmetis__MlevelNestedDissectionCC(ptr noundef %0, ptr noundef nonnull %84, ptr noundef %2, i32 noundef %92)
  br label %96

93:                                               ; preds = %87, %.lr.ph53
  %94 = sub nsw i32 %.0.lcssa, %.04650
  call void @libmetis__MMDOrder(ptr noundef %0, ptr noundef nonnull %84, ptr noundef %2, i32 noundef %94)
  %95 = getelementptr inbounds ptr, ptr %81, i64 %indvars.iv56
  call void @libmetis__FreeGraph(ptr noundef %95) #4
  br label %96

96:                                               ; preds = %93, %91
  %97 = add nsw i32 %85, %.04650
  %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1
  %exitcond60.not = icmp eq i64 %indvars.iv.next57, %wide.trip.count59
  br i1 %exitcond60.not, label %._crit_edge54, label %.lr.ph53, !llvm.loop !27

._crit_edge54:                                    ; preds = %96, %80
  call void (ptr, ...) @gk_free(ptr noundef nonnull %6, ptr noundef null) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  ret void
}

; 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
declare dso_local void @libmetis__MlevelNodeBisectionMultiple(ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @libmetis__FreeGraph(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @libmetis__MMDOrder(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

declare void @libmetis__wspacepush(ptr noundef) local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @libmetis__SplitGraphOrderCC(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @libmetis__wspacepop(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 = { 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 #3 = { 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 #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, !11, i64 0}
!10 = !{!"graph_t", !11, i64 0, !11, i64 4, !11, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !11, i64 72, !11, i64 76, !11, i64 80, !11, i64 84, !11, i64 88, !6, i64 96, !6, i64 104, !11, i64 112, !11, i64 116, !6, i64 120, !6, i64 128, !11, 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}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !11, i64 8}
!13 = !{!"ctrl_t", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !6, i64 80, !11, i64 88, !11, i64 92, !14, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !14, 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}
!14 = !{!"float", !7, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!10, !6, i64 128}
!18 = !{!11, !11, i64 0}
!19 = !{!10, !11, i64 136}
!20 = !{!10, !6, i64 152}
!21 = !{!10, !6, i64 96}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.unroll.disable"}
!26 = !{!10, !11, i64 4}
!27 = distinct !{!27, !23}


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