; LLVM IR from FedericaPaoli1/stm32-speech-recognition-and-traduction :: Drivers/CMSIS/DSP/Source/FilteringFunctions (arm_biquad_cascade_df2T_f32)

; 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.arm_biquad_cascade_df2T_instance_f32 = type { i8, ptr, ptr }

; Function Attrs: nounwind uwtable
define dso_local void @arm_biquad_cascade_df2T_f32(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 ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca float, align 4
  %22 = alloca i32, align 4
  %23 = 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 8, ptr %9) #3
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %24, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %25, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.arm_biquad_cascade_df2T_instance_f32, ptr %26, i32 0, i32 1
  %28 = load ptr, ptr %27, align 8, !tbaa !11
  store ptr %28, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.arm_biquad_cascade_df2T_instance_f32, ptr %29, i32 0, i32 2
  %31 = load ptr, ptr %30, align 8, !tbaa !13
  store ptr %31, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #3
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.arm_biquad_cascade_df2T_instance_f32, ptr %32, i32 0, i32 0
  %34 = load i8, ptr %33, align 8, !tbaa !14
  %35 = zext i8 %34 to i32
  store i32 %35, ptr %23, align 4, !tbaa !9
  br label %36

36:                                               ; preds = %105, %4
  %37 = load ptr, ptr %12, align 8, !tbaa !5
  %38 = getelementptr inbounds float, ptr %37, i64 0
  %39 = load float, ptr %38, align 4, !tbaa !15
  store float %39, ptr %14, align 4, !tbaa !15
  %40 = load ptr, ptr %12, align 8, !tbaa !5
  %41 = getelementptr inbounds float, ptr %40, i64 1
  %42 = load float, ptr %41, align 4, !tbaa !15
  store float %42, ptr %15, align 4, !tbaa !15
  %43 = load ptr, ptr %12, align 8, !tbaa !5
  %44 = getelementptr inbounds float, ptr %43, i64 2
  %45 = load float, ptr %44, align 4, !tbaa !15
  store float %45, ptr %16, align 4, !tbaa !15
  %46 = load ptr, ptr %12, align 8, !tbaa !5
  %47 = getelementptr inbounds float, ptr %46, i64 3
  %48 = load float, ptr %47, align 4, !tbaa !15
  store float %48, ptr %17, align 4, !tbaa !15
  %49 = load ptr, ptr %12, align 8, !tbaa !5
  %50 = getelementptr inbounds float, ptr %49, i64 4
  %51 = load float, ptr %50, align 4, !tbaa !15
  store float %51, ptr %18, align 4, !tbaa !15
  %52 = load ptr, ptr %11, align 8, !tbaa !5
  %53 = getelementptr inbounds float, ptr %52, i64 0
  %54 = load float, ptr %53, align 4, !tbaa !15
  store float %54, ptr %20, align 4, !tbaa !15
  %55 = load ptr, ptr %11, align 8, !tbaa !5
  %56 = getelementptr inbounds float, ptr %55, i64 1
  %57 = load float, ptr %56, align 4, !tbaa !15
  store float %57, ptr %21, align 4, !tbaa !15
  %58 = load ptr, ptr %12, align 8, !tbaa !5
  %59 = getelementptr inbounds float, ptr %58, i64 5
  store ptr %59, ptr %12, align 8, !tbaa !5
  %60 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %60, ptr %22, align 4, !tbaa !9
  br label %61

61:                                               ; preds = %64, %36
  %62 = load i32, ptr %22, align 4, !tbaa !9
  %63 = icmp ugt i32 %62, 0
  br i1 %63, label %64, label %92

64:                                               ; preds = %61
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = getelementptr inbounds float, ptr %65, i32 1
  store ptr %66, ptr %9, align 8, !tbaa !5
  %67 = load float, ptr %65, align 4, !tbaa !15
  store float %67, ptr %19, align 4, !tbaa !15
  %68 = load float, ptr %14, align 4, !tbaa !15
  %69 = load float, ptr %19, align 4, !tbaa !15
  %70 = load float, ptr %20, align 4, !tbaa !15
  %71 = call float @llvm.fmuladd.f32(float %68, float %69, float %70)
  store float %71, ptr %13, align 4, !tbaa !15
  %72 = load float, ptr %15, align 4, !tbaa !15
  %73 = load float, ptr %19, align 4, !tbaa !15
  %74 = load float, ptr %21, align 4, !tbaa !15
  %75 = call float @llvm.fmuladd.f32(float %72, float %73, float %74)
  store float %75, ptr %20, align 4, !tbaa !15
  %76 = load float, ptr %17, align 4, !tbaa !15
  %77 = load float, ptr %13, align 4, !tbaa !15
  %78 = load float, ptr %20, align 4, !tbaa !15
  %79 = call float @llvm.fmuladd.f32(float %76, float %77, float %78)
  store float %79, ptr %20, align 4, !tbaa !15
  %80 = load float, ptr %16, align 4, !tbaa !15
  %81 = load float, ptr %19, align 4, !tbaa !15
  %82 = fmul float %80, %81
  store float %82, ptr %21, align 4, !tbaa !15
  %83 = load float, ptr %18, align 4, !tbaa !15
  %84 = load float, ptr %13, align 4, !tbaa !15
  %85 = load float, ptr %21, align 4, !tbaa !15
  %86 = call float @llvm.fmuladd.f32(float %83, float %84, float %85)
  store float %86, ptr %21, align 4, !tbaa !15
  %87 = load float, ptr %13, align 4, !tbaa !15
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  %89 = getelementptr inbounds float, ptr %88, i32 1
  store ptr %89, ptr %10, align 8, !tbaa !5
  store float %87, ptr %88, align 4, !tbaa !15
  %90 = load i32, ptr %22, align 4, !tbaa !9
  %91 = add i32 %90, -1
  store i32 %91, ptr %22, align 4, !tbaa !9
  br label %61, !llvm.loop !17

92:                                               ; preds = %61
  %93 = load float, ptr %20, align 4, !tbaa !15
  %94 = load ptr, ptr %11, align 8, !tbaa !5
  %95 = getelementptr inbounds float, ptr %94, i64 0
  store float %93, ptr %95, align 4, !tbaa !15
  %96 = load float, ptr %21, align 4, !tbaa !15
  %97 = load ptr, ptr %11, align 8, !tbaa !5
  %98 = getelementptr inbounds float, ptr %97, i64 1
  store float %96, ptr %98, align 4, !tbaa !15
  %99 = load ptr, ptr %11, align 8, !tbaa !5
  %100 = getelementptr inbounds float, ptr %99, i64 2
  store ptr %100, ptr %11, align 8, !tbaa !5
  %101 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %101, ptr %9, align 8, !tbaa !5
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %102, ptr %10, align 8, !tbaa !5
  %103 = load i32, ptr %23, align 4, !tbaa !9
  %104 = add i32 %103, -1
  store i32 %104, ptr %23, align 4, !tbaa !9
  br label %105

105:                                              ; preds = %92
  %106 = load i32, ptr %23, align 4, !tbaa !9
  %107 = icmp ugt i32 %106, 0
  br i1 %107, label %36, label %108, !llvm.loop !19

108:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #2

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

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


; 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: nofree norecurse nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable
define dso_local void @arm_biquad_cascade_df2T_f32(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef %2, i32 noundef %3) local_unnamed_addr #0 {
  %.not51 = icmp eq i32 %3, 0
  br i1 %.not51, label %.split59.us, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %4
  %5 = load i8, ptr %0, align 8, !tbaa !5
  %6 = zext i8 %5 to i32
  %7 = getelementptr inbounds i8, ptr %0, i64 8
  %8 = load ptr, ptr %7, align 8, !tbaa !10
  %9 = getelementptr inbounds i8, ptr %0, i64 16
  %10 = load ptr, ptr %9, align 8, !tbaa !11
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %._crit_edge
  %.048 = phi ptr [ %35, %._crit_edge ], [ %10, %.lr.ph.preheader ]
  %.047 = phi ptr [ %36, %._crit_edge ], [ %8, %.lr.ph.preheader ]
  %.044 = phi ptr [ %2, %._crit_edge ], [ %1, %.lr.ph.preheader ]
  %.0 = phi i32 [ %37, %._crit_edge ], [ %6, %.lr.ph.preheader ]
  %11 = load float, ptr %.048, align 4, !tbaa !12
  %12 = getelementptr inbounds i8, ptr %.048, i64 4
  %13 = load float, ptr %12, align 4, !tbaa !12
  %14 = getelementptr inbounds i8, ptr %.048, i64 8
  %15 = load float, ptr %14, align 4, !tbaa !12
  %16 = getelementptr inbounds i8, ptr %.048, i64 12
  %17 = load <2 x float>, ptr %16, align 4, !tbaa !12
  %18 = load <2 x float>, ptr %.047, align 4, !tbaa !12
  br label %19

19:                                               ; preds = %.lr.ph, %19
  %.04156 = phi i32 [ %3, %.lr.ph ], [ %34, %19 ]
  %.153 = phi ptr [ %.044, %.lr.ph ], [ %21, %19 ]
  %.14652 = phi ptr [ %2, %.lr.ph ], [ %33, %19 ]
  %20 = phi <2 x float> [ %18, %.lr.ph ], [ %32, %19 ]
  %21 = getelementptr inbounds i8, ptr %.153, i64 4
  %22 = load float, ptr %.153, align 4, !tbaa !12
  %23 = extractelement <2 x float> %20, i64 0
  %24 = tail call float @llvm.fmuladd.f32(float %11, float %22, float %23)
  %25 = extractelement <2 x float> %20, i64 1
  %26 = tail call float @llvm.fmuladd.f32(float %13, float %22, float %25)
  %27 = fmul float %15, %22
  %28 = insertelement <2 x float> poison, float %24, i64 0
  %29 = shufflevector <2 x float> %28, <2 x float> poison, <2 x i32> zeroinitializer
  %30 = insertelement <2 x float> poison, float %26, i64 0
  %31 = insertelement <2 x float> %30, float %27, i64 1
  %32 = tail call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %17, <2 x float> %29, <2 x float> %31)
  %33 = getelementptr inbounds i8, ptr %.14652, i64 4
  store float %24, ptr %.14652, align 4, !tbaa !12
  %34 = add i32 %.04156, -1
  %.not = icmp eq i32 %34, 0
  br i1 %.not, label %._crit_edge, label %19, !llvm.loop !14

._crit_edge:                                      ; preds = %19
  %35 = getelementptr inbounds i8, ptr %.048, i64 20
  store <2 x float> %32, ptr %.047, align 4, !tbaa !12
  %36 = getelementptr inbounds i8, ptr %.047, i64 8
  %37 = add i32 %.0, -1
  %.not50 = icmp eq i32 %37, 0
  br i1 %.not50, label %.split59.us, label %.lr.ph, !llvm.loop !16

.split59.us:                                      ; preds = %._crit_edge, %4
  ret void
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x float> @llvm.fmuladd.v2f32(<2 x float>, <2 x float>, <2 x float>) #2

attributes #0 = { nofree norecurse nosync nounwind memory(readwrite, inaccessiblemem: none) 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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

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


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