; LLVM IR from sp-nitech/SPTK :: src/math/inverse_discrete_cosine_transform.ll (ZN4sptk30InverseDiscreteCosineTransformC2Ei)

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

%"class.sptk::InverseDiscreteCosineTransform" = type { ptr, i32, %"class.sptk::FourierTransform", %"class.std::vector", %"class.std::vector" }
%"class.sptk::FourierTransform" = type { ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZTVN4sptk30InverseDiscreteCosineTransformE = external dso_local unnamed_addr constant { [4 x ptr] }, align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4sptk30InverseDiscreteCosineTransformC2Ei(ptr noundef nonnull align 8 dereferenceable(80) %0, i32 noundef %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  %11 = load ptr, ptr %3, align 8
  store ptr getelementptr inbounds inrange(-16, 16) ({ [4 x ptr] }, ptr @_ZTVN4sptk30InverseDiscreteCosineTransformE, i32 0, i32 0, i32 2), ptr %11, align 8, !tbaa !11
  %12 = getelementptr inbounds %"class.sptk::InverseDiscreteCosineTransform", ptr %11, i32 0, i32 1
  %13 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %13, ptr %12, align 8, !tbaa !13
  %14 = getelementptr inbounds %"class.sptk::InverseDiscreteCosineTransform", ptr %11, i32 0, i32 2
  %15 = load i32, ptr %4, align 4, !tbaa !9
  %16 = mul nsw i32 2, %15
  call void @_ZN4sptk16FourierTransformC1Ei(ptr noundef nonnull align 8 dereferenceable(16) %14, i32 noundef %16)
  %17 = getelementptr inbounds %"class.sptk::InverseDiscreteCosineTransform", ptr %11, i32 0, i32 3
  call void @_ZNSt6vectorIdSaIdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  %18 = getelementptr inbounds %"class.sptk::InverseDiscreteCosineTransform", ptr %11, i32 0, i32 4
  call void @_ZNSt6vectorIdSaIdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #6
  %19 = getelementptr inbounds %"class.sptk::InverseDiscreteCosineTransform", ptr %11, i32 0, i32 2
  %20 = invoke noundef zeroext i1 @_ZNK4sptk16FourierTransform7IsValidEv(ptr noundef nonnull align 8 dereferenceable(16) %19)
          to label %21 unwind label %23

21:                                               ; preds = %2
  br i1 %20, label %27, label %22

22:                                               ; preds = %21
  br label %94

23:                                               ; preds = %2
  %24 = landingpad { ptr, i32 }
          cleanup
  %25 = extractvalue { ptr, i32 } %24, 0
  store ptr %25, ptr %5, align 8
  %26 = extractvalue { ptr, i32 } %24, 1
  store i32 %26, ptr %6, align 4
  br label %96

27:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %28 = getelementptr inbounds %"class.sptk::InverseDiscreteCosineTransform", ptr %11, i32 0, i32 2
  %29 = invoke noundef i32 @_ZNK4sptk16FourierTransform9GetLengthEv(ptr noundef nonnull align 8 dereferenceable(16) %28)
          to label %30 unwind label %58

30:                                               ; preds = %27
  store i32 %29, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %31 = load i32, ptr %7, align 4, !tbaa !9
  %32 = sitofp i32 %31 to double
  %33 = fdiv double 0x400921FB54442D18, %32
  store double %33, ptr %8, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %34 = load i32, ptr %7, align 4, !tbaa !9
  %35 = invoke noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %34)
          to label %36 unwind label %62

36:                                               ; preds = %30
  %37 = fdiv double 1.000000e+00, %35
  store double %37, ptr %9, align 8, !tbaa !20
  %38 = getelementptr inbounds %"class.sptk::InverseDiscreteCosineTransform", ptr %11, i32 0, i32 3
  %39 = load i32, ptr %7, align 4, !tbaa !9
  %40 = sext i32 %39 to i64
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %40)
          to label %41 unwind label %62

41:                                               ; preds = %36
  %42 = getelementptr inbounds %"class.sptk::InverseDiscreteCosineTransform", ptr %11, i32 0, i32 4
  %43 = load i32, ptr %7, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %42, i64 noundef %44)
          to label %45 unwind label %62

45:                                               ; preds = %41
  %46 = load double, ptr %9, align 8, !tbaa !20
  %47 = call double @sqrt(double noundef 2.000000e+00) #6
  %48 = fmul double %46, %47
  %49 = getelementptr inbounds %"class.sptk::InverseDiscreteCosineTransform", ptr %11, i32 0, i32 3
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef 0) #6
  store double %48, ptr %50, align 8, !tbaa !20
  %51 = getelementptr inbounds %"class.sptk::InverseDiscreteCosineTransform", ptr %11, i32 0, i32 4
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %51, i64 noundef 0) #6
  store double 0.000000e+00, ptr %52, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 1, ptr %10, align 4, !tbaa !9
  br label %53

53:                                               ; preds = %90, %45
  %54 = load i32, ptr %10, align 4, !tbaa !9
  %55 = load i32, ptr %7, align 4, !tbaa !9
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %66, label %57

57:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %93

58:                                               ; preds = %27
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %5, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %6, align 4
  br label %95

62:                                               ; preds = %41, %36, %30
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %5, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %95

66:                                               ; preds = %53
  %67 = load double, ptr %8, align 8, !tbaa !20
  %68 = load i32, ptr %10, align 4, !tbaa !9
  %69 = sitofp i32 %68 to double
  %70 = fmul double %67, %69
  %71 = call double @cos(double noundef %70) #6
  %72 = load double, ptr %9, align 8, !tbaa !20
  %73 = fmul double %71, %72
  %74 = getelementptr inbounds %"class.sptk::InverseDiscreteCosineTransform", ptr %11, i32 0, i32 3
  %75 = load i32, ptr %10, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %74, i64 noundef %76) #6
  store double %73, ptr %77, align 8, !tbaa !20
  %78 = load double, ptr %8, align 8, !tbaa !20
  %79 = load i32, ptr %10, align 4, !tbaa !9
  %80 = sitofp i32 %79 to double
  %81 = fmul double %78, %80
  %82 = call double @sin(double noundef %81) #6
  %83 = fneg double %82
  %84 = load double, ptr %9, align 8, !tbaa !20
  %85 = fmul double %83, %84
  %86 = getelementptr inbounds %"class.sptk::InverseDiscreteCosineTransform", ptr %11, i32 0, i32 4
  %87 = load i32, ptr %10, align 4, !tbaa !9
  %88 = sext i32 %87 to i64
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %86, i64 noundef %88) #6
  store double %85, ptr %89, align 8, !tbaa !20
  br label %90

90:                                               ; preds = %66
  %91 = load i32, ptr %10, align 4, !tbaa !9
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %10, align 4, !tbaa !9
  br label %53, !llvm.loop !22

93:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %94

94:                                               ; preds = %93, %22
  ret void

95:                                               ; preds = %62, %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %96

96:                                               ; preds = %95, %23
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #6
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  call void @_ZN4sptk16FourierTransformD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #6
  br label %97

97:                                               ; preds = %96
  %98 = load ptr, ptr %5, align 8
  %99 = load i32, ptr %6, align 4
  %100 = insertvalue { ptr, i32 } poison, ptr %98, 0
  %101 = insertvalue { ptr, i32 } %100, i32 %99, 1
  resume { ptr, i32 } %101
}

declare void @_ZN4sptk16FourierTransformC1Ei(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4sptk16FourierTransform7IsValidEv(ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK4sptk16FourierTransform9GetLengthEv(ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

; Function Attrs: nounwind
declare double @sqrt(double noundef) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4sptk16FourierTransformD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2 align 2

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

!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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !10, i64 8}
!14 = !{!"_ZTSN4sptk30InverseDiscreteCosineTransformE", !10, i64 8, !15, i64 16, !16, i64 32, !16, i64 56}
!15 = !{!"_ZTSN4sptk16FourierTransformE", !6, i64 8}
!16 = !{!"_ZTSSt6vectorIdSaIdEE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!21, !21, i64 0}
!21 = !{!"double", !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"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"

@_ZTVN4sptk30InverseDiscreteCosineTransformE = external dso_local unnamed_addr constant { [4 x ptr] }, align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4sptk30InverseDiscreteCosineTransformC2Ei(ptr noundef nonnull align 8 dereferenceable(80) %0, i32 noundef %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  store ptr getelementptr inbounds inrange(-16, 16) (i8, ptr @_ZTVN4sptk30InverseDiscreteCosineTransformE, i64 16), ptr %0, align 8, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 %1, ptr %3, align 8, !tbaa !8
  %4 = getelementptr inbounds i8, ptr %0, i64 16
  %5 = shl nsw i32 %1, 1
  tail call void @_ZN4sptk16FourierTransformC1Ei(ptr noundef nonnull align 8 dereferenceable(16) %4, i32 noundef %5)
  %6 = getelementptr inbounds i8, ptr %0, i64 32
  tail call void @_ZNSt6vectorIdSaIdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  %7 = getelementptr inbounds i8, ptr %0, i64 56
  tail call void @_ZNSt6vectorIdSaIdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  %8 = invoke noundef zeroext i1 @_ZNK4sptk16FourierTransform7IsValidEv(ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %9 unwind label %10

9:                                                ; preds = %2
  br i1 %8, label %12, label %.loopexit

10:                                               ; preds = %2
  %11 = landingpad { ptr, i32 }
          cleanup
  br label %40

12:                                               ; preds = %9
  %13 = invoke noundef i32 @_ZNK4sptk16FourierTransform9GetLengthEv(ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %14 unwind label %26

14:                                               ; preds = %12
  %15 = sitofp i32 %13 to double
  %16 = fdiv double 0x400921FB54442D18, %15
  %17 = tail call noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %13)
  %18 = fdiv double 1.000000e+00, %17
  %19 = sext i32 %13 to i64
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %19)
          to label %20 unwind label %28

20:                                               ; preds = %14
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %19)
          to label %21 unwind label %28

21:                                               ; preds = %20
  %22 = fmul double %18, 0x3FF6A09E667F3BCD
  %23 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0) #5
  store double %22, ptr %23, align 8, !tbaa !18
  %24 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef 0) #5
  store double 0.000000e+00, ptr %24, align 8, !tbaa !18
  %25 = icmp sgt i32 %13, 1
  br i1 %25, label %.lr.ph.preheader, label %.loopexit

.lr.ph.preheader:                                 ; preds = %21
  %wide.trip.count = zext nneg i32 %13 to i64
  br label %.lr.ph

26:                                               ; preds = %12
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %40

28:                                               ; preds = %20, %14
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %40

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %30 = trunc nuw nsw i64 %indvars.iv to i32
  %31 = uitofp nneg i32 %30 to double
  %32 = fmul double %16, %31
  %33 = tail call double @cos(double noundef %32) #5
  %34 = fmul double %18, %33
  %35 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv) #5
  store double %34, ptr %35, align 8, !tbaa !18
  %36 = tail call double @sin(double noundef %32) #5
  %37 = fneg double %36
  %38 = fmul double %18, %37
  %39 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv) #5
  store double %38, ptr %39, align 8, !tbaa !18
  %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 %.loopexit, label %.lr.ph, !llvm.loop !20

.loopexit:                                        ; preds = %.lr.ph, %21, %9
  ret void

40:                                               ; preds = %26, %28, %10
  %.pn.pn = phi { ptr, i32 } [ %11, %10 ], [ %29, %28 ], [ %27, %26 ]
  tail call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  tail call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  tail call void @_ZN4sptk16FourierTransformD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #5
  resume { ptr, i32 } %.pn.pn
}

declare void @_ZN4sptk16FourierTransformC1Ei(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4sptk16FourierTransform7IsValidEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK4sptk16FourierTransform9GetLengthEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4sptk16FourierTransformD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2 align 2

attributes #0 = { 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" }
attributes #1 = { "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 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 = { inlinehint 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 #4 = { 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 #5 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !10, i64 8}
!9 = !{!"_ZTSN4sptk30InverseDiscreteCosineTransformE", !10, i64 8, !12, i64 16, !14, i64 32, !14, i64 56}
!10 = !{!"int", !11, i64 0}
!11 = !{!"omnipotent char", !7, i64 0}
!12 = !{!"_ZTSN4sptk16FourierTransformE", !13, i64 8}
!13 = !{!"any pointer", !11, i64 0}
!14 = !{!"_ZTSSt6vectorIdSaIdEE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!18 = !{!19, !19, i64 0}
!19 = !{!"double", !11, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass