; LLVM IR from jgaeddert/liquid-dsp :: src/fec/bench (sumproduct_benchmark)

; 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: nounwind uwtable
define dso_local void @sumproduct_bench(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca float, align 4
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  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) #6
  %22 = load i32, ptr %8, align 4, !tbaa !9
  %23 = uitofp i32 %22 to float
  %24 = call float @logf(float noundef %23) #6
  %25 = fpext float %24 to double
  %26 = call double @llvm.fmuladd.f64(double 2.997100e+00, double %25, double 0xC0316B8520000000)
  %27 = fptrunc double %26 to float
  %28 = call float @expf(float noundef %27) #6, !tbaa !9
  store float %28, ptr %9, align 4, !tbaa !11
  %29 = load float, ptr %9, align 4, !tbaa !11
  %30 = fpext float %29 to double
  %31 = fdiv double 0x3E7AD7F29ABCAF48, %30
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = load i64, ptr %32, align 8, !tbaa !13
  %34 = uitofp i64 %33 to double
  %35 = fmul double %34, %31
  %36 = fptoui double %35 to i64
  store i64 %36, ptr %32, align 8, !tbaa !13
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = load i64, ptr %37, align 8, !tbaa !13
  %39 = icmp ult i64 %38, 1
  br i1 %39, label %40, label %42

40:                                               ; preds = %4
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  store i64 1, ptr %41, align 8, !tbaa !13
  br label %42

42:                                               ; preds = %40, %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %43 = load i32, ptr %8, align 4, !tbaa !9
  %44 = mul i32 2, %43
  store i32 %44, ptr %11, align 4, !tbaa !9
  %45 = load i32, ptr %8, align 4, !tbaa !9
  %46 = load i32, ptr %11, align 4, !tbaa !9
  %47 = mul i32 %45, %46
  %48 = zext i32 %47 to i64
  %49 = call ptr @llvm.stacksave.p0()
  store ptr %49, ptr %12, align 8
  %50 = alloca i8, i64 %48, align 16
  store i64 %48, ptr %13, align 8
  %51 = load i32, ptr %8, align 4, !tbaa !9
  %52 = load i32, ptr %11, align 4, !tbaa !9
  %53 = mul i32 %51, %52
  %54 = zext i32 %53 to i64
  %55 = alloca i8, i64 %54, align 16
  store i64 %54, ptr %14, align 8
  %56 = load i32, ptr %8, align 4, !tbaa !9
  call void @sumproduct_generate(i32 noundef %56, ptr noundef %50, ptr noundef %55)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %57 = load i32, ptr %11, align 4, !tbaa !9
  %58 = load i32, ptr %8, align 4, !tbaa !9
  %59 = call ptr @smatrixb_create_array(ptr noundef %50, i32 noundef %57, i32 noundef %58)
  store ptr %59, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %60 = load i32, ptr %8, align 4, !tbaa !9
  %61 = load i32, ptr %11, align 4, !tbaa !9
  %62 = call ptr @smatrixb_create_array(ptr noundef %55, i32 noundef %60, i32 noundef %61)
  store ptr %62, ptr %16, align 8, !tbaa !5
  %63 = load i32, ptr %8, align 4, !tbaa !9
  %64 = zext i32 %63 to i64
  %65 = alloca i8, i64 %64, align 16
  store i64 %64, ptr %17, align 8
  %66 = load i32, ptr %11, align 4, !tbaa !9
  %67 = zext i32 %66 to i64
  %68 = alloca i8, i64 %67, align 16
  store i64 %67, ptr %18, align 8
  %69 = load i32, ptr %11, align 4, !tbaa !9
  %70 = zext i32 %69 to i64
  %71 = alloca float, i64 %70, align 16
  store i64 %70, ptr %19, align 8
  %72 = load i32, ptr %11, align 4, !tbaa !9
  %73 = zext i32 %72 to i64
  %74 = alloca i8, i64 %73, align 16
  store i64 %73, ptr %20, align 8
  store i64 0, ptr %10, align 8, !tbaa !13
  br label %75

75:                                               ; preds = %86, %42
  %76 = load i64, ptr %10, align 8, !tbaa !13
  %77 = load i32, ptr %8, align 4, !tbaa !9
  %78 = zext i32 %77 to i64
  %79 = icmp ult i64 %76, %78
  br i1 %79, label %80, label %89

80:                                               ; preds = %75
  %81 = call i32 @rand() #6
  %82 = srem i32 %81, 2
  %83 = trunc i32 %82 to i8
  %84 = load i64, ptr %10, align 8, !tbaa !13
  %85 = getelementptr inbounds i8, ptr %65, i64 %84
  store i8 %83, ptr %85, align 1, !tbaa !15
  br label %86

86:                                               ; preds = %80
  %87 = load i64, ptr %10, align 8, !tbaa !13
  %88 = add i64 %87, 1
  store i64 %88, ptr %10, align 8, !tbaa !13
  br label %75, !llvm.loop !16

89:                                               ; preds = %75
  %90 = load ptr, ptr %15, align 8, !tbaa !5
  %91 = call i32 @smatrixb_vmul(ptr noundef %90, ptr noundef %65, ptr noundef %68)
  store i64 0, ptr %10, align 8, !tbaa !13
  br label %92

92:                                               ; preds = %112, %89
  %93 = load i64, ptr %10, align 8, !tbaa !13
  %94 = load i32, ptr %11, align 4, !tbaa !9
  %95 = zext i32 %94 to i64
  %96 = icmp ult i64 %93, %95
  br i1 %96, label %97, label %115

97:                                               ; preds = %92
  %98 = load i64, ptr %10, align 8, !tbaa !13
  %99 = getelementptr inbounds i8, ptr %68, i64 %98
  %100 = load i8, ptr %99, align 1, !tbaa !15
  %101 = zext i8 %100 to i32
  %102 = icmp eq i32 %101, 0
  %103 = zext i1 %102 to i64
  %104 = select i1 %102, float 1.000000e+00, float -1.000000e+00
  %105 = fpext float %104 to double
  %106 = call float (...) @randnf()
  %107 = fpext float %106 to double
  %108 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %107, double %105)
  %109 = fptrunc double %108 to float
  %110 = load i64, ptr %10, align 8, !tbaa !13
  %111 = getelementptr inbounds float, ptr %71, i64 %110
  store float %109, ptr %111, align 4, !tbaa !11
  br label %112

112:                                              ; preds = %97
  %113 = load i64, ptr %10, align 8, !tbaa !13
  %114 = add i64 %113, 1
  store i64 %114, ptr %10, align 8, !tbaa !13
  br label %92, !llvm.loop !18

115:                                              ; preds = %92
  %116 = load ptr, ptr %5, align 8, !tbaa !5
  %117 = call i32 @getrusage(i32 noundef 0, ptr noundef %116) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i64 0, ptr %10, align 8, !tbaa !13
  br label %118

118:                                              ; preds = %188, %115
  %119 = load i64, ptr %10, align 8, !tbaa !13
  %120 = load ptr, ptr %7, align 8, !tbaa !5
  %121 = load i64, ptr %120, align 8, !tbaa !13
  %122 = icmp ult i64 %119, %121
  br i1 %122, label %123, label %191

123:                                              ; preds = %118
  %124 = load i32, ptr %8, align 4, !tbaa !9
  %125 = load i32, ptr %11, align 4, !tbaa !9
  %126 = load ptr, ptr %16, align 8, !tbaa !5
  %127 = call i32 @fec_sumproduct(i32 noundef %124, i32 noundef %125, ptr noundef %126, ptr noundef %71, ptr noundef %74, i32 noundef 1)
  store i32 %127, ptr %21, align 4, !tbaa !9
  %128 = load i32, ptr %21, align 4, !tbaa !9
  %129 = icmp ne i32 %128, 0
  %130 = zext i1 %129 to i64
  %131 = select i1 %129, i32 1, i32 -1
  %132 = sitofp i32 %131 to float
  %133 = load i64, ptr %10, align 8, !tbaa !13
  %134 = load i32, ptr %8, align 4, !tbaa !9
  %135 = zext i32 %134 to i64
  %136 = urem i64 %133, %135
  %137 = getelementptr inbounds float, ptr %71, i64 %136
  %138 = load float, ptr %137, align 4, !tbaa !11
  %139 = fadd float %138, %132
  store float %139, ptr %137, align 4, !tbaa !11
  %140 = load i32, ptr %8, align 4, !tbaa !9
  %141 = load i32, ptr %11, align 4, !tbaa !9
  %142 = load ptr, ptr %16, align 8, !tbaa !5
  %143 = call i32 @fec_sumproduct(i32 noundef %140, i32 noundef %141, ptr noundef %142, ptr noundef %71, ptr noundef %74, i32 noundef 1)
  store i32 %143, ptr %21, align 4, !tbaa !9
  %144 = load i32, ptr %21, align 4, !tbaa !9
  %145 = icmp ne i32 %144, 0
  %146 = zext i1 %145 to i64
  %147 = select i1 %145, i32 1, i32 -1
  %148 = sitofp i32 %147 to float
  %149 = load i64, ptr %10, align 8, !tbaa !13
  %150 = load i32, ptr %8, align 4, !tbaa !9
  %151 = zext i32 %150 to i64
  %152 = urem i64 %149, %151
  %153 = getelementptr inbounds float, ptr %71, i64 %152
  %154 = load float, ptr %153, align 4, !tbaa !11
  %155 = fadd float %154, %148
  store float %155, ptr %153, align 4, !tbaa !11
  %156 = load i32, ptr %8, align 4, !tbaa !9
  %157 = load i32, ptr %11, align 4, !tbaa !9
  %158 = load ptr, ptr %16, align 8, !tbaa !5
  %159 = call i32 @fec_sumproduct(i32 noundef %156, i32 noundef %157, ptr noundef %158, ptr noundef %71, ptr noundef %74, i32 noundef 1)
  store i32 %159, ptr %21, align 4, !tbaa !9
  %160 = load i32, ptr %21, align 4, !tbaa !9
  %161 = icmp ne i32 %160, 0
  %162 = zext i1 %161 to i64
  %163 = select i1 %161, i32 1, i32 -1
  %164 = sitofp i32 %163 to float
  %165 = load i64, ptr %10, align 8, !tbaa !13
  %166 = load i32, ptr %8, align 4, !tbaa !9
  %167 = zext i32 %166 to i64
  %168 = urem i64 %165, %167
  %169 = getelementptr inbounds float, ptr %71, i64 %168
  %170 = load float, ptr %169, align 4, !tbaa !11
  %171 = fadd float %170, %164
  store float %171, ptr %169, align 4, !tbaa !11
  %172 = load i32, ptr %8, align 4, !tbaa !9
  %173 = load i32, ptr %11, align 4, !tbaa !9
  %174 = load ptr, ptr %16, align 8, !tbaa !5
  %175 = call i32 @fec_sumproduct(i32 noundef %172, i32 noundef %173, ptr noundef %174, ptr noundef %71, ptr noundef %74, i32 noundef 1)
  store i32 %175, ptr %21, align 4, !tbaa !9
  %176 = load i32, ptr %21, align 4, !tbaa !9
  %177 = icmp ne i32 %176, 0
  %178 = zext i1 %177 to i64
  %179 = select i1 %177, i32 1, i32 -1
  %180 = sitofp i32 %179 to float
  %181 = load i64, ptr %10, align 8, !tbaa !13
  %182 = load i32, ptr %8, align 4, !tbaa !9
  %183 = zext i32 %182 to i64
  %184 = urem i64 %181, %183
  %185 = getelementptr inbounds float, ptr %71, i64 %184
  %186 = load float, ptr %185, align 4, !tbaa !11
  %187 = fadd float %186, %180
  store float %187, ptr %185, align 4, !tbaa !11
  br label %188

188:                                              ; preds = %123
  %189 = load i64, ptr %10, align 8, !tbaa !13
  %190 = add i64 %189, 1
  store i64 %190, ptr %10, align 8, !tbaa !13
  br label %118, !llvm.loop !19

191:                                              ; preds = %118
  %192 = load ptr, ptr %6, align 8, !tbaa !5
  %193 = call i32 @getrusage(i32 noundef 0, ptr noundef %192) #6
  %194 = load ptr, ptr %7, align 8, !tbaa !5
  %195 = load i64, ptr %194, align 8, !tbaa !13
  %196 = mul i64 %195, 4
  store i64 %196, ptr %194, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  %197 = load ptr, ptr %12, align 8
  call void @llvm.stackrestore.p0(ptr %197)
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  ret void
}

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

; Function Attrs: nounwind
declare float @expf(float noundef) #2

; Function Attrs: nounwind
declare float @logf(float noundef) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

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

declare ptr @smatrixb_create_array(ptr noundef, i32 noundef, i32 noundef) #5

; Function Attrs: nounwind
declare i32 @rand() #2

declare i32 @smatrixb_vmul(ptr noundef, ptr noundef, ptr noundef) #5

declare float @randnf(...) #5

; Function Attrs: nounwind
declare i32 @getrusage(i32 noundef, ptr noundef) #2

declare i32 @fec_sumproduct(i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #5

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #4

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nocallback nofree nosync nounwind willreturn }
attributes #5 = { "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 #6 = { 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, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}


; 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 @sumproduct_bench(ptr noundef %0, ptr noundef %1, ptr nocapture noundef %2, i32 noundef %3) local_unnamed_addr #0 {
  %5 = uitofp i32 %3 to float
  %6 = tail call float @logf(float noundef %5) #6
  %7 = fpext float %6 to double
  %8 = tail call double @llvm.fmuladd.f64(double %7, double 2.997100e+00, double 0xC0316B8520000000)
  %9 = fptrunc double %8 to float
  %10 = tail call float @expf(float noundef %9) #6, !tbaa !5
  %11 = fpext float %10 to double
  %12 = fdiv double 0x3E7AD7F29ABCAF48, %11
  %13 = load i64, ptr %2, align 8, !tbaa !9
  %14 = uitofp i64 %13 to double
  %15 = fmul double %12, %14
  %16 = fptoui double %15 to i64
  %spec.select = tail call i64 @llvm.umax.i64(i64 %16, i64 1)
  store i64 %spec.select, ptr %2, align 8, !tbaa !9
  %17 = shl i32 %3, 1
  %18 = mul i32 %17, %3
  %19 = zext i32 %18 to i64
  %20 = alloca i8, i64 %19, align 16
  %21 = alloca i8, i64 %19, align 16
  call void @sumproduct_generate(i32 noundef %3, ptr noundef nonnull %20, ptr noundef nonnull %21)
  %22 = call ptr @smatrixb_create_array(ptr noundef nonnull %20, i32 noundef %17, i32 noundef %3) #6
  %23 = call ptr @smatrixb_create_array(ptr noundef nonnull %21, i32 noundef %3, i32 noundef %17) #6
  %24 = zext i32 %3 to i64
  %25 = alloca i8, i64 %24, align 16
  %26 = zext i32 %17 to i64
  %27 = alloca i8, i64 %26, align 16
  %28 = alloca float, i64 %26, align 16
  %29 = alloca i8, i64 %26, align 16
  %.not72 = icmp eq i32 %3, 0
  br i1 %.not72, label %._crit_edge.thread, label %.lr.ph

._crit_edge.thread:                               ; preds = %4
  %30 = call i32 @smatrixb_vmul(ptr noundef %22, ptr noundef nonnull %25, ptr noundef nonnull %27) #6
  br label %._crit_edge67

.lr.ph:                                           ; preds = %4, %.lr.ph
  %.063 = phi i64 [ %35, %.lr.ph ], [ 0, %4 ]
  %31 = call i32 @rand() #6
  %32 = srem i32 %31, 2
  %33 = trunc nsw i32 %32 to i8
  %34 = getelementptr inbounds i8, ptr %25, i64 %.063
  store i8 %33, ptr %34, align 1, !tbaa !11
  %35 = add nuw nsw i64 %.063, 1
  %exitcond.not = icmp eq i64 %35, %24
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !12

._crit_edge:                                      ; preds = %.lr.ph
  %36 = call i32 @smatrixb_vmul(ptr noundef %22, ptr noundef nonnull %25, ptr noundef nonnull %27) #6
  %.not73 = icmp eq i32 %17, 0
  br i1 %.not73, label %._crit_edge67, label %.lr.ph66

.lr.ph66:                                         ; preds = %._crit_edge, %.lr.ph66
  %.164 = phi i64 [ %46, %.lr.ph66 ], [ 0, %._crit_edge ]
  %37 = getelementptr inbounds i8, ptr %27, i64 %.164
  %38 = load i8, ptr %37, align 1, !tbaa !11
  %39 = icmp eq i8 %38, 0
  %40 = select i1 %39, double 1.000000e+00, double -1.000000e+00
  %41 = call float (...) @randnf() #6
  %42 = fpext float %41 to double
  %43 = call double @llvm.fmuladd.f64(double %42, double 5.000000e-01, double %40)
  %44 = fptrunc double %43 to float
  %45 = getelementptr inbounds float, ptr %28, i64 %.164
  store float %44, ptr %45, align 4, !tbaa !14
  %46 = add nuw nsw i64 %.164, 1
  %exitcond75.not = icmp eq i64 %46, %26
  br i1 %exitcond75.not, label %._crit_edge67, label %.lr.ph66, !llvm.loop !16

._crit_edge67:                                    ; preds = %.lr.ph66, %._crit_edge.thread, %._crit_edge
  %47 = call i32 @getrusage(i32 noundef 0, ptr noundef %0) #6
  %48 = load i64, ptr %2, align 8, !tbaa !9
  %.not74 = icmp eq i64 %48, 0
  br i1 %.not74, label %._crit_edge71, label %.lr.ph70

.lr.ph70:                                         ; preds = %._crit_edge67, %.lr.ph70
  %.268 = phi i64 [ %71, %.lr.ph70 ], [ 0, %._crit_edge67 ]
  %49 = call i32 @fec_sumproduct(i32 noundef %3, i32 noundef %17, ptr noundef %23, ptr noundef nonnull %28, ptr noundef nonnull %29, i32 noundef 1) #6
  %.not = icmp eq i32 %49, 0
  %50 = select i1 %.not, i32 -1, i32 1
  %51 = sitofp i32 %50 to float
  %52 = urem i64 %.268, %24
  %53 = getelementptr inbounds float, ptr %28, i64 %52
  %54 = load float, ptr %53, align 4, !tbaa !14
  %55 = fadd float %54, %51
  store float %55, ptr %53, align 4, !tbaa !14
  %56 = call i32 @fec_sumproduct(i32 noundef %3, i32 noundef %17, ptr noundef %23, ptr noundef nonnull %28, ptr noundef nonnull %29, i32 noundef 1) #6
  %.not60 = icmp eq i32 %56, 0
  %57 = select i1 %.not60, i32 -1, i32 1
  %58 = sitofp i32 %57 to float
  %59 = load float, ptr %53, align 4, !tbaa !14
  %60 = fadd float %59, %58
  store float %60, ptr %53, align 4, !tbaa !14
  %61 = call i32 @fec_sumproduct(i32 noundef %3, i32 noundef %17, ptr noundef %23, ptr noundef nonnull %28, ptr noundef nonnull %29, i32 noundef 1) #6
  %.not61 = icmp eq i32 %61, 0
  %62 = select i1 %.not61, i32 -1, i32 1
  %63 = sitofp i32 %62 to float
  %64 = load float, ptr %53, align 4, !tbaa !14
  %65 = fadd float %64, %63
  store float %65, ptr %53, align 4, !tbaa !14
  %66 = call i32 @fec_sumproduct(i32 noundef %3, i32 noundef %17, ptr noundef %23, ptr noundef nonnull %28, ptr noundef nonnull %29, i32 noundef 1) #6
  %.not62 = icmp eq i32 %66, 0
  %67 = select i1 %.not62, i32 -1, i32 1
  %68 = sitofp i32 %67 to float
  %69 = load float, ptr %53, align 4, !tbaa !14
  %70 = fadd float %69, %68
  store float %70, ptr %53, align 4, !tbaa !14
  %71 = add nuw i64 %.268, 1
  %72 = load i64, ptr %2, align 8, !tbaa !9
  %73 = icmp ult i64 %71, %72
  br i1 %73, label %.lr.ph70, label %._crit_edge71, !llvm.loop !17

._crit_edge71:                                    ; preds = %.lr.ph70, %._crit_edge67
  %74 = call i32 @getrusage(i32 noundef 0, ptr noundef %1) #6
  %75 = load i64, ptr %2, align 8, !tbaa !9
  %76 = shl i64 %75, 2
  store i64 %76, ptr %2, align 8, !tbaa !9
  ret void
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @expf(float noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @logf(float noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #2

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

declare ptr @smatrixb_create_array(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #4

declare i32 @smatrixb_vmul(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare float @randnf(...) local_unnamed_addr #3

; Function Attrs: nounwind
declare i32 @getrusage(i32 noundef, ptr noundef) local_unnamed_addr #4

declare i32 @fec_sumproduct(i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umax.i64(i64, i64) #5

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 = { mustprogress nofree nounwind willreturn memory(write) "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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { "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 "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !15, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass