; LLVM IR from Overload-Technologies/Overload :: Dependencies/soloud/src/core/soloud_fft.ll (ZN7fftimpl7cftbsubEiPf)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7fftimpl10bitrv2conjEiPf(i32 noundef, ptr noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7fftimpl11bitrv216negEPf(ptr noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7fftimpl11bitrv208negEPf(ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7fftimpl7cftb1stEiPf(i32 noundef, ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7fftimpl7cftf161EPf(ptr noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7fftimpl7cftf081EPf(ptr noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7fftimpl7cftb040EPf(ptr noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7fftimpl7cftx020EPf(ptr noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7fftimpl7cftfx41EiPf(i32 noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7fftimpl7cftleafEiiPf(i32 noundef, i32 noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7fftimpl7cftrec4EiPf(i32 noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7fftimpl7cftbsubEiPf(i32 noundef %0, ptr noundef %1) #1 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  store i32 %0, ptr %3, align 4, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  %5 = load i32, ptr %3, align 4, !tbaa !5
  %6 = icmp sgt i32 %5, 8
  br i1 %6, label %7, label %42

7:                                                ; preds = %2
  %8 = load i32, ptr %3, align 4, !tbaa !5
  %9 = icmp sgt i32 %8, 32
  br i1 %9, label %10, label %31

10:                                               ; preds = %7
  %11 = load i32, ptr %3, align 4, !tbaa !5
  %12 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN7fftimpl7cftb1stEiPf(i32 noundef %11, ptr noundef %12)
  %13 = load i32, ptr %3, align 4, !tbaa !5
  %14 = icmp sgt i32 %13, 512
  br i1 %14, label %15, label %18

15:                                               ; preds = %10
  %16 = load i32, ptr %3, align 4, !tbaa !5
  %17 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN7fftimpl7cftrec4EiPf(i32 noundef %16, ptr noundef %17)
  br label %28

18:                                               ; preds = %10
  %19 = load i32, ptr %3, align 4, !tbaa !5
  %20 = icmp sgt i32 %19, 128
  br i1 %20, label %21, label %24

21:                                               ; preds = %18
  %22 = load i32, ptr %3, align 4, !tbaa !5
  %23 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN7fftimpl7cftleafEiiPf(i32 noundef %22, i32 noundef 1, ptr noundef %23)
  br label %27

24:                                               ; preds = %18
  %25 = load i32, ptr %3, align 4, !tbaa !5
  %26 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN7fftimpl7cftfx41EiPf(i32 noundef %25, ptr noundef %26)
  br label %27

27:                                               ; preds = %24, %21
  br label %28

28:                                               ; preds = %27, %15
  %29 = load i32, ptr %3, align 4, !tbaa !5
  %30 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN7fftimpl10bitrv2conjEiPf(i32 noundef %29, ptr noundef %30)
  br label %41

31:                                               ; preds = %7
  %32 = load i32, ptr %3, align 4, !tbaa !5
  %33 = icmp eq i32 %32, 32
  br i1 %33, label %34, label %37

34:                                               ; preds = %31
  %35 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN7fftimpl7cftf161EPf(ptr noundef %35)
  %36 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN7fftimpl11bitrv216negEPf(ptr noundef %36)
  br label %40

37:                                               ; preds = %31
  %38 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN7fftimpl7cftf081EPf(ptr noundef %38)
  %39 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN7fftimpl11bitrv208negEPf(ptr noundef %39)
  br label %40

40:                                               ; preds = %37, %34
  br label %41

41:                                               ; preds = %40, %28
  br label %54

42:                                               ; preds = %2
  %43 = load i32, ptr %3, align 4, !tbaa !5
  %44 = icmp eq i32 %43, 8
  br i1 %44, label %45, label %47

45:                                               ; preds = %42
  %46 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN7fftimpl7cftb040EPf(ptr noundef %46)
  br label %53

47:                                               ; preds = %42
  %48 = load i32, ptr %3, align 4, !tbaa !5
  %49 = icmp eq i32 %48, 4
  br i1 %49, label %50, label %52

50:                                               ; preds = %47
  %51 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN7fftimpl7cftx020EPf(ptr noundef %51)
  br label %52

52:                                               ; preds = %50, %47
  br label %53

53:                                               ; preds = %52, %45
  br label %54

54:                                               ; preds = %53, %41
  ret void
}

attributes #0 = { mustprogress 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 = { mustprogress 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" }

!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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}


; 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 nounwind uwtable
declare dso_local void @_ZN7fftimpl10bitrv2conjEiPf(i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7fftimpl11bitrv216negEPf(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7fftimpl11bitrv208negEPf(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7fftimpl7cftb1stEiPf(i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7fftimpl7cftf161EPf(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7fftimpl7cftf081EPf(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7fftimpl7cftb040EPf(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7fftimpl7cftx020EPf(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7fftimpl7cftfx41EiPf(i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7fftimpl7cftleafEiiPf(i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7fftimpl7cftrec4EiPf(i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7fftimpl7cftbsubEiPf(i32 noundef %0, ptr noundef %1) local_unnamed_addr #1 {
  %3 = icmp sgt i32 %0, 8
  br i1 %3, label %4, label %18

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

6:                                                ; preds = %4
  tail call void @_ZN7fftimpl7cftb1stEiPf(i32 noundef %0, ptr noundef %1)
  %7 = icmp ugt i32 %0, 512
  br i1 %7, label %8, label %9

8:                                                ; preds = %6
  tail call void @_ZN7fftimpl7cftrec4EiPf(i32 noundef %0, ptr noundef %1)
  br label %13

9:                                                ; preds = %6
  %10 = icmp ugt i32 %0, 128
  br i1 %10, label %11, label %12

11:                                               ; preds = %9
  tail call void @_ZN7fftimpl7cftleafEiiPf(i32 noundef %0, i32 noundef 1, ptr noundef %1)
  br label %13

12:                                               ; preds = %9
  tail call void @_ZN7fftimpl7cftfx41EiPf(i32 noundef %0, ptr noundef %1)
  br label %13

13:                                               ; preds = %11, %12, %8
  tail call void @_ZN7fftimpl10bitrv2conjEiPf(i32 noundef %0, ptr noundef %1)
  br label %21

14:                                               ; preds = %4
  %15 = icmp eq i32 %0, 32
  br i1 %15, label %16, label %17

16:                                               ; preds = %14
  tail call void @_ZN7fftimpl7cftf161EPf(ptr noundef %1)
  tail call void @_ZN7fftimpl11bitrv216negEPf(ptr noundef %1)
  br label %21

17:                                               ; preds = %14
  tail call void @_ZN7fftimpl7cftf081EPf(ptr noundef %1)
  tail call void @_ZN7fftimpl11bitrv208negEPf(ptr noundef %1)
  br label %21

18:                                               ; preds = %2
  switch i32 %0, label %21 [
    i32 8, label %19
    i32 4, label %20
  ]

19:                                               ; preds = %18
  tail call void @_ZN7fftimpl7cftb040EPf(ptr noundef %1)
  br label %21

20:                                               ; preds = %18
  tail call void @_ZN7fftimpl7cftx020EPf(ptr noundef %1)
  br label %21

21:                                               ; preds = %18, %19, %20, %13, %17, %16
  ret void
}

attributes #0 = { mustprogress 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 = { mustprogress 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" }

!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)"}


; Effective O3 passes: CorrelatedValuePropagationPass,GlobalOptPass,SROAPass,SimplifyCFGPass,TailCallElimPass