; LLVM IR from software-mansion/react-native-audio-api :: packages/react-native-audio-api/common/cpp/audioapi/libs/pffft (pffft)

; 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.PFFFT_Setup = type { i32, i32, [25 x i32], i32, ptr, ptr, ptr }

@.str.2 = external hidden unnamed_addr constant [144 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [2 x i8], align 1
@__PRETTY_FUNCTION__.pffft_new_setup = external hidden unnamed_addr constant [53 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [32 x i8], align 1

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @pffft_aligned_malloc(i64 noundef) #2

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

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

; Function Attrs: nounwind
declare double @cos(double noundef) #4

; Function Attrs: nounwind
declare double @sin(double noundef) #4

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

14:                                               ; preds = %2
  store ptr null, ptr %3, align 8
  br label %212

15:                                               ; preds = %2
  %16 = load i32, ptr %4, align 4, !tbaa !5
  %17 = icmp sgt i32 %16, 67108864
  br i1 %17, label %18, label %19

18:                                               ; preds = %15
  call void @__assert_fail(ptr noundef @.str.25, ptr noundef @.str.2, i32 noundef 1238, ptr noundef @__PRETTY_FUNCTION__.pffft_new_setup) #5
  unreachable

19:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %20 = call noalias ptr @malloc(i64 noundef 136) #7
  store ptr %20, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %21 = load i32, ptr %5, align 4, !tbaa !5
  %22 = icmp eq i32 %21, 0
  br i1 %22, label %23, label %33

23:                                               ; preds = %19
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = srem i32 %24, 32
  %26 = icmp eq i32 %25, 0
  br i1 %26, label %27, label %31

27:                                               ; preds = %23
  %28 = load i32, ptr %4, align 4, !tbaa !5
  %29 = icmp sgt i32 %28, 0
  br i1 %29, label %30, label %31

30:                                               ; preds = %27
  br label %32

31:                                               ; preds = %27, %23
  call void @__assert_fail(ptr noundef @.str.26, ptr noundef @.str.2, i32 noundef 1246, ptr noundef @__PRETTY_FUNCTION__.pffft_new_setup) #5
  unreachable

32:                                               ; preds = %30
  br label %33

33:                                               ; preds = %32, %19
  %34 = load i32, ptr %5, align 4, !tbaa !5
  %35 = icmp eq i32 %34, 1
  br i1 %35, label %36, label %46

36:                                               ; preds = %33
  %37 = load i32, ptr %4, align 4, !tbaa !5
  %38 = srem i32 %37, 16
  %39 = icmp eq i32 %38, 0
  br i1 %39, label %40, label %44

40:                                               ; preds = %36
  %41 = load i32, ptr %4, align 4, !tbaa !5
  %42 = icmp sgt i32 %41, 0
  br i1 %42, label %43, label %44

43:                                               ; preds = %40
  br label %45

44:                                               ; preds = %40, %36
  call void @__assert_fail(ptr noundef @.str.27, ptr noundef @.str.2, i32 noundef 1247, ptr noundef @__PRETTY_FUNCTION__.pffft_new_setup) #5
  unreachable

45:                                               ; preds = %43
  br label %46

46:                                               ; preds = %45, %33
  %47 = load i32, ptr %4, align 4, !tbaa !5
  %48 = load ptr, ptr %6, align 8, !tbaa !9
  %49 = getelementptr inbounds %struct.PFFFT_Setup, ptr %48, i32 0, i32 0
  store i32 %47, ptr %49, align 8, !tbaa !11
  %50 = load i32, ptr %5, align 4, !tbaa !5
  %51 = load ptr, ptr %6, align 8, !tbaa !9
  %52 = getelementptr inbounds %struct.PFFFT_Setup, ptr %51, i32 0, i32 3
  store i32 %50, ptr %52, align 4, !tbaa !13
  %53 = load i32, ptr %5, align 4, !tbaa !5
  %54 = icmp eq i32 %53, 0
  br i1 %54, label %55, label %58

55:                                               ; preds = %46
  %56 = load i32, ptr %4, align 4, !tbaa !5
  %57 = sdiv i32 %56, 2
  br label %60

58:                                               ; preds = %46
  %59 = load i32, ptr %4, align 4, !tbaa !5
  br label %60

60:                                               ; preds = %58, %55
  %61 = phi i32 [ %57, %55 ], [ %59, %58 ]
  %62 = sdiv i32 %61, 4
  %63 = load ptr, ptr %6, align 8, !tbaa !9
  %64 = getelementptr inbounds %struct.PFFFT_Setup, ptr %63, i32 0, i32 1
  store i32 %62, ptr %64, align 4, !tbaa !14
  %65 = load ptr, ptr %6, align 8, !tbaa !9
  %66 = getelementptr inbounds %struct.PFFFT_Setup, ptr %65, i32 0, i32 1
  %67 = load i32, ptr %66, align 4, !tbaa !14
  %68 = mul nsw i32 2, %67
  %69 = sext i32 %68 to i64
  %70 = mul i64 %69, 16
  %71 = call ptr @pffft_aligned_malloc(i64 noundef %70)
  %72 = load ptr, ptr %6, align 8, !tbaa !9
  %73 = getelementptr inbounds %struct.PFFFT_Setup, ptr %72, i32 0, i32 4
  store ptr %71, ptr %73, align 8, !tbaa !15
  %74 = load ptr, ptr %6, align 8, !tbaa !9
  %75 = getelementptr inbounds %struct.PFFFT_Setup, ptr %74, i32 0, i32 4
  %76 = load ptr, ptr %75, align 8, !tbaa !15
  %77 = load ptr, ptr %6, align 8, !tbaa !9
  %78 = getelementptr inbounds %struct.PFFFT_Setup, ptr %77, i32 0, i32 5
  store ptr %76, ptr %78, align 8, !tbaa !16
  %79 = load ptr, ptr %6, align 8, !tbaa !9
  %80 = getelementptr inbounds %struct.PFFFT_Setup, ptr %79, i32 0, i32 4
  %81 = load ptr, ptr %80, align 8, !tbaa !15
  %82 = load ptr, ptr %6, align 8, !tbaa !9
  %83 = getelementptr inbounds %struct.PFFFT_Setup, ptr %82, i32 0, i32 1
  %84 = load i32, ptr %83, align 4, !tbaa !14
  %85 = mul nsw i32 2, %84
  %86 = mul nsw i32 %85, 3
  %87 = sdiv i32 %86, 4
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds <4 x float>, ptr %81, i64 %88
  %90 = load ptr, ptr %6, align 8, !tbaa !9
  %91 = getelementptr inbounds %struct.PFFFT_Setup, ptr %90, i32 0, i32 6
  store ptr %89, ptr %91, align 8, !tbaa !17
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %92

92:                                               ; preds = %158, %60
  %93 = load i32, ptr %7, align 4, !tbaa !5
  %94 = load ptr, ptr %6, align 8, !tbaa !9
  %95 = getelementptr inbounds %struct.PFFFT_Setup, ptr %94, i32 0, i32 1
  %96 = load i32, ptr %95, align 4, !tbaa !14
  %97 = icmp slt i32 %93, %96
  br i1 %97, label %98, label %161

98:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %99 = load i32, ptr %7, align 4, !tbaa !5
  %100 = sdiv i32 %99, 4
  store i32 %100, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %101 = load i32, ptr %7, align 4, !tbaa !5
  %102 = srem i32 %101, 4
  store i32 %102, ptr %10, align 4, !tbaa !5
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %103

103:                                              ; preds = %154, %98
  %104 = load i32, ptr %8, align 4, !tbaa !5
  %105 = icmp slt i32 %104, 3
  br i1 %105, label %106, label %157

106:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %107 = load i32, ptr %8, align 4, !tbaa !5
  %108 = add nsw i32 %107, 1
  %109 = sitofp i32 %108 to double
  %110 = fmul double 0xC01921FB54442D18, %109
  %111 = load i32, ptr %7, align 4, !tbaa !5
  %112 = sitofp i32 %111 to double
  %113 = fmul double %110, %112
  %114 = load i32, ptr %4, align 4, !tbaa !5
  %115 = sitofp i32 %114 to double
  %116 = fdiv double %113, %115
  %117 = fptrunc double %116 to float
  store float %117, ptr %11, align 4, !tbaa !18
  %118 = load float, ptr %11, align 4, !tbaa !18
  %119 = fpext float %118 to double
  %120 = call double @cos(double noundef %119) #6
  %121 = fptrunc double %120 to float
  %122 = load ptr, ptr %6, align 8, !tbaa !9
  %123 = getelementptr inbounds %struct.PFFFT_Setup, ptr %122, i32 0, i32 5
  %124 = load ptr, ptr %123, align 8, !tbaa !16
  %125 = load i32, ptr %9, align 4, !tbaa !5
  %126 = mul nsw i32 %125, 3
  %127 = load i32, ptr %8, align 4, !tbaa !5
  %128 = add nsw i32 %126, %127
  %129 = mul nsw i32 2, %128
  %130 = add nsw i32 %129, 0
  %131 = mul nsw i32 %130, 4
  %132 = load i32, ptr %10, align 4, !tbaa !5
  %133 = add nsw i32 %131, %132
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds float, ptr %124, i64 %134
  store float %121, ptr %135, align 4, !tbaa !18
  %136 = load float, ptr %11, align 4, !tbaa !18
  %137 = fpext float %136 to double
  %138 = call double @sin(double noundef %137) #6
  %139 = fptrunc double %138 to float
  %140 = load ptr, ptr %6, align 8, !tbaa !9
  %141 = getelementptr inbounds %struct.PFFFT_Setup, ptr %140, i32 0, i32 5
  %142 = load ptr, ptr %141, align 8, !tbaa !16
  %143 = load i32, ptr %9, align 4, !tbaa !5
  %144 = mul nsw i32 %143, 3
  %145 = load i32, ptr %8, align 4, !tbaa !5
  %146 = add nsw i32 %144, %145
  %147 = mul nsw i32 2, %146
  %148 = add nsw i32 %147, 1
  %149 = mul nsw i32 %148, 4
  %150 = load i32, ptr %10, align 4, !tbaa !5
  %151 = add nsw i32 %149, %150
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds float, ptr %142, i64 %152
  store float %139, ptr %153, align 4, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %154

154:                                              ; preds = %106
  %155 = load i32, ptr %8, align 4, !tbaa !5
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %8, align 4, !tbaa !5
  br label %103, !llvm.loop !20

157:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %158

158:                                              ; preds = %157
  %159 = load i32, ptr %7, align 4, !tbaa !5
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %7, align 4, !tbaa !5
  br label %92, !llvm.loop !22

161:                                              ; preds = %92
  %162 = load i32, ptr %5, align 4, !tbaa !5
  %163 = icmp eq i32 %162, 0
  br i1 %163, label %164, label %173

164:                                              ; preds = %161
  %165 = load i32, ptr %4, align 4, !tbaa !5
  %166 = sdiv i32 %165, 4
  %167 = load ptr, ptr %6, align 8, !tbaa !9
  %168 = getelementptr inbounds %struct.PFFFT_Setup, ptr %167, i32 0, i32 6
  %169 = load ptr, ptr %168, align 8, !tbaa !17
  %170 = load ptr, ptr %6, align 8, !tbaa !9
  %171 = getelementptr inbounds %struct.PFFFT_Setup, ptr %170, i32 0, i32 2
  %172 = getelementptr inbounds [25 x i32], ptr %171, i64 0, i64 0
  call void @rffti1_ps(i32 noundef %166, ptr noundef %169, ptr noundef %172)
  br label %182

173:                                              ; preds = %161
  %174 = load i32, ptr %4, align 4, !tbaa !5
  %175 = sdiv i32 %174, 4
  %176 = load ptr, ptr %6, align 8, !tbaa !9
  %177 = getelementptr inbounds %struct.PFFFT_Setup, ptr %176, i32 0, i32 6
  %178 = load ptr, ptr %177, align 8, !tbaa !17
  %179 = load ptr, ptr %6, align 8, !tbaa !9
  %180 = getelementptr inbounds %struct.PFFFT_Setup, ptr %179, i32 0, i32 2
  %181 = getelementptr inbounds [25 x i32], ptr %180, i64 0, i64 0
  call void @cffti1_ps(i32 noundef %175, ptr noundef %178, ptr noundef %181)
  br label %182

182:                                              ; preds = %173, %164
  store i32 0, ptr %7, align 4, !tbaa !5
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %183

183:                                              ; preds = %200, %182
  %184 = load i32, ptr %7, align 4, !tbaa !5
  %185 = load ptr, ptr %6, align 8, !tbaa !9
  %186 = getelementptr inbounds %struct.PFFFT_Setup, ptr %185, i32 0, i32 2
  %187 = getelementptr inbounds [25 x i32], ptr %186, i64 0, i64 1
  %188 = load i32, ptr %187, align 4, !tbaa !5
  %189 = icmp slt i32 %184, %188
  br i1 %189, label %190, label %203

190:                                              ; preds = %183
  %191 = load ptr, ptr %6, align 8, !tbaa !9
  %192 = getelementptr inbounds %struct.PFFFT_Setup, ptr %191, i32 0, i32 2
  %193 = load i32, ptr %7, align 4, !tbaa !5
  %194 = add nsw i32 2, %193
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [25 x i32], ptr %192, i64 0, i64 %195
  %197 = load i32, ptr %196, align 4, !tbaa !5
  %198 = load i32, ptr %8, align 4, !tbaa !5
  %199 = mul nsw i32 %198, %197
  store i32 %199, ptr %8, align 4, !tbaa !5
  br label %200

200:                                              ; preds = %190
  %201 = load i32, ptr %7, align 4, !tbaa !5
  %202 = add nsw i32 %201, 1
  store i32 %202, ptr %7, align 4, !tbaa !5
  br label %183, !llvm.loop !23

203:                                              ; preds = %183
  %204 = load i32, ptr %8, align 4, !tbaa !5
  %205 = load i32, ptr %4, align 4, !tbaa !5
  %206 = sdiv i32 %205, 4
  %207 = icmp ne i32 %204, %206
  br i1 %207, label %208, label %210

208:                                              ; preds = %203
  %209 = load ptr, ptr %6, align 8, !tbaa !9
  call void @pffft_destroy_setup(ptr noundef %209)
  store ptr null, ptr %6, align 8, !tbaa !9
  br label %210

210:                                              ; preds = %208, %203
  %211 = load ptr, ptr %6, align 8, !tbaa !9
  store ptr %211, ptr %3, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %212

212:                                              ; preds = %210, %14
  %213 = load ptr, ptr %3, align 8
  ret ptr %213
}

; Function Attrs: nounwind uwtable
declare hidden void @rffti1_ps(i32 noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @pffft_destroy_setup(ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn 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 #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 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 = { 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 = { noreturn nounwind }
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 = !{!"PFFFT_Setup", !6, i64 0, !6, i64 4, !7, i64 8, !6, i64 108, !10, i64 112, !10, i64 120, !10, i64 128}
!13 = !{!12, !6, i64 108}
!14 = !{!12, !6, i64 4}
!15 = !{!12, !10, i64 112}
!16 = !{!12, !10, i64 120}
!17 = !{!12, !10, i64 128}
!18 = !{!19, !19, i64 0}
!19 = !{!"float", !7, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = distinct !{!23, !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 [144 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [2 x i8], align 1
@__PRETTY_FUNCTION__.pffft_new_setup = external hidden unnamed_addr constant [53 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [32 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @pffft_aligned_malloc(i64 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: nounwind uwtable
declare dso_local void @cffti1_ps(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @cos(double noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sin(double noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @pffft_new_setup(i32 noundef %0, i32 noundef %1) local_unnamed_addr #1 {
  %3 = icmp slt i32 %0, 0
  br i1 %3, label %112, label %4

4:                                                ; preds = %2
  %5 = icmp ugt i32 %0, 67108864
  br i1 %5, label %6, label %7

6:                                                ; preds = %4
  tail call void @__assert_fail(ptr noundef nonnull @.str.25, ptr noundef nonnull @.str.2, i32 noundef 1238, ptr noundef nonnull @__PRETTY_FUNCTION__.pffft_new_setup) #5
  unreachable

7:                                                ; preds = %4
  %8 = tail call noalias dereferenceable_or_null(136) ptr @malloc(i64 noundef 136) #6
  %9 = icmp eq i32 %1, 0
  br i1 %9, label %10, label %15

10:                                               ; preds = %7
  %11 = and i32 %0, 31
  %12 = icmp eq i32 %11, 0
  %13 = icmp ne i32 %0, 0
  %or.cond = and i1 %13, %12
  br i1 %or.cond, label %.thread, label %14

14:                                               ; preds = %10
  tail call void @__assert_fail(ptr noundef nonnull @.str.26, ptr noundef nonnull @.str.2, i32 noundef 1246, ptr noundef nonnull @__PRETTY_FUNCTION__.pffft_new_setup) #5
  unreachable

15:                                               ; preds = %7
  %16 = icmp eq i32 %1, 1
  br i1 %16, label %17, label %.thread

17:                                               ; preds = %15
  %18 = and i32 %0, 15
  %19 = icmp eq i32 %18, 0
  %20 = icmp ne i32 %0, 0
  %or.cond3 = and i1 %20, %19
  br i1 %or.cond3, label %.thread, label %21

21:                                               ; preds = %17
  tail call void @__assert_fail(ptr noundef nonnull @.str.27, ptr noundef nonnull @.str.2, i32 noundef 1247, ptr noundef nonnull @__PRETTY_FUNCTION__.pffft_new_setup) #5
  unreachable

.thread:                                          ; preds = %10, %17, %15
  store i32 %0, ptr %8, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %8, i64 108
  store i32 %1, ptr %22, align 4, !tbaa !11
  %23 = zext i1 %9 to i32
  %24 = lshr i32 %0, %23
  %25 = lshr i32 %24, 2
  %26 = getelementptr inbounds i8, ptr %8, i64 4
  store i32 %25, ptr %26, align 4, !tbaa !12
  %27 = shl nuw nsw i32 %25, 5
  %28 = zext nneg i32 %27 to i64
  %29 = tail call ptr @pffft_aligned_malloc(i64 noundef %28)
  %30 = getelementptr inbounds i8, ptr %8, i64 112
  store ptr %29, ptr %30, align 8, !tbaa !13
  %31 = getelementptr inbounds i8, ptr %8, i64 120
  store ptr %29, ptr %31, align 8, !tbaa !14
  %32 = mul nuw nsw i32 %25, 6
  %33 = lshr i32 %32, 2
  %34 = zext nneg i32 %33 to i64
  %35 = getelementptr inbounds <4 x float>, ptr %29, i64 %34
  %36 = getelementptr inbounds i8, ptr %8, i64 128
  store ptr %35, ptr %36, align 8, !tbaa !15
  %.not77 = icmp ult i32 %24, 4
  br i1 %.not77, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.thread
  %37 = uitofp nneg i32 %0 to double
  br label %38

38:                                               ; preds = %.lr.ph, %38
  %.06469 = phi i32 [ 0, %.lr.ph ], [ %88, %38 ]
  %39 = lshr i32 %.06469, 2
  %40 = and i32 %.06469, 3
  %41 = uitofp nneg i32 %.06469 to double
  %42 = fmul double %41, 0xC01921FB54442D18
  %43 = fdiv double %42, %37
  %44 = fptrunc double %43 to float
  %45 = fpext float %44 to double
  %46 = tail call double @cos(double noundef %45) #7
  %47 = fptrunc double %46 to float
  %48 = mul i32 %39, 24
  %49 = or disjoint i32 %48, %40
  %50 = zext nneg i32 %49 to i64
  %51 = getelementptr inbounds float, ptr %29, i64 %50
  store float %47, ptr %51, align 4, !tbaa !16
  %52 = tail call double @sin(double noundef %45) #7
  %53 = fptrunc double %52 to float
  %54 = or disjoint i32 %49, 4
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds float, ptr %29, i64 %55
  store float %53, ptr %56, align 4, !tbaa !16
  %57 = fmul double %41, 0xC02921FB54442D18
  %58 = fdiv double %57, %37
  %59 = fptrunc double %58 to float
  %60 = fpext float %59 to double
  %61 = tail call double @cos(double noundef %60) #7
  %62 = fptrunc double %61 to float
  %63 = mul i32 %39, 24
  %64 = add i32 %63, 8
  %65 = or disjoint i32 %64, %40
  %66 = zext nneg i32 %65 to i64
  %67 = getelementptr inbounds float, ptr %29, i64 %66
  store float %62, ptr %67, align 4, !tbaa !16
  %68 = tail call double @sin(double noundef %60) #7
  %69 = fptrunc double %68 to float
  %70 = or disjoint i32 %65, 4
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds float, ptr %29, i64 %71
  store float %69, ptr %72, align 4, !tbaa !16
  %73 = fmul double %41, 0xC032D97C7F3321D2
  %74 = fdiv double %73, %37
  %75 = fptrunc double %74 to float
  %76 = fpext float %75 to double
  %77 = tail call double @cos(double noundef %76) #7
  %78 = fptrunc double %77 to float
  %narrow = mul i32 %39, 24
  %79 = add i32 %narrow, 16
  %80 = or disjoint i32 %79, %40
  %81 = zext nneg i32 %80 to i64
  %82 = getelementptr inbounds float, ptr %29, i64 %81
  store float %78, ptr %82, align 4, !tbaa !16
  %83 = tail call double @sin(double noundef %76) #7
  %84 = fptrunc double %83 to float
  %85 = or disjoint i32 %80, 4
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds float, ptr %29, i64 %86
  store float %84, ptr %87, align 4, !tbaa !16
  %88 = add nuw nsw i32 %.06469, 1
  %89 = icmp ult i32 %88, %25
  br i1 %89, label %38, label %._crit_edge, !llvm.loop !18

._crit_edge:                                      ; preds = %38, %.thread
  %90 = lshr i32 %0, 2
  %91 = getelementptr inbounds i8, ptr %8, i64 8
  br i1 %9, label %92, label %93

92:                                               ; preds = %._crit_edge
  tail call void @rffti1_ps(i32 noundef %90, ptr noundef %35, ptr noundef nonnull %91)
  br label %94

93:                                               ; preds = %._crit_edge
  tail call void @cffti1_ps(i32 noundef %90, ptr noundef %35, ptr noundef nonnull %91)
  br label %94

94:                                               ; preds = %93, %92
  %95 = getelementptr inbounds i8, ptr %8, i64 12
  %96 = load i32, ptr %95, align 4, !tbaa !20
  %97 = icmp sgt i32 %96, 0
  br i1 %97, label %.lr.ph73, label %._crit_edge74

.lr.ph73:                                         ; preds = %94
  %98 = getelementptr inbounds i8, ptr %8, i64 8
  %wide.trip.count = zext nneg i32 %96 to i64
  %min.iters.check = icmp ult i32 %96, 8
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph73
  %n.vec = and i64 %wide.trip.count, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %102, %vector.body ]
  %vec.phi78 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %103, %vector.body ]
  %99 = or disjoint i64 %index, 2
  %100 = getelementptr inbounds [25 x i32], ptr %98, i64 0, i64 %99
  %101 = getelementptr inbounds i8, ptr %100, i64 16
  %wide.load = load <4 x i32>, ptr %100, align 4, !tbaa !20
  %wide.load79 = load <4 x i32>, ptr %101, align 4, !tbaa !20
  %102 = mul <4 x i32> %wide.load, %vec.phi
  %103 = mul <4 x i32> %wide.load79, %vec.phi78
  %index.next = add nuw i64 %index, 8
  %104 = icmp eq i64 %index.next, %n.vec
  br i1 %104, label %middle.block, label %vector.body, !llvm.loop !21

middle.block:                                     ; preds = %vector.body
  %bin.rdx = mul <4 x i32> %103, %102
  %105 = tail call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge74, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph73
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph73 ], [ %n.vec, %middle.block ]
  %.16670.ph = phi i32 [ 1, %.lr.ph73 ], [ %105, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %.16670 = phi i32 [ %109, %scalar.ph ], [ %.16670.ph, %scalar.ph.preheader ]
  %106 = add nuw nsw i64 %indvars.iv, 2
  %107 = getelementptr inbounds [25 x i32], ptr %98, i64 0, i64 %106
  %108 = load i32, ptr %107, align 4, !tbaa !20
  %109 = mul nsw i32 %108, %.16670
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge74, label %scalar.ph, !llvm.loop !24

._crit_edge74:                                    ; preds = %scalar.ph, %middle.block, %94
  %.166.lcssa = phi i32 [ 1, %94 ], [ %105, %middle.block ], [ %109, %scalar.ph ]
  %110 = lshr i32 %0, 2
  %.not = icmp eq i32 %.166.lcssa, %110
  br i1 %.not, label %112, label %111

111:                                              ; preds = %._crit_edge74
  tail call void @pffft_destroy_setup(ptr noundef nonnull %8)
  br label %112

112:                                              ; preds = %._crit_edge74, %111, %2
  %.0 = phi ptr [ null, %2 ], [ null, %111 ], [ %8, %._crit_edge74 ]
  ret ptr %.0
}

; Function Attrs: nounwind uwtable
declare hidden void @rffti1_ps(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @pffft_destroy_setup(ptr noundef) local_unnamed_addr #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.mul.v4i32(<4 x i32>) #4

attributes #0 = { noreturn 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 #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 = { 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 nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { noreturn nounwind }
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 = !{!"PFFFT_Setup", !7, i64 0, !7, i64 4, !8, i64 8, !7, i64 108, !10, i64 112, !10, i64 120, !10, i64 128}
!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 108}
!12 = !{!6, !7, i64 4}
!13 = !{!6, !10, i64 112}
!14 = !{!6, !10, i64 120}
!15 = !{!6, !10, i64 128}
!16 = !{!17, !17, i64 0}
!17 = !{!"float", !8, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!7, !7, i64 0}
!21 = distinct !{!21, !19, !22, !23}
!22 = !{!"llvm.loop.isvectorized", i32 1}
!23 = !{!"llvm.loop.unroll.runtime.disable"}
!24 = distinct !{!24, !19, !23, !22}


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