; 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 }

@.str.19 = external hidden unnamed_addr constant [90 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [65 x i8], align 1

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

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

54:                                               ; preds = %5
  %55 = load i32, ptr %7, align 4, !tbaa !5
  %56 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str.19, i32 noundef 65, ptr noundef @.str.20, i32 noundef %55)
  store ptr %56, ptr %6, align 8
  store i32 1, ptr %15, align 4
  br label %224

57:                                               ; preds = %5
  %58 = load i32, ptr %7, align 4, !tbaa !5
  %59 = load i32, ptr %14, align 4, !tbaa !5
  %60 = urem i32 %58, %59
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %62, label %66

62:                                               ; preds = %57
  %63 = load i32, ptr %7, align 4, !tbaa !5
  %64 = load i32, ptr %14, align 4, !tbaa !5
  %65 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str.19, i32 noundef 67, ptr noundef @.str.21, i32 noundef %63, i32 noundef %64)
  store ptr %65, ptr %6, align 8
  store i32 1, ptr %15, align 4
  br label %224

66:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %67 = load ptr, ptr %12, align 8, !tbaa !9
  %68 = getelementptr inbounds %struct.fftplan_s, ptr %67, i32 0, i32 0
  %69 = load i32, ptr %68, align 8, !tbaa !11
  %70 = load i32, ptr %14, align 4, !tbaa !5
  %71 = udiv i32 %69, %70
  store i32 %71, ptr %16, align 4, !tbaa !5
  %72 = load i32, ptr %14, align 4, !tbaa !5
  %73 = load ptr, ptr %12, align 8, !tbaa !9
  %74 = getelementptr inbounds %struct.fftplan_s, ptr %73, i32 0, i32 10
  %75 = getelementptr inbounds %struct.anon.1, ptr %74, i32 0, i32 1
  store i32 %72, ptr %75, align 4, !tbaa !20
  %76 = load i32, ptr %16, align 4, !tbaa !5
  %77 = load ptr, ptr %12, align 8, !tbaa !9
  %78 = getelementptr inbounds %struct.fftplan_s, ptr %77, i32 0, i32 10
  %79 = getelementptr inbounds %struct.anon.1, ptr %78, i32 0, i32 0
  store i32 %76, ptr %79, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %80 = load i32, ptr %14, align 4, !tbaa !5
  %81 = load i32, ptr %16, align 4, !tbaa !5
  %82 = icmp ugt i32 %80, %81
  br i1 %82, label %83, label %85

83:                                               ; preds = %66
  %84 = load i32, ptr %14, align 4, !tbaa !5
  br label %87

85:                                               ; preds = %66
  %86 = load i32, ptr %16, align 4, !tbaa !5
  br label %87

87:                                               ; preds = %85, %83
  %88 = phi i32 [ %84, %83 ], [ %86, %85 ]
  store i32 %88, ptr %17, align 4, !tbaa !5
  %89 = load i32, ptr %17, align 4, !tbaa !5
  %90 = zext i32 %89 to i64
  %91 = mul i64 %90, 8
  %92 = call noalias ptr @malloc(i64 noundef %91) #7
  %93 = load ptr, ptr %12, align 8, !tbaa !9
  %94 = getelementptr inbounds %struct.fftplan_s, ptr %93, i32 0, i32 10
  %95 = getelementptr inbounds %struct.anon.1, ptr %94, i32 0, i32 3
  store ptr %92, ptr %95, align 8, !tbaa !20
  %96 = load i32, ptr %17, align 4, !tbaa !5
  %97 = zext i32 %96 to i64
  %98 = mul i64 %97, 8
  %99 = call noalias ptr @malloc(i64 noundef %98) #7
  %100 = load ptr, ptr %12, align 8, !tbaa !9
  %101 = getelementptr inbounds %struct.fftplan_s, ptr %100, i32 0, i32 10
  %102 = getelementptr inbounds %struct.anon.1, ptr %101, i32 0, i32 4
  store ptr %99, ptr %102, align 8, !tbaa !20
  %103 = load ptr, ptr %12, align 8, !tbaa !9
  %104 = getelementptr inbounds %struct.fftplan_s, ptr %103, i32 0, i32 0
  %105 = load i32, ptr %104, align 8, !tbaa !11
  %106 = zext i32 %105 to i64
  %107 = mul i64 %106, 8
  %108 = call noalias ptr @malloc(i64 noundef %107) #7
  %109 = load ptr, ptr %12, align 8, !tbaa !9
  %110 = getelementptr inbounds %struct.fftplan_s, ptr %109, i32 0, i32 10
  %111 = getelementptr inbounds %struct.anon.1, ptr %110, i32 0, i32 2
  store ptr %108, ptr %111, align 8, !tbaa !20
  %112 = load ptr, ptr %12, align 8, !tbaa !9
  %113 = getelementptr inbounds %struct.fftplan_s, ptr %112, i32 0, i32 10
  %114 = getelementptr inbounds %struct.anon.1, ptr %113, i32 0, i32 0
  %115 = load i32, ptr %114, align 8, !tbaa !20
  %116 = load ptr, ptr %12, align 8, !tbaa !9
  %117 = getelementptr inbounds %struct.fftplan_s, ptr %116, i32 0, i32 10
  %118 = getelementptr inbounds %struct.anon.1, ptr %117, i32 0, i32 3
  %119 = load ptr, ptr %118, align 8, !tbaa !20
  %120 = load ptr, ptr %12, align 8, !tbaa !9
  %121 = getelementptr inbounds %struct.fftplan_s, ptr %120, i32 0, i32 10
  %122 = getelementptr inbounds %struct.anon.1, ptr %121, i32 0, i32 4
  %123 = load ptr, ptr %122, align 8, !tbaa !20
  %124 = load ptr, ptr %12, align 8, !tbaa !9
  %125 = getelementptr inbounds %struct.fftplan_s, ptr %124, i32 0, i32 3
  %126 = load i32, ptr %125, align 8, !tbaa !17
  %127 = load ptr, ptr %12, align 8, !tbaa !9
  %128 = getelementptr inbounds %struct.fftplan_s, ptr %127, i32 0, i32 4
  %129 = load i32, ptr %128, align 4, !tbaa !15
  %130 = call ptr @fft_create_plan(i32 noundef %115, ptr noundef %119, ptr noundef %123, i32 noundef %126, i32 noundef %129)
  %131 = load ptr, ptr %12, align 8, !tbaa !9
  %132 = getelementptr inbounds %struct.fftplan_s, ptr %131, i32 0, i32 10
  %133 = getelementptr inbounds %struct.anon.1, ptr %132, i32 0, i32 6
  store ptr %130, ptr %133, align 8, !tbaa !20
  %134 = load ptr, ptr %12, align 8, !tbaa !9
  %135 = getelementptr inbounds %struct.fftplan_s, ptr %134, i32 0, i32 10
  %136 = getelementptr inbounds %struct.anon.1, ptr %135, i32 0, i32 1
  %137 = load i32, ptr %136, align 4, !tbaa !20
  %138 = load ptr, ptr %12, align 8, !tbaa !9
  %139 = getelementptr inbounds %struct.fftplan_s, ptr %138, i32 0, i32 10
  %140 = getelementptr inbounds %struct.anon.1, ptr %139, i32 0, i32 3
  %141 = load ptr, ptr %140, align 8, !tbaa !20
  %142 = load ptr, ptr %12, align 8, !tbaa !9
  %143 = getelementptr inbounds %struct.fftplan_s, ptr %142, i32 0, i32 10
  %144 = getelementptr inbounds %struct.anon.1, ptr %143, i32 0, i32 4
  %145 = load ptr, ptr %144, align 8, !tbaa !20
  %146 = load ptr, ptr %12, align 8, !tbaa !9
  %147 = getelementptr inbounds %struct.fftplan_s, ptr %146, i32 0, i32 3
  %148 = load i32, ptr %147, align 8, !tbaa !17
  %149 = load ptr, ptr %12, align 8, !tbaa !9
  %150 = getelementptr inbounds %struct.fftplan_s, ptr %149, i32 0, i32 4
  %151 = load i32, ptr %150, align 4, !tbaa !15
  %152 = call ptr @fft_create_plan(i32 noundef %137, ptr noundef %141, ptr noundef %145, i32 noundef %148, i32 noundef %151)
  %153 = load ptr, ptr %12, align 8, !tbaa !9
  %154 = getelementptr inbounds %struct.fftplan_s, ptr %153, i32 0, i32 10
  %155 = getelementptr inbounds %struct.anon.1, ptr %154, i32 0, i32 7
  store ptr %152, ptr %155, align 8, !tbaa !20
  %156 = load ptr, ptr %12, align 8, !tbaa !9
  %157 = getelementptr inbounds %struct.fftplan_s, ptr %156, i32 0, i32 0
  %158 = load i32, ptr %157, align 8, !tbaa !11
  %159 = zext i32 %158 to i64
  %160 = mul i64 %159, 8
  %161 = call noalias ptr @malloc(i64 noundef %160) #7
  %162 = load ptr, ptr %12, align 8, !tbaa !9
  %163 = getelementptr inbounds %struct.fftplan_s, ptr %162, i32 0, i32 10
  %164 = getelementptr inbounds %struct.anon.1, ptr %163, i32 0, i32 5
  store ptr %161, ptr %164, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %165 = load ptr, ptr %12, align 8, !tbaa !9
  %166 = getelementptr inbounds %struct.fftplan_s, ptr %165, i32 0, i32 3
  %167 = load i32, ptr %166, align 8, !tbaa !17
  %168 = icmp eq i32 %167, 1
  %169 = zext i1 %168 to i64
  %170 = select i1 %168, double -1.000000e+00, double 1.000000e+00
  %171 = fptrunc double %170 to float
  store float %171, ptr %18, align 4, !tbaa !21
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %172

172:                                              ; preds = %219, %87
  %173 = load i32, ptr %13, align 4, !tbaa !5
  %174 = load ptr, ptr %12, align 8, !tbaa !9
  %175 = getelementptr inbounds %struct.fftplan_s, ptr %174, i32 0, i32 0
  %176 = load i32, ptr %175, align 8, !tbaa !11
  %177 = icmp ult i32 %173, %176
  br i1 %177, label %178, label %222

178:                                              ; preds = %172
  %179 = load float, ptr %18, align 4, !tbaa !21
  %180 = fmul float 0.000000e+00, %179
  %181 = fmul float 1.000000e+00, %179
  %182 = fmul float %180, 2.000000e+00
  %183 = fmul float %181, 2.000000e+00
  %184 = fpext float %182 to double
  %185 = fpext float %183 to double
  %186 = fmul double %184, 0x400921FB54442D18
  %187 = fmul double %185, 0x400921FB54442D18
  %188 = load i32, ptr %13, align 4, !tbaa !5
  %189 = uitofp i32 %188 to float
  %190 = fpext float %189 to double
  %191 = fmul double %186, %190
  %192 = fmul double %187, %190
  %193 = load ptr, ptr %12, align 8, !tbaa !9
  %194 = getelementptr inbounds %struct.fftplan_s, ptr %193, i32 0, i32 0
  %195 = load i32, ptr %194, align 8, !tbaa !11
  %196 = uitofp i32 %195 to float
  %197 = fpext float %196 to double
  %198 = fdiv double %191, %197
  %199 = fdiv double %192, %197
  %200 = fptrunc double %198 to float
  %201 = fptrunc double %199 to float
  %202 = getelementptr inbounds { float, float }, ptr %19, i32 0, i32 0
  %203 = getelementptr inbounds { float, float }, ptr %19, i32 0, i32 1
  store float %200, ptr %202, align 4
  store float %201, ptr %203, align 4
  %204 = load <2 x float>, ptr %19, align 4
  %205 = call <2 x float> @cexpf(<2 x float> noundef %204) #6
  store <2 x float> %205, ptr %20, align 4
  %206 = getelementptr inbounds { float, float }, ptr %20, i32 0, i32 0
  %207 = load float, ptr %206, align 4
  %208 = getelementptr inbounds { float, float }, ptr %20, i32 0, i32 1
  %209 = load float, ptr %208, align 4
  %210 = load ptr, ptr %12, align 8, !tbaa !9
  %211 = getelementptr inbounds %struct.fftplan_s, ptr %210, i32 0, i32 10
  %212 = getelementptr inbounds %struct.anon.1, ptr %211, i32 0, i32 5
  %213 = load ptr, ptr %212, align 8, !tbaa !20
  %214 = load i32, ptr %13, align 4, !tbaa !5
  %215 = zext i32 %214 to i64
  %216 = getelementptr inbounds { float, float }, ptr %213, i64 %215
  %217 = getelementptr inbounds { float, float }, ptr %216, i32 0, i32 0
  %218 = getelementptr inbounds { float, float }, ptr %216, i32 0, i32 1
  store float %207, ptr %217, align 4
  store float %209, ptr %218, align 4
  br label %219

219:                                              ; preds = %178
  %220 = load i32, ptr %13, align 4, !tbaa !5
  %221 = add i32 %220, 1
  store i32 %221, ptr %13, align 4, !tbaa !5
  br label %172, !llvm.loop !23

222:                                              ; preds = %172
  %223 = load ptr, ptr %12, align 8, !tbaa !9
  store ptr %223, ptr %6, align 8
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %224

224:                                              ; preds = %222, %62, %54
  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 8, ptr %12) #6
  %225 = load ptr, ptr %6, align 8
  ret ptr %225
}

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

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

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

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

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

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 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = { 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 = !{!"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 = !{!12, !10, i64 40}
!20 = !{!7, !7, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"float", !7, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


; 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.19 = external hidden unnamed_addr constant [90 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [65 x i8], align 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 #0

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

; Function Attrs: nounwind uwtable
define dso_local ptr @fft_create_plan_mixed_radix(i32 noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #2 {
  %6 = tail call noalias dereferenceable_or_null(120) ptr @malloc(i64 noundef 120) #6
  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 2, ptr %14, align 4, !tbaa !16
  %15 = getelementptr inbounds i8, ptr %6, i64 40
  store ptr @fft_execute_mixed_radix, ptr %15, align 8, !tbaa !17
  %16 = tail call i32 @fft_estimate_mixed_radix(i32 noundef %0)
  %17 = icmp eq i32 %16, 0
  br i1 %17, label %18, label %20

18:                                               ; preds = %5
  %19 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str.19, i32 noundef 65, ptr noundef nonnull @.str.20, i32 noundef %0) #7
  br label %.loopexit

20:                                               ; preds = %5
  %21 = urem i32 %0, %16
  %22 = udiv i32 %0, %16
  %.not = icmp eq i32 %21, 0
  br i1 %.not, label %25, label %23

23:                                               ; preds = %20
  %24 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str.19, i32 noundef 67, ptr noundef nonnull @.str.21, i32 noundef %0, i32 noundef %16) #7
  br label %.loopexit

25:                                               ; preds = %20
  %26 = getelementptr inbounds i8, ptr %6, i64 64
  %27 = getelementptr inbounds i8, ptr %6, i64 68
  store i32 %16, ptr %27, align 4, !tbaa !18
  store i32 %22, ptr %26, align 8, !tbaa !18
  %28 = tail call i32 @llvm.umax.i32(i32 %16, i32 %22)
  %29 = zext i32 %28 to i64
  %30 = shl nuw nsw i64 %29, 3
  %31 = tail call noalias ptr @malloc(i64 noundef %30) #6
  %32 = getelementptr inbounds i8, ptr %6, i64 80
  store ptr %31, ptr %32, align 8, !tbaa !18
  %33 = tail call noalias ptr @malloc(i64 noundef %30) #6
  %34 = getelementptr inbounds i8, ptr %6, i64 88
  store ptr %33, ptr %34, align 8, !tbaa !18
  %35 = zext i32 %0 to i64
  %36 = shl nuw nsw i64 %35, 3
  %37 = tail call noalias ptr @malloc(i64 noundef %36) #6
  %38 = getelementptr inbounds i8, ptr %6, i64 72
  store ptr %37, ptr %38, align 8, !tbaa !18
  %39 = tail call ptr @fft_create_plan(i32 noundef %22, ptr noundef %31, ptr noundef %33, i32 noundef %11, i32 noundef %4)
  %40 = getelementptr inbounds i8, ptr %6, i64 104
  store ptr %39, ptr %40, align 8, !tbaa !18
  %41 = tail call ptr @fft_create_plan(i32 noundef %16, ptr noundef %31, ptr noundef %33, i32 noundef %11, i32 noundef %4)
  %42 = getelementptr inbounds i8, ptr %6, i64 112
  store ptr %41, ptr %42, align 8, !tbaa !18
  %43 = tail call noalias ptr @malloc(i64 noundef %36) #6
  %44 = getelementptr inbounds i8, ptr %6, i64 96
  store ptr %43, ptr %44, align 8, !tbaa !18
  %.not67 = icmp eq i32 %0, 0
  br i1 %.not67, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %25
  %45 = select i1 %10, float -1.000000e+00, float 1.000000e+00
  %46 = tail call float @llvm.copysign.f32(float 0.000000e+00, float %45)
  %47 = insertelement <2 x float> poison, float %46, i64 0
  %48 = insertelement <2 x float> %47, float %45, i64 1
  %49 = fmul <2 x float> %48, <float 2.000000e+00, float 2.000000e+00>
  %50 = fpext <2 x float> %49 to <2 x double>
  %51 = fmul <2 x double> %50, <double 0x400921FB54442D18, double 0x400921FB54442D18>
  %52 = uitofp i32 %0 to float
  %53 = fpext float %52 to double
  %54 = insertelement <2 x double> poison, double %53, i64 0
  %55 = shufflevector <2 x double> %54, <2 x double> poison, <2 x i32> zeroinitializer
  br label %56

56:                                               ; preds = %.lr.ph, %56
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %56 ]
  %57 = trunc nuw i64 %indvars.iv to i32
  %58 = uitofp i32 %57 to float
  %59 = fpext float %58 to double
  %60 = insertelement <2 x double> poison, double %59, i64 0
  %61 = shufflevector <2 x double> %60, <2 x double> poison, <2 x i32> zeroinitializer
  %62 = fmul <2 x double> %51, %61
  %63 = fdiv <2 x double> %62, %55
  %64 = fptrunc <2 x double> %63 to <2 x float>
  %65 = tail call <2 x float> @cexpf(<2 x float> noundef %64) #7
  %66 = getelementptr inbounds { float, float }, ptr %43, i64 %indvars.iv
  store <2 x float> %65, ptr %66, align 4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %35
  br i1 %exitcond.not, label %.loopexit, label %56, !llvm.loop !19

.loopexit:                                        ; preds = %56, %25, %23, %18
  %.0 = phi ptr [ %19, %18 ], [ %24, %23 ], [ %6, %25 ], [ %6, %56 ]
  ret ptr %.0
}

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @fft_estimate_mixed_radix(i32 noundef) local_unnamed_addr #1

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

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

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"="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 #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 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind allocsize(0) }
attributes #7 = { 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"}


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