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

@.str = external hidden unnamed_addr constant [92 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [67 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @firpfbch_crcf_create(i32 noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef %3) #0 {
  %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, i32 noundef 76, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %22)
  store ptr %23, ptr %5, align 8
  br label %213

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

27:                                               ; preds = %24
  %28 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str, i32 noundef 78, ptr noundef @.str.3, ptr noundef @.str.2)
  store ptr %28, ptr %5, align 8
  br label %213

29:                                               ; preds = %24
  %30 = load i32, ptr %8, align 4, !tbaa !5
  %31 = icmp eq i32 %30, 0
  br i1 %31, label %32, label %34

32:                                               ; preds = %29
  %33 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str, i32 noundef 80, ptr noundef @.str.4, ptr noundef @.str.2)
  store ptr %33, ptr %5, align 8
  br label %213

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

78:                                               ; preds = %96, %34
  %79 = load i32, ptr %11, align 4, !tbaa !5
  %80 = load ptr, ptr %10, align 8, !tbaa !9
  %81 = getelementptr inbounds %struct.firpfbch_crcf_s, ptr %80, i32 0, i32 3
  %82 = load i32, ptr %81, align 4, !tbaa !15
  %83 = icmp ult i32 %79, %82
  br i1 %83, label %84, label %99

84:                                               ; preds = %78
  %85 = load ptr, ptr %9, align 8, !tbaa !9
  %86 = load i32, ptr %11, align 4, !tbaa !5
  %87 = zext i32 %86 to i64
  %88 = getelementptr inbounds float, ptr %85, i64 %87
  %89 = load float, ptr %88, align 4, !tbaa !19
  %90 = load ptr, ptr %10, align 8, !tbaa !9
  %91 = getelementptr inbounds %struct.firpfbch_crcf_s, ptr %90, i32 0, i32 4
  %92 = load ptr, ptr %91, align 8, !tbaa !18
  %93 = load i32, ptr %11, align 4, !tbaa !5
  %94 = zext i32 %93 to i64
  %95 = getelementptr inbounds float, ptr %92, i64 %94
  store float %89, ptr %95, align 4, !tbaa !19
  br label %96

96:                                               ; preds = %84
  %97 = load i32, ptr %11, align 4, !tbaa !5
  %98 = add i32 %97, 1
  store i32 %98, ptr %11, align 4, !tbaa !5
  br label %78, !llvm.loop !21

99:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %100 = load ptr, ptr %10, align 8, !tbaa !9
  %101 = getelementptr inbounds %struct.firpfbch_crcf_s, ptr %100, i32 0, i32 2
  %102 = load i32, ptr %101, align 8, !tbaa !14
  store i32 %102, ptr %13, align 4, !tbaa !5
  %103 = load i32, ptr %13, align 4, !tbaa !5
  %104 = zext i32 %103 to i64
  %105 = call ptr @llvm.stacksave.p0()
  store ptr %105, ptr %14, align 8
  %106 = alloca float, i64 %104, align 16
  store i64 %104, ptr %15, align 8
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %107

107:                                              ; preds = %158, %99
  %108 = load i32, ptr %11, align 4, !tbaa !5
  %109 = load ptr, ptr %10, align 8, !tbaa !9
  %110 = getelementptr inbounds %struct.firpfbch_crcf_s, ptr %109, i32 0, i32 1
  %111 = load i32, ptr %110, align 4, !tbaa !13
  %112 = icmp ult i32 %108, %111
  br i1 %112, label %113, label %161

113:                                              ; preds = %107
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %114

114:                                              ; preds = %138, %113
  %115 = load i32, ptr %12, align 4, !tbaa !5
  %116 = load i32, ptr %13, align 4, !tbaa !5
  %117 = icmp ult i32 %115, %116
  br i1 %117, label %118, label %141

118:                                              ; preds = %114
  %119 = load ptr, ptr %10, align 8, !tbaa !9
  %120 = getelementptr inbounds %struct.firpfbch_crcf_s, ptr %119, i32 0, i32 4
  %121 = load ptr, ptr %120, align 8, !tbaa !18
  %122 = load i32, ptr %11, align 4, !tbaa !5
  %123 = load i32, ptr %12, align 4, !tbaa !5
  %124 = load ptr, ptr %10, align 8, !tbaa !9
  %125 = getelementptr inbounds %struct.firpfbch_crcf_s, ptr %124, i32 0, i32 1
  %126 = load i32, ptr %125, align 4, !tbaa !13
  %127 = mul i32 %123, %126
  %128 = add i32 %122, %127
  %129 = zext i32 %128 to i64
  %130 = getelementptr inbounds float, ptr %121, i64 %129
  %131 = load float, ptr %130, align 4, !tbaa !19
  %132 = load i32, ptr %13, align 4, !tbaa !5
  %133 = load i32, ptr %12, align 4, !tbaa !5
  %134 = sub i32 %132, %133
  %135 = sub i32 %134, 1
  %136 = zext i32 %135 to i64
  %137 = getelementptr inbounds float, ptr %106, i64 %136
  store float %131, ptr %137, align 4, !tbaa !19
  br label %138

138:                                              ; preds = %118
  %139 = load i32, ptr %12, align 4, !tbaa !5
  %140 = add i32 %139, 1
  store i32 %140, ptr %12, align 4, !tbaa !5
  br label %114, !llvm.loop !23

141:                                              ; preds = %114
  %142 = load i32, ptr %13, align 4, !tbaa !5
  %143 = call ptr @dotprod_crcf_create(ptr noundef %106, i32 noundef %142)
  %144 = load ptr, ptr %10, align 8, !tbaa !9
  %145 = getelementptr inbounds %struct.firpfbch_crcf_s, ptr %144, i32 0, i32 5
  %146 = load ptr, ptr %145, align 8, !tbaa !16
  %147 = load i32, ptr %11, align 4, !tbaa !5
  %148 = zext i32 %147 to i64
  %149 = getelementptr inbounds ptr, ptr %146, i64 %148
  store ptr %143, ptr %149, align 8, !tbaa !9
  %150 = load i32, ptr %13, align 4, !tbaa !5
  %151 = call ptr @windowcf_create(i32 noundef %150)
  %152 = load ptr, ptr %10, align 8, !tbaa !9
  %153 = getelementptr inbounds %struct.firpfbch_crcf_s, ptr %152, i32 0, i32 6
  %154 = load ptr, ptr %153, align 8, !tbaa !17
  %155 = load i32, ptr %11, align 4, !tbaa !5
  %156 = zext i32 %155 to i64
  %157 = getelementptr inbounds ptr, ptr %154, i64 %156
  store ptr %151, ptr %157, align 8, !tbaa !9
  br label %158

158:                                              ; preds = %141
  %159 = load i32, ptr %11, align 4, !tbaa !5
  %160 = add i32 %159, 1
  store i32 %160, ptr %11, align 4, !tbaa !5
  br label %107, !llvm.loop !24

161:                                              ; preds = %107
  %162 = load ptr, ptr %10, align 8, !tbaa !9
  %163 = getelementptr inbounds %struct.firpfbch_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.firpfbch_crcf_s, ptr %168, i32 0, i32 9
  store ptr %167, ptr %169, align 8, !tbaa !25
  %170 = load ptr, ptr %10, align 8, !tbaa !9
  %171 = getelementptr inbounds %struct.firpfbch_crcf_s, ptr %170, i32 0, i32 1
  %172 = load i32, ptr %171, align 4, !tbaa !13
  %173 = zext i32 %172 to i64
  %174 = mul i64 %173, 8
  %175 = call noalias ptr @malloc(i64 noundef %174) #6
  %176 = load ptr, ptr %10, align 8, !tbaa !9
  %177 = getelementptr inbounds %struct.firpfbch_crcf_s, ptr %176, i32 0, i32 10
  store ptr %175, ptr %177, align 8, !tbaa !26
  %178 = load ptr, ptr %10, align 8, !tbaa !9
  %179 = getelementptr inbounds %struct.firpfbch_crcf_s, ptr %178, i32 0, i32 0
  %180 = load i32, ptr %179, align 8, !tbaa !11
  %181 = icmp eq i32 %180, 0
  br i1 %181, label %182, label %195

182:                                              ; preds = %161
  %183 = load ptr, ptr %10, align 8, !tbaa !9
  %184 = getelementptr inbounds %struct.firpfbch_crcf_s, ptr %183, i32 0, i32 1
  %185 = load i32, ptr %184, align 4, !tbaa !13
  %186 = load ptr, ptr %10, align 8, !tbaa !9
  %187 = getelementptr inbounds %struct.firpfbch_crcf_s, ptr %186, i32 0, i32 10
  %188 = load ptr, ptr %187, align 8, !tbaa !26
  %189 = load ptr, ptr %10, align 8, !tbaa !9
  %190 = getelementptr inbounds %struct.firpfbch_crcf_s, ptr %189, i32 0, i32 9
  %191 = load ptr, ptr %190, align 8, !tbaa !25
  %192 = call ptr @fft_create_plan(i32 noundef %185, ptr noundef %188, ptr noundef %191, i32 noundef 1, i32 noundef 0)
  %193 = load ptr, ptr %10, align 8, !tbaa !9
  %194 = getelementptr inbounds %struct.firpfbch_crcf_s, ptr %193, i32 0, i32 8
  store ptr %192, ptr %194, align 8, !tbaa !27
  br label %208

195:                                              ; preds = %161
  %196 = load ptr, ptr %10, align 8, !tbaa !9
  %197 = getelementptr inbounds %struct.firpfbch_crcf_s, ptr %196, i32 0, i32 1
  %198 = load i32, ptr %197, align 4, !tbaa !13
  %199 = load ptr, ptr %10, align 8, !tbaa !9
  %200 = getelementptr inbounds %struct.firpfbch_crcf_s, ptr %199, i32 0, i32 10
  %201 = load ptr, ptr %200, align 8, !tbaa !26
  %202 = load ptr, ptr %10, align 8, !tbaa !9
  %203 = getelementptr inbounds %struct.firpfbch_crcf_s, ptr %202, i32 0, i32 9
  %204 = load ptr, ptr %203, align 8, !tbaa !25
  %205 = call ptr @fft_create_plan(i32 noundef %198, ptr noundef %201, ptr noundef %204, i32 noundef -1, i32 noundef 0)
  %206 = load ptr, ptr %10, align 8, !tbaa !9
  %207 = getelementptr inbounds %struct.firpfbch_crcf_s, ptr %206, i32 0, i32 8
  store ptr %205, ptr %207, align 8, !tbaa !27
  br label %208

208:                                              ; preds = %195, %182
  %209 = load ptr, ptr %10, align 8, !tbaa !9
  %210 = call i32 @firpfbch_crcf_reset(ptr noundef %209)
  %211 = load ptr, ptr %10, align 8, !tbaa !9
  store ptr %211, ptr %5, align 8
  %212 = load ptr, ptr %14, align 8
  call void @llvm.stackrestore.p0(ptr %212)
  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 %213

213:                                              ; preds = %208, %32, %27, %21
  %214 = load ptr, ptr %5, align 8
  ret ptr %214
}

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

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

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

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

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

declare ptr @windowcf_create(i32 noundef) #1

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @firpfbch_crcf_reset(ptr noundef) #0

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

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

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


; 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 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [67 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @firpfbch_crcf_create(i32 noundef %0, i32 noundef %1, i32 noundef %2, ptr nocapture noundef readonly %3) local_unnamed_addr #0 {
  %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, i32 noundef 76, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %0) #5
  br label %104

7:                                                ; preds = %4
  %8 = icmp eq i32 %1, 0
  br i1 %8, label %9, label %11

9:                                                ; preds = %7
  %10 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str, i32 noundef 78, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.2) #5
  br label %104

11:                                               ; preds = %7
  %12 = icmp eq i32 %2, 0
  br i1 %12, label %13, label %15

13:                                               ; preds = %11
  %14 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str, i32 noundef 80, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.2) #5
  br label %104

15:                                               ; preds = %11
  %16 = tail call noalias dereferenceable_or_null(72) ptr @malloc(i64 noundef 72) #6
  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 8
  store i32 %2, ptr %18, align 8, !tbaa !12
  %19 = mul i32 %2, %1
  %20 = getelementptr inbounds i8, ptr %16, i64 12
  store i32 %19, ptr %20, align 4, !tbaa !13
  %21 = zext i32 %1 to i64
  %22 = shl nuw nsw i64 %21, 3
  %23 = tail call noalias ptr @malloc(i64 noundef %22) #6
  %24 = getelementptr inbounds i8, ptr %16, i64 24
  store ptr %23, ptr %24, align 8, !tbaa !14
  %25 = tail call noalias ptr @malloc(i64 noundef %22) #6
  %26 = getelementptr inbounds i8, ptr %16, i64 32
  store ptr %25, ptr %26, align 8, !tbaa !15
  %27 = zext i32 %19 to i64
  %28 = shl nuw nsw i64 %27, 2
  %29 = tail call noalias ptr @malloc(i64 noundef %28) #6
  %30 = getelementptr inbounds i8, ptr %16, i64 16
  store ptr %29, ptr %30, align 8, !tbaa !16
  %.not = icmp eq i32 %19, 0
  br i1 %.not, label %.preheader.preheader, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %15
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 4 %3, i64 %28, i1 false), !tbaa !17
  br label %.preheader.preheader

.preheader.preheader:                             ; preds = %15, %.lr.ph.preheader
  %31 = zext i32 %2 to i64
  %32 = tail call ptr @llvm.stacksave.p0()
  %33 = alloca float, i64 %31, align 16
  %wide.trip.count = zext i32 %2 to i64
  %34 = add nsw i64 %wide.trip.count, -1
  %35 = add i32 %2, -1
  %min.iters.check = icmp ult i32 %2, 20
  %ident.check = icmp ne i32 %1, 1
  %36 = trunc i64 %34 to i32
  %37 = icmp ugt i64 %34, 4294967295
  %38 = trunc i64 %34 to i32
  %39 = icmp ult i32 %35, %38
  %n.vec = and i64 %wide.trip.count, 4294967288
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  %xtraiter = and i64 %wide.trip.count, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  %40 = add nsw i64 %wide.trip.count, -1
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %.loopexit
  %indvars.iv80 = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next81, %.loopexit ]
  %41 = trunc nuw i64 %indvars.iv80 to i32
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.scevcheck

vector.scevcheck:                                 ; preds = %.preheader
  %42 = trunc i64 %indvars.iv80 to i32
  %43 = xor i32 %42, -1
  %44 = icmp ult i32 %43, %36
  %45 = or i1 %44, %37
  %46 = or i1 %ident.check, %45
  %47 = or i1 %39, %46
  br i1 %47, label %scalar.ph.preheader, label %vector.body

vector.body:                                      ; preds = %vector.scevcheck, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %vector.scevcheck ]
  %48 = trunc i64 %index to i32
  %49 = add i64 %index, %indvars.iv80
  %50 = and i64 %49, 4294967295
  %51 = getelementptr inbounds float, ptr %29, i64 %50
  %52 = getelementptr inbounds i8, ptr %51, i64 16
  %wide.load = load <4 x float>, ptr %51, align 4, !tbaa !17
  %wide.load84 = load <4 x float>, ptr %52, align 4, !tbaa !17
  %53 = xor i32 %48, -1
  %54 = add i32 %53, %2
  %55 = zext i32 %54 to i64
  %56 = getelementptr inbounds float, ptr %33, i64 %55
  %57 = getelementptr inbounds i8, ptr %56, i64 -12
  %58 = getelementptr inbounds i8, ptr %56, 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 %57, align 4, !tbaa !17
  %reverse85 = shufflevector <4 x float> %wide.load84, <4 x float> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  store <4 x float> %reverse85, ptr %58, align 4, !tbaa !17
  %index.next = add nuw i64 %index, 8
  %59 = icmp eq i64 %index.next, %n.vec
  br i1 %59, label %middle.block, label %vector.body, !llvm.loop !19

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

scalar.ph.preheader:                              ; preds = %middle.block, %vector.scevcheck, %.preheader
  %indvars.iv.ph = phi i64 [ 0, %vector.scevcheck ], [ 0, %.preheader ], [ %n.vec, %middle.block ]
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader
  %60 = trunc nuw i64 %indvars.iv.ph to i32
  %61 = mul i32 %60, %1
  %62 = add i32 %61, %41
  %63 = zext i32 %62 to i64
  %64 = getelementptr inbounds float, ptr %29, i64 %63
  %65 = load float, ptr %64, align 4, !tbaa !17
  %66 = xor i32 %60, -1
  %67 = add i32 %66, %2
  %68 = zext i32 %67 to i64
  %69 = getelementptr inbounds float, ptr %33, i64 %68
  store float %65, ptr %69, align 4, !tbaa !17
  %indvars.iv.next.prol = or disjoint i64 %indvars.iv.ph, 1
  br label %scalar.ph.prol.loopexit

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol ]
  %70 = icmp eq i64 %indvars.iv.ph, %40
  br i1 %70, label %.loopexit, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %scalar.ph ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %71 = trunc nuw i64 %indvars.iv to i32
  %72 = mul i32 %71, %1
  %73 = add i32 %72, %41
  %74 = zext i32 %73 to i64
  %75 = getelementptr inbounds float, ptr %29, i64 %74
  %76 = load float, ptr %75, align 4, !tbaa !17
  %77 = xor i32 %71, -1
  %78 = add i32 %77, %2
  %79 = zext i32 %78 to i64
  %80 = getelementptr inbounds float, ptr %33, i64 %79
  store float %76, ptr %80, align 4, !tbaa !17
  %81 = trunc i64 %indvars.iv to i32
  %82 = add i32 %81, 1
  %83 = mul i32 %82, %1
  %84 = add i32 %83, %41
  %85 = zext i32 %84 to i64
  %86 = getelementptr inbounds float, ptr %29, i64 %85
  %87 = load float, ptr %86, align 4, !tbaa !17
  %reass.sub = sub i32 %2, %81
  %88 = add i32 %reass.sub, -2
  %89 = zext i32 %88 to i64
  %90 = getelementptr inbounds float, ptr %33, i64 %89
  store float %87, ptr %90, align 4, !tbaa !17
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, %wide.trip.count
  br i1 %exitcond.not.1, label %.loopexit, label %scalar.ph, !llvm.loop !23

.loopexit:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  %91 = call ptr @dotprod_crcf_create(ptr noundef nonnull %33, i32 noundef %2) #5
  %92 = getelementptr inbounds ptr, ptr %23, i64 %indvars.iv80
  store ptr %91, ptr %92, align 8, !tbaa !24
  %93 = call ptr @windowcf_create(i32 noundef %2) #5
  %94 = getelementptr inbounds ptr, ptr %25, i64 %indvars.iv80
  store ptr %93, ptr %94, align 8, !tbaa !24
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %95 = icmp ult i64 %indvars.iv.next81, %21
  br i1 %95, label %.preheader, label %._crit_edge75, !llvm.loop !25

._crit_edge75:                                    ; preds = %.loopexit
  %96 = call noalias ptr @malloc(i64 noundef %22) #6
  %97 = getelementptr inbounds i8, ptr %16, i64 56
  store ptr %96, ptr %97, align 8, !tbaa !26
  %98 = call noalias ptr @malloc(i64 noundef %22) #6
  %99 = getelementptr inbounds i8, ptr %16, i64 64
  store ptr %98, ptr %99, align 8, !tbaa !27
  %100 = icmp eq i32 %0, 0
  %. = select i1 %100, i32 1, i32 -1
  %101 = call ptr @fft_create_plan(i32 noundef %1, ptr noundef %98, ptr noundef %96, i32 noundef %., i32 noundef 0) #5
  %102 = getelementptr inbounds i8, ptr %16, i64 48
  store ptr %101, ptr %102, align 8
  %103 = call i32 @firpfbch_crcf_reset(ptr noundef nonnull %16)
  call void @llvm.stackrestore.p0(ptr %32)
  br label %104

104:                                              ; preds = %._crit_edge75, %13, %9, %5
  %.0 = phi ptr [ %6, %5 ], [ %10, %9 ], [ %14, %13 ], [ %16, %._crit_edge75 ]
  ret ptr %.0
}

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

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

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

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

declare ptr @windowcf_create(i32 noundef) local_unnamed_addr #1

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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 = { "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 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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, !7, i64 0}
!6 = !{!"firpfbch_crcf_s", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !10, i64 16, !10, i64 24, !10, i64 32, !7, i64 40, !10, i64 48, !10, i64 56, !10, i64 64}
!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 8}
!13 = !{!6, !7, i64 12}
!14 = !{!6, !10, i64 24}
!15 = !{!6, !10, i64 32}
!16 = !{!6, !10, i64 16}
!17 = !{!18, !18, i64 0}
!18 = !{!"float", !8, i64 0}
!19 = distinct !{!19, !20, !21, !22}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!"llvm.loop.isvectorized", i32 1}
!22 = !{!"llvm.loop.unroll.runtime.disable"}
!23 = distinct !{!23, !20, !21}
!24 = !{!10, !10, i64 0}
!25 = distinct !{!25, !20}
!26 = !{!6, !10, i64 56}
!27 = !{!6, !10, i64 64}


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