; LLVM IR from siconos/siconos :: externals/lbl/metis4/stat.ll_ (ComputePartitionBalance)

; 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.graphdef = type { ptr, ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, 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 @__idxsmalloc(i32 noundef, i32 noundef, ptr noundef) #1

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

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

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #2

; 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 @__ComputePartitionBalance(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3) #3 {
  %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) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.graphdef, ptr %16, i32 0, i32 2
  %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.graphdef, ptr %19, i32 0, i32 24
  %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.graphdef, ptr %22, i32 0, i32 5
  %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 = call ptr @__idxsmalloc(i32 noundef %25, i32 noundef 0, ptr noundef @.str.3)
  store ptr %26, ptr %13, align 8, !tbaa !5
  %27 = load ptr, ptr %14, align 8, !tbaa !5
  %28 = icmp eq ptr %27, null
  br i1 %28, label %29, label %68

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

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

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

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

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

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

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

73:                                               ; preds = %69
  %74 = load i32, ptr %6, align 4, !tbaa !9
  %75 = load ptr, ptr %13, align 8, !tbaa !5
  %76 = call ptr @__idxset(i32 noundef %74, i32 noundef 0, ptr noundef %75)
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %77

77:                                               ; preds = %103, %73
  %78 = load i32, ptr %9, align 4, !tbaa !9
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.graphdef, ptr %79, i32 0, i32 2
  %81 = load i32, ptr %80, align 8, !tbaa !11
  %82 = icmp slt i32 %78, %81
  br i1 %82, label %83, label %106

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

103:                                              ; preds = %83
  %104 = load i32, ptr %9, align 4, !tbaa !9
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %9, align 4, !tbaa !9
  br label %77, !llvm.loop !19

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

130:                                              ; preds = %106
  %131 = load i32, ptr %10, align 4, !tbaa !9
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %10, align 4, !tbaa !9
  br label %69, !llvm.loop !20

133:                                              ; preds = %69
  br label %134

134:                                              ; preds = %133, %48
  %135 = load ptr, ptr %13, align 8, !tbaa !5
  call void @free(ptr noundef %135) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  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 "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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 16}
!12 = !{!"graphdef", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !10, i64 92, !6, i64 96, !6, i64 104, !10, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !10, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208}
!13 = !{!12, !10, i64 176}
!14 = !{!12, !6, i64 32}
!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

declare ptr @__idxsmalloc(i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

declare i32 @__idxamax(i32 noundef, ptr noundef) local_unnamed_addr #0

declare i32 @__idxsum(i32 noundef, ptr noundef) local_unnamed_addr #0

declare ptr @__idxset(i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @__ComputePartitionBalance(ptr nocapture noundef readonly %0, i32 noundef %1, ptr nocapture noundef readonly %2, ptr nocapture noundef writeonly %3) local_unnamed_addr #2 {
  %5 = getelementptr inbounds i8, ptr %0, i64 16
  %6 = load i32, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 176
  %8 = load i32, ptr %7, align 8, !tbaa !11
  %9 = getelementptr inbounds i8, ptr %0, i64 32
  %10 = load ptr, ptr %9, align 8, !tbaa !12
  %11 = tail call ptr @__idxsmalloc(i32 noundef %1, i32 noundef 0, ptr noundef nonnull @.str.3) #3
  %12 = icmp eq ptr %10, null
  br i1 %12, label %.preheader, label %.preheader44

.preheader44:                                     ; preds = %4
  %13 = icmp sgt i32 %8, 0
  br i1 %13, label %.lr.ph47, label %.loopexit

.lr.ph47:                                         ; preds = %.preheader44
  %14 = sitofp i32 %1 to double
  %15 = zext nneg i32 %8 to i64
  br label %58

.preheader:                                       ; preds = %4
  %16 = icmp sgt i32 %6, 0
  br i1 %16, label %.lr.ph49.preheader, label %._crit_edge50

.lr.ph49.preheader:                               ; preds = %.preheader
  %wide.trip.count58 = zext nneg i32 %6 to i64
  %xtraiter = and i64 %wide.trip.count58, 3
  %17 = icmp ult i32 %6, 4
  br i1 %17, label %._crit_edge50.loopexit.unr-lcssa, label %.lr.ph49.preheader.new

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

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

._crit_edge50.loopexit.unr-lcssa:                 ; preds = %.lr.ph49, %.lr.ph49.preheader
  %indvars.iv55.unr = phi i64 [ 0, %.lr.ph49.preheader ], [ %indvars.iv.next56.3, %.lr.ph49 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge50, label %.lr.ph49.epil

.lr.ph49.epil:                                    ; preds = %._crit_edge50.loopexit.unr-lcssa, %.lr.ph49.epil
  %indvars.iv55.epil = phi i64 [ %indvars.iv.next56.epil, %.lr.ph49.epil ], [ %indvars.iv55.unr, %._crit_edge50.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph49.epil ], [ 0, %._crit_edge50.loopexit.unr-lcssa ]
  %42 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv55.epil
  %43 = load i32, ptr %42, align 4, !tbaa !13
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds i32, ptr %11, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !13
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %45, align 4, !tbaa !13
  %indvars.iv.next56.epil = add nuw nsw i64 %indvars.iv55.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_edge50, label %.lr.ph49.epil, !llvm.loop !16

._crit_edge50:                                    ; preds = %._crit_edge50.loopexit.unr-lcssa, %.lr.ph49.epil, %.preheader
  %48 = sitofp i32 %1 to double
  %49 = tail call i32 @__idxamax(i32 noundef %1, ptr noundef %11) #3
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds i32, ptr %11, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !13
  %53 = sitofp i32 %52 to double
  %54 = fmul double %48, %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 !18
  br label %.loopexit

58:                                               ; preds = %.lr.ph47, %._crit_edge
  %indvars.iv52 = phi i64 [ 0, %.lr.ph47 ], [ %indvars.iv.next53, %._crit_edge ]
  %59 = tail call ptr @__idxset(i32 noundef %1, i32 noundef 0, ptr noundef %11) #3
  %60 = load i32, ptr %5, 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.iv52
  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, %15
  %gep = getelementptr inbounds i32, ptr %invariant.gep, i64 %62
  %63 = load i32, ptr %gep, align 4, !tbaa !13
  %64 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv
  %65 = load i32, ptr %64, align 4, !tbaa !13
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds i32, ptr %11, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !13
  %69 = add nsw i32 %68, %63
  store i32 %69, ptr %67, align 4, !tbaa !13
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %70 = load i32, ptr %5, 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 !20

._crit_edge:                                      ; preds = %.lr.ph, %58
  %73 = tail call i32 @__idxamax(i32 noundef %1, ptr noundef %11) #3
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds i32, ptr %11, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !13
  %77 = sitofp i32 %76 to double
  %78 = fmul double %14, %77
  %79 = tail call i32 @__idxsum(i32 noundef %1, ptr noundef %11) #3
  %80 = sitofp i32 %79 to double
  %81 = fdiv double %78, %80
  %82 = fptrunc double %81 to float
  %83 = getelementptr inbounds float, ptr %3, i64 %indvars.iv52
  store float %82, ptr %83, align 4, !tbaa !18
  %indvars.iv.next53 = add nuw nsw i64 %indvars.iv52, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next53, %15
  br i1 %exitcond.not, label %.loopexit, label %58, !llvm.loop !21

.loopexit:                                        ; preds = %._crit_edge, %.preheader44, %._crit_edge50
  tail call void @free(ptr noundef %11) #3
  ret void
}

attributes #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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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, !10, i64 16}
!6 = !{!"graphdef", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !10, i64 88, !10, i64 92, !7, i64 96, !7, i64 104, !10, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !10, i64 176, !7, i64 184, !7, i64 192, !7, i64 200, !7, i64 208}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !10, i64 176}
!12 = !{!6, !7, i64 32}
!13 = !{!10, !10, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.unroll.disable"}
!18 = !{!19, !19, i64 0}
!19 = !{!"float", !8, i64 0}
!20 = distinct !{!20, !15}
!21 = distinct !{!21, !15}


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