; LLVM IR from EntityFX/anybench :: src/benchmarks/generic/scimark2 (kernel)

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

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

declare ptr @new_Stopwatch() #1

declare void @Stopwatch_start(ptr noundef) #1

declare void @Stopwatch_stop(ptr noundef) #1

declare double @Stopwatch_read(ptr noundef) #1

declare void @Stopwatch_delete(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 double @kernel_measureSparseMatMult(i32 noundef %0, i32 noundef %1, double noundef %2, ptr noundef %3) #3 {
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca double, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca double, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  store i32 %0, ptr %5, align 4, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !5
  store double %2, ptr %7, align 8, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %23 = load i32, ptr %5, align 4, !tbaa !5
  %24 = load ptr, ptr %8, align 8, !tbaa !11
  %25 = call ptr @RandomVector(i32 noundef %23, ptr noundef %24)
  store ptr %25, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %26 = load i32, ptr %5, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = mul i64 8, %27
  %29 = call noalias ptr @malloc(i64 noundef %28) #6
  store ptr %29, ptr %10, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store double 0.000000e+00, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %30 = load i32, ptr %6, align 4, !tbaa !5
  %31 = load i32, ptr %5, align 4, !tbaa !5
  %32 = sdiv i32 %30, %31
  store i32 %32, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %33 = load i32, ptr %12, align 4, !tbaa !5
  %34 = load i32, ptr %5, align 4, !tbaa !5
  %35 = mul nsw i32 %33, %34
  store i32 %35, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %36 = load i32, ptr %13, align 4, !tbaa !5
  %37 = load ptr, ptr %8, align 8, !tbaa !11
  %38 = call ptr @RandomVector(i32 noundef %36, ptr noundef %37)
  store ptr %38, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %39 = load i32, ptr %6, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = mul i64 4, %40
  %42 = call noalias ptr @malloc(i64 noundef %41) #6
  store ptr %42, ptr %15, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %43 = load i32, ptr %5, align 4, !tbaa !5
  %44 = add nsw i32 %43, 1
  %45 = sext i32 %44 to i64
  %46 = mul i64 4, %45
  %47 = call noalias ptr @malloc(i64 noundef %46) #6
  store ptr %47, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 0, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 1, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %48 = call ptr @new_Stopwatch()
  store ptr %48, ptr %19, align 8, !tbaa !11
  %49 = load ptr, ptr %16, align 8, !tbaa !11
  %50 = getelementptr inbounds i32, ptr %49, i64 0
  store i32 0, ptr %50, align 4, !tbaa !5
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %94, %4
  %52 = load i32, ptr %17, align 4, !tbaa !5
  %53 = load i32, ptr %5, align 4, !tbaa !5
  %54 = icmp slt i32 %52, %53
  br i1 %54, label %55, label %97

55:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %56 = load ptr, ptr %16, align 8, !tbaa !11
  %57 = load i32, ptr %17, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds i32, ptr %56, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !5
  store i32 %60, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %61 = load i32, ptr %17, align 4, !tbaa !5
  %62 = load i32, ptr %12, align 4, !tbaa !5
  %63 = sdiv i32 %61, %62
  store i32 %63, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 0, ptr %22, align 4, !tbaa !5
  %64 = load i32, ptr %20, align 4, !tbaa !5
  %65 = load i32, ptr %12, align 4, !tbaa !5
  %66 = add nsw i32 %64, %65
  %67 = load ptr, ptr %16, align 8, !tbaa !11
  %68 = load i32, ptr %17, align 4, !tbaa !5
  %69 = add nsw i32 %68, 1
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds i32, ptr %67, i64 %70
  store i32 %66, ptr %71, align 4, !tbaa !5
  %72 = load i32, ptr %21, align 4, !tbaa !5
  %73 = icmp slt i32 %72, 1
  br i1 %73, label %74, label %75

74:                                               ; preds = %55
  store i32 1, ptr %21, align 4, !tbaa !5
  br label %75

75:                                               ; preds = %74, %55
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %90, %75
  %77 = load i32, ptr %22, align 4, !tbaa !5
  %78 = load i32, ptr %12, align 4, !tbaa !5
  %79 = icmp slt i32 %77, %78
  br i1 %79, label %80, label %93

80:                                               ; preds = %76
  %81 = load i32, ptr %22, align 4, !tbaa !5
  %82 = load i32, ptr %21, align 4, !tbaa !5
  %83 = mul nsw i32 %81, %82
  %84 = load ptr, ptr %15, align 8, !tbaa !11
  %85 = load i32, ptr %20, align 4, !tbaa !5
  %86 = load i32, ptr %22, align 4, !tbaa !5
  %87 = add nsw i32 %85, %86
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds i32, ptr %84, i64 %88
  store i32 %83, ptr %89, align 4, !tbaa !5
  br label %90

90:                                               ; preds = %80
  %91 = load i32, ptr %22, align 4, !tbaa !5
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %22, align 4, !tbaa !5
  br label %76, !llvm.loop !13

93:                                               ; preds = %76
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %94

94:                                               ; preds = %93
  %95 = load i32, ptr %17, align 4, !tbaa !5
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %17, align 4, !tbaa !5
  br label %51, !llvm.loop !15

97:                                               ; preds = %51
  br label %98

98:                                               ; preds = %114, %97
  br label %99

99:                                               ; preds = %98
  %100 = load ptr, ptr %19, align 8, !tbaa !11
  call void @Stopwatch_start(ptr noundef %100)
  %101 = load i32, ptr %5, align 4, !tbaa !5
  %102 = load ptr, ptr %10, align 8, !tbaa !11
  %103 = load ptr, ptr %14, align 8, !tbaa !11
  %104 = load ptr, ptr %16, align 8, !tbaa !11
  %105 = load ptr, ptr %15, align 8, !tbaa !11
  %106 = load ptr, ptr %9, align 8, !tbaa !11
  %107 = load i32, ptr %18, align 4, !tbaa !5
  call void @SparseCompRow_matmult(i32 noundef %101, ptr noundef %102, ptr noundef %103, ptr noundef %104, ptr noundef %105, ptr noundef %106, i32 noundef %107)
  %108 = load ptr, ptr %19, align 8, !tbaa !11
  call void @Stopwatch_stop(ptr noundef %108)
  %109 = load ptr, ptr %19, align 8, !tbaa !11
  %110 = call double @Stopwatch_read(ptr noundef %109)
  %111 = load double, ptr %7, align 8, !tbaa !9
  %112 = fcmp oge double %110, %111
  br i1 %112, label %113, label %114

113:                                              ; preds = %99
  br label %117

114:                                              ; preds = %99
  %115 = load i32, ptr %18, align 4, !tbaa !5
  %116 = mul nsw i32 %115, 2
  store i32 %116, ptr %18, align 4, !tbaa !5
  br label %98

117:                                              ; preds = %113
  %118 = load i32, ptr %5, align 4, !tbaa !5
  %119 = load i32, ptr %6, align 4, !tbaa !5
  %120 = load i32, ptr %18, align 4, !tbaa !5
  %121 = call double @SparseCompRow_num_flops(i32 noundef %118, i32 noundef %119, i32 noundef %120)
  %122 = load ptr, ptr %19, align 8, !tbaa !11
  %123 = call double @Stopwatch_read(ptr noundef %122)
  %124 = fdiv double %121, %123
  %125 = fmul double %124, 0x3EB0C6F7A0B5ED8D
  store double %125, ptr %11, align 8, !tbaa !9
  %126 = load ptr, ptr %19, align 8, !tbaa !11
  call void @Stopwatch_delete(ptr noundef %126)
  %127 = load ptr, ptr %16, align 8, !tbaa !11
  call void @free(ptr noundef %127) #5
  %128 = load ptr, ptr %15, align 8, !tbaa !11
  call void @free(ptr noundef %128) #5
  %129 = load ptr, ptr %14, align 8, !tbaa !11
  call void @free(ptr noundef %129) #5
  %130 = load ptr, ptr %10, align 8, !tbaa !11
  call void @free(ptr noundef %130) #5
  %131 = load ptr, ptr %9, align 8, !tbaa !11
  call void @free(ptr noundef %131) #5
  %132 = load double, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  ret double %132
}

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #4

declare void @SparseCompRow_matmult(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #1

declare double @SparseCompRow_num_flops(i32 noundef, i32 noundef, i32 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 "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 allocsize(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 #5 = { nounwind }
attributes #6 = { nounwind allocsize(0) }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


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

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

declare ptr @new_Stopwatch() local_unnamed_addr #0

declare void @Stopwatch_start(ptr noundef) local_unnamed_addr #0

declare void @Stopwatch_stop(ptr noundef) local_unnamed_addr #0

declare double @Stopwatch_read(ptr noundef) local_unnamed_addr #0

declare void @Stopwatch_delete(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 double @kernel_measureSparseMatMult(i32 noundef %0, i32 noundef %1, double noundef %2, ptr noundef %3) local_unnamed_addr #2 {
  %5 = tail call ptr @RandomVector(i32 noundef %0, ptr noundef %3) #5
  %6 = sext i32 %0 to i64
  %7 = shl nsw i64 %6, 3
  %8 = tail call noalias ptr @malloc(i64 noundef %7) #6
  %9 = sdiv i32 %1, %0
  %10 = mul nsw i32 %9, %0
  %11 = tail call ptr @RandomVector(i32 noundef %10, ptr noundef %3) #5
  %12 = sext i32 %1 to i64
  %13 = shl nsw i64 %12, 2
  %14 = tail call noalias ptr @malloc(i64 noundef %13) #6
  %15 = add nsw i32 %0, 1
  %16 = sext i32 %15 to i64
  %17 = shl nsw i64 %16, 2
  %18 = tail call noalias ptr @malloc(i64 noundef %17) #6
  %19 = tail call ptr @new_Stopwatch() #5
  store i32 0, ptr %18, align 4, !tbaa !5
  %20 = icmp sgt i32 %0, 0
  br i1 %20, label %.lr.ph58, label %.preheader.preheader

.lr.ph58:                                         ; preds = %4
  %21 = icmp sgt i32 %9, 0
  %wide.trip.count69 = zext nneg i32 %0 to i64
  br i1 %21, label %.lr.ph.us.preheader, label %.loopexit.preheader

.loopexit.preheader:                              ; preds = %.lr.ph58
  %min.iters.check = icmp ult i32 %0, 8
  br i1 %min.iters.check, label %.loopexit.preheader94, label %vector.ph

.loopexit.preheader94:                            ; preds = %middle.block, %.loopexit.preheader
  %.ph = phi i32 [ 0, %.loopexit.preheader ], [ %ind.end, %middle.block ]
  %indvars.iv.ph = phi i64 [ 0, %.loopexit.preheader ], [ %n.vec, %middle.block ]
  br label %.loopexit

vector.ph:                                        ; preds = %.loopexit.preheader
  %n.vec = and i64 %wide.trip.count69, 2147483640
  %.cast = trunc nuw nsw i64 %n.vec to i32
  %ind.end = mul i32 %9, %.cast
  %.splatinsert = insertelement <4 x i32> poison, i32 %9, i64 0
  %.splat = shufflevector <4 x i32> %.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  %22 = mul <4 x i32> %.splat, <i32 0, i32 1, i32 2, i32 3>
  %23 = shl i32 %9, 2
  %.splatinsert74 = insertelement <4 x i32> poison, i32 %23, i64 0
  %.splat75 = shufflevector <4 x i32> %.splatinsert74, <4 x i32> poison, <4 x i32> zeroinitializer
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %9, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i32> [ %22, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <4 x i32> %vec.ind, %.splat75
  %24 = add nsw <4 x i32> %vec.ind, %broadcast.splat
  %25 = add nsw <4 x i32> %step.add, %broadcast.splat
  %26 = or disjoint i64 %index, 1
  %27 = getelementptr inbounds i32, ptr %18, i64 %26
  %28 = getelementptr inbounds i8, ptr %27, i64 16
  store <4 x i32> %24, ptr %27, align 4, !tbaa !5
  store <4 x i32> %25, ptr %28, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i32> %step.add, %.splat75
  %29 = icmp eq i64 %index.next, %n.vec
  br i1 %29, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count69
  br i1 %cmp.n, label %.preheader.preheader, label %.loopexit.preheader94

.lr.ph.us.preheader:                              ; preds = %.lr.ph58
  %wide.trip.count64 = zext nneg i32 %9 to i64
  %min.iters.check79 = icmp ult i32 %9, 8
  %n.vec82 = and i64 %wide.trip.count64, 2147483640
  %cmp.n93 = icmp eq i64 %n.vec82, %wide.trip.count64
  br label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %..loopexit_crit_edge.us
  %30 = phi i32 [ 0, %.lr.ph.us.preheader ], [ %33, %..loopexit_crit_edge.us ]
  %indvars.iv66 = phi i64 [ 0, %.lr.ph.us.preheader ], [ %indvars.iv.next67, %..loopexit_crit_edge.us ]
  %31 = trunc nuw nsw i64 %indvars.iv66 to i32
  %32 = udiv i32 %31, %9
  %33 = add nuw nsw i32 %30, %9
  %indvars.iv.next67 = add nuw nsw i64 %indvars.iv66, 1
  %34 = getelementptr inbounds i32, ptr %18, i64 %indvars.iv.next67
  store i32 %33, ptr %34, align 4, !tbaa !5
  %spec.store.select.us = tail call i32 @llvm.smax.i32(i32 %32, i32 1)
  %35 = zext nneg i32 %30 to i64
  %invariant.gep = getelementptr inbounds i32, ptr %14, i64 %35
  br i1 %min.iters.check79, label %scalar.ph78.preheader, label %vector.ph80

vector.ph80:                                      ; preds = %.lr.ph.us
  %broadcast.splatinsert90 = insertelement <4 x i32> poison, i32 %spec.store.select.us, i64 0
  %broadcast.splat91 = shufflevector <4 x i32> %broadcast.splatinsert90, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body84

vector.body84:                                    ; preds = %vector.body84, %vector.ph80
  %index85 = phi i64 [ 0, %vector.ph80 ], [ %index.next92, %vector.body84 ]
  %vec.ind86 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph80 ], [ %vec.ind.next89, %vector.body84 ]
  %step.add87 = add <4 x i32> %vec.ind86, <i32 4, i32 4, i32 4, i32 4>
  %36 = getelementptr inbounds i32, ptr %invariant.gep, i64 %index85
  %37 = mul <4 x i32> %broadcast.splat91, %vec.ind86
  %38 = mul <4 x i32> %broadcast.splat91, %step.add87
  %39 = getelementptr inbounds i8, ptr %36, i64 16
  store <4 x i32> %37, ptr %36, align 4, !tbaa !5
  store <4 x i32> %38, ptr %39, align 4, !tbaa !5
  %index.next92 = add nuw i64 %index85, 8
  %vec.ind.next89 = add <4 x i32> %vec.ind86, <i32 8, i32 8, i32 8, i32 8>
  %40 = icmp eq i64 %index.next92, %n.vec82
  br i1 %40, label %middle.block77, label %vector.body84, !llvm.loop !13

middle.block77:                                   ; preds = %vector.body84
  br i1 %cmp.n93, label %..loopexit_crit_edge.us, label %scalar.ph78.preheader

scalar.ph78.preheader:                            ; preds = %middle.block77, %.lr.ph.us
  %indvars.iv61.ph = phi i64 [ 0, %.lr.ph.us ], [ %n.vec82, %middle.block77 ]
  br label %scalar.ph78

scalar.ph78:                                      ; preds = %scalar.ph78.preheader, %scalar.ph78
  %indvars.iv61 = phi i64 [ %indvars.iv.next62, %scalar.ph78 ], [ %indvars.iv61.ph, %scalar.ph78.preheader ]
  %gep = getelementptr inbounds i32, ptr %invariant.gep, i64 %indvars.iv61
  %41 = trunc i64 %indvars.iv61 to i32
  %42 = mul i32 %spec.store.select.us, %41
  store i32 %42, ptr %gep, align 4, !tbaa !5
  %indvars.iv.next62 = add nuw nsw i64 %indvars.iv61, 1
  %exitcond65.not = icmp eq i64 %indvars.iv.next62, %wide.trip.count64
  br i1 %exitcond65.not, label %..loopexit_crit_edge.us, label %scalar.ph78, !llvm.loop !14

..loopexit_crit_edge.us:                          ; preds = %scalar.ph78, %middle.block77
  %exitcond70.not = icmp eq i64 %indvars.iv.next67, %wide.trip.count69
  br i1 %exitcond70.not, label %.preheader.preheader, label %.lr.ph.us, !llvm.loop !15

.loopexit:                                        ; preds = %.loopexit.preheader94, %.loopexit
  %43 = phi i32 [ %44, %.loopexit ], [ %.ph, %.loopexit.preheader94 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %.loopexit ], [ %indvars.iv.ph, %.loopexit.preheader94 ]
  %44 = add nsw i32 %43, %9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %45 = getelementptr inbounds i32, ptr %18, i64 %indvars.iv.next
  store i32 %44, ptr %45, align 4, !tbaa !5
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count69
  br i1 %exitcond.not, label %.preheader.preheader, label %.loopexit, !llvm.loop !16

.preheader.preheader:                             ; preds = %.loopexit, %..loopexit_crit_edge.us, %middle.block, %4
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %.preheader
  %.055 = phi i32 [ %48, %.preheader ], [ 1, %.preheader.preheader ]
  tail call void @Stopwatch_start(ptr noundef %19) #5
  tail call void @SparseCompRow_matmult(i32 noundef %0, ptr noundef %8, ptr noundef %11, ptr noundef nonnull %18, ptr noundef %14, ptr noundef %5, i32 noundef %.055) #5
  tail call void @Stopwatch_stop(ptr noundef %19) #5
  %46 = tail call double @Stopwatch_read(ptr noundef %19) #5
  %47 = fcmp ult double %46, %2
  %48 = shl nsw i32 %.055, 1
  br i1 %47, label %.preheader, label %49

49:                                               ; preds = %.preheader
  %50 = tail call double @SparseCompRow_num_flops(i32 noundef %0, i32 noundef %1, i32 noundef %.055) #5
  %51 = tail call double @Stopwatch_read(ptr noundef %19) #5
  %52 = fdiv double %50, %51
  %53 = fmul double %52, 0x3EB0C6F7A0B5ED8D
  tail call void @Stopwatch_delete(ptr noundef %19) #5
  tail call void @free(ptr noundef %18) #5
  tail call void @free(ptr noundef %14) #5
  tail call void @free(ptr noundef %11) #5
  tail call void @free(ptr noundef %8) #5
  tail call void @free(ptr noundef %5) #5
  ret double %53
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

declare void @SparseCompRow_matmult(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare double @SparseCompRow_num_flops(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #4

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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }
attributes #6 = { nounwind allocsize(0) }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10, !11, !12}
!14 = distinct !{!14, !10, !12, !11}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10, !12, !11}


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