; LLVM IR from clangen/musikcube :: src/plugins/supereqdsp/supereq (Fftsg_fl)

; 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind uwtable
define dso_local void @cftbsub(i32 noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4) #1 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, 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 ptr %4, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #2
  %12 = load i32, ptr %6, align 4, !tbaa !5
  %13 = icmp sgt i32 %12, 32
  br i1 %13, label %14, label %73

14:                                               ; preds = %5
  %15 = load i32, ptr %6, align 4, !tbaa !5
  %16 = ashr i32 %15, 2
  store i32 %16, ptr %11, align 4, !tbaa !5
  %17 = load i32, ptr %6, align 4, !tbaa !5
  %18 = load ptr, ptr %7, align 8, !tbaa !9
  %19 = load ptr, ptr %10, align 8, !tbaa !9
  %20 = load i32, ptr %9, align 4, !tbaa !5
  %21 = load i32, ptr %11, align 4, !tbaa !5
  %22 = sub nsw i32 %20, %21
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds float, ptr %19, i64 %23
  call void @cftb1st(i32 noundef %17, ptr noundef %18, ptr noundef %24)
  %25 = load i32, ptr %6, align 4, !tbaa !5
  %26 = icmp sgt i32 %25, 512
  br i1 %26, label %27, label %55

27:                                               ; preds = %14
  %28 = load i32, ptr %11, align 4, !tbaa !5
  %29 = load ptr, ptr %7, align 8, !tbaa !9
  %30 = load i32, ptr %9, align 4, !tbaa !5
  %31 = load ptr, ptr %10, align 8, !tbaa !9
  call void @cftrec1(i32 noundef %28, ptr noundef %29, i32 noundef %30, ptr noundef %31)
  %32 = load i32, ptr %11, align 4, !tbaa !5
  %33 = load ptr, ptr %7, align 8, !tbaa !9
  %34 = load i32, ptr %11, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds float, ptr %33, i64 %35
  %37 = load i32, ptr %9, align 4, !tbaa !5
  %38 = load ptr, ptr %10, align 8, !tbaa !9
  call void @cftrec2(i32 noundef %32, ptr noundef %36, i32 noundef %37, ptr noundef %38)
  %39 = load i32, ptr %11, align 4, !tbaa !5
  %40 = load ptr, ptr %7, align 8, !tbaa !9
  %41 = load i32, ptr %11, align 4, !tbaa !5
  %42 = mul nsw i32 2, %41
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds float, ptr %40, i64 %43
  %45 = load i32, ptr %9, align 4, !tbaa !5
  %46 = load ptr, ptr %10, align 8, !tbaa !9
  call void @cftrec1(i32 noundef %39, ptr noundef %44, i32 noundef %45, ptr noundef %46)
  %47 = load i32, ptr %11, align 4, !tbaa !5
  %48 = load ptr, ptr %7, align 8, !tbaa !9
  %49 = load i32, ptr %11, align 4, !tbaa !5
  %50 = mul nsw i32 3, %49
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds float, ptr %48, i64 %51
  %53 = load i32, ptr %9, align 4, !tbaa !5
  %54 = load ptr, ptr %10, align 8, !tbaa !9
  call void @cftrec1(i32 noundef %47, ptr noundef %52, i32 noundef %53, ptr noundef %54)
  br label %69

55:                                               ; preds = %14
  %56 = load i32, ptr %11, align 4, !tbaa !5
  %57 = icmp sgt i32 %56, 32
  br i1 %57, label %58, label %63

58:                                               ; preds = %55
  %59 = load i32, ptr %6, align 4, !tbaa !5
  %60 = load ptr, ptr %7, align 8, !tbaa !9
  %61 = load i32, ptr %9, align 4, !tbaa !5
  %62 = load ptr, ptr %10, align 8, !tbaa !9
  call void @cftexp1(i32 noundef %59, ptr noundef %60, i32 noundef %61, ptr noundef %62)
  br label %68

63:                                               ; preds = %55
  %64 = load i32, ptr %6, align 4, !tbaa !5
  %65 = load ptr, ptr %7, align 8, !tbaa !9
  %66 = load i32, ptr %9, align 4, !tbaa !5
  %67 = load ptr, ptr %10, align 8, !tbaa !9
  call void @cftfx41(i32 noundef %64, ptr noundef %65, i32 noundef %66, ptr noundef %67)
  br label %68

68:                                               ; preds = %63, %58
  br label %69

69:                                               ; preds = %68, %27
  %70 = load i32, ptr %6, align 4, !tbaa !5
  %71 = load ptr, ptr %8, align 8, !tbaa !9
  %72 = load ptr, ptr %7, align 8, !tbaa !9
  call void @bitrv2conj(i32 noundef %70, ptr noundef %71, ptr noundef %72)
  br label %105

73:                                               ; preds = %5
  %74 = load i32, ptr %6, align 4, !tbaa !5
  %75 = icmp sgt i32 %74, 8
  br i1 %75, label %76, label %92

76:                                               ; preds = %73
  %77 = load i32, ptr %6, align 4, !tbaa !5
  %78 = icmp eq i32 %77, 32
  br i1 %78, label %79, label %87

79:                                               ; preds = %76
  %80 = load ptr, ptr %7, align 8, !tbaa !9
  %81 = load ptr, ptr %10, align 8, !tbaa !9
  %82 = load i32, ptr %9, align 4, !tbaa !5
  %83 = sub nsw i32 %82, 8
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds float, ptr %81, i64 %84
  call void @cftf161(ptr noundef %80, ptr noundef %85)
  %86 = load ptr, ptr %7, align 8, !tbaa !9
  call void @bitrv216neg(ptr noundef %86)
  br label %91

87:                                               ; preds = %76
  %88 = load ptr, ptr %7, align 8, !tbaa !9
  %89 = load ptr, ptr %10, align 8, !tbaa !9
  call void @cftf081(ptr noundef %88, ptr noundef %89)
  %90 = load ptr, ptr %7, align 8, !tbaa !9
  call void @bitrv208neg(ptr noundef %90)
  br label %91

91:                                               ; preds = %87, %79
  br label %104

92:                                               ; preds = %73
  %93 = load i32, ptr %6, align 4, !tbaa !5
  %94 = icmp eq i32 %93, 8
  br i1 %94, label %95, label %97

95:                                               ; preds = %92
  %96 = load ptr, ptr %7, align 8, !tbaa !9
  call void @cftb040(ptr noundef %96)
  br label %103

97:                                               ; preds = %92
  %98 = load i32, ptr %6, align 4, !tbaa !5
  %99 = icmp eq i32 %98, 4
  br i1 %99, label %100, label %102

100:                                              ; preds = %97
  %101 = load ptr, ptr %7, align 8, !tbaa !9
  call void @cftx020(ptr noundef %101)
  br label %102

102:                                              ; preds = %100, %97
  br label %103

103:                                              ; preds = %102, %95
  br label %104

104:                                              ; preds = %103, %91
  br label %105

105:                                              ; preds = %104, %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #2
  ret void
}

; 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 void @cftrec1(i32 noundef, ptr noundef, i32 noundef, ptr noundef) #1

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

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

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

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

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

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 }

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


; 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: nounwind uwtable
define dso_local void @cftbsub(i32 noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4) local_unnamed_addr #0 {
  %6 = icmp sgt i32 %0, 32
  br i1 %6, label %7, label %27

7:                                                ; preds = %5
  %8 = lshr i32 %0, 2
  %9 = sub nsw i32 %3, %8
  %10 = sext i32 %9 to i64
  %11 = getelementptr inbounds float, ptr %4, i64 %10
  tail call void @cftb1st(i32 noundef %0, ptr noundef %1, ptr noundef %11)
  %12 = icmp ugt i32 %0, 512
  br i1 %12, label %13, label %22

13:                                               ; preds = %7
  tail call void @cftrec1(i32 noundef %8, ptr noundef %1, i32 noundef %3, ptr noundef %4)
  %14 = zext nneg i32 %8 to i64
  %15 = getelementptr inbounds float, ptr %1, i64 %14
  tail call void @cftrec2(i32 noundef %8, ptr noundef %15, i32 noundef %3, ptr noundef %4)
  %16 = shl nuw nsw i32 %8, 1
  %17 = zext nneg i32 %16 to i64
  %18 = getelementptr inbounds float, ptr %1, i64 %17
  tail call void @cftrec1(i32 noundef %8, ptr noundef %18, i32 noundef %3, ptr noundef %4)
  %19 = mul nuw nsw i32 %8, 3
  %20 = zext nneg i32 %19 to i64
  %21 = getelementptr inbounds float, ptr %1, i64 %20
  tail call void @cftrec1(i32 noundef %8, ptr noundef %21, i32 noundef %3, ptr noundef %4)
  br label %26

22:                                               ; preds = %7
  %23 = icmp ugt i32 %0, 131
  br i1 %23, label %24, label %25

24:                                               ; preds = %22
  tail call void @cftexp1(i32 noundef %0, ptr noundef %1, i32 noundef %3, ptr noundef %4)
  br label %26

25:                                               ; preds = %22
  tail call void @cftfx41(i32 noundef %0, ptr noundef %1, i32 noundef %3, ptr noundef %4)
  br label %26

26:                                               ; preds = %24, %25, %13
  tail call void @bitrv2conj(i32 noundef %0, ptr noundef %2, ptr noundef %1)
  br label %39

27:                                               ; preds = %5
  %28 = icmp sgt i32 %0, 8
  br i1 %28, label %29, label %36

29:                                               ; preds = %27
  %30 = icmp eq i32 %0, 32
  br i1 %30, label %31, label %35

31:                                               ; preds = %29
  %32 = sext i32 %3 to i64
  %33 = getelementptr float, ptr %4, i64 %32
  %34 = getelementptr i8, ptr %33, i64 -32
  tail call void @cftf161(ptr noundef %1, ptr noundef %34)
  tail call void @bitrv216neg(ptr noundef %1)
  br label %39

35:                                               ; preds = %29
  tail call void @cftf081(ptr noundef %1, ptr noundef %4)
  tail call void @bitrv208neg(ptr noundef %1)
  br label %39

36:                                               ; preds = %27
  switch i32 %0, label %39 [
    i32 8, label %37
    i32 4, label %38
  ]

37:                                               ; preds = %36
  tail call void @cftb040(ptr noundef %1)
  br label %39

38:                                               ; preds = %36
  tail call void @cftx020(ptr noundef %1)
  br label %39

39:                                               ; preds = %36, %35, %31, %38, %37, %26
  ret void
}

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

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

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

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

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

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

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

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

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

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

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

!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,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass