; LLVM IR from sp-nitech/SPTK :: src/conversion (mel_generalized_cepstrum_to_spectrum)

; 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::MelGeneralizedCepstrumToSpectrum" = type <{ ptr, %"class.sptk::MelGeneralizedCepstrumToMelGeneralizedCepstrum", %"class.sptk::RealValuedFastFourierTransform", i8, [7 x i8] }>
%"class.sptk::MelGeneralizedCepstrumToMelGeneralizedCepstrum" = type <{ ptr, i32, [4 x i8], double, double, i8, i8, [2 x i8], i32, double, double, i8, i8, [6 x i8], double, %"class.std::vector", i8, [7 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<sptk::MelGeneralizedCepstrumToMelGeneralizedCepstrum::ModuleInterface *, std::allocator<sptk::MelGeneralizedCepstrumToMelGeneralizedCepstrum::ModuleInterface *>>::_Vector_impl" }
%"struct.std::_Vector_base<sptk::MelGeneralizedCepstrumToMelGeneralizedCepstrum::ModuleInterface *, std::allocator<sptk::MelGeneralizedCepstrumToMelGeneralizedCepstrum::ModuleInterface *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sptk::MelGeneralizedCepstrumToMelGeneralizedCepstrum::ModuleInterface *, std::allocator<sptk::MelGeneralizedCepstrumToMelGeneralizedCepstrum::ModuleInterface *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sptk::MelGeneralizedCepstrumToMelGeneralizedCepstrum::ModuleInterface *, std::allocator<sptk::MelGeneralizedCepstrumToMelGeneralizedCepstrum::ModuleInterface *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sptk::RealValuedFastFourierTransform" = type { ptr, i32, i32, i32, %"class.sptk::FastFourierTransform", i8, %"class.std::vector.0" }
%"class.sptk::FastFourierTransform" = type { ptr, i32, i32, i32, i8, %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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 }
%"class.sptk::MelGeneralizedCepstrumToSpectrum::Buffer" = type { ptr, %"class.sptk::MelGeneralizedCepstrumToMelGeneralizedCepstrum::Buffer", %"class.sptk::RealValuedFastFourierTransform::Buffer", %"class.std::vector.0" }
%"class.sptk::MelGeneralizedCepstrumToMelGeneralizedCepstrum::Buffer" = type { ptr, %"class.sptk::FrequencyTransform::Buffer", %"class.std::vector.0" }
%"class.sptk::FrequencyTransform::Buffer" = type { ptr, %"class.std::vector.0" }
%"class.sptk::RealValuedFastFourierTransform::Buffer" = type { ptr, %"class.std::vector.0", %"class.std::vector.0" }

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK4sptk32MelGeneralizedCepstrumToSpectrum3RunERKSt6vectorIdSaIdEEPS3_S6_PNS0_6BufferE(ptr noundef nonnull align 8 dereferenceable(217) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #0 align 2 {
  %6 = alloca i1, align 1
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  %12 = load ptr, ptr %7, align 8
  %13 = getelementptr inbounds %"class.sptk::MelGeneralizedCepstrumToSpectrum", ptr %12, i32 0, i32 3
  %14 = load i8, ptr %13, align 8, !tbaa !9, !range !25, !noundef !26
  %15 = trunc i8 %14 to i1
  br i1 %15, label %16, label %25

16:                                               ; preds = %5
  %17 = load ptr, ptr %9, align 8, !tbaa !5
  %18 = icmp eq ptr null, %17
  br i1 %18, label %25, label %19

19:                                               ; preds = %16
  %20 = load ptr, ptr %10, align 8, !tbaa !5
  %21 = icmp eq ptr null, %20
  br i1 %21, label %25, label %22

22:                                               ; preds = %19
  %23 = load ptr, ptr %11, align 8, !tbaa !5
  %24 = icmp eq ptr null, %23
  br i1 %24, label %25, label %26

25:                                               ; preds = %22, %19, %16, %5
  store i1 false, ptr %6, align 1
  br label %46

26:                                               ; preds = %22
  %27 = getelementptr inbounds %"class.sptk::MelGeneralizedCepstrumToSpectrum", ptr %12, i32 0, i32 1
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  %29 = load ptr, ptr %11, align 8, !tbaa !5
  %30 = getelementptr inbounds %"class.sptk::MelGeneralizedCepstrumToSpectrum::Buffer", ptr %29, i32 0, i32 3
  %31 = load ptr, ptr %11, align 8, !tbaa !5
  %32 = getelementptr inbounds %"class.sptk::MelGeneralizedCepstrumToSpectrum::Buffer", ptr %31, i32 0, i32 1
  %33 = call noundef zeroext i1 @_ZNK4sptk46MelGeneralizedCepstrumToMelGeneralizedCepstrum3RunERKSt6vectorIdSaIdEEPS3_PNS0_6BufferE(ptr noundef nonnull align 8 dereferenceable(97) %27, ptr noundef nonnull align 8 dereferenceable(24) %28, ptr noundef %30, ptr noundef %32)
  br i1 %33, label %35, label %34

34:                                               ; preds = %26
  store i1 false, ptr %6, align 1
  br label %46

35:                                               ; preds = %26
  %36 = getelementptr inbounds %"class.sptk::MelGeneralizedCepstrumToSpectrum", ptr %12, i32 0, i32 2
  %37 = load ptr, ptr %11, align 8, !tbaa !5
  %38 = getelementptr inbounds %"class.sptk::MelGeneralizedCepstrumToSpectrum::Buffer", ptr %37, i32 0, i32 3
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = load ptr, ptr %10, align 8, !tbaa !5
  %41 = load ptr, ptr %11, align 8, !tbaa !5
  %42 = getelementptr inbounds %"class.sptk::MelGeneralizedCepstrumToSpectrum::Buffer", ptr %41, i32 0, i32 2
  %43 = call noundef zeroext i1 @_ZNK4sptk30RealValuedFastFourierTransform3RunERKSt6vectorIdSaIdEEPS3_S6_PNS0_6BufferE(ptr noundef nonnull align 8 dereferenceable(104) %36, ptr noundef nonnull align 8 dereferenceable(24) %38, ptr noundef %39, ptr noundef %40, ptr noundef %42)
  br i1 %43, label %45, label %44

44:                                               ; preds = %35
  store i1 false, ptr %6, align 1
  br label %46

45:                                               ; preds = %35
  store i1 true, ptr %6, align 1
  br label %46

46:                                               ; preds = %45, %44, %34, %25
  %47 = load i1, ptr %6, align 1
  ret i1 %47
}

declare noundef zeroext i1 @_ZNK4sptk46MelGeneralizedCepstrumToMelGeneralizedCepstrum3RunERKSt6vectorIdSaIdEEPS3_PNS0_6BufferE(ptr noundef nonnull align 8 dereferenceable(97), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef) #1

declare noundef zeroext i1 @_ZNK4sptk30RealValuedFastFourierTransform3RunERKSt6vectorIdSaIdEEPS3_S6_PNS0_6BufferE(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef, ptr noundef) #1

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

!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, !14, i64 216}
!10 = !{!"_ZTSN4sptk32MelGeneralizedCepstrumToSpectrumE", !11, i64 8, !19, i64 112, !14, i64 216}
!11 = !{!"_ZTSN4sptk46MelGeneralizedCepstrumToMelGeneralizedCepstrumE", !12, i64 8, !13, i64 16, !13, i64 24, !14, i64 32, !14, i64 33, !12, i64 36, !13, i64 40, !13, i64 48, !14, i64 56, !14, i64 57, !13, i64 64, !15, i64 72, !14, i64 96}
!12 = !{!"int", !7, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTSSt6vectorIPN4sptk46MelGeneralizedCepstrumToMelGeneralizedCepstrum15ModuleInterfaceESaIS3_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIPN4sptk46MelGeneralizedCepstrumToMelGeneralizedCepstrum15ModuleInterfaceESaIS3_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIPN4sptk46MelGeneralizedCepstrumToMelGeneralizedCepstrum15ModuleInterfaceESaIS3_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIPN4sptk46MelGeneralizedCepstrumToMelGeneralizedCepstrum15ModuleInterfaceESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_ZTSN4sptk30RealValuedFastFourierTransformE", !12, i64 8, !12, i64 12, !12, i64 16, !20, i64 24, !14, i64 72, !21, i64 80}
!20 = !{!"_ZTSN4sptk20FastFourierTransformE", !12, i64 8, !12, i64 12, !12, i64 16, !14, i64 20, !21, i64 24}
!21 = !{!"_ZTSSt6vectorIdSaIdEE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{i8 0, i8 2}
!26 = !{}


; 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 uwtable
define dso_local noundef zeroext i1 @_ZNK4sptk32MelGeneralizedCepstrumToSpectrum3RunERKSt6vectorIdSaIdEEPS3_S6_PNS0_6BufferE(ptr noundef nonnull align 8 dereferenceable(217) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #0 align 2 {
  %6 = getelementptr inbounds i8, ptr %0, i64 216
  %7 = load i8, ptr %6, align 8, !tbaa !5, !range !24, !noundef !25
  %8 = trunc nuw i8 %7 to i1
  %.not = xor i1 %8, true
  %9 = icmp eq ptr %2, null
  %or.cond = or i1 %9, %.not
  %10 = icmp eq ptr %3, null
  %or.cond3 = or i1 %10, %or.cond
  %11 = icmp eq ptr %4, null
  %or.cond5 = or i1 %11, %or.cond3
  br i1 %or.cond5, label %21, label %12

12:                                               ; preds = %5
  %13 = getelementptr inbounds i8, ptr %0, i64 8
  %14 = getelementptr inbounds i8, ptr %4, i64 128
  %15 = getelementptr inbounds i8, ptr %4, i64 8
  %16 = tail call noundef zeroext i1 @_ZNK4sptk46MelGeneralizedCepstrumToMelGeneralizedCepstrum3RunERKSt6vectorIdSaIdEEPS3_PNS0_6BufferE(ptr noundef nonnull align 8 dereferenceable(97) %13, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull %14, ptr noundef nonnull %15)
  br i1 %16, label %17, label %21

17:                                               ; preds = %12
  %18 = getelementptr inbounds i8, ptr %0, i64 112
  %19 = getelementptr inbounds i8, ptr %4, i64 72
  %20 = tail call noundef zeroext i1 @_ZNK4sptk30RealValuedFastFourierTransform3RunERKSt6vectorIdSaIdEEPS3_S6_PNS0_6BufferE(ptr noundef nonnull align 8 dereferenceable(104) %18, ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %19)
  br label %21

21:                                               ; preds = %17, %12, %5
  %.0 = phi i1 [ false, %5 ], [ false, %12 ], [ %20, %17 ]
  ret i1 %.0
}

declare noundef zeroext i1 @_ZNK4sptk46MelGeneralizedCepstrumToMelGeneralizedCepstrum3RunERKSt6vectorIdSaIdEEPS3_PNS0_6BufferE(ptr noundef nonnull align 8 dereferenceable(97), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef) local_unnamed_addr #1

declare noundef zeroext i1 @_ZNK4sptk30RealValuedFastFourierTransform3RunERKSt6vectorIdSaIdEEPS3_S6_PNS0_6BufferE(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

!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, !12, i64 216}
!6 = !{!"_ZTSN4sptk32MelGeneralizedCepstrumToSpectrumE", !7, i64 8, !18, i64 112, !12, i64 216}
!7 = !{!"_ZTSN4sptk46MelGeneralizedCepstrumToMelGeneralizedCepstrumE", !8, i64 8, !11, i64 16, !11, i64 24, !12, i64 32, !12, i64 33, !8, i64 36, !11, i64 40, !11, i64 48, !12, i64 56, !12, i64 57, !11, i64 64, !13, i64 72, !12, i64 96}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"double", !9, i64 0}
!12 = !{!"bool", !9, i64 0}
!13 = !{!"_ZTSSt6vectorIPN4sptk46MelGeneralizedCepstrumToMelGeneralizedCepstrum15ModuleInterfaceESaIS3_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIPN4sptk46MelGeneralizedCepstrumToMelGeneralizedCepstrum15ModuleInterfaceESaIS3_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIPN4sptk46MelGeneralizedCepstrumToMelGeneralizedCepstrum15ModuleInterfaceESaIS3_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIPN4sptk46MelGeneralizedCepstrumToMelGeneralizedCepstrum15ModuleInterfaceESaIS3_EE17_Vector_impl_dataE", !17, i64 0, !17, i64 8, !17, i64 16}
!17 = !{!"any pointer", !9, i64 0}
!18 = !{!"_ZTSN4sptk30RealValuedFastFourierTransformE", !8, i64 8, !8, i64 12, !8, i64 16, !19, i64 24, !12, i64 72, !20, i64 80}
!19 = !{!"_ZTSN4sptk20FastFourierTransformE", !8, i64 8, !8, i64 12, !8, i64 16, !12, i64 20, !20, i64 24}
!20 = !{!"_ZTSSt6vectorIdSaIdEE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !17, i64 0, !17, i64 8, !17, i64 16}
!24 = !{i8 0, i8 2}
!25 = !{}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass