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

; 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.5", %"class.std::vector.5" }
%"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.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = 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 }
%"struct.std::pair" = type { %"class.nativeformat::plugin::util::ButterFilter", %"class.nativeformat::plugin::util::ButterFilter" }
%"class.nativeformat::plugin::util::BandSplitter" = type { ptr, i64, i64, %"class.std::vector", %"class.std::vector.0" }
%"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 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::pair<nativeformat::plugin::util::ButterFilter, nativeformat::plugin::util::ButterFilter>, std::allocator<std::pair<nativeformat::plugin::util::ButterFilter, nativeformat::plugin::util::ButterFilter>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<nativeformat::plugin::util::ButterFilter, nativeformat::plugin::util::ButterFilter>, std::allocator<std::pair<nativeformat::plugin::util::ButterFilter, nativeformat::plugin::util::ButterFilter>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<nativeformat::plugin::util::ButterFilter, nativeformat::plugin::util::ButterFilter>, std::allocator<std::pair<nativeformat::plugin::util::ButterFilter, nativeformat::plugin::util::ButterFilter>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<nativeformat::plugin::util::ButterFilter, nativeformat::plugin::util::ButterFilter>, std::allocator<std::pair<nativeformat::plugin::util::ButterFilter, nativeformat::plugin::util::ButterFilter>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12nativeformat6plugin4util12BandSplitter17build_filter_treeEPKdm(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef %1, i64 noundef %2) #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca float, align 4
  %9 = alloca %"class.nativeformat::plugin::util::ButterFilter", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::pair", align 8
  %13 = alloca %"class.nativeformat::plugin::util::ButterFilter", align 8
  %14 = alloca %"struct.std::pair", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i64 %2, ptr %6, align 8, !tbaa !9
  %15 = load ptr, ptr %4, align 8
  %16 = load i64, ptr %6, align 8, !tbaa !9
  %17 = icmp ne i64 %16, 0
  br i1 %17, label %19, label %18

18:                                               ; preds = %3
  br label %61

19:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %20 = load i64, ptr %6, align 8, !tbaa !9
  %21 = sub i64 %20, 1
  %22 = udiv i64 %21, 2
  %23 = call noundef double @_ZSt5floorImEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef %22)
  %24 = fptoui double %23 to i64
  store i64 %24, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = load i64, ptr %7, align 8, !tbaa !9
  %27 = getelementptr inbounds double, ptr %25, i64 %26
  %28 = load double, ptr %27, align 8, !tbaa !11
  %29 = fptrunc double %28 to float
  store float %29, ptr %8, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1720, ptr %9) #5
  %30 = getelementptr inbounds %"class.nativeformat::plugin::util::BandSplitter", ptr %15, i32 0, i32 2
  %31 = load i64, ptr %30, align 8, !tbaa !15
  %32 = trunc i64 %31 to i32
  call void @_ZN12nativeformat6plugin4util12ButterFilterC1EjNS1_10FilterTypeEj(ptr noundef nonnull align 8 dereferenceable(1720) %9, i32 noundef 2, i32 noundef 0, i32 noundef %32)
  %33 = load float, ptr %8, align 4, !tbaa !13
  %34 = fpext float %33 to double
  invoke void @_ZN12nativeformat6plugin4util12ButterFilter7computeEdd(ptr noundef nonnull align 8 dereferenceable(1720) %9, double noundef %34, double noundef 0.000000e+00)
          to label %35 unwind label %62

35:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 3440, ptr %12) #5
  invoke void @_ZNSt4pairIN12nativeformat6plugin4util12ButterFilterES3_EC2IRS3_S6_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS8_S9_EEEbE4typeELb1EEEOS8_OS9_(ptr noundef nonnull align 8 dereferenceable(3440) %12, ptr noundef nonnull align 8 dereferenceable(1720) %9, ptr noundef nonnull align 8 dereferenceable(1720) %9)
          to label %36 unwind label %66

36:                                               ; preds = %35
  %37 = getelementptr inbounds %"class.nativeformat::plugin::util::BandSplitter", ptr %15, i32 0, i32 4
  invoke void @_ZNSt6vectorISt4pairIN12nativeformat6plugin4util12ButterFilterES4_ESaIS5_EE9push_backERKS5_(ptr noundef nonnull align 8 dereferenceable(24) %37, ptr noundef nonnull align 8 dereferenceable(3440) %12)
          to label %38 unwind label %70

38:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 1720, ptr %13) #5
  %39 = getelementptr inbounds %"class.nativeformat::plugin::util::BandSplitter", ptr %15, i32 0, i32 2
  %40 = load i64, ptr %39, align 8, !tbaa !15
  %41 = trunc i64 %40 to i32
  invoke void @_ZN12nativeformat6plugin4util12ButterFilterC1EjNS1_10FilterTypeEj(ptr noundef nonnull align 8 dereferenceable(1720) %13, i32 noundef 2, i32 noundef 1, i32 noundef %41)
          to label %42 unwind label %74

42:                                               ; preds = %38
  %43 = load float, ptr %8, align 4, !tbaa !13
  %44 = fpext float %43 to double
  invoke void @_ZN12nativeformat6plugin4util12ButterFilter7computeEdd(ptr noundef nonnull align 8 dereferenceable(1720) %13, double noundef %44, double noundef 0.000000e+00)
          to label %45 unwind label %78

45:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 3440, ptr %14) #5
  invoke void @_ZNSt4pairIN12nativeformat6plugin4util12ButterFilterES3_EC2IRS3_S6_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS8_S9_EEEbE4typeELb1EEEOS8_OS9_(ptr noundef nonnull align 8 dereferenceable(3440) %14, ptr noundef nonnull align 8 dereferenceable(1720) %13, ptr noundef nonnull align 8 dereferenceable(1720) %13)
          to label %46 unwind label %82

46:                                               ; preds = %45
  %47 = getelementptr inbounds %"class.nativeformat::plugin::util::BandSplitter", ptr %15, i32 0, i32 4
  invoke void @_ZNSt6vectorISt4pairIN12nativeformat6plugin4util12ButterFilterES4_ESaIS5_EE9push_backERKS5_(ptr noundef nonnull align 8 dereferenceable(24) %47, ptr noundef nonnull align 8 dereferenceable(3440) %14)
          to label %48 unwind label %86

48:                                               ; preds = %46
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = load i64, ptr %7, align 8, !tbaa !9
  invoke void @_ZN12nativeformat6plugin4util12BandSplitter17build_filter_treeEPKdm(ptr noundef nonnull align 8 dereferenceable(72) %15, ptr noundef %49, i64 noundef %50)
          to label %51 unwind label %86

51:                                               ; preds = %48
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = load i64, ptr %7, align 8, !tbaa !9
  %54 = getelementptr inbounds double, ptr %52, i64 %53
  %55 = getelementptr inbounds double, ptr %54, i64 1
  %56 = load i64, ptr %6, align 8, !tbaa !9
  %57 = load i64, ptr %7, align 8, !tbaa !9
  %58 = sub i64 %56, %57
  %59 = sub i64 %58, 1
  invoke void @_ZN12nativeformat6plugin4util12BandSplitter17build_filter_treeEPKdm(ptr noundef nonnull align 8 dereferenceable(72) %15, ptr noundef %55, i64 noundef %59)
          to label %60 unwind label %86

60:                                               ; preds = %51
  call void @_ZNSt4pairIN12nativeformat6plugin4util12ButterFilterES3_ED2Ev(ptr noundef nonnull align 8 dereferenceable(3440) %14) #5
  call void @llvm.lifetime.end.p0(i64 3440, ptr %14) #5
  call void @_ZN12nativeformat6plugin4util12ButterFilterD1Ev(ptr noundef nonnull align 8 dereferenceable(1720) %13) #5
  call void @llvm.lifetime.end.p0(i64 1720, ptr %13) #5
  call void @_ZNSt4pairIN12nativeformat6plugin4util12ButterFilterES3_ED2Ev(ptr noundef nonnull align 8 dereferenceable(3440) %12) #5
  call void @llvm.lifetime.end.p0(i64 3440, ptr %12) #5
  call void @_ZN12nativeformat6plugin4util12ButterFilterD1Ev(ptr noundef nonnull align 8 dereferenceable(1720) %9) #5
  call void @llvm.lifetime.end.p0(i64 1720, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %61

61:                                               ; preds = %60, %18
  ret void

62:                                               ; preds = %19
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %10, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %11, align 4
  br label %95

66:                                               ; preds = %35
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %10, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %11, align 4
  br label %94

70:                                               ; preds = %36
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %10, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %11, align 4
  br label %93

74:                                               ; preds = %38
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %10, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %11, align 4
  br label %92

78:                                               ; preds = %42
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %10, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %11, align 4
  br label %91

82:                                               ; preds = %45
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %10, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %11, align 4
  br label %90

86:                                               ; preds = %51, %48, %46
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %10, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %11, align 4
  call void @_ZNSt4pairIN12nativeformat6plugin4util12ButterFilterES3_ED2Ev(ptr noundef nonnull align 8 dereferenceable(3440) %14) #5
  br label %90

90:                                               ; preds = %86, %82
  call void @llvm.lifetime.end.p0(i64 3440, ptr %14) #5
  br label %91

91:                                               ; preds = %90, %78
  call void @_ZN12nativeformat6plugin4util12ButterFilterD1Ev(ptr noundef nonnull align 8 dereferenceable(1720) %13) #5
  br label %92

92:                                               ; preds = %91, %74
  call void @llvm.lifetime.end.p0(i64 1720, ptr %13) #5
  br label %93

93:                                               ; preds = %92, %70
  call void @_ZNSt4pairIN12nativeformat6plugin4util12ButterFilterES3_ED2Ev(ptr noundef nonnull align 8 dereferenceable(3440) %12) #5
  br label %94

94:                                               ; preds = %93, %66
  call void @llvm.lifetime.end.p0(i64 3440, ptr %12) #5
  br label %95

95:                                               ; preds = %94, %62
  call void @_ZN12nativeformat6plugin4util12ButterFilterD1Ev(ptr noundef nonnull align 8 dereferenceable(1720) %9) #5
  call void @llvm.lifetime.end.p0(i64 1720, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %96

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt5floorImEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef) #2

declare void @_ZN12nativeformat6plugin4util12ButterFilterC1EjNS1_10FilterTypeEj(ptr noundef nonnull align 8 dereferenceable(1720), i32 noundef, i32 noundef, i32 noundef) unnamed_addr #3

declare void @_ZN12nativeformat6plugin4util12ButterFilter7computeEdd(ptr noundef nonnull align 8 dereferenceable(1720), double noundef, double noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt4pairIN12nativeformat6plugin4util12ButterFilterES3_EC2IRS3_S6_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS8_S9_EEEbE4typeELb1EEEOS8_OS9_(ptr noundef nonnull align 8 dereferenceable(3440), ptr noundef nonnull align 8 dereferenceable(1720), ptr noundef nonnull align 8 dereferenceable(1720)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIN12nativeformat6plugin4util12ButterFilterES4_ESaIS5_EE9push_backERKS5_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(3440)) #1 align 2

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

; Function Attrs: nounwind
declare void @_ZN12nativeformat6plugin4util12ButterFilterD1Ev(ptr noundef nonnull align 8 dereferenceable(1720)) unnamed_addr #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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" }
attributes #2 = { 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 #3 = { "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 "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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = !{!16, !10, i64 16}
!16 = !{!"_ZTSN12nativeformat6plugin4util12BandSplitterE", !10, i64 8, !10, i64 16, !17, i64 24, !21, i64 48}
!17 = !{!"_ZTSSt6vectorIdSaIdEE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"_ZTSSt6vectorISt4pairIN12nativeformat6plugin4util12ButterFilterES4_ESaIS5_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseISt4pairIN12nativeformat6plugin4util12ButterFilterES4_ESaIS5_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseISt4pairIN12nativeformat6plugin4util12ButterFilterES4_ESaIS5_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseISt4pairIN12nativeformat6plugin4util12ButterFilterES4_ESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}


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

%"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.5", %"class.std::vector.5" }
%"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.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = 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 }
%"struct.std::pair" = type { %"class.nativeformat::plugin::util::ButterFilter", %"class.nativeformat::plugin::util::ButterFilter" }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12nativeformat6plugin4util12BandSplitter17build_filter_treeEPKdm(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef %1, i64 noundef %2) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.nativeformat::plugin::util::ButterFilter", align 8
  %5 = alloca %"struct.std::pair", align 8
  %6 = alloca %"class.nativeformat::plugin::util::ButterFilter", align 8
  %7 = alloca %"struct.std::pair", align 8
  %.not = icmp eq i64 %2, 0
  br i1 %.not, label %35, label %8

8:                                                ; preds = %3
  %9 = add i64 %2, -1
  %10 = lshr i64 %9, 1
  %11 = tail call noundef double @_ZSt5floorImEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef %10)
  %12 = fptoui double %11 to i64
  %13 = getelementptr inbounds double, ptr %1, i64 %12
  %14 = load double, ptr %13, align 8, !tbaa !5
  %15 = fptrunc double %14 to float
  call void @llvm.lifetime.start.p0(i64 1720, ptr nonnull %4) #5
  %16 = getelementptr inbounds i8, ptr %0, i64 16
  %17 = load i64, ptr %16, align 8, !tbaa !9
  %18 = trunc i64 %17 to i32
  call void @_ZN12nativeformat6plugin4util12ButterFilterC1EjNS1_10FilterTypeEj(ptr noundef nonnull align 8 dereferenceable(1720) %4, i32 noundef 2, i32 noundef 0, i32 noundef %18)
  %19 = fpext float %15 to double
  invoke void @_ZN12nativeformat6plugin4util12ButterFilter7computeEdd(ptr noundef nonnull align 8 dereferenceable(1720) %4, double noundef %19, double noundef 0.000000e+00)
          to label %20 unwind label %36

20:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 3440, ptr nonnull %5) #5
  invoke void @_ZNSt4pairIN12nativeformat6plugin4util12ButterFilterES3_EC2IRS3_S6_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS8_S9_EEEbE4typeELb1EEEOS8_OS9_(ptr noundef nonnull align 8 dereferenceable(3440) %5, ptr noundef nonnull align 8 dereferenceable(1720) %4, ptr noundef nonnull align 8 dereferenceable(1720) %4)
          to label %21 unwind label %38

21:                                               ; preds = %20
  %22 = getelementptr inbounds i8, ptr %0, i64 48
  invoke void @_ZNSt6vectorISt4pairIN12nativeformat6plugin4util12ButterFilterES4_ESaIS5_EE9push_backERKS5_(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 8 dereferenceable(3440) %5)
          to label %23 unwind label %40

23:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 1720, ptr nonnull %6) #5
  %24 = load i64, ptr %16, align 8, !tbaa !9
  %25 = trunc i64 %24 to i32
  invoke void @_ZN12nativeformat6plugin4util12ButterFilterC1EjNS1_10FilterTypeEj(ptr noundef nonnull align 8 dereferenceable(1720) %6, i32 noundef 2, i32 noundef 1, i32 noundef %25)
          to label %26 unwind label %42

26:                                               ; preds = %23
  invoke void @_ZN12nativeformat6plugin4util12ButterFilter7computeEdd(ptr noundef nonnull align 8 dereferenceable(1720) %6, double noundef %19, double noundef 0.000000e+00)
          to label %27 unwind label %44

27:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 3440, ptr nonnull %7) #5
  invoke void @_ZNSt4pairIN12nativeformat6plugin4util12ButterFilterES3_EC2IRS3_S6_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS8_S9_EEEbE4typeELb1EEEOS8_OS9_(ptr noundef nonnull align 8 dereferenceable(3440) %7, ptr noundef nonnull align 8 dereferenceable(1720) %6, ptr noundef nonnull align 8 dereferenceable(1720) %6)
          to label %28 unwind label %46

28:                                               ; preds = %27
  invoke void @_ZNSt6vectorISt4pairIN12nativeformat6plugin4util12ButterFilterES4_ESaIS5_EE9push_backERKS5_(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 8 dereferenceable(3440) %7)
          to label %29 unwind label %48

29:                                               ; preds = %28
  invoke void @_ZN12nativeformat6plugin4util12BandSplitter17build_filter_treeEPKdm(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull %1, i64 noundef %12)
          to label %30 unwind label %48

30:                                               ; preds = %29
  %31 = getelementptr inbounds i8, ptr %13, i64 8
  %32 = xor i64 %12, -1
  %33 = add i64 %32, %2
  invoke void @_ZN12nativeformat6plugin4util12BandSplitter17build_filter_treeEPKdm(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull %31, i64 noundef %33)
          to label %34 unwind label %48

34:                                               ; preds = %30
  call void @_ZNSt4pairIN12nativeformat6plugin4util12ButterFilterES3_ED2Ev(ptr noundef nonnull align 8 dereferenceable(3440) %7) #5
  call void @llvm.lifetime.end.p0(i64 3440, ptr nonnull %7) #5
  call void @_ZN12nativeformat6plugin4util12ButterFilterD1Ev(ptr noundef nonnull align 8 dereferenceable(1720) %6) #5
  call void @llvm.lifetime.end.p0(i64 1720, ptr nonnull %6) #5
  call void @_ZNSt4pairIN12nativeformat6plugin4util12ButterFilterES3_ED2Ev(ptr noundef nonnull align 8 dereferenceable(3440) %5) #5
  call void @llvm.lifetime.end.p0(i64 3440, ptr nonnull %5) #5
  call void @_ZN12nativeformat6plugin4util12ButterFilterD1Ev(ptr noundef nonnull align 8 dereferenceable(1720) %4) #5
  call void @llvm.lifetime.end.p0(i64 1720, ptr nonnull %4) #5
  br label %35

35:                                               ; preds = %3, %34
  ret void

36:                                               ; preds = %8
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %55

38:                                               ; preds = %20
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %54

40:                                               ; preds = %21
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %53

42:                                               ; preds = %23
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %52

44:                                               ; preds = %26
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %51

46:                                               ; preds = %27
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %50

48:                                               ; preds = %30, %29, %28
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt4pairIN12nativeformat6plugin4util12ButterFilterES3_ED2Ev(ptr noundef nonnull align 8 dereferenceable(3440) %7) #5
  br label %50

50:                                               ; preds = %48, %46
  %.pn = phi { ptr, i32 } [ %49, %48 ], [ %47, %46 ]
  call void @llvm.lifetime.end.p0(i64 3440, ptr nonnull %7) #5
  br label %51

51:                                               ; preds = %50, %44
  %.pn.pn = phi { ptr, i32 } [ %.pn, %50 ], [ %45, %44 ]
  call void @_ZN12nativeformat6plugin4util12ButterFilterD1Ev(ptr noundef nonnull align 8 dereferenceable(1720) %6) #5
  br label %52

52:                                               ; preds = %51, %42
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %51 ], [ %43, %42 ]
  call void @llvm.lifetime.end.p0(i64 1720, ptr nonnull %6) #5
  br label %53

53:                                               ; preds = %52, %40
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %52 ], [ %41, %40 ]
  call void @_ZNSt4pairIN12nativeformat6plugin4util12ButterFilterES3_ED2Ev(ptr noundef nonnull align 8 dereferenceable(3440) %5) #5
  br label %54

54:                                               ; preds = %53, %38
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %53 ], [ %39, %38 ]
  call void @llvm.lifetime.end.p0(i64 3440, ptr nonnull %5) #5
  br label %55

55:                                               ; preds = %54, %36
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %54 ], [ %37, %36 ]
  call void @_ZN12nativeformat6plugin4util12ButterFilterD1Ev(ptr noundef nonnull align 8 dereferenceable(1720) %4) #5
  call void @llvm.lifetime.end.p0(i64 1720, ptr nonnull %4) #5
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt5floorImEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef) local_unnamed_addr #2

declare void @_ZN12nativeformat6plugin4util12ButterFilterC1EjNS1_10FilterTypeEj(ptr noundef nonnull align 8 dereferenceable(1720), i32 noundef, i32 noundef, i32 noundef) unnamed_addr #3

declare void @_ZN12nativeformat6plugin4util12ButterFilter7computeEdd(ptr noundef nonnull align 8 dereferenceable(1720), double noundef, double noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt4pairIN12nativeformat6plugin4util12ButterFilterES3_EC2IRS3_S6_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS8_S9_EEEbE4typeELb1EEEOS8_OS9_(ptr noundef nonnull align 8 dereferenceable(3440), ptr noundef nonnull align 8 dereferenceable(1720), ptr noundef nonnull align 8 dereferenceable(1720)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIN12nativeformat6plugin4util12ButterFilterES4_ESaIS5_EE9push_backERKS5_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(3440)) local_unnamed_addr #1 align 2

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

; Function Attrs: nounwind
declare void @_ZN12nativeformat6plugin4util12ButterFilterD1Ev(ptr noundef nonnull align 8 dereferenceable(1720)) unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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" }
attributes #2 = { 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 #3 = { "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 "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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 16}
!10 = !{!"_ZTSN12nativeformat6plugin4util12BandSplitterE", !11, i64 8, !11, i64 16, !12, i64 24, !17, i64 48}
!11 = !{!"long", !7, i64 0}
!12 = !{!"_ZTSSt6vectorIdSaIdEE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!16 = !{!"any pointer", !7, i64 0}
!17 = !{!"_ZTSSt6vectorISt4pairIN12nativeformat6plugin4util12ButterFilterES4_ESaIS5_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseISt4pairIN12nativeformat6plugin4util12ButterFilterES4_ESaIS5_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseISt4pairIN12nativeformat6plugin4util12ButterFilterES4_ESaIS5_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseISt4pairIN12nativeformat6plugin4util12ButterFilterES4_ESaIS5_EE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}


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