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

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

@.str.3 = external hidden unnamed_addr constant [29 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 ptr @libmetis__ismalloc(i64 noundef, i32 noundef, ptr noundef) #1

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

declare i32 @libmetis__isum(i64 noundef, ptr noundef, i64 noundef) #1

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

declare void @gk_free(ptr noundef, ...) #1

; 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__ComputePartitionBalance(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3) #2 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca float, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  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 8, 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
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.graph_t, ptr %16, i32 0, i32 0
  %18 = load i32, ptr %17, align 8, !tbaa !11
  store i32 %18, ptr %11, align 4, !tbaa !9
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.graph_t, ptr %19, i32 0, i32 2
  %21 = load i32, ptr %20, align 8, !tbaa !13
  store i32 %21, ptr %12, align 4, !tbaa !9
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.graph_t, ptr %22, i32 0, i32 4
  %24 = load ptr, ptr %23, align 8, !tbaa !14
  store ptr %24, ptr %14, align 8, !tbaa !5
  %25 = load i32, ptr %6, align 4, !tbaa !9
  %26 = sext i32 %25 to i64
  %27 = call ptr @libmetis__ismalloc(i64 noundef %26, i32 noundef 0, ptr noundef @.str.3)
  store ptr %27, ptr %13, align 8, !tbaa !5
  %28 = load ptr, ptr %14, align 8, !tbaa !5
  %29 = icmp eq ptr %28, null
  br i1 %29, label %30, label %69

30:                                               ; preds = %4
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %31

31:                                               ; preds = %46, %30
  %32 = load i32, ptr %9, align 4, !tbaa !9
  %33 = load i32, ptr %11, align 4, !tbaa !9
  %34 = icmp slt i32 %32, %33
  br i1 %34, label %35, label %49

35:                                               ; preds = %31
  %36 = load ptr, ptr %13, align 8, !tbaa !5
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = load i32, ptr %9, align 4, !tbaa !9
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds i32, ptr %37, i64 %39
  %41 = load i32, ptr %40, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds i32, ptr %36, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !9
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %43, align 4, !tbaa !9
  br label %46

46:                                               ; preds = %35
  %47 = load i32, ptr %9, align 4, !tbaa !9
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %9, align 4, !tbaa !9
  br label %31, !llvm.loop !15

49:                                               ; preds = %31
  %50 = load i32, ptr %6, align 4, !tbaa !9
  %51 = sitofp i32 %50 to double
  %52 = fmul double 1.000000e+00, %51
  %53 = load ptr, ptr %13, align 8, !tbaa !5
  %54 = load i32, ptr %6, align 4, !tbaa !9
  %55 = sext i32 %54 to i64
  %56 = load ptr, ptr %13, align 8, !tbaa !5
  %57 = call i64 @libmetis__iargmax(i64 noundef %55, ptr noundef %56)
  %58 = getelementptr inbounds i32, ptr %53, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !9
  %60 = sitofp i32 %59 to double
  %61 = fmul double %52, %60
  %62 = load i32, ptr %11, align 4, !tbaa !9
  %63 = sitofp i32 %62 to double
  %64 = fmul double 1.000000e+00, %63
  %65 = fdiv double %61, %64
  %66 = fptrunc double %65 to float
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  %68 = getelementptr inbounds float, ptr %67, i64 0
  store float %66, ptr %68, align 4, !tbaa !17
  br label %137

69:                                               ; preds = %4
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %70

70:                                               ; preds = %133, %69
  %71 = load i32, ptr %10, align 4, !tbaa !9
  %72 = load i32, ptr %12, align 4, !tbaa !9
  %73 = icmp slt i32 %71, %72
  br i1 %73, label %74, label %136

74:                                               ; preds = %70
  %75 = load i32, ptr %6, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = load ptr, ptr %13, align 8, !tbaa !5
  %78 = call ptr @libmetis__iset(i64 noundef %76, i32 noundef 0, ptr noundef %77)
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %79

79:                                               ; preds = %105, %74
  %80 = load i32, ptr %9, align 4, !tbaa !9
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.graph_t, ptr %81, i32 0, i32 0
  %83 = load i32, ptr %82, align 8, !tbaa !11
  %84 = icmp slt i32 %80, %83
  br i1 %84, label %85, label %108

85:                                               ; preds = %79
  %86 = load ptr, ptr %14, align 8, !tbaa !5
  %87 = load i32, ptr %9, align 4, !tbaa !9
  %88 = load i32, ptr %12, align 4, !tbaa !9
  %89 = mul nsw i32 %87, %88
  %90 = load i32, ptr %10, align 4, !tbaa !9
  %91 = add nsw i32 %89, %90
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds i32, ptr %86, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !9
  %95 = load ptr, ptr %13, align 8, !tbaa !5
  %96 = load ptr, ptr %7, align 8, !tbaa !5
  %97 = load i32, ptr %9, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds i32, ptr %96, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds i32, ptr %95, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !9
  %104 = add nsw i32 %103, %94
  store i32 %104, ptr %102, align 4, !tbaa !9
  br label %105

105:                                              ; preds = %85
  %106 = load i32, ptr %9, align 4, !tbaa !9
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %9, align 4, !tbaa !9
  br label %79, !llvm.loop !19

108:                                              ; preds = %79
  %109 = load i32, ptr %6, align 4, !tbaa !9
  %110 = sitofp i32 %109 to double
  %111 = fmul double 1.000000e+00, %110
  %112 = load ptr, ptr %13, align 8, !tbaa !5
  %113 = load i32, ptr %6, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = load ptr, ptr %13, align 8, !tbaa !5
  %116 = call i64 @libmetis__iargmax(i64 noundef %114, ptr noundef %115)
  %117 = getelementptr inbounds i32, ptr %112, i64 %116
  %118 = load i32, ptr %117, align 4, !tbaa !9
  %119 = sitofp i32 %118 to double
  %120 = fmul double %111, %119
  %121 = load i32, ptr %6, align 4, !tbaa !9
  %122 = sext i32 %121 to i64
  %123 = load ptr, ptr %13, align 8, !tbaa !5
  %124 = call i32 @libmetis__isum(i64 noundef %122, ptr noundef %123, i64 noundef 1)
  %125 = sitofp i32 %124 to double
  %126 = fmul double 1.000000e+00, %125
  %127 = fdiv double %120, %126
  %128 = fptrunc double %127 to float
  %129 = load ptr, ptr %8, align 8, !tbaa !5
  %130 = load i32, ptr %10, align 4, !tbaa !9
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds float, ptr %129, i64 %131
  store float %128, ptr %132, align 4, !tbaa !17
  br label %133

133:                                              ; preds = %108
  %134 = load i32, ptr %10, align 4, !tbaa !9
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %10, align 4, !tbaa !9
  br label %70, !llvm.loop !20

136:                                              ; preds = %70
  br label %137

137:                                              ; preds = %136, %49
  call void (ptr, ...) @gk_free(ptr noundef %13, ptr noundef null)
  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 8, 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
}

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 = !{!12, !10, i64 8}
!14 = !{!12, !6, i64 24}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !18, i64 0}
!18 = !{!"float", !7, i64 0}
!19 = distinct !{!19, !16}
!20 = distinct !{!20, !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"

@.str.3 = external hidden unnamed_addr constant [29 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 ptr @libmetis__ismalloc(i64 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

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

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

declare void @gk_free(ptr noundef, ...) local_unnamed_addr #1

; 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__ComputePartitionBalance(ptr nocapture noundef readonly %0, i32 noundef %1, ptr nocapture noundef readonly %2, ptr nocapture noundef writeonly %3) local_unnamed_addr #2 {
  %5 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  %6 = load i32, ptr %0, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 8
  %8 = load i32, ptr %7, align 8, !tbaa !11
  %9 = getelementptr inbounds i8, ptr %0, i64 24
  %10 = load ptr, ptr %9, align 8, !tbaa !12
  %11 = sext i32 %1 to i64
  %12 = tail call ptr @libmetis__ismalloc(i64 noundef %11, i32 noundef 0, ptr noundef nonnull @.str.3) #3
  store ptr %12, ptr %5, align 8, !tbaa !13
  %13 = icmp eq ptr %10, null
  br i1 %13, label %.preheader, label %.preheader35

.preheader35:                                     ; preds = %4
  %14 = icmp sgt i32 %8, 0
  br i1 %14, label %.lr.ph38, label %.loopexit

.lr.ph38:                                         ; preds = %.preheader35
  %15 = sitofp i32 %1 to double
  %16 = zext nneg i32 %8 to i64
  br label %58

.preheader:                                       ; preds = %4
  %17 = icmp sgt i32 %6, 0
  br i1 %17, label %.lr.ph40.preheader, label %._crit_edge41

.lr.ph40.preheader:                               ; preds = %.preheader
  %wide.trip.count49 = zext nneg i32 %6 to i64
  %xtraiter = and i64 %wide.trip.count49, 3
  %18 = icmp ult i32 %6, 4
  br i1 %18, label %._crit_edge41.loopexit.unr-lcssa, label %.lr.ph40.preheader.new

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

.lr.ph40:                                         ; preds = %.lr.ph40, %.lr.ph40.preheader.new
  %indvars.iv46 = phi i64 [ 0, %.lr.ph40.preheader.new ], [ %indvars.iv.next47.3, %.lr.ph40 ]
  %niter = phi i64 [ 0, %.lr.ph40.preheader.new ], [ %niter.next.3, %.lr.ph40 ]
  %19 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv46
  %20 = load i32, ptr %19, align 4, !tbaa !14
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds i32, ptr %12, i64 %21
  %23 = load i32, ptr %22, align 4, !tbaa !14
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr %22, align 4, !tbaa !14
  %indvars.iv.next47 = or disjoint i64 %indvars.iv46, 1
  %25 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv.next47
  %26 = load i32, ptr %25, align 4, !tbaa !14
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds i32, ptr %12, i64 %27
  %29 = load i32, ptr %28, align 4, !tbaa !14
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr %28, align 4, !tbaa !14
  %indvars.iv.next47.1 = or disjoint i64 %indvars.iv46, 2
  %31 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv.next47.1
  %32 = load i32, ptr %31, align 4, !tbaa !14
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds i32, ptr %12, i64 %33
  %35 = load i32, ptr %34, align 4, !tbaa !14
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %34, align 4, !tbaa !14
  %indvars.iv.next47.2 = or disjoint i64 %indvars.iv46, 3
  %37 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv.next47.2
  %38 = load i32, ptr %37, align 4, !tbaa !14
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds i32, ptr %12, i64 %39
  %41 = load i32, ptr %40, align 4, !tbaa !14
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %40, align 4, !tbaa !14
  %indvars.iv.next47.3 = add nuw nsw i64 %indvars.iv46, 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_edge41.loopexit.unr-lcssa, label %.lr.ph40, !llvm.loop !15

._crit_edge41.loopexit.unr-lcssa:                 ; preds = %.lr.ph40, %.lr.ph40.preheader
  %indvars.iv46.unr = phi i64 [ 0, %.lr.ph40.preheader ], [ %indvars.iv.next47.3, %.lr.ph40 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge41, label %.lr.ph40.epil

.lr.ph40.epil:                                    ; preds = %._crit_edge41.loopexit.unr-lcssa, %.lr.ph40.epil
  %indvars.iv46.epil = phi i64 [ %indvars.iv.next47.epil, %.lr.ph40.epil ], [ %indvars.iv46.unr, %._crit_edge41.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph40.epil ], [ 0, %._crit_edge41.loopexit.unr-lcssa ]
  %43 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv46.epil
  %44 = load i32, ptr %43, align 4, !tbaa !14
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds i32, ptr %12, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !14
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %46, align 4, !tbaa !14
  %indvars.iv.next47.epil = add nuw nsw i64 %indvars.iv46.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_edge41, label %.lr.ph40.epil, !llvm.loop !17

._crit_edge41:                                    ; preds = %._crit_edge41.loopexit.unr-lcssa, %.lr.ph40.epil, %.preheader
  %49 = sitofp i32 %1 to double
  %50 = tail call i64 @libmetis__iargmax(i64 noundef %11, ptr noundef %12) #3
  %51 = getelementptr inbounds i32, ptr %12, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !14
  %53 = sitofp i32 %52 to double
  %54 = fmul double %49, %53
  %55 = sitofp i32 %6 to double
  %56 = fdiv double %54, %55
  %57 = fptrunc double %56 to float
  store float %57, ptr %3, align 4, !tbaa !19
  br label %.loopexit

58:                                               ; preds = %.lr.ph38, %._crit_edge
  %indvars.iv43 = phi i64 [ 0, %.lr.ph38 ], [ %indvars.iv.next44, %._crit_edge ]
  %59 = tail call ptr @libmetis__iset(i64 noundef %11, i32 noundef 0, ptr noundef %12) #3
  %60 = load i32, ptr %0, align 8, !tbaa !5
  %61 = icmp sgt i32 %60, 0
  br i1 %61, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %58
  %invariant.gep = getelementptr inbounds i32, ptr %10, i64 %indvars.iv43
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %62 = mul nuw nsw i64 %indvars.iv, %16
  %gep = getelementptr inbounds i32, ptr %invariant.gep, i64 %62
  %63 = load i32, ptr %gep, align 4, !tbaa !14
  %64 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv
  %65 = load i32, ptr %64, align 4, !tbaa !14
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds i32, ptr %12, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !14
  %69 = add nsw i32 %68, %63
  store i32 %69, ptr %67, align 4, !tbaa !14
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %70 = load i32, ptr %0, align 8, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = icmp slt i64 %indvars.iv.next, %71
  br i1 %72, label %.lr.ph, label %._crit_edge, !llvm.loop !21

._crit_edge:                                      ; preds = %.lr.ph, %58
  %73 = tail call i64 @libmetis__iargmax(i64 noundef %11, ptr noundef %12) #3
  %74 = getelementptr inbounds i32, ptr %12, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !14
  %76 = sitofp i32 %75 to double
  %77 = fmul double %15, %76
  %78 = tail call i32 @libmetis__isum(i64 noundef %11, ptr noundef %12, i64 noundef 1) #3
  %79 = sitofp i32 %78 to double
  %80 = fdiv double %77, %79
  %81 = fptrunc double %80 to float
  %82 = getelementptr inbounds float, ptr %3, i64 %indvars.iv43
  store float %81, ptr %82, align 4, !tbaa !19
  %indvars.iv.next44 = add nuw nsw i64 %indvars.iv43, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next44, %16
  br i1 %exitcond.not, label %.loopexit, label %58, !llvm.loop !22

.loopexit:                                        ; preds = %._crit_edge, %.preheader35, %._crit_edge41
  call void (ptr, ...) @gk_free(ptr noundef nonnull %5, ptr noundef null) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  ret void
}

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 = { 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, !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 = !{!10, !10, i64 0}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.unroll.disable"}
!19 = !{!20, !20, i64 0}
!20 = !{!"float", !8, i64 0}
!21 = distinct !{!21, !16}
!22 = distinct !{!22, !16}


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