; LLVM IR from modlfo/AudioEngine :: AudioEngine/JuceLibraryCode (juce_audio_basics)

; 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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef <4 x float> @_ZN4juce18FloatVectorHelpers10BasicOps325load1Ef(float noundef) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN4juce18FloatVectorHelpersL9isAlignedEPKv(ptr noundef) #2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN4juce18FloatVectorHelpers10BasicOps326storeAEPfDv4_f(ptr noundef, <4 x float> noundef) #1 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN4juce18FloatVectorHelpers10BasicOps326storeUEPfDv4_f(ptr noundef, <4 x float> noundef) #1 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef <4 x float> @_ZN4juce18FloatVectorHelpers10BasicOps325loadAEPKf(ptr noundef) #1 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef <4 x float> @_ZN4juce18FloatVectorHelpers10BasicOps323mulEDv4_fS2_(<4 x float> noundef, <4 x float> noundef) #1 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef <4 x float> @_ZN4juce18FloatVectorHelpers10BasicOps325loadUEPKf(ptr noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN4juce21FloatVectorOperations8multiplyEPffi(ptr noundef %0, float noundef %1, i32 noundef %2) #3 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca float, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca <4 x float>, align 16
  %9 = alloca i32, align 4
  %10 = alloca <4 x float>, align 16
  %11 = alloca i32, align 4
  %12 = alloca <4 x float>, align 16
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store float %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %15 = load i32, ptr %6, align 4, !tbaa !11
  %16 = sdiv i32 %15, 4
  store i32 %16, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #4
  %17 = load float, ptr %5, align 4, !tbaa !9
  %18 = call noundef <4 x float> @_ZN4juce18FloatVectorHelpers10BasicOps325load1Ef(float noundef %17) #4
  store <4 x float> %18, ptr %8, align 16, !tbaa !13
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = call noundef zeroext i1 @_ZN4juce18FloatVectorHelpersL9isAlignedEPKv(ptr noundef %19) #4
  br i1 %20, label %21, label %40

21:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !11
  br label %22

22:                                               ; preds = %36, %21
  %23 = load i32, ptr %9, align 4, !tbaa !11
  %24 = load i32, ptr %7, align 4, !tbaa !11
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %39

27:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #4
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = call noundef <4 x float> @_ZN4juce18FloatVectorHelpers10BasicOps325loadAEPKf(ptr noundef %28) #4
  store <4 x float> %29, ptr %10, align 16, !tbaa !13
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = load <4 x float>, ptr %10, align 16, !tbaa !13
  %32 = load <4 x float>, ptr %8, align 16, !tbaa !13
  %33 = call noundef <4 x float> @_ZN4juce18FloatVectorHelpers10BasicOps323mulEDv4_fS2_(<4 x float> noundef %31, <4 x float> noundef %32) #4
  call void @_ZN4juce18FloatVectorHelpers10BasicOps326storeAEPfDv4_f(ptr noundef %30, <4 x float> noundef %33) #4
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds float, ptr %34, i64 4
  store ptr %35, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #4
  br label %36

36:                                               ; preds = %27
  %37 = load i32, ptr %9, align 4, !tbaa !11
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %9, align 4, !tbaa !11
  br label %22, !llvm.loop !14

39:                                               ; preds = %26
  br label %59

40:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !11
  br label %41

41:                                               ; preds = %55, %40
  %42 = load i32, ptr %11, align 4, !tbaa !11
  %43 = load i32, ptr %7, align 4, !tbaa !11
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %58

46:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #4
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = call noundef <4 x float> @_ZN4juce18FloatVectorHelpers10BasicOps325loadUEPKf(ptr noundef %47) #4
  store <4 x float> %48, ptr %12, align 16, !tbaa !13
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = load <4 x float>, ptr %12, align 16, !tbaa !13
  %51 = load <4 x float>, ptr %8, align 16, !tbaa !13
  %52 = call noundef <4 x float> @_ZN4juce18FloatVectorHelpers10BasicOps323mulEDv4_fS2_(<4 x float> noundef %50, <4 x float> noundef %51) #4
  call void @_ZN4juce18FloatVectorHelpers10BasicOps326storeUEPfDv4_f(ptr noundef %49, <4 x float> noundef %52) #4
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = getelementptr inbounds float, ptr %53, i64 4
  store ptr %54, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #4
  br label %55

55:                                               ; preds = %46
  %56 = load i32, ptr %11, align 4, !tbaa !11
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %11, align 4, !tbaa !11
  br label %41, !llvm.loop !16

58:                                               ; preds = %45
  br label %59

59:                                               ; preds = %58, %39
  %60 = load i32, ptr %6, align 4, !tbaa !11
  %61 = and i32 %60, 3
  store i32 %61, ptr %6, align 4, !tbaa !11
  %62 = load i32, ptr %6, align 4, !tbaa !11
  %63 = icmp eq i32 %62, 0
  br i1 %63, label %64, label %65

64:                                               ; preds = %59
  store i32 1, ptr %13, align 4
  br label %66

65:                                               ; preds = %59
  store i32 0, ptr %13, align 4
  br label %66

66:                                               ; preds = %65, %64
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  %67 = load i32, ptr %13, align 4
  switch i32 %67, label %86 [
    i32 0, label %68
    i32 1, label %85
  ]

68:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !11
  br label %69

69:                                               ; preds = %82, %68
  %70 = load i32, ptr %14, align 4, !tbaa !11
  %71 = load i32, ptr %6, align 4, !tbaa !11
  %72 = icmp slt i32 %70, %71
  br i1 %72, label %74, label %73

73:                                               ; preds = %69
  store i32 8, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %85

74:                                               ; preds = %69
  %75 = load float, ptr %5, align 4, !tbaa !9
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = load i32, ptr %14, align 4, !tbaa !11
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds float, ptr %76, i64 %78
  %80 = load float, ptr %79, align 4, !tbaa !9
  %81 = fmul float %80, %75
  store float %81, ptr %79, align 4, !tbaa !9
  br label %82

82:                                               ; preds = %74
  %83 = load i32, ptr %14, align 4, !tbaa !11
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %14, align 4, !tbaa !11
  br label %69, !llvm.loop !17

85:                                               ; preds = %73, %66
  ret void

86:                                               ; preds = %66
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="128" "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 = { inlinehint mustprogress 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 nounwind uwtable "min-legal-vector-width"="128" "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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}


; 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: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef <4 x float> @_ZN4juce18FloatVectorHelpers10BasicOps325load1Ef(float noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN4juce18FloatVectorHelpersL9isAlignedEPKv(ptr noundef) local_unnamed_addr #1

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN4juce18FloatVectorHelpers10BasicOps326storeAEPfDv4_f(ptr noundef, <4 x float> noundef) local_unnamed_addr #0 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN4juce18FloatVectorHelpers10BasicOps326storeUEPfDv4_f(ptr noundef, <4 x float> noundef) local_unnamed_addr #0 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef <4 x float> @_ZN4juce18FloatVectorHelpers10BasicOps325loadAEPKf(ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef <4 x float> @_ZN4juce18FloatVectorHelpers10BasicOps323mulEDv4_fS2_(<4 x float> noundef, <4 x float> noundef) local_unnamed_addr #0 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef <4 x float> @_ZN4juce18FloatVectorHelpers10BasicOps325loadUEPKf(ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN4juce21FloatVectorOperations8multiplyEPffi(ptr noundef %0, float noundef %1, i32 noundef %2) local_unnamed_addr #2 align 2 {
  %4 = sdiv i32 %2, 4
  %5 = tail call noundef <4 x float> @_ZN4juce18FloatVectorHelpers10BasicOps325load1Ef(float noundef %1) #3
  %6 = tail call noundef zeroext i1 @_ZN4juce18FloatVectorHelpersL9isAlignedEPKv(ptr noundef %0) #3
  %7 = icmp sgt i32 %2, 3
  br i1 %6, label %.preheader31, label %.preheader33

.preheader33:                                     ; preds = %3
  br i1 %7, label %.lr.ph, label %.loopexit32

.preheader31:                                     ; preds = %3
  br i1 %7, label %.lr.ph39, label %.loopexit32

.lr.ph39:                                         ; preds = %.preheader31, %.lr.ph39
  %.02838 = phi ptr [ %10, %.lr.ph39 ], [ %0, %.preheader31 ]
  %.03037 = phi i32 [ %11, %.lr.ph39 ], [ 0, %.preheader31 ]
  %8 = tail call noundef <4 x float> @_ZN4juce18FloatVectorHelpers10BasicOps325loadAEPKf(ptr noundef %.02838) #3
  %9 = tail call noundef <4 x float> @_ZN4juce18FloatVectorHelpers10BasicOps323mulEDv4_fS2_(<4 x float> noundef %8, <4 x float> noundef %5) #3
  tail call void @_ZN4juce18FloatVectorHelpers10BasicOps326storeAEPfDv4_f(ptr noundef %.02838, <4 x float> noundef %9) #3
  %10 = getelementptr inbounds i8, ptr %.02838, i64 16
  %11 = add nuw nsw i32 %.03037, 1
  %exitcond44.not = icmp eq i32 %11, %4
  br i1 %exitcond44.not, label %.loopexit32, label %.lr.ph39, !llvm.loop !5

.lr.ph:                                           ; preds = %.preheader33, %.lr.ph
  %.136 = phi ptr [ %14, %.lr.ph ], [ %0, %.preheader33 ]
  %.02935 = phi i32 [ %15, %.lr.ph ], [ 0, %.preheader33 ]
  %12 = tail call noundef <4 x float> @_ZN4juce18FloatVectorHelpers10BasicOps325loadUEPKf(ptr noundef %.136) #3
  %13 = tail call noundef <4 x float> @_ZN4juce18FloatVectorHelpers10BasicOps323mulEDv4_fS2_(<4 x float> noundef %12, <4 x float> noundef %5) #3
  tail call void @_ZN4juce18FloatVectorHelpers10BasicOps326storeUEPfDv4_f(ptr noundef %.136, <4 x float> noundef %13) #3
  %14 = getelementptr inbounds i8, ptr %.136, i64 16
  %15 = add nuw nsw i32 %.02935, 1
  %exitcond.not = icmp eq i32 %15, %4
  br i1 %exitcond.not, label %.loopexit32, label %.lr.ph, !llvm.loop !7

.loopexit32:                                      ; preds = %.lr.ph, %.lr.ph39, %.preheader33, %.preheader31
  %.2 = phi ptr [ %0, %.preheader31 ], [ %0, %.preheader33 ], [ %10, %.lr.ph39 ], [ %14, %.lr.ph ]
  %16 = and i32 %2, 3
  %.not = icmp eq i32 %16, 0
  br i1 %.not, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %.loopexit32
  %17 = load float, ptr %.2, align 4, !tbaa !8
  %18 = fmul float %17, %1
  store float %18, ptr %.2, align 4, !tbaa !8
  %exitcond46.not = icmp eq i32 %16, 1
  br i1 %exitcond46.not, label %.loopexit, label %.preheader.1, !llvm.loop !12

.preheader.1:                                     ; preds = %.preheader
  %19 = getelementptr inbounds i8, ptr %.2, i64 4
  %20 = load float, ptr %19, align 4, !tbaa !8
  %21 = fmul float %20, %1
  store float %21, ptr %19, align 4, !tbaa !8
  %exitcond46.not.1 = icmp eq i32 %16, 2
  br i1 %exitcond46.not.1, label %.loopexit, label %.preheader.2, !llvm.loop !12

.preheader.2:                                     ; preds = %.preheader.1
  %22 = getelementptr inbounds i8, ptr %.2, i64 8
  %23 = load float, ptr %22, align 4, !tbaa !8
  %24 = fmul float %23, %1
  store float %24, ptr %22, align 4, !tbaa !8
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader, %.preheader.1, %.preheader.2, %.loopexit32
  ret void
}

attributes #0 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="128" "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 = { inlinehint mustprogress 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="128" "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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}
!8 = !{!9, !9, i64 0}
!9 = !{!"float", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = distinct !{!12, !6}


; Effective O3 passes: GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass