; 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__RandomBisection(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 [2 x 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 i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = 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 8, 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
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  store i32 0, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 4, 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
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #3
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  call void @libmetis__wspacepush(ptr noundef %29)
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.graph_t, ptr %30, i32 0, i32 0
  %32 = load i32, ptr %31, align 8, !tbaa !11
  store i32 %32, ptr %13, align 4, !tbaa !9
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.graph_t, ptr %33, i32 0, i32 3
  %35 = load ptr, ptr %34, align 8, !tbaa !13
  store ptr %35, ptr %22, align 8, !tbaa !5
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.graph_t, ptr %36, i32 0, i32 4
  %38 = load ptr, ptr %37, align 8, !tbaa !14
  store ptr %38, ptr %23, align 8, !tbaa !5
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.graph_t, ptr %39, i32 0, i32 6
  %41 = load ptr, ptr %40, align 8, !tbaa !15
  store ptr %41, ptr %24, align 8, !tbaa !5
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.graph_t, ptr %42, i32 0, i32 7
  %44 = load ptr, ptr %43, align 8, !tbaa !16
  store ptr %44, ptr %25, align 8, !tbaa !5
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  call void @libmetis__Allocate2WayPartitionMemory(ptr noundef %45, ptr noundef %46)
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.graph_t, ptr %47, i32 0, i32 19
  %49 = load ptr, ptr %48, align 8, !tbaa !17
  store ptr %49, ptr %26, align 8, !tbaa !5
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = load i32, ptr %13, align 4, !tbaa !9
  %52 = call ptr @libmetis__iwspacemalloc(ptr noundef %50, i32 noundef %51)
  store ptr %52, ptr %28, align 8, !tbaa !5
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = load i32, ptr %13, align 4, !tbaa !9
  %55 = call ptr @libmetis__iwspacemalloc(ptr noundef %53, i32 noundef %54)
  store ptr %55, ptr %27, align 8, !tbaa !5
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.ctrl_t, ptr %56, i32 0, i32 23
  %58 = load ptr, ptr %57, align 8, !tbaa !18
  %59 = getelementptr inbounds float, ptr %58, i64 0
  %60 = load float, ptr %59, align 4, !tbaa !23
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.graph_t, ptr %61, i32 0, i32 8
  %63 = load ptr, ptr %62, align 8, !tbaa !24
  %64 = getelementptr inbounds i32, ptr %63, i64 0
  %65 = load i32, ptr %64, align 4, !tbaa !9
  %66 = sitofp i32 %65 to float
  %67 = fmul float %60, %66
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = getelementptr inbounds float, ptr %68, i64 0
  %70 = load float, ptr %69, align 4, !tbaa !23
  %71 = fmul float %67, %70
  %72 = fptosi float %71 to i32
  store i32 %72, ptr %15, align 4, !tbaa !9
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %73

73:                                               ; preds = %179, %4
  %74 = load i32, ptr %21, align 4, !tbaa !9
  %75 = load i32, ptr %8, align 4, !tbaa !9
  %76 = icmp slt i32 %74, %75
  br i1 %76, label %77, label %182

77:                                               ; preds = %73
  %78 = load i32, ptr %13, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = load ptr, ptr %26, align 8, !tbaa !5
  %81 = call ptr @libmetis__iset(i64 noundef %79, i32 noundef 1, ptr noundef %80)
  %82 = load i32, ptr %21, align 4, !tbaa !9
  %83 = icmp sgt i32 %82, 0
  br i1 %83, label %84, label %148

84:                                               ; preds = %77
  %85 = load i32, ptr %13, align 4, !tbaa !9
  %86 = load ptr, ptr %27, align 8, !tbaa !5
  %87 = load i32, ptr %13, align 4, !tbaa !9
  %88 = sdiv i32 %87, 2
  call void @libmetis__irandArrayPermute(i32 noundef %85, ptr noundef %86, i32 noundef %88, i32 noundef 1)
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.graph_t, ptr %89, i32 0, i32 8
  %91 = load ptr, ptr %90, align 8, !tbaa !24
  %92 = getelementptr inbounds i32, ptr %91, i64 0
  %93 = load i32, ptr %92, align 4, !tbaa !9
  %94 = getelementptr inbounds [2 x i32], ptr %14, i64 0, i64 1
  store i32 %93, ptr %94, align 4, !tbaa !9
  %95 = getelementptr inbounds [2 x i32], ptr %14, i64 0, i64 0
  store i32 0, ptr %95, align 4, !tbaa !9
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %96

96:                                               ; preds = %144, %84
  %97 = load i32, ptr %10, align 4, !tbaa !9
  %98 = load i32, ptr %13, align 4, !tbaa !9
  %99 = icmp slt i32 %97, %98
  br i1 %99, label %100, label %147

100:                                              ; preds = %96
  %101 = load ptr, ptr %27, align 8, !tbaa !5
  %102 = load i32, ptr %10, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds i32, ptr %101, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !9
  store i32 %105, ptr %9, align 4, !tbaa !9
  %106 = getelementptr inbounds [2 x i32], ptr %14, i64 0, i64 0
  %107 = load i32, ptr %106, align 4, !tbaa !9
  %108 = load ptr, ptr %23, align 8, !tbaa !5
  %109 = load i32, ptr %9, align 4, !tbaa !9
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds i32, ptr %108, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !9
  %113 = add nsw i32 %107, %112
  %114 = load i32, ptr %15, align 4, !tbaa !9
  %115 = icmp slt i32 %113, %114
  br i1 %115, label %116, label %143

116:                                              ; preds = %100
  %117 = load ptr, ptr %26, align 8, !tbaa !5
  %118 = load i32, ptr %9, align 4, !tbaa !9
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds i32, ptr %117, i64 %119
  store i32 0, ptr %120, align 4, !tbaa !9
  %121 = load ptr, ptr %23, align 8, !tbaa !5
  %122 = load i32, ptr %9, align 4, !tbaa !9
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds i32, ptr %121, i64 %123
  %125 = load i32, ptr %124, align 4, !tbaa !9
  %126 = getelementptr inbounds [2 x i32], ptr %14, i64 0, i64 0
  %127 = load i32, ptr %126, align 4, !tbaa !9
  %128 = add nsw i32 %127, %125
  store i32 %128, ptr %126, align 4, !tbaa !9
  %129 = load ptr, ptr %23, align 8, !tbaa !5
  %130 = load i32, ptr %9, align 4, !tbaa !9
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds i32, ptr %129, i64 %131
  %133 = load i32, ptr %132, align 4, !tbaa !9
  %134 = getelementptr inbounds [2 x i32], ptr %14, i64 0, i64 1
  %135 = load i32, ptr %134, align 4, !tbaa !9
  %136 = sub nsw i32 %135, %133
  store i32 %136, ptr %134, align 4, !tbaa !9
  %137 = getelementptr inbounds [2 x i32], ptr %14, i64 0, i64 0
  %138 = load i32, ptr %137, align 4, !tbaa !9
  %139 = load i32, ptr %15, align 4, !tbaa !9
  %140 = icmp sgt i32 %138, %139
  br i1 %140, label %141, label %142

141:                                              ; preds = %116
  br label %147

142:                                              ; preds = %116
  br label %143

143:                                              ; preds = %142, %100
  br label %144

144:                                              ; preds = %143
  %145 = load i32, ptr %10, align 4, !tbaa !9
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %10, align 4, !tbaa !9
  br label %96, !llvm.loop !25

147:                                              ; preds = %141, %96
  br label %148

148:                                              ; preds = %147, %77
  %149 = load ptr, ptr %5, align 8, !tbaa !5
  %150 = load ptr, ptr %6, align 8, !tbaa !5
  call void @libmetis__Compute2WayPartitionParams(ptr noundef %149, ptr noundef %150)
  %151 = load ptr, ptr %5, align 8, !tbaa !5
  %152 = load ptr, ptr %6, align 8, !tbaa !5
  %153 = load ptr, ptr %7, align 8, !tbaa !5
  call void @libmetis__Balance2Way(ptr noundef %151, ptr noundef %152, ptr noundef %153)
  %154 = load ptr, ptr %5, align 8, !tbaa !5
  %155 = load ptr, ptr %6, align 8, !tbaa !5
  %156 = load ptr, ptr %7, align 8, !tbaa !5
  call void @libmetis__FM_2WayRefine(ptr noundef %154, ptr noundef %155, ptr noundef %156, i32 noundef 4)
  %157 = load i32, ptr %21, align 4, !tbaa !9
  %158 = icmp eq i32 %157, 0
  br i1 %158, label %165, label %159

159:                                              ; preds = %148
  %160 = load i32, ptr %18, align 4, !tbaa !9
  %161 = load ptr, ptr %6, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.graph_t, ptr %161, i32 0, i32 17
  %163 = load i32, ptr %162, align 8, !tbaa !27
  %164 = icmp sgt i32 %160, %163
  br i1 %164, label %165, label %178

165:                                              ; preds = %159, %148
  %166 = load ptr, ptr %6, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.graph_t, ptr %166, i32 0, i32 17
  %168 = load i32, ptr %167, align 8, !tbaa !27
  store i32 %168, ptr %18, align 4, !tbaa !9
  %169 = load i32, ptr %13, align 4, !tbaa !9
  %170 = sext i32 %169 to i64
  %171 = load ptr, ptr %26, align 8, !tbaa !5
  %172 = load ptr, ptr %28, align 8, !tbaa !5
  %173 = call ptr @libmetis__icopy(i64 noundef %170, ptr noundef %171, ptr noundef %172)
  %174 = load i32, ptr %18, align 4, !tbaa !9
  %175 = icmp eq i32 %174, 0
  br i1 %175, label %176, label %177

176:                                              ; preds = %165
  br label %182

177:                                              ; preds = %165
  br label %178

178:                                              ; preds = %177, %159
  br label %179

179:                                              ; preds = %178
  %180 = load i32, ptr %21, align 4, !tbaa !9
  %181 = add nsw i32 %180, 1
  store i32 %181, ptr %21, align 4, !tbaa !9
  br label %73, !llvm.loop !28

182:                                              ; preds = %176, %73
  %183 = load i32, ptr %18, align 4, !tbaa !9
  %184 = load ptr, ptr %6, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.graph_t, ptr %184, i32 0, i32 17
  store i32 %183, ptr %185, align 8, !tbaa !27
  %186 = load i32, ptr %13, align 4, !tbaa !9
  %187 = sext i32 %186 to i64
  %188 = load ptr, ptr %28, align 8, !tbaa !5
  %189 = load ptr, ptr %26, align 8, !tbaa !5
  %190 = call ptr @libmetis__icopy(i64 noundef %187, ptr noundef %188, ptr noundef %189)
  %191 = load ptr, ptr %5, align 8, !tbaa !5
  call void @libmetis__wspacepop(ptr noundef %191)
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  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 4, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 4, 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 8, 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

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 24}
!15 = !{!12, !6, i64 40}
!16 = !{!12, !6, i64 48}
!17 = !{!12, !6, i64 120}
!18 = !{!19, !6, i64 104}
!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 = !{!20, !20, i64 0}
!24 = !{!12, !6, i64 56}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!12, !10, i64 112}
!28 = distinct !{!28, !26}


; 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__RandomBisection(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) local_unnamed_addr #0 {
  tail call void @libmetis__wspacepush(ptr noundef %0) #2
  %5 = load i32, ptr %1, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %1, i64 24
  %7 = load ptr, ptr %6, align 8, !tbaa !11
  tail call void @libmetis__Allocate2WayPartitionMemory(ptr noundef %0, ptr noundef nonnull %1) #2
  %8 = getelementptr inbounds i8, ptr %1, i64 120
  %9 = load ptr, ptr %8, align 8, !tbaa !12
  %10 = tail call ptr @libmetis__iwspacemalloc(ptr noundef %0, i32 noundef %5) #2
  %11 = tail call ptr @libmetis__iwspacemalloc(ptr noundef %0, i32 noundef %5) #2
  %12 = getelementptr inbounds i8, ptr %0, i64 104
  %13 = load ptr, ptr %12, align 8, !tbaa !13
  %14 = load float, ptr %13, align 4, !tbaa !18
  %15 = getelementptr inbounds i8, ptr %1, i64 56
  %16 = load ptr, ptr %15, align 8, !tbaa !19
  %17 = load i32, ptr %16, align 4, !tbaa !20
  %18 = sitofp i32 %17 to float
  %19 = fmul float %14, %18
  %20 = load float, ptr %2, align 4, !tbaa !18
  %21 = fmul float %20, %19
  %22 = fptosi float %21 to i32
  %23 = icmp sgt i32 %3, 0
  %24 = sext i32 %5 to i64
  br i1 %23, label %.lr.ph77, label %._crit_edge78

.lr.ph77:                                         ; preds = %4
  %25 = sdiv i32 %5, 2
  %26 = icmp sgt i32 %5, 0
  %27 = getelementptr inbounds i8, ptr %1, i64 112
  %wide.trip.count = zext nneg i32 %5 to i64
  br label %28

28:                                               ; preds = %.lr.ph77, %50
  %.06475 = phi i32 [ 0, %.lr.ph77 ], [ %.1, %50 ]
  %.06574 = phi i32 [ 0, %.lr.ph77 ], [ %51, %50 ]
  %29 = tail call ptr @libmetis__iset(i64 noundef %24, i32 noundef 1, ptr noundef %9) #2
  %.not = icmp eq i32 %.06574, 0
  br i1 %.not, label %.critedge, label %30

30:                                               ; preds = %28
  tail call void @libmetis__irandArrayPermute(i32 noundef %5, ptr noundef %11, i32 noundef %25, i32 noundef 1) #2
  br i1 %26, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %30, %43
  %indvars.iv = phi i64 [ %indvars.iv.next, %43 ], [ 0, %30 ]
  %.sroa.0.070 = phi i32 [ %.sroa.0.1, %43 ], [ 0, %30 ]
  %31 = getelementptr inbounds i32, ptr %11, i64 %indvars.iv
  %32 = load i32, ptr %31, align 4, !tbaa !20
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds i32, ptr %7, i64 %33
  %35 = load i32, ptr %34, align 4, !tbaa !20
  %36 = add nsw i32 %35, %.sroa.0.070
  %37 = icmp slt i32 %36, %22
  br i1 %37, label %38, label %43

38:                                               ; preds = %.lr.ph
  %39 = getelementptr inbounds i32, ptr %9, i64 %33
  store i32 0, ptr %39, align 4, !tbaa !20
  %40 = load i32, ptr %34, align 4, !tbaa !20
  %41 = add nsw i32 %40, %.sroa.0.070
  %42 = icmp sgt i32 %41, %22
  br i1 %42, label %._crit_edge, label %43

43:                                               ; preds = %.lr.ph, %38
  %.sroa.0.1 = phi i32 [ %41, %38 ], [ %.sroa.0.070, %.lr.ph ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !21

._crit_edge:                                      ; preds = %38, %43, %30
  tail call void @libmetis__Compute2WayPartitionParams(ptr noundef %0, ptr noundef nonnull %1) #2
  tail call void @libmetis__Balance2Way(ptr noundef %0, ptr noundef nonnull %1, ptr noundef nonnull %2) #2
  tail call void @libmetis__FM_2WayRefine(ptr noundef %0, ptr noundef nonnull %1, ptr noundef nonnull %2, i32 noundef 4) #2
  %44 = load i32, ptr %27, align 8, !tbaa !23
  %45 = icmp sgt i32 %.06475, %44
  br i1 %45, label %46, label %50

.critedge:                                        ; preds = %28
  tail call void @libmetis__Compute2WayPartitionParams(ptr noundef %0, ptr noundef nonnull %1) #2
  tail call void @libmetis__Balance2Way(ptr noundef %0, ptr noundef nonnull %1, ptr noundef nonnull %2) #2
  tail call void @libmetis__FM_2WayRefine(ptr noundef %0, ptr noundef nonnull %1, ptr noundef nonnull %2, i32 noundef 4) #2
  %.pre = load i32, ptr %27, align 8, !tbaa !23
  br label %46

46:                                               ; preds = %.critedge, %._crit_edge
  %47 = phi i32 [ %.pre, %.critedge ], [ %44, %._crit_edge ]
  %48 = tail call ptr @libmetis__icopy(i64 noundef %24, ptr noundef %9, ptr noundef %10) #2
  %49 = icmp eq i32 %47, 0
  br i1 %49, label %._crit_edge78, label %50

50:                                               ; preds = %._crit_edge, %46
  %.1 = phi i32 [ %47, %46 ], [ %.06475, %._crit_edge ]
  %51 = add nuw nsw i32 %.06574, 1
  %exitcond82.not = icmp eq i32 %51, %3
  br i1 %exitcond82.not, label %._crit_edge78, label %28, !llvm.loop !24

._crit_edge78:                                    ; preds = %50, %46, %4
  %.2 = phi i32 [ 0, %4 ], [ 0, %46 ], [ %.1, %50 ]
  %52 = getelementptr inbounds i8, ptr %1, i64 112
  store i32 %.2, ptr %52, align 8, !tbaa !23
  %53 = tail call ptr @libmetis__icopy(i64 noundef %24, ptr noundef %10, ptr noundef %9) #2
  tail call void @libmetis__wspacepop(ptr noundef %0) #2
  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

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 = { 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 24}
!12 = !{!6, !10, i64 120}
!13 = !{!14, !10, i64 104}
!14 = !{!"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, !15, i64 96, !10, i64 104, !10, i64 112, !10, 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, !10, i64 232, !17, i64 240, !17, i64 248, !17, 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}
!15 = !{!"float", !8, i64 0}
!16 = !{!"double", !8, i64 0}
!17 = !{!"long", !8, i64 0}
!18 = !{!15, !15, i64 0}
!19 = !{!6, !10, i64 56}
!20 = !{!7, !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!6, !7, i64 112}
!24 = distinct !{!24, !22}


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