; LLVM IR from jgaeddert/liquid-dsp :: src/fft/src (fftf)

; 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.fftplan_s = type { i32, ptr, ptr, i32, i32, i32, i32, ptr, ptr, ptr, %union.anon }
%union.anon = type { %struct.anon.1 }
%struct.anon.1 = type { i32, i32, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.anon = type { ptr, ptr }

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 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 uwtable
define dso_local ptr @fft_create_plan_dft(i32 noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4) #2 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca float, align 4
  %15 = alloca { float, float }, align 4
  %16 = alloca { float, float }, align 4
  store i32 %0, ptr %6, align 4, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !5
  store i32 %4, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %17 = call noalias ptr @malloc(i64 noundef 120) #7
  store ptr %17, ptr %11, align 8, !tbaa !9
  %18 = load i32, ptr %6, align 4, !tbaa !5
  %19 = load ptr, ptr %11, align 8, !tbaa !9
  %20 = getelementptr inbounds %struct.fftplan_s, ptr %19, i32 0, i32 0
  store i32 %18, ptr %20, align 8, !tbaa !11
  %21 = load ptr, ptr %7, align 8, !tbaa !9
  %22 = load ptr, ptr %11, align 8, !tbaa !9
  %23 = getelementptr inbounds %struct.fftplan_s, ptr %22, i32 0, i32 1
  store ptr %21, ptr %23, align 8, !tbaa !13
  %24 = load ptr, ptr %8, align 8, !tbaa !9
  %25 = load ptr, ptr %11, align 8, !tbaa !9
  %26 = getelementptr inbounds %struct.fftplan_s, ptr %25, i32 0, i32 2
  store ptr %24, ptr %26, align 8, !tbaa !14
  %27 = load i32, ptr %10, align 4, !tbaa !5
  %28 = load ptr, ptr %11, align 8, !tbaa !9
  %29 = getelementptr inbounds %struct.fftplan_s, ptr %28, i32 0, i32 4
  store i32 %27, ptr %29, align 4, !tbaa !15
  %30 = load i32, ptr %9, align 4, !tbaa !5
  %31 = icmp eq i32 %30, 1
  %32 = zext i1 %31 to i64
  %33 = select i1 %31, i32 1, i32 -1
  %34 = load ptr, ptr %11, align 8, !tbaa !9
  %35 = getelementptr inbounds %struct.fftplan_s, ptr %34, i32 0, i32 5
  store i32 %33, ptr %35, align 8, !tbaa !16
  %36 = load i32, ptr %9, align 4, !tbaa !5
  %37 = icmp eq i32 %36, 1
  %38 = zext i1 %37 to i64
  %39 = select i1 %37, i32 1, i32 -1
  %40 = load ptr, ptr %11, align 8, !tbaa !9
  %41 = getelementptr inbounds %struct.fftplan_s, ptr %40, i32 0, i32 3
  store i32 %39, ptr %41, align 8, !tbaa !17
  %42 = load ptr, ptr %11, align 8, !tbaa !9
  %43 = getelementptr inbounds %struct.fftplan_s, ptr %42, i32 0, i32 6
  store i32 5, ptr %43, align 4, !tbaa !18
  %44 = load ptr, ptr %11, align 8, !tbaa !9
  %45 = getelementptr inbounds %struct.fftplan_s, ptr %44, i32 0, i32 10
  %46 = getelementptr inbounds %struct.anon, ptr %45, i32 0, i32 0
  store ptr null, ptr %46, align 8, !tbaa !19
  %47 = load ptr, ptr %11, align 8, !tbaa !9
  %48 = getelementptr inbounds %struct.fftplan_s, ptr %47, i32 0, i32 10
  %49 = getelementptr inbounds %struct.anon, ptr %48, i32 0, i32 1
  store ptr null, ptr %49, align 8, !tbaa !19
  %50 = load ptr, ptr %11, align 8, !tbaa !9
  %51 = getelementptr inbounds %struct.fftplan_s, ptr %50, i32 0, i32 0
  %52 = load i32, ptr %51, align 8, !tbaa !11
  %53 = icmp eq i32 %52, 2
  br i1 %53, label %54, label %57

54:                                               ; preds = %5
  %55 = load ptr, ptr %11, align 8, !tbaa !9
  %56 = getelementptr inbounds %struct.fftplan_s, ptr %55, i32 0, i32 7
  store ptr @fft_execute_dft_2, ptr %56, align 8, !tbaa !20
  br label %229

57:                                               ; preds = %5
  %58 = load ptr, ptr %11, align 8, !tbaa !9
  %59 = getelementptr inbounds %struct.fftplan_s, ptr %58, i32 0, i32 0
  %60 = load i32, ptr %59, align 8, !tbaa !11
  %61 = icmp eq i32 %60, 3
  br i1 %61, label %62, label %65

62:                                               ; preds = %57
  %63 = load ptr, ptr %11, align 8, !tbaa !9
  %64 = getelementptr inbounds %struct.fftplan_s, ptr %63, i32 0, i32 7
  store ptr @fft_execute_dft_3, ptr %64, align 8, !tbaa !20
  br label %228

65:                                               ; preds = %57
  %66 = load ptr, ptr %11, align 8, !tbaa !9
  %67 = getelementptr inbounds %struct.fftplan_s, ptr %66, i32 0, i32 0
  %68 = load i32, ptr %67, align 8, !tbaa !11
  %69 = icmp eq i32 %68, 4
  br i1 %69, label %70, label %73

70:                                               ; preds = %65
  %71 = load ptr, ptr %11, align 8, !tbaa !9
  %72 = getelementptr inbounds %struct.fftplan_s, ptr %71, i32 0, i32 7
  store ptr @fft_execute_dft_4, ptr %72, align 8, !tbaa !20
  br label %227

73:                                               ; preds = %65
  %74 = load ptr, ptr %11, align 8, !tbaa !9
  %75 = getelementptr inbounds %struct.fftplan_s, ptr %74, i32 0, i32 0
  %76 = load i32, ptr %75, align 8, !tbaa !11
  %77 = icmp eq i32 %76, 5
  br i1 %77, label %78, label %81

78:                                               ; preds = %73
  %79 = load ptr, ptr %11, align 8, !tbaa !9
  %80 = getelementptr inbounds %struct.fftplan_s, ptr %79, i32 0, i32 7
  store ptr @fft_execute_dft_5, ptr %80, align 8, !tbaa !20
  br label %226

81:                                               ; preds = %73
  %82 = load ptr, ptr %11, align 8, !tbaa !9
  %83 = getelementptr inbounds %struct.fftplan_s, ptr %82, i32 0, i32 0
  %84 = load i32, ptr %83, align 8, !tbaa !11
  %85 = icmp eq i32 %84, 6
  br i1 %85, label %86, label %89

86:                                               ; preds = %81
  %87 = load ptr, ptr %11, align 8, !tbaa !9
  %88 = getelementptr inbounds %struct.fftplan_s, ptr %87, i32 0, i32 7
  store ptr @fft_execute_dft_6, ptr %88, align 8, !tbaa !20
  br label %225

89:                                               ; preds = %81
  %90 = load ptr, ptr %11, align 8, !tbaa !9
  %91 = getelementptr inbounds %struct.fftplan_s, ptr %90, i32 0, i32 0
  %92 = load i32, ptr %91, align 8, !tbaa !11
  %93 = icmp eq i32 %92, 7
  br i1 %93, label %94, label %97

94:                                               ; preds = %89
  %95 = load ptr, ptr %11, align 8, !tbaa !9
  %96 = getelementptr inbounds %struct.fftplan_s, ptr %95, i32 0, i32 7
  store ptr @fft_execute_dft_7, ptr %96, align 8, !tbaa !20
  br label %224

97:                                               ; preds = %89
  %98 = load ptr, ptr %11, align 8, !tbaa !9
  %99 = getelementptr inbounds %struct.fftplan_s, ptr %98, i32 0, i32 0
  %100 = load i32, ptr %99, align 8, !tbaa !11
  %101 = icmp eq i32 %100, 8
  br i1 %101, label %102, label %105

102:                                              ; preds = %97
  %103 = load ptr, ptr %11, align 8, !tbaa !9
  %104 = getelementptr inbounds %struct.fftplan_s, ptr %103, i32 0, i32 7
  store ptr @fft_execute_dft_8, ptr %104, align 8, !tbaa !20
  br label %223

105:                                              ; preds = %97
  %106 = load ptr, ptr %11, align 8, !tbaa !9
  %107 = getelementptr inbounds %struct.fftplan_s, ptr %106, i32 0, i32 0
  %108 = load i32, ptr %107, align 8, !tbaa !11
  %109 = icmp eq i32 %108, 16
  br i1 %109, label %110, label %113

110:                                              ; preds = %105
  %111 = load ptr, ptr %11, align 8, !tbaa !9
  %112 = getelementptr inbounds %struct.fftplan_s, ptr %111, i32 0, i32 7
  store ptr @fft_execute_dft_16, ptr %112, align 8, !tbaa !20
  br label %222

113:                                              ; preds = %105
  %114 = load ptr, ptr %11, align 8, !tbaa !9
  %115 = getelementptr inbounds %struct.fftplan_s, ptr %114, i32 0, i32 7
  store ptr @fft_execute_dft, ptr %115, align 8, !tbaa !20
  %116 = load ptr, ptr %11, align 8, !tbaa !9
  %117 = getelementptr inbounds %struct.fftplan_s, ptr %116, i32 0, i32 0
  %118 = load i32, ptr %117, align 8, !tbaa !11
  %119 = zext i32 %118 to i64
  %120 = mul i64 %119, 8
  %121 = call noalias ptr @malloc(i64 noundef %120) #7
  %122 = load ptr, ptr %11, align 8, !tbaa !9
  %123 = getelementptr inbounds %struct.fftplan_s, ptr %122, i32 0, i32 10
  %124 = getelementptr inbounds %struct.anon, ptr %123, i32 0, i32 0
  store ptr %121, ptr %124, align 8, !tbaa !19
  %125 = load ptr, ptr %11, align 8, !tbaa !9
  %126 = getelementptr inbounds %struct.fftplan_s, ptr %125, i32 0, i32 0
  %127 = load i32, ptr %126, align 8, !tbaa !11
  %128 = zext i32 %127 to i64
  %129 = mul i64 %128, 8
  %130 = call noalias ptr @malloc(i64 noundef %129) #7
  %131 = load ptr, ptr %11, align 8, !tbaa !9
  %132 = getelementptr inbounds %struct.fftplan_s, ptr %131, i32 0, i32 10
  %133 = getelementptr inbounds %struct.anon, ptr %132, i32 0, i32 1
  store ptr %130, ptr %133, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %134 = load ptr, ptr %11, align 8, !tbaa !9
  %135 = getelementptr inbounds %struct.fftplan_s, ptr %134, i32 0, i32 3
  %136 = load i32, ptr %135, align 8, !tbaa !17
  %137 = icmp eq i32 %136, 1
  %138 = zext i1 %137 to i64
  %139 = select i1 %137, double -1.000000e+00, double 1.000000e+00
  %140 = fptrunc double %139 to float
  store float %140, ptr %14, align 4, !tbaa !21
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %141

141:                                              ; preds = %218, %113
  %142 = load i32, ptr %12, align 4, !tbaa !5
  %143 = load ptr, ptr %11, align 8, !tbaa !9
  %144 = getelementptr inbounds %struct.fftplan_s, ptr %143, i32 0, i32 0
  %145 = load i32, ptr %144, align 8, !tbaa !11
  %146 = icmp ult i32 %142, %145
  br i1 %146, label %147, label %221

147:                                              ; preds = %141
  store i32 1, ptr %13, align 4, !tbaa !5
  br label %148

148:                                              ; preds = %198, %147
  %149 = load i32, ptr %13, align 4, !tbaa !5
  %150 = load ptr, ptr %11, align 8, !tbaa !9
  %151 = getelementptr inbounds %struct.fftplan_s, ptr %150, i32 0, i32 0
  %152 = load i32, ptr %151, align 8, !tbaa !11
  %153 = icmp ult i32 %149, %152
  br i1 %153, label %154, label %201

154:                                              ; preds = %148
  %155 = load float, ptr %14, align 4, !tbaa !21
  %156 = fmul float 0.000000e+00, %155
  %157 = fmul float 1.000000e+00, %155
  %158 = fmul float %156, 2.000000e+00
  %159 = fmul float %157, 2.000000e+00
  %160 = fpext float %158 to double
  %161 = fpext float %159 to double
  %162 = fmul double %160, 0x400921FB54442D18
  %163 = fmul double %161, 0x400921FB54442D18
  %164 = load i32, ptr %13, align 4, !tbaa !5
  %165 = load i32, ptr %12, align 4, !tbaa !5
  %166 = mul i32 %164, %165
  %167 = uitofp i32 %166 to float
  %168 = fpext float %167 to double
  %169 = fmul double %162, %168
  %170 = fmul double %163, %168
  %171 = load ptr, ptr %11, align 8, !tbaa !9
  %172 = getelementptr inbounds %struct.fftplan_s, ptr %171, i32 0, i32 0
  %173 = load i32, ptr %172, align 8, !tbaa !11
  %174 = uitofp i32 %173 to float
  %175 = fpext float %174 to double
  %176 = fdiv double %169, %175
  %177 = fdiv double %170, %175
  %178 = fptrunc double %176 to float
  %179 = fptrunc double %177 to float
  %180 = getelementptr inbounds { float, float }, ptr %15, i32 0, i32 0
  %181 = getelementptr inbounds { float, float }, ptr %15, i32 0, i32 1
  store float %178, ptr %180, align 4
  store float %179, ptr %181, align 4
  %182 = load <2 x float>, ptr %15, align 4
  %183 = call <2 x float> @cexpf(<2 x float> noundef %182) #6
  store <2 x float> %183, ptr %16, align 4
  %184 = getelementptr inbounds { float, float }, ptr %16, i32 0, i32 0
  %185 = load float, ptr %184, align 4
  %186 = getelementptr inbounds { float, float }, ptr %16, i32 0, i32 1
  %187 = load float, ptr %186, align 4
  %188 = load ptr, ptr %11, align 8, !tbaa !9
  %189 = getelementptr inbounds %struct.fftplan_s, ptr %188, i32 0, i32 10
  %190 = getelementptr inbounds %struct.anon, ptr %189, i32 0, i32 0
  %191 = load ptr, ptr %190, align 8, !tbaa !19
  %192 = load i32, ptr %13, align 4, !tbaa !5
  %193 = sub i32 %192, 1
  %194 = zext i32 %193 to i64
  %195 = getelementptr inbounds { float, float }, ptr %191, i64 %194
  %196 = getelementptr inbounds { float, float }, ptr %195, i32 0, i32 0
  %197 = getelementptr inbounds { float, float }, ptr %195, i32 0, i32 1
  store float %185, ptr %196, align 4
  store float %187, ptr %197, align 4
  br label %198

198:                                              ; preds = %154
  %199 = load i32, ptr %13, align 4, !tbaa !5
  %200 = add i32 %199, 1
  store i32 %200, ptr %13, align 4, !tbaa !5
  br label %148, !llvm.loop !23

201:                                              ; preds = %148
  %202 = load ptr, ptr %11, align 8, !tbaa !9
  %203 = getelementptr inbounds %struct.fftplan_s, ptr %202, i32 0, i32 10
  %204 = getelementptr inbounds %struct.anon, ptr %203, i32 0, i32 0
  %205 = load ptr, ptr %204, align 8, !tbaa !19
  %206 = load ptr, ptr %11, align 8, !tbaa !9
  %207 = getelementptr inbounds %struct.fftplan_s, ptr %206, i32 0, i32 0
  %208 = load i32, ptr %207, align 8, !tbaa !11
  %209 = sub i32 %208, 1
  %210 = call ptr @dotprod_cccf_create(ptr noundef %205, i32 noundef %209)
  %211 = load ptr, ptr %11, align 8, !tbaa !9
  %212 = getelementptr inbounds %struct.fftplan_s, ptr %211, i32 0, i32 10
  %213 = getelementptr inbounds %struct.anon, ptr %212, i32 0, i32 1
  %214 = load ptr, ptr %213, align 8, !tbaa !19
  %215 = load i32, ptr %12, align 4, !tbaa !5
  %216 = zext i32 %215 to i64
  %217 = getelementptr inbounds ptr, ptr %214, i64 %216
  store ptr %210, ptr %217, align 8, !tbaa !9
  br label %218

218:                                              ; preds = %201
  %219 = load i32, ptr %12, align 4, !tbaa !5
  %220 = add i32 %219, 1
  store i32 %220, ptr %12, align 4, !tbaa !5
  br label %141, !llvm.loop !25

221:                                              ; preds = %141
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %222

222:                                              ; preds = %221, %110
  br label %223

223:                                              ; preds = %222, %102
  br label %224

224:                                              ; preds = %223, %94
  br label %225

225:                                              ; preds = %224, %86
  br label %226

226:                                              ; preds = %225, %78
  br label %227

227:                                              ; preds = %226, %70
  br label %228

228:                                              ; preds = %227, %62
  br label %229

229:                                              ; preds = %228, %54
  %230 = load ptr, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  ret ptr %230
}

; 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
declare dso_local i32 @fft_execute_dft_2(ptr noundef) #3

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

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

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

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

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

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

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

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

; Function Attrs: nounwind
declare <2 x float> @cexpf(<2 x float> noundef) #4

declare ptr @dotprod_cccf_create(ptr noundef, i32 noundef) #5

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

; Function Attrs: nounwind uwtable
define dso_local noalias noundef ptr @fft_create_plan_dft(i32 noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #1 {
  %6 = tail call noalias dereferenceable_or_null(120) ptr @malloc(i64 noundef 120) #7
  store i32 %0, ptr %6, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %6, i64 8
  store ptr %1, ptr %7, align 8, !tbaa !11
  %8 = getelementptr inbounds i8, ptr %6, i64 16
  store ptr %2, ptr %8, align 8, !tbaa !12
  %9 = getelementptr inbounds i8, ptr %6, i64 28
  store i32 %4, ptr %9, align 4, !tbaa !13
  %10 = icmp eq i32 %3, 1
  %11 = select i1 %10, i32 1, i32 -1
  %12 = getelementptr inbounds i8, ptr %6, i64 32
  store i32 %11, ptr %12, align 8, !tbaa !14
  %13 = getelementptr inbounds i8, ptr %6, i64 24
  store i32 %11, ptr %13, align 8, !tbaa !15
  %14 = getelementptr inbounds i8, ptr %6, i64 36
  store i32 5, ptr %14, align 4, !tbaa !16
  %15 = getelementptr inbounds i8, ptr %6, i64 64
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %15, i8 0, i64 16, i1 false)
  %16 = getelementptr inbounds i8, ptr %6, i64 40
  switch i32 %0, label %25 [
    i32 2, label %17
    i32 3, label %18
    i32 4, label %19
    i32 5, label %20
    i32 6, label %21
    i32 7, label %22
    i32 8, label %23
    i32 16, label %24
  ]

17:                                               ; preds = %5
  store ptr @fft_execute_dft_2, ptr %16, align 8, !tbaa !17
  br label %.loopexit

18:                                               ; preds = %5
  store ptr @fft_execute_dft_3, ptr %16, align 8, !tbaa !17
  br label %.loopexit

19:                                               ; preds = %5
  store ptr @fft_execute_dft_4, ptr %16, align 8, !tbaa !17
  br label %.loopexit

20:                                               ; preds = %5
  store ptr @fft_execute_dft_5, ptr %16, align 8, !tbaa !17
  br label %.loopexit

21:                                               ; preds = %5
  store ptr @fft_execute_dft_6, ptr %16, align 8, !tbaa !17
  br label %.loopexit

22:                                               ; preds = %5
  store ptr @fft_execute_dft_7, ptr %16, align 8, !tbaa !17
  br label %.loopexit

23:                                               ; preds = %5
  store ptr @fft_execute_dft_8, ptr %16, align 8, !tbaa !17
  br label %.loopexit

24:                                               ; preds = %5
  store ptr @fft_execute_dft_16, ptr %16, align 8, !tbaa !17
  br label %.loopexit

25:                                               ; preds = %5
  %26 = getelementptr inbounds i8, ptr %6, i64 72
  store ptr @fft_execute_dft, ptr %16, align 8, !tbaa !17
  %27 = zext i32 %0 to i64
  %28 = shl nuw nsw i64 %27, 3
  %29 = tail call noalias ptr @malloc(i64 noundef %28) #7
  store ptr %29, ptr %15, align 8, !tbaa !18
  %30 = tail call noalias ptr @malloc(i64 noundef %28) #7
  store ptr %30, ptr %26, align 8, !tbaa !18
  %.not = icmp eq i32 %0, 0
  br i1 %.not, label %.loopexit, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %25
  %31 = select i1 %10, float -1.000000e+00, float 1.000000e+00
  %.not60 = icmp eq i32 %0, 1
  %32 = tail call float @llvm.copysign.f32(float 0.000000e+00, float %31)
  %33 = insertelement <2 x float> poison, float %32, i64 0
  %34 = insertelement <2 x float> %33, float %31, i64 1
  %35 = fmul <2 x float> %34, <float 2.000000e+00, float 2.000000e+00>
  %36 = fpext <2 x float> %35 to <2 x double>
  %37 = fmul <2 x double> %36, <double 0x400921FB54442D18, double 0x400921FB54442D18>
  %38 = uitofp i32 %0 to float
  %39 = fpext float %38 to double
  %40 = add i32 %0, -1
  br i1 %.not60, label %.loopexit.loopexit, label %.preheader.us.preheader

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %41 = insertelement <2 x double> poison, double %39, i64 0
  %42 = shufflevector <2 x double> %41, <2 x double> poison, <2 x i32> zeroinitializer
  %invariant.gep = getelementptr i8, ptr %29, i64 -8
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge.us
  %indvars.iv63 = phi i64 [ %indvars.iv.next64, %._crit_edge.us ], [ 0, %.preheader.us.preheader ]
  %43 = trunc nuw i64 %indvars.iv63 to i32
  br label %44

44:                                               ; preds = %.preheader.us, %44
  %indvars.iv = phi i64 [ 1, %.preheader.us ], [ %indvars.iv.next, %44 ]
  %45 = trunc nuw i64 %indvars.iv to i32
  %46 = mul i32 %45, %43
  %47 = uitofp i32 %46 to float
  %48 = fpext float %47 to double
  %49 = insertelement <2 x double> poison, double %48, i64 0
  %50 = shufflevector <2 x double> %49, <2 x double> poison, <2 x i32> zeroinitializer
  %51 = fmul <2 x double> %37, %50
  %52 = fdiv <2 x double> %51, %42
  %53 = fptrunc <2 x double> %52 to <2 x float>
  %54 = tail call <2 x float> @cexpf(<2 x float> noundef %53) #8
  %gep = getelementptr { float, float }, ptr %invariant.gep, i64 %indvars.iv
  store <2 x float> %54, ptr %gep, align 4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %27
  br i1 %exitcond.not, label %._crit_edge.us, label %44, !llvm.loop !19

._crit_edge.us:                                   ; preds = %44
  %55 = tail call ptr @dotprod_cccf_create(ptr noundef nonnull %29, i32 noundef %40) #8
  %56 = getelementptr inbounds ptr, ptr %30, i64 %indvars.iv63
  store ptr %55, ptr %56, align 8, !tbaa !21
  %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1
  %exitcond67.not = icmp eq i64 %indvars.iv.next64, %27
  br i1 %exitcond67.not, label %.loopexit, label %.preheader.us, !llvm.loop !22

.loopexit.loopexit:                               ; preds = %.preheader.lr.ph
  %57 = tail call ptr @dotprod_cccf_create(ptr noundef %29, i32 noundef %40) #8
  store ptr %57, ptr %30, align 8, !tbaa !21
  br label %.loopexit

.loopexit:                                        ; preds = %._crit_edge.us, %.loopexit.loopexit, %25, %18, %20, %22, %24, %23, %21, %19, %17
  ret ptr %6
}

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @fft_execute_dft_3(ptr noundef) #1

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @fft_execute_dft_5(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @fft_execute_dft_6(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @fft_execute_dft_7(ptr noundef) #1

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @fft_execute_dft_16(ptr noundef) #1

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

; Function Attrs: nounwind
declare <2 x float> @cexpf(<2 x float> noundef) local_unnamed_addr #3

declare ptr @dotprod_cccf_create(ptr noundef, i32 noundef) local_unnamed_addr #4

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

attributes #0 = { 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 #1 = { nounwind uwtable "min-legal-vector-width"="64" "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 = { 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 #4 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind allocsize(0) }
attributes #8 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"fftplan_s", !7, i64 0, !10, i64 8, !10, i64 16, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !10, i64 40, !10, i64 48, !10, i64 56, !8, 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, !10, i64 8}
!12 = !{!6, !10, i64 16}
!13 = !{!6, !7, i64 28}
!14 = !{!6, !7, i64 32}
!15 = !{!6, !7, i64 24}
!16 = !{!6, !7, i64 36}
!17 = !{!6, !10, i64 40}
!18 = !{!8, !8, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!10, !10, i64 0}
!22 = distinct !{!22, !20}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass