; LLVM IR from jgaeddert/liquid-dsp :: src/multichannel/src (firpfbch_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.firpfbch2_crcf_s = type { i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, i32 }

@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [61 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
declare ptr @llvm.stacksave.p0() #3

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

declare ptr @windowcf_create(i32 noundef) #0

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

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

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

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

18:                                               ; preds = %4
  %19 = load i32, ptr %6, align 4, !tbaa !5
  %20 = icmp ne i32 %19, 1
  br i1 %20, label %21, label %24

21:                                               ; preds = %18
  %22 = load i32, ptr %6, align 4, !tbaa !5
  %23 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str.15, i32 noundef 75, ptr noundef @.str.16, ptr noundef @.str.2, i32 noundef %22)
  store ptr %23, ptr %5, align 8
  br label %201

24:                                               ; preds = %18, %4
  %25 = load i32, ptr %7, align 4, !tbaa !5
  %26 = icmp ult i32 %25, 2
  br i1 %26, label %31, label %27

27:                                               ; preds = %24
  %28 = load i32, ptr %7, align 4, !tbaa !5
  %29 = urem i32 %28, 2
  %30 = icmp ne i32 %29, 0
  br i1 %30, label %31, label %33

31:                                               ; preds = %27, %24
  %32 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str.15, i32 noundef 77, ptr noundef @.str.17, ptr noundef @.str.2)
  store ptr %32, ptr %5, align 8
  br label %201

33:                                               ; preds = %27
  %34 = load i32, ptr %8, align 4, !tbaa !5
  %35 = icmp ult i32 %34, 1
  br i1 %35, label %36, label %38

36:                                               ; preds = %33
  %37 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str.15, i32 noundef 79, ptr noundef @.str.18, ptr noundef @.str.2)
  store ptr %37, ptr %5, align 8
  br label %201

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

81:                                               ; preds = %122, %38
  %82 = load i32, ptr %11, align 4, !tbaa !5
  %83 = load ptr, ptr %10, align 8, !tbaa !9
  %84 = getelementptr inbounds %struct.firpfbch2_crcf_s, ptr %83, i32 0, i32 1
  %85 = load i32, ptr %84, align 4, !tbaa !13
  %86 = icmp ult i32 %82, %85
  br i1 %86, label %87, label %125

87:                                               ; preds = %81
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %110, %87
  %89 = load i32, ptr %12, align 4, !tbaa !5
  %90 = load i32, ptr %13, align 4, !tbaa !5
  %91 = icmp ult i32 %89, %90
  br i1 %91, label %92, label %113

92:                                               ; preds = %88
  %93 = load ptr, ptr %9, align 8, !tbaa !9
  %94 = load i32, ptr %11, align 4, !tbaa !5
  %95 = load i32, ptr %12, align 4, !tbaa !5
  %96 = load ptr, ptr %10, align 8, !tbaa !9
  %97 = getelementptr inbounds %struct.firpfbch2_crcf_s, ptr %96, i32 0, i32 1
  %98 = load i32, ptr %97, align 4, !tbaa !13
  %99 = mul i32 %95, %98
  %100 = add i32 %94, %99
  %101 = zext i32 %100 to i64
  %102 = getelementptr inbounds float, ptr %93, i64 %101
  %103 = load float, ptr %102, align 4, !tbaa !18
  %104 = load i32, ptr %13, align 4, !tbaa !5
  %105 = load i32, ptr %12, align 4, !tbaa !5
  %106 = sub i32 %104, %105
  %107 = sub i32 %106, 1
  %108 = zext i32 %107 to i64
  %109 = getelementptr inbounds float, ptr %80, i64 %108
  store float %103, ptr %109, align 4, !tbaa !18
  br label %110

110:                                              ; preds = %92
  %111 = load i32, ptr %12, align 4, !tbaa !5
  %112 = add i32 %111, 1
  store i32 %112, ptr %12, align 4, !tbaa !5
  br label %88, !llvm.loop !20

113:                                              ; preds = %88
  %114 = load i32, ptr %13, align 4, !tbaa !5
  %115 = call ptr @dotprod_crcf_create(ptr noundef %80, i32 noundef %114)
  %116 = load ptr, ptr %10, align 8, !tbaa !9
  %117 = getelementptr inbounds %struct.firpfbch2_crcf_s, ptr %116, i32 0, i32 5
  %118 = load ptr, ptr %117, align 8, !tbaa !17
  %119 = load i32, ptr %11, align 4, !tbaa !5
  %120 = zext i32 %119 to i64
  %121 = getelementptr inbounds ptr, ptr %118, i64 %120
  store ptr %115, ptr %121, align 8, !tbaa !9
  br label %122

122:                                              ; preds = %113
  %123 = load i32, ptr %11, align 4, !tbaa !5
  %124 = add i32 %123, 1
  store i32 %124, ptr %11, align 4, !tbaa !5
  br label %81, !llvm.loop !22

125:                                              ; preds = %81
  %126 = load ptr, ptr %10, align 8, !tbaa !9
  %127 = getelementptr inbounds %struct.firpfbch2_crcf_s, ptr %126, i32 0, i32 1
  %128 = load i32, ptr %127, align 4, !tbaa !13
  %129 = zext i32 %128 to i64
  %130 = mul i64 %129, 8
  %131 = call noalias ptr @malloc(i64 noundef %130) #6
  %132 = load ptr, ptr %10, align 8, !tbaa !9
  %133 = getelementptr inbounds %struct.firpfbch2_crcf_s, ptr %132, i32 0, i32 7
  store ptr %131, ptr %133, align 8, !tbaa !23
  %134 = load ptr, ptr %10, align 8, !tbaa !9
  %135 = getelementptr inbounds %struct.firpfbch2_crcf_s, ptr %134, i32 0, i32 1
  %136 = load i32, ptr %135, align 4, !tbaa !13
  %137 = zext i32 %136 to i64
  %138 = mul i64 %137, 8
  %139 = call noalias ptr @malloc(i64 noundef %138) #6
  %140 = load ptr, ptr %10, align 8, !tbaa !9
  %141 = getelementptr inbounds %struct.firpfbch2_crcf_s, ptr %140, i32 0, i32 8
  store ptr %139, ptr %141, align 8, !tbaa !24
  %142 = load ptr, ptr %10, align 8, !tbaa !9
  %143 = getelementptr inbounds %struct.firpfbch2_crcf_s, ptr %142, i32 0, i32 1
  %144 = load i32, ptr %143, align 4, !tbaa !13
  %145 = load ptr, ptr %10, align 8, !tbaa !9
  %146 = getelementptr inbounds %struct.firpfbch2_crcf_s, ptr %145, i32 0, i32 7
  %147 = load ptr, ptr %146, align 8, !tbaa !23
  %148 = load ptr, ptr %10, align 8, !tbaa !9
  %149 = getelementptr inbounds %struct.firpfbch2_crcf_s, ptr %148, i32 0, i32 8
  %150 = load ptr, ptr %149, align 8, !tbaa !24
  %151 = call ptr @fft_create_plan(i32 noundef %144, ptr noundef %147, ptr noundef %150, i32 noundef -1, i32 noundef 0)
  %152 = load ptr, ptr %10, align 8, !tbaa !9
  %153 = getelementptr inbounds %struct.firpfbch2_crcf_s, ptr %152, i32 0, i32 6
  store ptr %151, ptr %153, align 8, !tbaa !25
  %154 = load ptr, ptr %10, align 8, !tbaa !9
  %155 = getelementptr inbounds %struct.firpfbch2_crcf_s, ptr %154, i32 0, i32 1
  %156 = load i32, ptr %155, align 4, !tbaa !13
  %157 = zext i32 %156 to i64
  %158 = mul i64 %157, 8
  %159 = call noalias ptr @malloc(i64 noundef %158) #6
  %160 = load ptr, ptr %10, align 8, !tbaa !9
  %161 = getelementptr inbounds %struct.firpfbch2_crcf_s, ptr %160, i32 0, i32 9
  store ptr %159, ptr %161, align 8, !tbaa !26
  %162 = load ptr, ptr %10, align 8, !tbaa !9
  %163 = getelementptr inbounds %struct.firpfbch2_crcf_s, ptr %162, i32 0, i32 1
  %164 = load i32, ptr %163, align 4, !tbaa !13
  %165 = zext i32 %164 to i64
  %166 = mul i64 %165, 8
  %167 = call noalias ptr @malloc(i64 noundef %166) #6
  %168 = load ptr, ptr %10, align 8, !tbaa !9
  %169 = getelementptr inbounds %struct.firpfbch2_crcf_s, ptr %168, i32 0, i32 10
  store ptr %167, ptr %169, align 8, !tbaa !27
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %170

170:                                              ; preds = %193, %125
  %171 = load i32, ptr %11, align 4, !tbaa !5
  %172 = load ptr, ptr %10, align 8, !tbaa !9
  %173 = getelementptr inbounds %struct.firpfbch2_crcf_s, ptr %172, i32 0, i32 1
  %174 = load i32, ptr %173, align 4, !tbaa !13
  %175 = icmp ult i32 %171, %174
  br i1 %175, label %176, label %196

176:                                              ; preds = %170
  %177 = load i32, ptr %13, align 4, !tbaa !5
  %178 = call ptr @windowcf_create(i32 noundef %177)
  %179 = load ptr, ptr %10, align 8, !tbaa !9
  %180 = getelementptr inbounds %struct.firpfbch2_crcf_s, ptr %179, i32 0, i32 9
  %181 = load ptr, ptr %180, align 8, !tbaa !26
  %182 = load i32, ptr %11, align 4, !tbaa !5
  %183 = zext i32 %182 to i64
  %184 = getelementptr inbounds ptr, ptr %181, i64 %183
  store ptr %178, ptr %184, align 8, !tbaa !9
  %185 = load i32, ptr %13, align 4, !tbaa !5
  %186 = call ptr @windowcf_create(i32 noundef %185)
  %187 = load ptr, ptr %10, align 8, !tbaa !9
  %188 = getelementptr inbounds %struct.firpfbch2_crcf_s, ptr %187, i32 0, i32 10
  %189 = load ptr, ptr %188, align 8, !tbaa !27
  %190 = load i32, ptr %11, align 4, !tbaa !5
  %191 = zext i32 %190 to i64
  %192 = getelementptr inbounds ptr, ptr %189, i64 %191
  store ptr %186, ptr %192, align 8, !tbaa !9
  br label %193

193:                                              ; preds = %176
  %194 = load i32, ptr %11, align 4, !tbaa !5
  %195 = add i32 %194, 1
  store i32 %195, ptr %11, align 4, !tbaa !5
  br label %170, !llvm.loop !28

196:                                              ; preds = %170
  %197 = load ptr, ptr %10, align 8, !tbaa !9
  %198 = call i32 @firpfbch2_crcf_reset(ptr noundef %197)
  %199 = load ptr, ptr %10, align 8, !tbaa !9
  store ptr %199, ptr %5, align 8
  %200 = load ptr, ptr %14, align 8
  call void @llvm.stackrestore.p0(ptr %200)
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %201

201:                                              ; preds = %196, %36, %31, %21
  %202 = load ptr, ptr %5, align 8
  ret ptr %202
}

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


; 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.15 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [61 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

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

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

declare ptr @windowcf_create(i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @firpfbch2_crcf_create(i32 noundef %0, i32 noundef %1, i32 noundef %2, ptr nocapture noundef readonly %3) local_unnamed_addr #3 {
  %or.cond = icmp ugt i32 %0, 1
  br i1 %or.cond, label %5, label %7

5:                                                ; preds = %4
  %6 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str.15, i32 noundef 75, ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.2, i32 noundef %0) #4
  br label %100

7:                                                ; preds = %4
  %8 = icmp ugt i32 %1, 1
  %9 = and i32 %1, 1
  %.not = icmp eq i32 %9, 0
  %or.cond69 = and i1 %8, %.not
  br i1 %or.cond69, label %12, label %10

10:                                               ; preds = %7
  %11 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str.15, i32 noundef 77, ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.2) #4
  br label %100

12:                                               ; preds = %7
  %13 = icmp eq i32 %2, 0
  br i1 %13, label %14, label %.preheader.lr.ph

14:                                               ; preds = %12
  %15 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str.15, i32 noundef 79, ptr noundef nonnull @.str.18, ptr noundef nonnull @.str.2) #4
  br label %100

.preheader.lr.ph:                                 ; preds = %12
  %16 = tail call noalias dereferenceable_or_null(80) ptr @malloc(i64 noundef 80) #5
  store i32 %0, ptr %16, align 8, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %16, i64 4
  store i32 %1, ptr %17, align 4, !tbaa !11
  %18 = getelementptr inbounds i8, ptr %16, i64 12
  store i32 %2, ptr %18, align 4, !tbaa !12
  %19 = shl i32 %1, 1
  %20 = mul i32 %19, %2
  %21 = getelementptr inbounds i8, ptr %16, i64 16
  store i32 %20, ptr %21, align 8, !tbaa !13
  %22 = lshr exact i32 %1, 1
  %23 = getelementptr inbounds i8, ptr %16, i64 8
  store i32 %22, ptr %23, align 8, !tbaa !14
  %24 = zext i32 %1 to i64
  %25 = shl nuw nsw i64 %24, 3
  %26 = tail call noalias ptr @malloc(i64 noundef %25) #5
  %27 = getelementptr inbounds i8, ptr %16, i64 24
  store ptr %26, ptr %27, align 8, !tbaa !15
  %28 = shl i32 %2, 1
  %29 = zext i32 %28 to i64
  %30 = tail call ptr @llvm.stacksave.p0()
  %31 = alloca float, i64 %29, align 16
  %.not75 = icmp eq i32 %28, 0
  br i1 %.not75, label %.preheader, label %.preheader.us.preheader

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %32 = add nsw i64 %29, -1
  %33 = add i32 %28, -1
  %min.iters.check = icmp ult i32 %28, 20
  %ident.check = icmp ne i32 %1, 1
  %34 = trunc i64 %32 to i32
  %35 = icmp ugt i64 %32, 4294967295
  %36 = trunc i64 %32 to i32
  %37 = icmp ult i32 %33, %36
  %n.vec = and i64 %29, 4294967288
  %cmp.n = icmp eq i64 %n.vec, %29
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge.us
  %indvars.iv81 = phi i64 [ %indvars.iv.next82, %._crit_edge.us ], [ 0, %.preheader.us.preheader ]
  %38 = trunc nuw i64 %indvars.iv81 to i32
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.scevcheck

vector.scevcheck:                                 ; preds = %.preheader.us
  %39 = trunc i64 %indvars.iv81 to i32
  %40 = xor i32 %39, -1
  %41 = icmp ult i32 %40, %34
  %42 = or i1 %41, %35
  %43 = or i1 %ident.check, %42
  %44 = or i1 %37, %43
  br i1 %44, label %scalar.ph.preheader, label %vector.body

vector.body:                                      ; preds = %vector.scevcheck, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %vector.scevcheck ]
  %45 = trunc i64 %index to i32
  %46 = add i64 %index, %indvars.iv81
  %47 = and i64 %46, 4294967295
  %48 = getelementptr inbounds float, ptr %3, i64 %47
  %49 = getelementptr inbounds i8, ptr %48, i64 16
  %wide.load = load <4 x float>, ptr %48, align 4, !tbaa !16
  %wide.load92 = load <4 x float>, ptr %49, align 4, !tbaa !16
  %50 = xor i32 %45, -1
  %51 = add i32 %28, %50
  %52 = zext i32 %51 to i64
  %53 = getelementptr inbounds float, ptr %31, i64 %52
  %54 = getelementptr inbounds i8, ptr %53, i64 -12
  %55 = getelementptr inbounds i8, ptr %53, i64 -28
  %reverse = shufflevector <4 x float> %wide.load, <4 x float> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  store <4 x float> %reverse, ptr %54, align 4, !tbaa !16
  %reverse93 = shufflevector <4 x float> %wide.load92, <4 x float> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  store <4 x float> %reverse93, ptr %55, align 4, !tbaa !16
  %index.next = add nuw i64 %index, 8
  %56 = icmp eq i64 %index.next, %n.vec
  br i1 %56, label %middle.block, label %vector.body, !llvm.loop !18

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us, label %scalar.ph.preheader

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

scalar.ph:                                        ; preds = %scalar.ph, %scalar.ph.preheader
  %indvars.iv = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.1, %scalar.ph ]
  %57 = trunc nuw i64 %indvars.iv to i32
  %58 = mul i32 %57, %1
  %59 = add i32 %58, %38
  %60 = zext i32 %59 to i64
  %61 = getelementptr inbounds float, ptr %3, i64 %60
  %62 = load float, ptr %61, align 4, !tbaa !16
  %63 = xor i32 %57, -1
  %64 = add i32 %28, %63
  %65 = zext i32 %64 to i64
  %66 = getelementptr inbounds float, ptr %31, i64 %65
  store float %62, ptr %66, align 4, !tbaa !16
  %67 = trunc i64 %indvars.iv to i32
  %68 = or disjoint i32 %67, 1
  %69 = mul i32 %68, %1
  %70 = add i32 %69, %38
  %71 = zext i32 %70 to i64
  %72 = getelementptr inbounds float, ptr %3, i64 %71
  %73 = load float, ptr %72, align 4, !tbaa !16
  %74 = xor i32 %67, -2
  %75 = add i32 %28, %74
  %76 = zext i32 %75 to i64
  %77 = getelementptr inbounds float, ptr %31, i64 %76
  store float %73, ptr %77, align 4, !tbaa !16
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, %29
  br i1 %exitcond.not.1, label %._crit_edge.us, label %scalar.ph, !llvm.loop !22

._crit_edge.us:                                   ; preds = %scalar.ph, %middle.block
  %78 = call ptr @dotprod_crcf_create(ptr noundef nonnull %31, i32 noundef %28) #4
  %79 = getelementptr inbounds ptr, ptr %26, i64 %indvars.iv81
  store ptr %78, ptr %79, align 8, !tbaa !23
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  %80 = icmp ult i64 %indvars.iv.next82, %24
  br i1 %80, label %.preheader.us, label %.lr.ph.preheader, !llvm.loop !24

.preheader:                                       ; preds = %.preheader.lr.ph, %.preheader
  %indvars.iv84 = phi i64 [ %indvars.iv.next85, %.preheader ], [ 0, %.preheader.lr.ph ]
  %81 = call ptr @dotprod_crcf_create(ptr noundef nonnull %31, i32 noundef 0) #4
  %82 = getelementptr inbounds ptr, ptr %26, i64 %indvars.iv84
  store ptr %81, ptr %82, align 8, !tbaa !23
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %83 = icmp ult i64 %indvars.iv.next85, %24
  br i1 %83, label %.preheader, label %.lr.ph.preheader, !llvm.loop !24

.lr.ph.preheader:                                 ; preds = %._crit_edge.us, %.preheader
  %84 = call noalias ptr @malloc(i64 noundef %25) #5
  %85 = getelementptr inbounds i8, ptr %16, i64 40
  store ptr %84, ptr %85, align 8, !tbaa !25
  %86 = call noalias ptr @malloc(i64 noundef %25) #5
  %87 = getelementptr inbounds i8, ptr %16, i64 48
  store ptr %86, ptr %87, align 8, !tbaa !26
  %88 = call ptr @fft_create_plan(i32 noundef %1, ptr noundef %84, ptr noundef %86, i32 noundef -1, i32 noundef 0) #4
  %89 = getelementptr inbounds i8, ptr %16, i64 32
  store ptr %88, ptr %89, align 8, !tbaa !27
  %90 = call noalias ptr @malloc(i64 noundef %25) #5
  %91 = getelementptr inbounds i8, ptr %16, i64 56
  store ptr %90, ptr %91, align 8, !tbaa !28
  %92 = call noalias ptr @malloc(i64 noundef %25) #5
  %93 = getelementptr inbounds i8, ptr %16, i64 64
  store ptr %92, ptr %93, align 8, !tbaa !29
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv87 = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next88, %.lr.ph ]
  %94 = call ptr @windowcf_create(i32 noundef %28) #4
  %95 = getelementptr inbounds ptr, ptr %90, i64 %indvars.iv87
  store ptr %94, ptr %95, align 8, !tbaa !23
  %96 = call ptr @windowcf_create(i32 noundef %28) #4
  %97 = getelementptr inbounds ptr, ptr %92, i64 %indvars.iv87
  store ptr %96, ptr %97, align 8, !tbaa !23
  %indvars.iv.next88 = add nuw nsw i64 %indvars.iv87, 1
  %98 = icmp ult i64 %indvars.iv.next88, %24
  br i1 %98, label %.lr.ph, label %._crit_edge, !llvm.loop !30

._crit_edge:                                      ; preds = %.lr.ph
  %99 = call i32 @firpfbch2_crcf_reset(ptr noundef nonnull %16)
  call void @llvm.stackrestore.p0(ptr %30)
  br label %100

100:                                              ; preds = %._crit_edge, %14, %10, %5
  %.0 = phi ptr [ %6, %5 ], [ %11, %10 ], [ %15, %14 ], [ %16, %._crit_edge ]
  ret ptr %.0
}

; Function Attrs: nounwind uwtable
declare dso_local i32 @firpfbch2_crcf_reset(ptr noundef) local_unnamed_addr #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 = { 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 = { 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, !7, i64 0}
!6 = !{!"firpfbch2_crcf_s", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !7, i64 72}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 4}
!12 = !{!6, !7, i64 12}
!13 = !{!6, !7, i64 16}
!14 = !{!6, !7, i64 8}
!15 = !{!6, !10, i64 24}
!16 = !{!17, !17, i64 0}
!17 = !{!"float", !8, 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, !20}
!23 = !{!10, !10, i64 0}
!24 = distinct !{!24, !19}
!25 = !{!6, !10, i64 40}
!26 = !{!6, !10, i64 48}
!27 = !{!6, !10, i64 32}
!28 = !{!6, !10, i64 56}
!29 = !{!6, !10, i64 64}
!30 = distinct !{!30, !19}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalDCEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass