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

@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.149 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.150 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.151 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.152 = external hidden unnamed_addr constant [59 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

declare ptr @windowcf_create(i32 noundef) #0

; 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: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

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

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

16:                                               ; preds = %3
  %17 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str.149, i32 noundef 70, ptr noundef @.str.150, ptr noundef @.str.2)
  store ptr %17, ptr %4, align 8
  br label %190

18:                                               ; preds = %3
  %19 = load float, ptr %6, align 4, !tbaa !9
  %20 = fcmp olt float %19, -5.000000e-01
  br i1 %20, label %24, label %21

21:                                               ; preds = %18
  %22 = load float, ptr %6, align 4, !tbaa !9
  %23 = fcmp ogt float %22, 5.000000e-01
  br i1 %23, label %24, label %28

24:                                               ; preds = %21, %18
  %25 = load float, ptr %6, align 4, !tbaa !9
  %26 = fpext float %25 to double
  %27 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str.149, i32 noundef 72, ptr noundef @.str.151, ptr noundef @.str.2, double noundef %26)
  store ptr %27, ptr %4, align 8
  br label %190

28:                                               ; preds = %21
  %29 = load float, ptr %7, align 4, !tbaa !9
  %30 = fcmp olt float %29, 0.000000e+00
  br i1 %30, label %31, label %35

31:                                               ; preds = %28
  %32 = load float, ptr %7, align 4, !tbaa !9
  %33 = fpext float %32 to double
  %34 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str.149, i32 noundef 74, ptr noundef @.str.152, ptr noundef @.str.2, double noundef %33)
  store ptr %34, ptr %4, align 8
  br label %190

35:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %36 = call noalias ptr @malloc(i64 noundef 72) #7
  store ptr %36, ptr %8, align 8, !tbaa !11
  %37 = load i32, ptr %5, align 4, !tbaa !5
  %38 = load ptr, ptr %8, align 8, !tbaa !11
  %39 = getelementptr inbounds %struct.resamp2_crcf_s, ptr %38, i32 0, i32 1
  store i32 %37, ptr %39, align 8, !tbaa !13
  %40 = load float, ptr %6, align 4, !tbaa !9
  %41 = load ptr, ptr %8, align 8, !tbaa !11
  %42 = getelementptr inbounds %struct.resamp2_crcf_s, ptr %41, i32 0, i32 3
  store float %40, ptr %42, align 8, !tbaa !15
  %43 = load float, ptr %7, align 4, !tbaa !9
  %44 = load ptr, ptr %8, align 8, !tbaa !11
  %45 = getelementptr inbounds %struct.resamp2_crcf_s, ptr %44, i32 0, i32 4
  store float %43, ptr %45, align 4, !tbaa !16
  %46 = load ptr, ptr %8, align 8, !tbaa !11
  %47 = getelementptr inbounds %struct.resamp2_crcf_s, ptr %46, i32 0, i32 1
  %48 = load i32, ptr %47, align 8, !tbaa !13
  %49 = mul i32 4, %48
  %50 = add i32 %49, 1
  %51 = load ptr, ptr %8, align 8, !tbaa !11
  %52 = getelementptr inbounds %struct.resamp2_crcf_s, ptr %51, i32 0, i32 2
  store i32 %50, ptr %52, align 4, !tbaa !17
  %53 = load ptr, ptr %8, align 8, !tbaa !11
  %54 = getelementptr inbounds %struct.resamp2_crcf_s, ptr %53, i32 0, i32 2
  %55 = load i32, ptr %54, align 4, !tbaa !17
  %56 = zext i32 %55 to i64
  %57 = mul i64 %56, 4
  %58 = call noalias ptr @malloc(i64 noundef %57) #7
  %59 = load ptr, ptr %8, align 8, !tbaa !11
  %60 = getelementptr inbounds %struct.resamp2_crcf_s, ptr %59, i32 0, i32 0
  store ptr %58, ptr %60, align 8, !tbaa !18
  %61 = load ptr, ptr %8, align 8, !tbaa !11
  %62 = getelementptr inbounds %struct.resamp2_crcf_s, ptr %61, i32 0, i32 1
  %63 = load i32, ptr %62, align 8, !tbaa !13
  %64 = mul i32 2, %63
  %65 = load ptr, ptr %8, align 8, !tbaa !11
  %66 = getelementptr inbounds %struct.resamp2_crcf_s, ptr %65, i32 0, i32 7
  store i32 %64, ptr %66, align 8, !tbaa !19
  %67 = load ptr, ptr %8, align 8, !tbaa !11
  %68 = getelementptr inbounds %struct.resamp2_crcf_s, ptr %67, i32 0, i32 7
  %69 = load i32, ptr %68, align 8, !tbaa !19
  %70 = zext i32 %69 to i64
  %71 = mul i64 %70, 4
  %72 = call noalias ptr @malloc(i64 noundef %71) #7
  %73 = load ptr, ptr %8, align 8, !tbaa !11
  %74 = getelementptr inbounds %struct.resamp2_crcf_s, ptr %73, i32 0, i32 5
  store ptr %72, ptr %74, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %75 = load ptr, ptr %8, align 8, !tbaa !11
  %76 = getelementptr inbounds %struct.resamp2_crcf_s, ptr %75, i32 0, i32 2
  %77 = load i32, ptr %76, align 4, !tbaa !17
  %78 = zext i32 %77 to i64
  %79 = call ptr @llvm.stacksave.p0()
  store ptr %79, ptr %10, align 8
  %80 = alloca float, i64 %78, align 16
  store i64 %78, ptr %11, align 8
  %81 = load ptr, ptr %8, align 8, !tbaa !11
  %82 = getelementptr inbounds %struct.resamp2_crcf_s, ptr %81, i32 0, i32 1
  %83 = load i32, ptr %82, align 8, !tbaa !13
  %84 = load ptr, ptr %8, align 8, !tbaa !11
  %85 = getelementptr inbounds %struct.resamp2_crcf_s, ptr %84, i32 0, i32 4
  %86 = load float, ptr %85, align 4, !tbaa !16
  %87 = call i32 @liquid_firdespm_halfband_as(i32 noundef %83, float noundef %86, ptr noundef %80)
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %126, %35
  %89 = load i32, ptr %9, align 4, !tbaa !5
  %90 = load ptr, ptr %8, align 8, !tbaa !11
  %91 = getelementptr inbounds %struct.resamp2_crcf_s, ptr %90, i32 0, i32 2
  %92 = load i32, ptr %91, align 4, !tbaa !17
  %93 = icmp ult i32 %89, %92
  br i1 %93, label %94, label %129

94:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %95 = load i32, ptr %9, align 4, !tbaa !5
  %96 = uitofp i32 %95 to float
  %97 = load ptr, ptr %8, align 8, !tbaa !11
  %98 = getelementptr inbounds %struct.resamp2_crcf_s, ptr %97, i32 0, i32 2
  %99 = load i32, ptr %98, align 4, !tbaa !17
  %100 = sub i32 %99, 1
  %101 = uitofp i32 %100 to float
  %102 = fdiv float %101, 2.000000e+00
  %103 = fsub float %96, %102
  store float %103, ptr %12, align 4, !tbaa !9
  %104 = load i32, ptr %9, align 4, !tbaa !5
  %105 = zext i32 %104 to i64
  %106 = getelementptr inbounds float, ptr %80, i64 %105
  %107 = load float, ptr %106, align 4, !tbaa !9
  %108 = fmul float 2.000000e+00, %107
  %109 = load float, ptr %12, align 4, !tbaa !9
  %110 = fpext float %109 to double
  %111 = fmul double 0x401921FB54442D18, %110
  %112 = load ptr, ptr %8, align 8, !tbaa !11
  %113 = getelementptr inbounds %struct.resamp2_crcf_s, ptr %112, i32 0, i32 3
  %114 = load float, ptr %113, align 8, !tbaa !15
  %115 = fpext float %114 to double
  %116 = fmul double %111, %115
  %117 = fptrunc double %116 to float
  %118 = call float @cosf(float noundef %117) #6
  %119 = fmul float %108, %118
  %120 = load ptr, ptr %8, align 8, !tbaa !11
  %121 = getelementptr inbounds %struct.resamp2_crcf_s, ptr %120, i32 0, i32 0
  %122 = load ptr, ptr %121, align 8, !tbaa !18
  %123 = load i32, ptr %9, align 4, !tbaa !5
  %124 = zext i32 %123 to i64
  %125 = getelementptr inbounds float, ptr %122, i64 %124
  store float %119, ptr %125, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %126

126:                                              ; preds = %94
  %127 = load i32, ptr %9, align 4, !tbaa !5
  %128 = add i32 %127, 1
  store i32 %128, ptr %9, align 4, !tbaa !5
  br label %88, !llvm.loop !21

129:                                              ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !5
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %130

130:                                              ; preds = %156, %129
  %131 = load i32, ptr %9, align 4, !tbaa !5
  %132 = load ptr, ptr %8, align 8, !tbaa !11
  %133 = getelementptr inbounds %struct.resamp2_crcf_s, ptr %132, i32 0, i32 2
  %134 = load i32, ptr %133, align 4, !tbaa !17
  %135 = icmp ult i32 %131, %134
  br i1 %135, label %136, label %159

136:                                              ; preds = %130
  %137 = load ptr, ptr %8, align 8, !tbaa !11
  %138 = getelementptr inbounds %struct.resamp2_crcf_s, ptr %137, i32 0, i32 0
  %139 = load ptr, ptr %138, align 8, !tbaa !18
  %140 = load ptr, ptr %8, align 8, !tbaa !11
  %141 = getelementptr inbounds %struct.resamp2_crcf_s, ptr %140, i32 0, i32 2
  %142 = load i32, ptr %141, align 4, !tbaa !17
  %143 = load i32, ptr %9, align 4, !tbaa !5
  %144 = sub i32 %142, %143
  %145 = sub i32 %144, 1
  %146 = zext i32 %145 to i64
  %147 = getelementptr inbounds float, ptr %139, i64 %146
  %148 = load float, ptr %147, align 4, !tbaa !9
  %149 = load ptr, ptr %8, align 8, !tbaa !11
  %150 = getelementptr inbounds %struct.resamp2_crcf_s, ptr %149, i32 0, i32 5
  %151 = load ptr, ptr %150, align 8, !tbaa !20
  %152 = load i32, ptr %13, align 4, !tbaa !5
  %153 = add i32 %152, 1
  store i32 %153, ptr %13, align 4, !tbaa !5
  %154 = zext i32 %152 to i64
  %155 = getelementptr inbounds float, ptr %151, i64 %154
  store float %148, ptr %155, align 4, !tbaa !9
  br label %156

156:                                              ; preds = %136
  %157 = load i32, ptr %9, align 4, !tbaa !5
  %158 = add i32 %157, 2
  store i32 %158, ptr %9, align 4, !tbaa !5
  br label %130, !llvm.loop !23

159:                                              ; preds = %130
  %160 = load ptr, ptr %8, align 8, !tbaa !11
  %161 = getelementptr inbounds %struct.resamp2_crcf_s, ptr %160, i32 0, i32 5
  %162 = load ptr, ptr %161, align 8, !tbaa !20
  %163 = load ptr, ptr %8, align 8, !tbaa !11
  %164 = getelementptr inbounds %struct.resamp2_crcf_s, ptr %163, i32 0, i32 1
  %165 = load i32, ptr %164, align 8, !tbaa !13
  %166 = mul i32 2, %165
  %167 = call ptr @dotprod_crcf_create(ptr noundef %162, i32 noundef %166)
  %168 = load ptr, ptr %8, align 8, !tbaa !11
  %169 = getelementptr inbounds %struct.resamp2_crcf_s, ptr %168, i32 0, i32 6
  store ptr %167, ptr %169, align 8, !tbaa !24
  %170 = load ptr, ptr %8, align 8, !tbaa !11
  %171 = getelementptr inbounds %struct.resamp2_crcf_s, ptr %170, i32 0, i32 1
  %172 = load i32, ptr %171, align 8, !tbaa !13
  %173 = mul i32 2, %172
  %174 = call ptr @windowcf_create(i32 noundef %173)
  %175 = load ptr, ptr %8, align 8, !tbaa !11
  %176 = getelementptr inbounds %struct.resamp2_crcf_s, ptr %175, i32 0, i32 8
  store ptr %174, ptr %176, align 8, !tbaa !25
  %177 = load ptr, ptr %8, align 8, !tbaa !11
  %178 = getelementptr inbounds %struct.resamp2_crcf_s, ptr %177, i32 0, i32 1
  %179 = load i32, ptr %178, align 8, !tbaa !13
  %180 = mul i32 2, %179
  %181 = call ptr @windowcf_create(i32 noundef %180)
  %182 = load ptr, ptr %8, align 8, !tbaa !11
  %183 = getelementptr inbounds %struct.resamp2_crcf_s, ptr %182, i32 0, i32 9
  store ptr %181, ptr %183, align 8, !tbaa !26
  %184 = load ptr, ptr %8, align 8, !tbaa !11
  %185 = call i32 @resamp2_crcf_reset(ptr noundef %184)
  %186 = load ptr, ptr %8, align 8, !tbaa !11
  %187 = call i32 @resamp2_crcf_set_scale(ptr noundef %186, float noundef 1.000000e+00)
  %188 = load ptr, ptr %8, align 8, !tbaa !11
  store ptr %188, ptr %4, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  %189 = load ptr, ptr %10, align 8
  call void @llvm.stackrestore.p0(ptr %189)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %190

190:                                              ; preds = %159, %31, %24, %16
  %191 = load ptr, ptr %4, align 8
  ret ptr %191
}

; Function Attrs: nounwind uwtable
declare dso_local i32 @resamp2_crcf_reset(ptr noundef) #4

declare i32 @liquid_firdespm_halfband_as(i32 noundef, float noundef, ptr noundef) #0

; Function Attrs: nounwind
declare float @cosf(float noundef) #5

; Function Attrs: nounwind uwtable
declare dso_local i32 @resamp2_crcf_set_scale(ptr noundef, float noundef) #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 = { 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 = { nocallback nofree nosync nounwind willreturn }
attributes #4 = { 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { 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 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !6, i64 8}
!14 = !{!"resamp2_crcf_s", !12, i64 0, !6, i64 8, !6, i64 12, !10, i64 16, !10, i64 20, !12, i64 24, !12, i64 32, !6, i64 40, !12, i64 48, !12, i64 56, !10, i64 64, !6, i64 68}
!15 = !{!14, !10, i64 16}
!16 = !{!14, !10, i64 20}
!17 = !{!14, !6, i64 12}
!18 = !{!14, !12, i64 0}
!19 = !{!14, !6, i64 40}
!20 = !{!14, !12, i64 24}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = !{!14, !12, i64 32}
!25 = !{!14, !12, i64 48}
!26 = !{!14, !12, i64 56}


; 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.149 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.150 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.151 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.152 = external hidden unnamed_addr constant [59 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 @windowcf_create(i32 noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @resamp2_crcf_create(i32 noundef %0, float noundef %1, float noundef %2) local_unnamed_addr #3 {
  %4 = icmp ult i32 %0, 2
  br i1 %4, label %5, label %7

5:                                                ; preds = %3
  %6 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str.149, i32 noundef 70, ptr noundef nonnull @.str.150, ptr noundef nonnull @.str.2) #6
  br label %104

7:                                                ; preds = %3
  %8 = tail call float @llvm.fabs.f32(float %1)
  %or.cond = fcmp ogt float %8, 5.000000e-01
  br i1 %or.cond, label %9, label %12

9:                                                ; preds = %7
  %10 = fpext float %1 to double
  %11 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str.149, i32 noundef 72, ptr noundef nonnull @.str.151, ptr noundef nonnull @.str.2, double noundef %10) #6
  br label %104

12:                                               ; preds = %7
  %13 = fcmp olt float %2, 0.000000e+00
  br i1 %13, label %14, label %.lr.ph.preheader

14:                                               ; preds = %12
  %15 = fpext float %2 to double
  %16 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str.149, i32 noundef 74, ptr noundef nonnull @.str.152, ptr noundef nonnull @.str.2, double noundef %15) #6
  br label %104

.lr.ph.preheader:                                 ; preds = %12
  %17 = tail call noalias dereferenceable_or_null(72) ptr @malloc(i64 noundef 72) #7
  %18 = getelementptr inbounds i8, ptr %17, i64 8
  store i32 %0, ptr %18, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %17, i64 16
  store float %1, ptr %19, align 8, !tbaa !12
  %20 = getelementptr inbounds i8, ptr %17, i64 20
  store float %2, ptr %20, align 4, !tbaa !13
  %21 = shl i32 %0, 2
  %22 = or disjoint i32 %21, 1
  %23 = getelementptr inbounds i8, ptr %17, i64 12
  store i32 %22, ptr %23, align 4, !tbaa !14
  %24 = zext i32 %22 to i64
  %25 = shl nuw nsw i64 %24, 2
  %26 = tail call noalias ptr @malloc(i64 noundef %25) #7
  store ptr %26, ptr %17, align 8, !tbaa !15
  %27 = shl i32 %0, 1
  %28 = getelementptr inbounds i8, ptr %17, i64 40
  store i32 %27, ptr %28, align 8, !tbaa !16
  %29 = zext i32 %27 to i64
  %30 = shl nuw nsw i64 %29, 2
  %31 = tail call noalias ptr @malloc(i64 noundef %30) #7
  %32 = getelementptr inbounds i8, ptr %17, i64 24
  store ptr %31, ptr %32, align 8, !tbaa !17
  %33 = tail call ptr @llvm.stacksave.p0()
  %34 = alloca float, i64 %24, align 16
  %35 = call i32 @liquid_firdespm_halfband_as(i32 noundef %0, float noundef %2, ptr noundef nonnull %34) #6
  %36 = uitofp i32 %21 to float
  %37 = fmul float %36, 5.000000e-01
  %38 = fpext float %1 to double
  %39 = icmp eq i32 %21, 0
  br i1 %39, label %.lr.ph.epil, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = zext i32 %21 to i64
  br label %.lr.ph

.lr.ph.epil:                                      ; preds = %.lr.ph, %.lr.ph.preheader
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.1, %.lr.ph ]
  %40 = trunc nuw i64 %indvars.iv.unr to i32
  %41 = uitofp i32 %40 to float
  %42 = fsub float %41, %37
  %43 = getelementptr inbounds float, ptr %34, i64 %indvars.iv.unr
  %44 = load float, ptr %43, align 4, !tbaa !18
  %45 = fmul float %44, 2.000000e+00
  %46 = fpext float %42 to double
  %47 = fmul double %46, 0x401921FB54442D18
  %48 = fmul double %47, %38
  %49 = fptrunc double %48 to float
  %50 = call float @cosf(float noundef %49) #6
  %51 = fmul float %45, %50
  %52 = getelementptr inbounds float, ptr %26, i64 %indvars.iv.unr
  store float %51, ptr %52, align 4, !tbaa !18
  %.not = icmp eq i32 %21, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph64.new

.lr.ph64.new:                                     ; preds = %.lr.ph.epil
  %53 = add i32 %21, -1
  %54 = lshr i32 %53, 1
  %55 = add nuw i32 %54, 1
  %wide.trip.count = zext i32 %55 to i64
  br label %82

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.1, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.1, %.lr.ph ]
  %56 = trunc nuw i64 %indvars.iv to i32
  %57 = uitofp i32 %56 to float
  %58 = fsub float %57, %37
  %59 = getelementptr inbounds float, ptr %34, i64 %indvars.iv
  %60 = load float, ptr %59, align 8, !tbaa !18
  %61 = fmul float %60, 2.000000e+00
  %62 = fpext float %58 to double
  %63 = fmul double %62, 0x401921FB54442D18
  %64 = fmul double %63, %38
  %65 = fptrunc double %64 to float
  %66 = call float @cosf(float noundef %65) #6
  %67 = fmul float %61, %66
  %68 = getelementptr inbounds float, ptr %26, i64 %indvars.iv
  store float %67, ptr %68, align 4, !tbaa !18
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %69 = trunc nuw i64 %indvars.iv.next to i32
  %70 = uitofp i32 %69 to float
  %71 = fsub float %70, %37
  %72 = getelementptr inbounds float, ptr %34, i64 %indvars.iv.next
  %73 = load float, ptr %72, align 4, !tbaa !18
  %74 = fmul float %73, 2.000000e+00
  %75 = fpext float %71 to double
  %76 = fmul double %75, 0x401921FB54442D18
  %77 = fmul double %76, %38
  %78 = fptrunc double %77 to float
  %79 = call float @cosf(float noundef %78) #6
  %80 = fmul float %74, %79
  %81 = getelementptr inbounds float, ptr %26, i64 %indvars.iv.next
  store float %80, ptr %81, align 4, !tbaa !18
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1.not = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1.not, label %.lr.ph.epil, label %.lr.ph, !llvm.loop !19

82:                                               ; preds = %82, %.lr.ph64.new
  %indvars.iv69 = phi i64 [ 1, %.lr.ph64.new ], [ %indvars.iv.next70.1, %82 ]
  %indvars.iv67 = phi i64 [ 0, %.lr.ph64.new ], [ %indvars.iv.next68.1, %82 ]
  %niter77 = phi i64 [ 0, %.lr.ph64.new ], [ %niter77.next.1, %82 ]
  %83 = trunc nuw i64 %indvars.iv69 to i32
  %84 = xor i32 %83, -1
  %85 = add i32 %22, %84
  %86 = zext i32 %85 to i64
  %87 = getelementptr inbounds float, ptr %26, i64 %86
  %88 = load float, ptr %87, align 4, !tbaa !18
  %indvars.iv.next68 = or disjoint i64 %indvars.iv67, 1
  %89 = getelementptr inbounds float, ptr %31, i64 %indvars.iv67
  store float %88, ptr %89, align 4, !tbaa !18
  %90 = trunc i64 %indvars.iv69 to i32
  %reass.sub = sub i32 %22, %90
  %91 = add i32 %reass.sub, -3
  %92 = zext i32 %91 to i64
  %93 = getelementptr inbounds float, ptr %26, i64 %92
  %94 = load float, ptr %93, align 4, !tbaa !18
  %indvars.iv.next68.1 = add nuw nsw i64 %indvars.iv67, 2
  %95 = getelementptr inbounds float, ptr %31, i64 %indvars.iv.next68
  store float %94, ptr %95, align 4, !tbaa !18
  %indvars.iv.next70.1 = add nuw nsw i64 %indvars.iv69, 4
  %niter77.next.1 = add i64 %niter77, 2
  %niter77.ncmp.1 = icmp eq i64 %niter77.next.1, %wide.trip.count
  br i1 %niter77.ncmp.1, label %._crit_edge, label %82, !llvm.loop !21

._crit_edge:                                      ; preds = %82, %.lr.ph.epil
  %96 = call ptr @dotprod_crcf_create(ptr noundef %31, i32 noundef %27) #6
  %97 = getelementptr inbounds i8, ptr %17, i64 32
  store ptr %96, ptr %97, align 8, !tbaa !22
  %98 = call ptr @windowcf_create(i32 noundef %27) #6
  %99 = getelementptr inbounds i8, ptr %17, i64 48
  store ptr %98, ptr %99, align 8, !tbaa !23
  %100 = call ptr @windowcf_create(i32 noundef %27) #6
  %101 = getelementptr inbounds i8, ptr %17, i64 56
  store ptr %100, ptr %101, align 8, !tbaa !24
  %102 = call i32 @resamp2_crcf_reset(ptr noundef nonnull %17)
  %103 = call i32 @resamp2_crcf_set_scale(ptr noundef nonnull %17, float noundef 1.000000e+00)
  call void @llvm.stackrestore.p0(ptr %33)
  br label %104

104:                                              ; preds = %._crit_edge, %14, %9, %5
  %.053 = phi ptr [ %6, %5 ], [ %11, %9 ], [ %16, %14 ], [ %17, %._crit_edge ]
  ret ptr %.053
}

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

declare i32 @liquid_firdespm_halfband_as(i32 noundef, float noundef, ptr noundef) local_unnamed_addr #0

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fabs.f32(float) #5

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 = { mustprogress nocallback nofree nosync nounwind willreturn }
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 = { 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { 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 8}
!6 = !{!"resamp2_crcf_s", !7, i64 0, !10, i64 8, !10, i64 12, !11, i64 16, !11, i64 20, !7, i64 24, !7, i64 32, !10, i64 40, !7, i64 48, !7, i64 56, !11, i64 64, !10, 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, !11, i64 16}
!13 = !{!6, !11, i64 20}
!14 = !{!6, !10, i64 12}
!15 = !{!6, !7, i64 0}
!16 = !{!6, !10, i64 40}
!17 = !{!6, !7, i64 24}
!18 = !{!11, !11, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = !{!6, !7, i64 32}
!23 = !{!6, !7, i64 48}
!24 = !{!6, !7, i64 56}


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