; LLVM IR from jgaeddert/liquid-dsp :: src/filter/src (filter_crcf)

; 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.iirfilt_crcf_s = type { ptr, ptr, ptr, i32, i32, i32, i32, ptr, ptr, ptr, i32, float }

@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.89 = external hidden unnamed_addr constant [55 x i8], align 1

declare ptr @liquid_error_config_fl(ptr noundef, i32 noundef, ptr noundef, ...) #0

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

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

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

declare ptr @dotprod_crcf_create(ptr noundef, i32 noundef) #0

; Function Attrs: nounwind uwtable
define dso_local ptr @iirfilt_crcf_create(ptr noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3) #3 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca float, align 4
  %12 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  %13 = load i32, ptr %7, align 4, !tbaa !9
  %14 = icmp eq i32 %13, 0
  br i1 %14, label %15, label %17

15:                                               ; preds = %4
  %16 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str.87, i32 noundef 102, ptr noundef @.str.88, ptr noundef @.str.2)
  store ptr %16, ptr %5, align 8
  br label %152

17:                                               ; preds = %4
  %18 = load i32, ptr %9, align 4, !tbaa !9
  %19 = icmp eq i32 %18, 0
  br i1 %19, label %20, label %22

20:                                               ; preds = %17
  %21 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str.87, i32 noundef 104, ptr noundef @.str.89, ptr noundef @.str.2)
  store ptr %21, ptr %5, align 8
  br label %152

22:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %23 = call noalias ptr @malloc(i64 noundef 72) #5
  store ptr %23, ptr %10, align 8, !tbaa !5
  %24 = load ptr, ptr %10, align 8, !tbaa !5
  call void @iirfilt_crcf_init(ptr noundef %24)
  %25 = load i32, ptr %7, align 4, !tbaa !9
  %26 = load ptr, ptr %10, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.iirfilt_crcf_s, ptr %26, i32 0, i32 4
  store i32 %25, ptr %27, align 4, !tbaa !11
  %28 = load i32, ptr %9, align 4, !tbaa !9
  %29 = load ptr, ptr %10, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.iirfilt_crcf_s, ptr %29, i32 0, i32 5
  store i32 %28, ptr %30, align 8, !tbaa !14
  %31 = load ptr, ptr %10, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.iirfilt_crcf_s, ptr %31, i32 0, i32 5
  %33 = load i32, ptr %32, align 8, !tbaa !14
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.iirfilt_crcf_s, ptr %34, i32 0, i32 4
  %36 = load i32, ptr %35, align 4, !tbaa !11
  %37 = icmp ugt i32 %33, %36
  br i1 %37, label %38, label %42

38:                                               ; preds = %22
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.iirfilt_crcf_s, ptr %39, i32 0, i32 5
  %41 = load i32, ptr %40, align 8, !tbaa !14
  br label %46

42:                                               ; preds = %22
  %43 = load ptr, ptr %10, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.iirfilt_crcf_s, ptr %43, i32 0, i32 4
  %45 = load i32, ptr %44, align 4, !tbaa !11
  br label %46

46:                                               ; preds = %42, %38
  %47 = phi i32 [ %41, %38 ], [ %45, %42 ]
  %48 = load ptr, ptr %10, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.iirfilt_crcf_s, ptr %48, i32 0, i32 3
  store i32 %47, ptr %49, align 8, !tbaa !15
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.iirfilt_crcf_s, ptr %50, i32 0, i32 6
  store i32 0, ptr %51, align 4, !tbaa !16
  %52 = load ptr, ptr %10, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.iirfilt_crcf_s, ptr %52, i32 0, i32 5
  %54 = load i32, ptr %53, align 8, !tbaa !14
  %55 = zext i32 %54 to i64
  %56 = mul i64 %55, 4
  %57 = call noalias ptr @malloc(i64 noundef %56) #5
  %58 = load ptr, ptr %10, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.iirfilt_crcf_s, ptr %58, i32 0, i32 1
  store ptr %57, ptr %59, align 8, !tbaa !17
  %60 = load ptr, ptr %10, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.iirfilt_crcf_s, ptr %60, i32 0, i32 4
  %62 = load i32, ptr %61, align 4, !tbaa !11
  %63 = zext i32 %62 to i64
  %64 = mul i64 %63, 4
  %65 = call noalias ptr @malloc(i64 noundef %64) #5
  %66 = load ptr, ptr %10, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.iirfilt_crcf_s, ptr %66, i32 0, i32 0
  store ptr %65, ptr %67, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  %69 = getelementptr inbounds float, ptr %68, i64 0
  %70 = load float, ptr %69, align 4, !tbaa !19
  store float %70, ptr %11, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %71

71:                                               ; preds = %91, %46
  %72 = load i32, ptr %12, align 4, !tbaa !9
  %73 = load ptr, ptr %10, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.iirfilt_crcf_s, ptr %73, i32 0, i32 4
  %75 = load i32, ptr %74, align 4, !tbaa !11
  %76 = icmp ult i32 %72, %75
  br i1 %76, label %77, label %94

77:                                               ; preds = %71
  %78 = load ptr, ptr %6, align 8, !tbaa !5
  %79 = load i32, ptr %12, align 4, !tbaa !9
  %80 = zext i32 %79 to i64
  %81 = getelementptr inbounds float, ptr %78, i64 %80
  %82 = load float, ptr %81, align 4, !tbaa !19
  %83 = load float, ptr %11, align 4, !tbaa !19
  %84 = fdiv float %82, %83
  %85 = load ptr, ptr %10, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.iirfilt_crcf_s, ptr %85, i32 0, i32 0
  %87 = load ptr, ptr %86, align 8, !tbaa !18
  %88 = load i32, ptr %12, align 4, !tbaa !9
  %89 = zext i32 %88 to i64
  %90 = getelementptr inbounds float, ptr %87, i64 %89
  store float %84, ptr %90, align 4, !tbaa !19
  br label %91

91:                                               ; preds = %77
  %92 = load i32, ptr %12, align 4, !tbaa !9
  %93 = add i32 %92, 1
  store i32 %93, ptr %12, align 4, !tbaa !9
  br label %71, !llvm.loop !20

94:                                               ; preds = %71
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %95

95:                                               ; preds = %115, %94
  %96 = load i32, ptr %12, align 4, !tbaa !9
  %97 = load ptr, ptr %10, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.iirfilt_crcf_s, ptr %97, i32 0, i32 5
  %99 = load i32, ptr %98, align 8, !tbaa !14
  %100 = icmp ult i32 %96, %99
  br i1 %100, label %101, label %118

101:                                              ; preds = %95
  %102 = load ptr, ptr %8, align 8, !tbaa !5
  %103 = load i32, ptr %12, align 4, !tbaa !9
  %104 = zext i32 %103 to i64
  %105 = getelementptr inbounds float, ptr %102, i64 %104
  %106 = load float, ptr %105, align 4, !tbaa !19
  %107 = load float, ptr %11, align 4, !tbaa !19
  %108 = fdiv float %106, %107
  %109 = load ptr, ptr %10, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.iirfilt_crcf_s, ptr %109, i32 0, i32 1
  %111 = load ptr, ptr %110, align 8, !tbaa !17
  %112 = load i32, ptr %12, align 4, !tbaa !9
  %113 = zext i32 %112 to i64
  %114 = getelementptr inbounds float, ptr %111, i64 %113
  store float %108, ptr %114, align 4, !tbaa !19
  br label %115

115:                                              ; preds = %101
  %116 = load i32, ptr %12, align 4, !tbaa !9
  %117 = add i32 %116, 1
  store i32 %117, ptr %12, align 4, !tbaa !9
  br label %95, !llvm.loop !22

118:                                              ; preds = %95
  %119 = load ptr, ptr %10, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.iirfilt_crcf_s, ptr %119, i32 0, i32 3
  %121 = load i32, ptr %120, align 8, !tbaa !15
  %122 = zext i32 %121 to i64
  %123 = mul i64 %122, 8
  %124 = call noalias ptr @malloc(i64 noundef %123) #5
  %125 = load ptr, ptr %10, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.iirfilt_crcf_s, ptr %125, i32 0, i32 2
  store ptr %124, ptr %126, align 8, !tbaa !23
  %127 = load ptr, ptr %10, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.iirfilt_crcf_s, ptr %127, i32 0, i32 1
  %129 = load ptr, ptr %128, align 8, !tbaa !17
  %130 = getelementptr inbounds float, ptr %129, i64 1
  %131 = load ptr, ptr %10, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.iirfilt_crcf_s, ptr %131, i32 0, i32 5
  %133 = load i32, ptr %132, align 8, !tbaa !14
  %134 = sub i32 %133, 1
  %135 = call ptr @dotprod_crcf_create(ptr noundef %130, i32 noundef %134)
  %136 = load ptr, ptr %10, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.iirfilt_crcf_s, ptr %136, i32 0, i32 8
  store ptr %135, ptr %137, align 8, !tbaa !24
  %138 = load ptr, ptr %10, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.iirfilt_crcf_s, ptr %138, i32 0, i32 0
  %140 = load ptr, ptr %139, align 8, !tbaa !18
  %141 = load ptr, ptr %10, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.iirfilt_crcf_s, ptr %141, i32 0, i32 4
  %143 = load i32, ptr %142, align 4, !tbaa !11
  %144 = call ptr @dotprod_crcf_create(ptr noundef %140, i32 noundef %143)
  %145 = load ptr, ptr %10, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.iirfilt_crcf_s, ptr %145, i32 0, i32 7
  store ptr %144, ptr %146, align 8, !tbaa !25
  %147 = load ptr, ptr %10, align 8, !tbaa !5
  %148 = call i32 @iirfilt_crcf_reset(ptr noundef %147)
  %149 = load ptr, ptr %10, align 8, !tbaa !5
  %150 = call i32 @iirfilt_crcf_set_scale(ptr noundef %149, float noundef 1.000000e+00)
  %151 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %151, ptr %5, align 8
  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 8, ptr %10) #4
  br label %152

152:                                              ; preds = %118, %20, %15
  %153 = load ptr, ptr %5, align 8
  ret ptr %153
}

; Function Attrs: nounwind uwtable
declare dso_local i32 @iirfilt_crcf_reset(ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local void @iirfilt_crcf_init(ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @iirfilt_crcf_set_scale(ptr noundef, float noundef) #3

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 }
attributes #5 = { 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 = !{!"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 28}
!12 = !{!"iirfilt_crcf_s", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !6, i64 40, !6, i64 48, !6, i64 56, !10, i64 64, !13, i64 68}
!13 = !{!"float", !7, i64 0}
!14 = !{!12, !10, i64 32}
!15 = !{!12, !10, i64 24}
!16 = !{!12, !10, i64 36}
!17 = !{!12, !6, i64 8}
!18 = !{!12, !6, i64 0}
!19 = !{!13, !13, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = !{!12, !6, i64 16}
!24 = !{!12, !6, i64 48}
!25 = !{!12, !6, i64 40}


; 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.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.89 = external hidden unnamed_addr constant [55 x i8], align 1

declare ptr @liquid_error_config_fl(ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @iirfilt_crcf_create(ptr nocapture noundef readonly %0, i32 noundef %1, ptr nocapture noundef readonly %2, i32 noundef %3) local_unnamed_addr #2 {
  %5 = icmp eq i32 %1, 0
  br i1 %5, label %6, label %8

6:                                                ; preds = %4
  %7 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str.87, i32 noundef 102, ptr noundef nonnull @.str.88, ptr noundef nonnull @.str.2) #4
  br label %56

8:                                                ; preds = %4
  %9 = icmp eq i32 %3, 0
  br i1 %9, label %10, label %12

10:                                               ; preds = %8
  %11 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str.87, i32 noundef 104, ptr noundef nonnull @.str.89, ptr noundef nonnull @.str.2) #4
  br label %56

12:                                               ; preds = %8
  %13 = tail call noalias dereferenceable_or_null(72) ptr @malloc(i64 noundef 72) #5
  tail call void @iirfilt_crcf_init(ptr noundef %13)
  %14 = getelementptr inbounds i8, ptr %13, i64 28
  store i32 %1, ptr %14, align 4, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %13, i64 32
  store i32 %3, ptr %15, align 8, !tbaa !12
  %. = tail call i32 @llvm.umax.i32(i32 %3, i32 %1)
  %16 = getelementptr inbounds i8, ptr %13, i64 24
  store i32 %., ptr %16, align 8, !tbaa !13
  %17 = getelementptr inbounds i8, ptr %13, i64 36
  store i32 0, ptr %17, align 4, !tbaa !14
  %18 = zext i32 %3 to i64
  %19 = shl nuw nsw i64 %18, 2
  %20 = tail call noalias ptr @malloc(i64 noundef %19) #5
  %21 = getelementptr inbounds i8, ptr %13, i64 8
  store ptr %20, ptr %21, align 8, !tbaa !15
  %22 = zext i32 %1 to i64
  %23 = shl nuw nsw i64 %22, 2
  %24 = tail call noalias ptr @malloc(i64 noundef %23) #5
  store ptr %24, ptr %13, align 8, !tbaa !16
  %25 = load float, ptr %2, align 4, !tbaa !17
  %min.iters.check = icmp ult i32 %1, 4
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %12
  %n.vec = and i64 %22, 4294967292
  %broadcast.splatinsert = insertelement <4 x float> poison, float %25, i64 0
  %broadcast.splat = shufflevector <4 x float> %broadcast.splatinsert, <4 x float> 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 ]
  %26 = getelementptr inbounds float, ptr %0, i64 %index
  %wide.load = load <4 x float>, ptr %26, align 4, !tbaa !17
  %27 = fdiv <4 x float> %wide.load, %broadcast.splat
  %28 = getelementptr inbounds float, ptr %24, i64 %index
  store <4 x float> %27, ptr %28, align 4, !tbaa !17
  %index.next = add nuw i64 %index, 4
  %29 = icmp eq i64 %index.next, %n.vec
  br i1 %29, label %middle.block, label %vector.body, !llvm.loop !18

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %22
  br i1 %cmp.n, label %.preheader.preheader, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %12
  %indvars.iv.ph = phi i64 [ 0, %12 ], [ %n.vec, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %30 = getelementptr inbounds float, ptr %0, i64 %indvars.iv
  %31 = load float, ptr %30, align 4, !tbaa !17
  %32 = fdiv float %31, %25
  %33 = getelementptr inbounds float, ptr %24, i64 %indvars.iv
  store float %32, ptr %33, align 4, !tbaa !17
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %22
  br i1 %exitcond.not, label %.preheader.preheader, label %scalar.ph, !llvm.loop !22

.preheader.preheader:                             ; preds = %scalar.ph, %middle.block
  %min.iters.check59 = icmp ult i32 %3, 4
  br i1 %min.iters.check59, label %.preheader.preheader71, label %vector.ph60

vector.ph60:                                      ; preds = %.preheader.preheader
  %n.vec62 = and i64 %18, 4294967292
  %broadcast.splatinsert67 = insertelement <4 x float> poison, float %25, i64 0
  %broadcast.splat68 = shufflevector <4 x float> %broadcast.splatinsert67, <4 x float> poison, <4 x i32> zeroinitializer
  br label %vector.body64

vector.body64:                                    ; preds = %vector.body64, %vector.ph60
  %index65 = phi i64 [ 0, %vector.ph60 ], [ %index.next69, %vector.body64 ]
  %34 = getelementptr inbounds float, ptr %2, i64 %index65
  %wide.load66 = load <4 x float>, ptr %34, align 4, !tbaa !17
  %35 = fdiv <4 x float> %wide.load66, %broadcast.splat68
  %36 = getelementptr inbounds float, ptr %20, i64 %index65
  store <4 x float> %35, ptr %36, align 4, !tbaa !17
  %index.next69 = add nuw i64 %index65, 4
  %37 = icmp eq i64 %index.next69, %n.vec62
  br i1 %37, label %middle.block57, label %vector.body64, !llvm.loop !23

middle.block57:                                   ; preds = %vector.body64
  %cmp.n70 = icmp eq i64 %n.vec62, %18
  br i1 %cmp.n70, label %.loopexit, label %.preheader.preheader71

.preheader.preheader71:                           ; preds = %middle.block57, %.preheader.preheader
  %indvars.iv52.ph = phi i64 [ 0, %.preheader.preheader ], [ %n.vec62, %middle.block57 ]
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader71, %.preheader
  %indvars.iv52 = phi i64 [ %indvars.iv.next53, %.preheader ], [ %indvars.iv52.ph, %.preheader.preheader71 ]
  %38 = getelementptr inbounds float, ptr %2, i64 %indvars.iv52
  %39 = load float, ptr %38, align 4, !tbaa !17
  %40 = fdiv float %39, %25
  %41 = getelementptr inbounds float, ptr %20, i64 %indvars.iv52
  store float %40, ptr %41, align 4, !tbaa !17
  %indvars.iv.next53 = add nuw nsw i64 %indvars.iv52, 1
  %exitcond56.not = icmp eq i64 %indvars.iv.next53, %18
  br i1 %exitcond56.not, label %.loopexit, label %.preheader, !llvm.loop !24

.loopexit:                                        ; preds = %.preheader, %middle.block57
  %42 = zext i32 %. to i64
  %43 = shl nuw nsw i64 %42, 3
  %44 = tail call noalias ptr @malloc(i64 noundef %43) #5
  %45 = getelementptr inbounds i8, ptr %13, i64 16
  store ptr %44, ptr %45, align 8, !tbaa !25
  %46 = getelementptr inbounds i8, ptr %20, i64 4
  %47 = add i32 %3, -1
  %48 = tail call ptr @dotprod_crcf_create(ptr noundef nonnull %46, i32 noundef %47) #4
  %49 = getelementptr inbounds i8, ptr %13, i64 48
  store ptr %48, ptr %49, align 8, !tbaa !26
  %50 = load ptr, ptr %13, align 8, !tbaa !16
  %51 = load i32, ptr %14, align 4, !tbaa !5
  %52 = tail call ptr @dotprod_crcf_create(ptr noundef %50, i32 noundef %51) #4
  %53 = getelementptr inbounds i8, ptr %13, i64 40
  store ptr %52, ptr %53, align 8, !tbaa !27
  %54 = tail call i32 @iirfilt_crcf_reset(ptr noundef nonnull %13)
  %55 = tail call i32 @iirfilt_crcf_set_scale(ptr noundef nonnull %13, float noundef 1.000000e+00)
  br label %56

56:                                               ; preds = %.loopexit, %10, %6
  %.045 = phi ptr [ %7, %6 ], [ %11, %10 ], [ %13, %.loopexit ]
  ret ptr %.045
}

; Function Attrs: nounwind uwtable
declare dso_local i32 @iirfilt_crcf_reset(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @iirfilt_crcf_init(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @iirfilt_crcf_set_scale(ptr noundef, float noundef) local_unnamed_addr #2

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

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 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind }
attributes #5 = { 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, !10, i64 28}
!6 = !{!"iirfilt_crcf_s", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !7, i64 40, !7, i64 48, !7, i64 56, !10, i64 64, !11, i64 68}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!6, !10, i64 32}
!13 = !{!6, !10, i64 24}
!14 = !{!6, !10, i64 36}
!15 = !{!6, !7, i64 8}
!16 = !{!6, !7, i64 0}
!17 = !{!11, !11, i64 0}
!18 = distinct !{!18, !19, !20, !21}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!"llvm.loop.isvectorized", i32 1}
!21 = !{!"llvm.loop.unroll.runtime.disable"}
!22 = distinct !{!22, !19, !21, !20}
!23 = distinct !{!23, !19, !20, !21}
!24 = distinct !{!24, !19, !21, !20}
!25 = !{!6, !7, i64 16}
!26 = !{!6, !7, i64 48}
!27 = !{!6, !7, i64 40}


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