; LLVM IR from nativeformat/NFSmartPlayer :: source/plugins/util (ButterFilter)

; 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.nativeformat::plugin::util::ButterFilter" = type { i32, i32, i32, %"struct.nativeformat::plugin::util::ButterFilter::pzrep", %"struct.nativeformat::plugin::util::ButterFilter::pzrep", double, double, double, [21 x double], [21 x double], %"class.std::vector", %"class.std::vector" }
%"struct.nativeformat::plugin::util::ButterFilter::pzrep" = type { [20 x %"class.std::complex"], [20 x %"class.std::complex"], i32, i32 }
%"class.std::complex" = type { { double, double } }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<float>, std::allocator<std::vector<float>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<float>, std::allocator<std::vector<float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<float>, std::allocator<std::vector<float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<float>, std::allocator<std::vector<float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12nativeformat6plugin4util12ButterFilterC2EjNS1_10FilterTypeEj(ptr noundef nonnull align 8 dereferenceable(1720) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !11
  store i32 %3, ptr %8, align 4, !tbaa !9
  %11 = load ptr, ptr %5, align 8
  %12 = getelementptr inbounds %"class.nativeformat::plugin::util::ButterFilter", ptr %11, i32 0, i32 0
  %13 = load i32, ptr %7, align 4, !tbaa !11
  store i32 %13, ptr %12, align 8, !tbaa !13
  %14 = getelementptr inbounds %"class.nativeformat::plugin::util::ButterFilter", ptr %11, i32 0, i32 1
  %15 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %15, ptr %14, align 4, !tbaa !21
  %16 = getelementptr inbounds %"class.nativeformat::plugin::util::ButterFilter", ptr %11, i32 0, i32 2
  %17 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %17, ptr %16, align 8, !tbaa !22
  %18 = getelementptr inbounds %"class.nativeformat::plugin::util::ButterFilter", ptr %11, i32 0, i32 3
  call void @_ZN12nativeformat6plugin4util12ButterFilter5pzrepC2Ev(ptr noundef nonnull align 8 dereferenceable(648) %18)
  %19 = getelementptr inbounds %"class.nativeformat::plugin::util::ButterFilter", ptr %11, i32 0, i32 4
  call void @_ZN12nativeformat6plugin4util12ButterFilter5pzrepC2Ev(ptr noundef nonnull align 8 dereferenceable(648) %19)
  %20 = getelementptr inbounds %"class.nativeformat::plugin::util::ButterFilter", ptr %11, i32 0, i32 5
  store double 0.000000e+00, ptr %20, align 8, !tbaa !23
  %21 = getelementptr inbounds %"class.nativeformat::plugin::util::ButterFilter", ptr %11, i32 0, i32 6
  store double 0.000000e+00, ptr %21, align 8, !tbaa !24
  %22 = getelementptr inbounds %"class.nativeformat::plugin::util::ButterFilter", ptr %11, i32 0, i32 7
  store double 1.000000e+00, ptr %22, align 8, !tbaa !25
  %23 = getelementptr inbounds %"class.nativeformat::plugin::util::ButterFilter", ptr %11, i32 0, i32 8
  call void @llvm.memset.p0.i64(ptr align 8 %23, i8 0, i64 168, i1 false)
  %24 = getelementptr inbounds %"class.nativeformat::plugin::util::ButterFilter", ptr %11, i32 0, i32 9
  call void @llvm.memset.p0.i64(ptr align 8 %24, i8 0, i64 168, i1 false)
  %25 = getelementptr inbounds %"class.nativeformat::plugin::util::ButterFilter", ptr %11, i32 0, i32 10
  call void @_ZNSt6vectorIS_IfSaIfEESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #4
  %26 = getelementptr inbounds %"class.nativeformat::plugin::util::ButterFilter", ptr %11, i32 0, i32 11
  call void @_ZNSt6vectorIS_IfSaIfEESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #4
  %27 = getelementptr inbounds %"class.nativeformat::plugin::util::ButterFilter", ptr %11, i32 0, i32 10
  %28 = load i32, ptr %8, align 4, !tbaa !9
  %29 = zext i32 %28 to i64
  invoke void @_ZNSt6vectorIS_IfSaIfEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef %29)
          to label %30 unwind label %35

30:                                               ; preds = %4
  %31 = getelementptr inbounds %"class.nativeformat::plugin::util::ButterFilter", ptr %11, i32 0, i32 11
  %32 = load i32, ptr %8, align 4, !tbaa !9
  %33 = zext i32 %32 to i64
  invoke void @_ZNSt6vectorIS_IfSaIfEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %31, i64 noundef %33)
          to label %34 unwind label %35

34:                                               ; preds = %30
  ret void

35:                                               ; preds = %30, %4
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %9, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %10, align 4
  call void @_ZNSt6vectorIS_IfSaIfEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #4
  call void @_ZNSt6vectorIS_IfSaIfEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #4
  br label %39

39:                                               ; preds = %35
  %40 = load ptr, ptr %9, align 8
  %41 = load i32, ptr %10, align 4
  %42 = insertvalue { ptr, i32 } poison, ptr %40, 0
  %43 = insertvalue { ptr, i32 } %42, i32 %41, 1
  resume { ptr, i32 } %43
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN12nativeformat6plugin4util12ButterFilter5pzrepC2Ev(ptr noundef nonnull align 8 dereferenceable(648)) unnamed_addr #1 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIS_IfSaIfEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 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 = { inlinehint 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 = { 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 = !{!"_ZTSN12nativeformat6plugin4util10FilterTypeE", !7, i64 0}
!13 = !{!14, !12, i64 0}
!14 = !{!"_ZTSN12nativeformat6plugin4util12ButterFilterE", !12, i64 0, !10, i64 4, !10, i64 8, !15, i64 16, !15, i64 664, !16, i64 1312, !16, i64 1320, !16, i64 1328, !7, i64 1336, !7, i64 1504, !17, i64 1672, !17, i64 1696}
!15 = !{!"_ZTSN12nativeformat6plugin4util12ButterFilter5pzrepE", !7, i64 0, !7, i64 320, !10, i64 640, !10, i64 644}
!16 = !{!"double", !7, i64 0}
!17 = !{!"_ZTSSt6vectorIS_IfSaIfEESaIS1_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseISt6vectorIfSaIfEESaIS2_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseISt6vectorIfSaIfEESaIS2_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseISt6vectorIfSaIfEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!14, !10, i64 4}
!22 = !{!14, !10, i64 8}
!23 = !{!14, !16, i64 1312}
!24 = !{!14, !16, i64 1320}
!25 = !{!14, !16, i64 1328}


; 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 void @_ZN12nativeformat6plugin4util12ButterFilterC2EjNS1_10FilterTypeEj(ptr noundef nonnull align 8 dereferenceable(1720) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  store i32 %2, ptr %0, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 %1, ptr %5, align 4, !tbaa !18
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 %3, ptr %6, align 8, !tbaa !19
  %7 = getelementptr inbounds i8, ptr %0, i64 16
  tail call void @_ZN12nativeformat6plugin4util12ButterFilter5pzrepC2Ev(ptr noundef nonnull align 8 dereferenceable(648) %7)
  %8 = getelementptr inbounds i8, ptr %0, i64 664
  tail call void @_ZN12nativeformat6plugin4util12ButterFilter5pzrepC2Ev(ptr noundef nonnull align 8 dereferenceable(648) %8)
  %9 = getelementptr inbounds i8, ptr %0, i64 1312
  %10 = getelementptr inbounds i8, ptr %0, i64 1328
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 0, i64 16, i1 false)
  store double 1.000000e+00, ptr %10, align 8, !tbaa !20
  %11 = getelementptr inbounds i8, ptr %0, i64 1336
  %12 = getelementptr inbounds i8, ptr %0, i64 1672
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(336) %11, i8 0, i64 336, i1 false)
  tail call void @_ZNSt6vectorIS_IfSaIfEESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  %13 = getelementptr inbounds i8, ptr %0, i64 1696
  tail call void @_ZNSt6vectorIS_IfSaIfEESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  %14 = zext i32 %3 to i64
  invoke void @_ZNSt6vectorIS_IfSaIfEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %14)
          to label %15 unwind label %17

15:                                               ; preds = %4
  invoke void @_ZNSt6vectorIS_IfSaIfEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %14)
          to label %16 unwind label %17

16:                                               ; preds = %15
  ret void

17:                                               ; preds = %15, %4
  %18 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZNSt6vectorIS_IfSaIfEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  tail call void @_ZNSt6vectorIS_IfSaIfEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  resume { ptr, i32 } %18
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN12nativeformat6plugin4util12ButterFilter5pzrepC2Ev(ptr noundef nonnull align 8 dereferenceable(648)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIS_IfSaIfEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 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 = { inlinehint 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 = { 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 = !{!"_ZTSN12nativeformat6plugin4util12ButterFilterE", !7, i64 0, !10, i64 4, !10, i64 8, !11, i64 16, !11, i64 664, !12, i64 1312, !12, i64 1320, !12, i64 1328, !8, i64 1336, !8, i64 1504, !13, i64 1672, !13, i64 1696}
!7 = !{!"_ZTSN12nativeformat6plugin4util10FilterTypeE", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTSN12nativeformat6plugin4util12ButterFilter5pzrepE", !8, i64 0, !8, i64 320, !10, i64 640, !10, i64 644}
!12 = !{!"double", !8, i64 0}
!13 = !{!"_ZTSSt6vectorIS_IfSaIfEESaIS1_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseISt6vectorIfSaIfEESaIS2_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseISt6vectorIfSaIfEESaIS2_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseISt6vectorIfSaIfEESaIS2_EE17_Vector_impl_dataE", !17, i64 0, !17, i64 8, !17, i64 16}
!17 = !{!"any pointer", !8, i64 0}
!18 = !{!6, !10, i64 4}
!19 = !{!6, !10, i64 8}
!20 = !{!6, !12, i64 1328}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,SROAPass,SimplifyCFGPass,TailCallElimPass