; LLVM IR from kdrag0n/fxdsp :: external/oboe/src/flowgraph/resampler (SincResamplerStereo)

; 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.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.resampler::MultiChannelResampler" = type <{ ptr, %"class.std::vector", i32, i32, %"class.std::vector", %"class.std::vector", i32, i32, i32, [4 x i8], %"class.resampler::HyperbolicCosineWindow", i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.resampler::HyperbolicCosineWindow" = type { double, double }
%"class.resampler::SincResampler" = type { %"class.resampler::MultiChannelResampler.base", %"class.std::vector", i32, double }
%"class.resampler::MultiChannelResampler.base" = type <{ ptr, %"class.std::vector", i32, i32, %"class.std::vector", %"class.std::vector", i32, i32, i32, [4 x i8], %"class.resampler::HyperbolicCosineWindow", i32 }>

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9resampler19SincResamplerStereo9readFrameEPf(ptr noundef nonnull align 8 dereferenceable(168) %0, ptr noundef %1) unnamed_addr #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca double, align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca i32, align 4
  %22 = alloca float, align 4
  %23 = alloca float, align 4
  %24 = alloca i32, align 4
  %25 = alloca float, align 4
  %26 = alloca float, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %27 = load ptr, ptr %3, align 8
  %28 = getelementptr inbounds %"class.resampler::MultiChannelResampler", ptr %27, i32 0, i32 5
  %29 = call ptr @_ZNSt6vectorIfSaIfEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #5
  %30 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %5, i32 0, i32 0
  store ptr %29, ptr %30, align 8
  %31 = getelementptr inbounds %"class.resampler::MultiChannelResampler", ptr %27, i32 0, i32 5
  %32 = call ptr @_ZNSt6vectorIfSaIfEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #5
  %33 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  store ptr %32, ptr %33, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store double 0.000000e+00, ptr %7, align 8, !tbaa !9
  %34 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %5, i32 0, i32 0
  %35 = load ptr, ptr %34, align 8
  %36 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8
  call void @_ZSt4fillIN9__gnu_cxx17__normal_iteratorIPfSt6vectorIfSaIfEEEEdEvT_S7_RKT0_(ptr %35, ptr %37, ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  %38 = getelementptr inbounds %"class.resampler::SincResampler", ptr %27, i32 0, i32 1
  %39 = call ptr @_ZNSt6vectorIfSaIfEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %38) #5
  %40 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %39, ptr %40, align 8
  %41 = getelementptr inbounds %"class.resampler::SincResampler", ptr %27, i32 0, i32 1
  %42 = call ptr @_ZNSt6vectorIfSaIfEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %41) #5
  %43 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %42, ptr %43, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store double 0.000000e+00, ptr %10, align 8, !tbaa !9
  %44 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8
  %46 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  %47 = load ptr, ptr %46, align 8
  call void @_ZSt4fillIN9__gnu_cxx17__normal_iteratorIPfSt6vectorIfSaIfEEEEdEvT_S7_RKT0_(ptr %45, ptr %47, ptr noundef nonnull align 8 dereferenceable(8) %10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %48 = call noundef i32 @_ZN9resampler21MultiChannelResampler15getIntegerPhaseEv(ptr noundef nonnull align 8 dereferenceable(124) %27)
  %49 = sitofp i32 %48 to double
  %50 = getelementptr inbounds %"class.resampler::SincResampler", ptr %27, i32 0, i32 3
  %51 = load double, ptr %50, align 8, !tbaa !11
  %52 = fmul double %49, %51
  store double %52, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %53 = load double, ptr %11, align 8, !tbaa !9
  %54 = call double @llvm.floor.f64(double %53)
  %55 = fptosi double %54 to i32
  store i32 %55, ptr %12, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %56 = getelementptr inbounds %"class.resampler::MultiChannelResampler", ptr %27, i32 0, i32 1
  %57 = load i32, ptr %12, align 4, !tbaa !20
  %58 = call noundef i32 @_ZNK9resampler21MultiChannelResampler10getNumTapsEv(ptr noundef nonnull align 8 dereferenceable(124) %27)
  %59 = mul nsw i32 %57, %58
  %60 = sext i32 %59 to i64
  %61 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %56, i64 noundef %60) #5
  store ptr %61, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %62 = load i32, ptr %12, align 4, !tbaa !20
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %14, align 4, !tbaa !20
  %64 = load i32, ptr %14, align 4, !tbaa !20
  %65 = getelementptr inbounds %"class.resampler::SincResampler", ptr %27, i32 0, i32 2
  %66 = load i32, ptr %65, align 8, !tbaa !21
  %67 = icmp sge i32 %64, %66
  br i1 %67, label %68, label %69

68:                                               ; preds = %2
  store i32 0, ptr %14, align 4, !tbaa !20
  br label %69

69:                                               ; preds = %68, %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %70 = getelementptr inbounds %"class.resampler::MultiChannelResampler", ptr %27, i32 0, i32 1
  %71 = load i32, ptr %14, align 4, !tbaa !20
  %72 = call noundef i32 @_ZNK9resampler21MultiChannelResampler10getNumTapsEv(ptr noundef nonnull align 8 dereferenceable(124) %27)
  %73 = mul nsw i32 %71, %72
  %74 = sext i32 %73 to i64
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %70, i64 noundef %74) #5
  store ptr %75, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %76 = getelementptr inbounds %"class.resampler::MultiChannelResampler", ptr %27, i32 0, i32 4
  %77 = getelementptr inbounds %"class.resampler::MultiChannelResampler", ptr %27, i32 0, i32 3
  %78 = load i32, ptr %77, align 4, !tbaa !22
  %79 = call noundef i32 @_ZNK9resampler21MultiChannelResampler15getChannelCountEv(ptr noundef nonnull align 8 dereferenceable(124) %27)
  %80 = mul nsw i32 %78, %79
  %81 = sext i32 %80 to i64
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %76, i64 noundef %81) #5
  store ptr %82, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 0, ptr %17, align 4, !tbaa !20
  br label %83

83:                                               ; preds = %125, %69
  %84 = load i32, ptr %17, align 4, !tbaa !20
  %85 = getelementptr inbounds %"class.resampler::MultiChannelResampler", ptr %27, i32 0, i32 2
  %86 = load i32, ptr %85, align 8, !tbaa !23
  %87 = icmp slt i32 %84, %86
  br i1 %87, label %89, label %88

88:                                               ; preds = %83
  store i32 2, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %128

89:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %90 = load ptr, ptr %13, align 8, !tbaa !5
  %91 = getelementptr inbounds float, ptr %90, i32 1
  store ptr %91, ptr %13, align 8, !tbaa !5
  %92 = load float, ptr %90, align 4, !tbaa !24
  store float %92, ptr %19, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %93 = load ptr, ptr %15, align 8, !tbaa !5
  %94 = getelementptr inbounds float, ptr %93, i32 1
  store ptr %94, ptr %15, align 8, !tbaa !5
  %95 = load float, ptr %93, align 4, !tbaa !24
  store float %95, ptr %20, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store i32 0, ptr %21, align 4, !tbaa !20
  br label %96

96:                                               ; preds = %121, %89
  %97 = load i32, ptr %21, align 4, !tbaa !20
  %98 = call noundef i32 @_ZNK9resampler21MultiChannelResampler15getChannelCountEv(ptr noundef nonnull align 8 dereferenceable(124) %27)
  %99 = icmp slt i32 %97, %98
  br i1 %99, label %101, label %100

100:                                              ; preds = %96
  store i32 5, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %124

101:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  %102 = load ptr, ptr %16, align 8, !tbaa !5
  %103 = getelementptr inbounds float, ptr %102, i32 1
  store ptr %103, ptr %16, align 8, !tbaa !5
  %104 = load float, ptr %102, align 4, !tbaa !24
  store float %104, ptr %22, align 4, !tbaa !24
  %105 = load float, ptr %22, align 4, !tbaa !24
  %106 = load float, ptr %19, align 4, !tbaa !24
  %107 = getelementptr inbounds %"class.resampler::MultiChannelResampler", ptr %27, i32 0, i32 5
  %108 = load i32, ptr %21, align 4, !tbaa !20
  %109 = sext i32 %108 to i64
  %110 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %107, i64 noundef %109) #5
  %111 = load float, ptr %110, align 4, !tbaa !24
  %112 = call float @llvm.fmuladd.f32(float %105, float %106, float %111)
  store float %112, ptr %110, align 4, !tbaa !24
  %113 = load float, ptr %22, align 4, !tbaa !24
  %114 = load float, ptr %20, align 4, !tbaa !24
  %115 = getelementptr inbounds %"class.resampler::SincResampler", ptr %27, i32 0, i32 1
  %116 = load i32, ptr %21, align 4, !tbaa !20
  %117 = sext i32 %116 to i64
  %118 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %115, i64 noundef %117) #5
  %119 = load float, ptr %118, align 4, !tbaa !24
  %120 = call float @llvm.fmuladd.f32(float %113, float %114, float %119)
  store float %120, ptr %118, align 4, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %121

121:                                              ; preds = %101
  %122 = load i32, ptr %21, align 4, !tbaa !20
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %21, align 4, !tbaa !20
  br label %96, !llvm.loop !26

124:                                              ; preds = %100
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %125

125:                                              ; preds = %124
  %126 = load i32, ptr %17, align 4, !tbaa !20
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %17, align 4, !tbaa !20
  br label %83, !llvm.loop !28

128:                                              ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  %129 = load double, ptr %11, align 8, !tbaa !9
  %130 = load i32, ptr %12, align 4, !tbaa !20
  %131 = sitofp i32 %130 to double
  %132 = fsub double %129, %131
  %133 = fptrunc double %132 to float
  store float %133, ptr %23, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store i32 0, ptr %24, align 4, !tbaa !20
  br label %134

134:                                              ; preds = %160, %128
  %135 = load i32, ptr %24, align 4, !tbaa !20
  %136 = call noundef i32 @_ZNK9resampler21MultiChannelResampler15getChannelCountEv(ptr noundef nonnull align 8 dereferenceable(124) %27)
  %137 = icmp slt i32 %135, %136
  br i1 %137, label %139, label %138

138:                                              ; preds = %134
  store i32 8, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %163

139:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  %140 = getelementptr inbounds %"class.resampler::MultiChannelResampler", ptr %27, i32 0, i32 5
  %141 = load i32, ptr %24, align 4, !tbaa !20
  %142 = sext i32 %141 to i64
  %143 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %140, i64 noundef %142) #5
  %144 = load float, ptr %143, align 4, !tbaa !24
  store float %144, ptr %25, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  %145 = getelementptr inbounds %"class.resampler::SincResampler", ptr %27, i32 0, i32 1
  %146 = load i32, ptr %24, align 4, !tbaa !20
  %147 = sext i32 %146 to i64
  %148 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %145, i64 noundef %147) #5
  %149 = load float, ptr %148, align 4, !tbaa !24
  store float %149, ptr %26, align 4, !tbaa !24
  %150 = load float, ptr %25, align 4, !tbaa !24
  %151 = load float, ptr %23, align 4, !tbaa !24
  %152 = load float, ptr %26, align 4, !tbaa !24
  %153 = load float, ptr %25, align 4, !tbaa !24
  %154 = fsub float %152, %153
  %155 = call float @llvm.fmuladd.f32(float %151, float %154, float %150)
  %156 = load ptr, ptr %4, align 8, !tbaa !5
  %157 = load i32, ptr %24, align 4, !tbaa !20
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds float, ptr %156, i64 %158
  store float %155, ptr %159, align 4, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  br label %160

160:                                              ; preds = %139
  %161 = load i32, ptr %24, align 4, !tbaa !20
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr %24, align 4, !tbaa !20
  br label %134, !llvm.loop !29

163:                                              ; preds = %138
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIN9__gnu_cxx17__normal_iteratorIPfSt6vectorIfSaIfEEEEdEvT_S7_RKT0_(ptr, ptr, ptr noundef nonnull align 8 dereferenceable(8)) #3

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.floor.f64(double) #4

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #4

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"double", !7, i64 0}
!11 = !{!12, !10, i64 160}
!12 = !{!"_ZTSN9resampler13SincResamplerE", !13, i64 0, !14, i64 128, !18, i64 152, !10, i64 160}
!13 = !{!"_ZTSN9resampler21MultiChannelResamplerE", !14, i64 8, !18, i64 32, !18, i64 36, !14, i64 40, !14, i64 64, !18, i64 88, !18, i64 92, !18, i64 96, !19, i64 104, !18, i64 120}
!14 = !{!"_ZTSSt6vectorIfSaIfEE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!"int", !7, i64 0}
!19 = !{!"_ZTSN9resampler22HyperbolicCosineWindowE", !10, i64 0, !10, i64 8}
!20 = !{!18, !18, i64 0}
!21 = !{!12, !18, i64 152}
!22 = !{!13, !18, i64 36}
!23 = !{!13, !18, i64 32}
!24 = !{!25, !25, i64 0}
!25 = !{!"float", !7, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}
!29 = distinct !{!29, !27}


; 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 nounwind uwtable
declare dso_local noundef i32 @_ZNK9resampler21MultiChannelResampler10getNumTapsEv(ptr noundef nonnull align 8 dereferenceable(124)) local_unnamed_addr #0 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9resampler19SincResamplerStereo9readFrameEPf(ptr noundef nonnull align 8 dereferenceable(168) %0, ptr nocapture noundef writeonly %1) unnamed_addr #2 align 2 {
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = getelementptr inbounds i8, ptr %0, i64 64
  %6 = tail call ptr @_ZNSt6vectorIfSaIfEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  %7 = tail call ptr @_ZNSt6vectorIfSaIfEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  store double 0.000000e+00, ptr %3, align 8, !tbaa !5
  call void @_ZSt4fillIN9__gnu_cxx17__normal_iteratorIPfSt6vectorIfSaIfEEEEdEvT_S7_RKT0_(ptr %6, ptr %7, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  %8 = getelementptr inbounds i8, ptr %0, i64 128
  %9 = call ptr @_ZNSt6vectorIfSaIfEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %10 = call ptr @_ZNSt6vectorIfSaIfEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  store double 0.000000e+00, ptr %4, align 8, !tbaa !5
  call void @_ZSt4fillIN9__gnu_cxx17__normal_iteratorIPfSt6vectorIfSaIfEEEEdEvT_S7_RKT0_(ptr %9, ptr %10, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  %11 = call noundef i32 @_ZN9resampler21MultiChannelResampler15getIntegerPhaseEv(ptr noundef nonnull align 8 dereferenceable(124) %0)
  %12 = sitofp i32 %11 to double
  %13 = getelementptr inbounds i8, ptr %0, i64 160
  %14 = load double, ptr %13, align 8, !tbaa !9
  %15 = fmul double %14, %12
  %16 = call double @llvm.floor.f64(double %15)
  %17 = fptosi double %16 to i32
  %18 = getelementptr inbounds i8, ptr %0, i64 8
  %19 = call noundef i32 @_ZNK9resampler21MultiChannelResampler10getNumTapsEv(ptr noundef nonnull align 8 dereferenceable(124) %0)
  %20 = mul nsw i32 %19, %17
  %21 = sext i32 %20 to i64
  %22 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %21) #5
  %23 = add nsw i32 %17, 1
  %24 = getelementptr inbounds i8, ptr %0, i64 152
  %25 = load i32, ptr %24, align 8, !tbaa !19
  %.not = icmp slt i32 %23, %25
  %spec.store.select = select i1 %.not, i32 %23, i32 0
  %26 = call noundef i32 @_ZNK9resampler21MultiChannelResampler10getNumTapsEv(ptr noundef nonnull align 8 dereferenceable(124) %0)
  %27 = mul nsw i32 %spec.store.select, %26
  %28 = sext i32 %27 to i64
  %29 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %28) #5
  %30 = getelementptr inbounds i8, ptr %0, i64 40
  %31 = getelementptr inbounds i8, ptr %0, i64 36
  %32 = load i32, ptr %31, align 4, !tbaa !20
  %33 = call noundef i32 @_ZNK9resampler21MultiChannelResampler15getChannelCountEv(ptr noundef nonnull align 8 dereferenceable(124) %0)
  %34 = mul nsw i32 %33, %32
  %35 = sext i32 %34 to i64
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef %35) #5
  %37 = getelementptr inbounds i8, ptr %0, i64 32
  %38 = load i32, ptr %37, align 8, !tbaa !21
  %39 = icmp sgt i32 %38, 0
  br i1 %39, label %.lr.ph45, label %._crit_edge46

._crit_edge46:                                    ; preds = %._crit_edge, %2
  %40 = sitofp i32 %17 to double
  %41 = fsub double %15, %40
  %42 = fptrunc double %41 to float
  %43 = call noundef i32 @_ZNK9resampler21MultiChannelResampler15getChannelCountEv(ptr noundef nonnull align 8 dereferenceable(124) %0)
  %44 = icmp sgt i32 %43, 0
  br i1 %44, label %.lr.ph49, label %._crit_edge50

.lr.ph45:                                         ; preds = %2, %._crit_edge
  %.043 = phi ptr [ %45, %._crit_edge ], [ %22, %2 ]
  %.03342 = phi ptr [ %47, %._crit_edge ], [ %29, %2 ]
  %.03541 = phi ptr [ %.1.lcssa, %._crit_edge ], [ %36, %2 ]
  %.03640 = phi i32 [ %51, %._crit_edge ], [ 0, %2 ]
  %45 = getelementptr inbounds i8, ptr %.043, i64 4
  %46 = load float, ptr %.043, align 4, !tbaa !22
  %47 = getelementptr inbounds i8, ptr %.03342, i64 4
  %48 = load float, ptr %.03342, align 4, !tbaa !22
  %49 = call noundef i32 @_ZNK9resampler21MultiChannelResampler15getChannelCountEv(ptr noundef nonnull align 8 dereferenceable(124) %0)
  %50 = icmp sgt i32 %49, 0
  br i1 %50, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph45
  %.1.lcssa = phi ptr [ %.03541, %.lr.ph45 ], [ %54, %.lr.ph ]
  %51 = add nuw nsw i32 %.03640, 1
  %52 = load i32, ptr %37, align 8, !tbaa !21
  %53 = icmp slt i32 %51, %52
  br i1 %53, label %.lr.ph45, label %._crit_edge46, !llvm.loop !24

.lr.ph:                                           ; preds = %.lr.ph45, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.lr.ph45 ]
  %.139 = phi ptr [ %54, %.lr.ph ], [ %.03541, %.lr.ph45 ]
  %54 = getelementptr inbounds i8, ptr %.139, i64 4
  %55 = load float, ptr %.139, align 4, !tbaa !22
  %56 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv) #5
  %57 = load float, ptr %56, align 4, !tbaa !22
  %58 = call float @llvm.fmuladd.f32(float %55, float %46, float %57)
  store float %58, ptr %56, align 4, !tbaa !22
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %indvars.iv) #5
  %60 = load float, ptr %59, align 4, !tbaa !22
  %61 = call float @llvm.fmuladd.f32(float %55, float %48, float %60)
  store float %61, ptr %59, align 4, !tbaa !22
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %62 = call noundef i32 @_ZNK9resampler21MultiChannelResampler15getChannelCountEv(ptr noundef nonnull align 8 dereferenceable(124) %0)
  %63 = sext i32 %62 to i64
  %64 = icmp slt i64 %indvars.iv.next, %63
  br i1 %64, label %.lr.ph, label %._crit_edge, !llvm.loop !26

._crit_edge50:                                    ; preds = %.lr.ph49, %._crit_edge46
  ret void

.lr.ph49:                                         ; preds = %._crit_edge46, %.lr.ph49
  %indvars.iv52 = phi i64 [ %indvars.iv.next53, %.lr.ph49 ], [ 0, %._crit_edge46 ]
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv52) #5
  %66 = load float, ptr %65, align 4, !tbaa !22
  %67 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %indvars.iv52) #5
  %68 = load float, ptr %67, align 4, !tbaa !22
  %69 = fsub float %68, %66
  %70 = call float @llvm.fmuladd.f32(float %42, float %69, float %66)
  %71 = getelementptr inbounds float, ptr %1, i64 %indvars.iv52
  store float %70, ptr %71, align 4, !tbaa !22
  %indvars.iv.next53 = add nuw nsw i64 %indvars.iv52, 1
  %72 = call noundef i32 @_ZNK9resampler21MultiChannelResampler15getChannelCountEv(ptr noundef nonnull align 8 dereferenceable(124) %0)
  %73 = sext i32 %72 to i64
  %74 = icmp slt i64 %indvars.iv.next53, %73
  br i1 %74, label %.lr.ph49, label %._crit_edge50, !llvm.loop !27
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIN9__gnu_cxx17__normal_iteratorIPfSt6vectorIfSaIfEEEEdEvT_S7_RKT0_(ptr, ptr, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.floor.f64(double) #4

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #4

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !6, i64 160}
!10 = !{!"_ZTSN9resampler13SincResamplerE", !11, i64 0, !12, i64 128, !17, i64 152, !6, i64 160}
!11 = !{!"_ZTSN9resampler21MultiChannelResamplerE", !12, i64 8, !17, i64 32, !17, i64 36, !12, i64 40, !12, i64 64, !17, i64 88, !17, i64 92, !17, i64 96, !18, i64 104, !17, i64 120}
!12 = !{!"_ZTSSt6vectorIfSaIfEE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!16 = !{!"any pointer", !7, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = !{!"_ZTSN9resampler22HyperbolicCosineWindowE", !6, i64 0, !6, i64 8}
!19 = !{!10, !17, i64 152}
!20 = !{!11, !17, i64 36}
!21 = !{!11, !17, i64 32}
!22 = !{!23, !23, i64 0}
!23 = !{!"float", !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = distinct !{!27, !25}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass