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

; 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9resampler13SincResampler9readFrameEPf(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 i32, align 4
  %14 = alloca ptr, align 8
  %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
  %56 = load i32, ptr %12, align 4, !tbaa !20
  %57 = getelementptr inbounds %"class.resampler::SincResampler", ptr %27, i32 0, i32 2
  %58 = load i32, ptr %57, align 8, !tbaa !21
  %59 = icmp sge i32 %56, %58
  br i1 %59, label %60, label %70

60:                                               ; preds = %2
  %61 = getelementptr inbounds %"class.resampler::SincResampler", ptr %27, i32 0, i32 2
  %62 = load i32, ptr %61, align 8, !tbaa !21
  %63 = sitofp i32 %62 to double
  %64 = load double, ptr %11, align 8, !tbaa !9
  %65 = fsub double %64, %63
  store double %65, ptr %11, align 8, !tbaa !9
  %66 = getelementptr inbounds %"class.resampler::SincResampler", ptr %27, i32 0, i32 2
  %67 = load i32, ptr %66, align 8, !tbaa !21
  %68 = load i32, ptr %12, align 4, !tbaa !20
  %69 = sub nsw i32 %68, %67
  store i32 %69, ptr %12, align 4, !tbaa !20
  br label %70

70:                                               ; preds = %60, %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %71 = load i32, ptr %12, align 4, !tbaa !20
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %13, align 4, !tbaa !20
  %73 = load i32, ptr %13, align 4, !tbaa !20
  %74 = getelementptr inbounds %"class.resampler::SincResampler", ptr %27, i32 0, i32 2
  %75 = load i32, ptr %74, align 8, !tbaa !21
  %76 = icmp sge i32 %73, %75
  br i1 %76, label %77, label %82

77:                                               ; preds = %70
  %78 = getelementptr inbounds %"class.resampler::SincResampler", ptr %27, i32 0, i32 2
  %79 = load i32, ptr %78, align 8, !tbaa !21
  %80 = load i32, ptr %13, align 4, !tbaa !20
  %81 = sub nsw i32 %80, %79
  store i32 %81, ptr %13, align 4, !tbaa !20
  br label %82

82:                                               ; preds = %77, %70
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %83 = getelementptr inbounds %"class.resampler::MultiChannelResampler", ptr %27, i32 0, i32 1
  %84 = load i32, ptr %12, align 4, !tbaa !20
  %85 = call noundef i32 @_ZNK9resampler21MultiChannelResampler10getNumTapsEv(ptr noundef nonnull align 8 dereferenceable(124) %27)
  %86 = mul nsw i32 %84, %85
  %87 = sext i32 %86 to i64
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %83, i64 noundef %87) #5
  store ptr %88, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %89 = getelementptr inbounds %"class.resampler::MultiChannelResampler", ptr %27, i32 0, i32 1
  %90 = load i32, ptr %13, align 4, !tbaa !20
  %91 = call noundef i32 @_ZNK9resampler21MultiChannelResampler10getNumTapsEv(ptr noundef nonnull align 8 dereferenceable(124) %27)
  %92 = mul nsw i32 %90, %91
  %93 = sext i32 %92 to i64
  %94 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %89, i64 noundef %93) #5
  store ptr %94, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %95 = getelementptr inbounds %"class.resampler::MultiChannelResampler", ptr %27, i32 0, i32 4
  %96 = getelementptr inbounds %"class.resampler::MultiChannelResampler", ptr %27, i32 0, i32 3
  %97 = load i32, ptr %96, align 4, !tbaa !22
  %98 = call noundef i32 @_ZNK9resampler21MultiChannelResampler15getChannelCountEv(ptr noundef nonnull align 8 dereferenceable(124) %27)
  %99 = mul nsw i32 %97, %98
  %100 = sext i32 %99 to i64
  %101 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %95, i64 noundef %100) #5
  store ptr %101, 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 %102

102:                                              ; preds = %144, %82
  %103 = load i32, ptr %17, align 4, !tbaa !20
  %104 = getelementptr inbounds %"class.resampler::MultiChannelResampler", ptr %27, i32 0, i32 2
  %105 = load i32, ptr %104, align 8, !tbaa !23
  %106 = icmp slt i32 %103, %105
  br i1 %106, label %108, label %107

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

108:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %109 = load ptr, ptr %14, align 8, !tbaa !5
  %110 = getelementptr inbounds float, ptr %109, i32 1
  store ptr %110, ptr %14, align 8, !tbaa !5
  %111 = load float, ptr %109, align 4, !tbaa !24
  store float %111, ptr %19, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %112 = load ptr, ptr %15, align 8, !tbaa !5
  %113 = getelementptr inbounds float, ptr %112, i32 1
  store ptr %113, ptr %15, align 8, !tbaa !5
  %114 = load float, ptr %112, align 4, !tbaa !24
  store float %114, 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 %115

115:                                              ; preds = %140, %108
  %116 = load i32, ptr %21, align 4, !tbaa !20
  %117 = call noundef i32 @_ZNK9resampler21MultiChannelResampler15getChannelCountEv(ptr noundef nonnull align 8 dereferenceable(124) %27)
  %118 = icmp slt i32 %116, %117
  br i1 %118, label %120, label %119

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

120:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  %121 = load ptr, ptr %16, align 8, !tbaa !5
  %122 = getelementptr inbounds float, ptr %121, i32 1
  store ptr %122, ptr %16, align 8, !tbaa !5
  %123 = load float, ptr %121, align 4, !tbaa !24
  store float %123, ptr %22, align 4, !tbaa !24
  %124 = load float, ptr %22, align 4, !tbaa !24
  %125 = load float, ptr %19, align 4, !tbaa !24
  %126 = getelementptr inbounds %"class.resampler::MultiChannelResampler", ptr %27, i32 0, i32 5
  %127 = load i32, ptr %21, align 4, !tbaa !20
  %128 = sext i32 %127 to i64
  %129 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %126, i64 noundef %128) #5
  %130 = load float, ptr %129, align 4, !tbaa !24
  %131 = call float @llvm.fmuladd.f32(float %124, float %125, float %130)
  store float %131, ptr %129, align 4, !tbaa !24
  %132 = load float, ptr %22, align 4, !tbaa !24
  %133 = load float, ptr %20, align 4, !tbaa !24
  %134 = getelementptr inbounds %"class.resampler::SincResampler", ptr %27, i32 0, i32 1
  %135 = load i32, ptr %21, align 4, !tbaa !20
  %136 = sext i32 %135 to i64
  %137 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %134, i64 noundef %136) #5
  %138 = load float, ptr %137, align 4, !tbaa !24
  %139 = call float @llvm.fmuladd.f32(float %132, float %133, float %138)
  store float %139, ptr %137, align 4, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %140

140:                                              ; preds = %120
  %141 = load i32, ptr %21, align 4, !tbaa !20
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %21, align 4, !tbaa !20
  br label %115, !llvm.loop !26

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

144:                                              ; preds = %143
  %145 = load i32, ptr %17, align 4, !tbaa !20
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %17, align 4, !tbaa !20
  br label %102, !llvm.loop !28

147:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  %148 = load double, ptr %11, align 8, !tbaa !9
  %149 = load i32, ptr %12, align 4, !tbaa !20
  %150 = sitofp i32 %149 to double
  %151 = fsub double %148, %150
  %152 = fptrunc double %151 to float
  store float %152, 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 %153

153:                                              ; preds = %179, %147
  %154 = load i32, ptr %24, align 4, !tbaa !20
  %155 = call noundef i32 @_ZNK9resampler21MultiChannelResampler15getChannelCountEv(ptr noundef nonnull align 8 dereferenceable(124) %27)
  %156 = icmp slt i32 %154, %155
  br i1 %156, label %158, label %157

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

158:                                              ; preds = %153
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  %159 = getelementptr inbounds %"class.resampler::MultiChannelResampler", ptr %27, i32 0, i32 5
  %160 = load i32, ptr %24, align 4, !tbaa !20
  %161 = sext i32 %160 to i64
  %162 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %159, i64 noundef %161) #5
  %163 = load float, ptr %162, align 4, !tbaa !24
  store float %163, ptr %25, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  %164 = getelementptr inbounds %"class.resampler::SincResampler", ptr %27, i32 0, i32 1
  %165 = load i32, ptr %24, align 4, !tbaa !20
  %166 = sext i32 %165 to i64
  %167 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %164, i64 noundef %166) #5
  %168 = load float, ptr %167, align 4, !tbaa !24
  store float %168, ptr %26, align 4, !tbaa !24
  %169 = load float, ptr %25, align 4, !tbaa !24
  %170 = load float, ptr %23, align 4, !tbaa !24
  %171 = load float, ptr %26, align 4, !tbaa !24
  %172 = load float, ptr %25, align 4, !tbaa !24
  %173 = fsub float %171, %172
  %174 = call float @llvm.fmuladd.f32(float %170, float %173, float %169)
  %175 = load ptr, ptr %4, align 8, !tbaa !5
  %176 = load i32, ptr %24, align 4, !tbaa !20
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds float, ptr %175, i64 %177
  store float %174, ptr %178, 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 %179

179:                                              ; preds = %158
  %180 = load i32, ptr %24, align 4, !tbaa !20
  %181 = add nsw i32 %180, 1
  store i32 %181, ptr %24, align 4, !tbaa !20
  br label %153, !llvm.loop !29

182:                                              ; preds = %157
  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 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, 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)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN9resampler21MultiChannelResampler15getIntegerPhaseEv(ptr noundef nonnull align 8 dereferenceable(124)) #1 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 nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9resampler13SincResampler9readFrameEPf(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 152
  %19 = load i32, ptr %18, align 8, !tbaa !19
  %.not = icmp sgt i32 %19, %17
  %20 = sitofp i32 %19 to double
  %21 = fsub double %15, %20
  %22 = select i1 %.not, i32 0, i32 %19
  %.037 = sub nsw i32 %17, %22
  %.0 = select i1 %.not, double %15, double %21
  %23 = add nsw i32 %.037, 1
  %.not51 = icmp slt i32 %23, %19
  %24 = select i1 %.not51, i32 0, i32 %19
  %.039 = sub nsw i32 %23, %24
  %25 = getelementptr inbounds i8, ptr %0, i64 8
  %26 = call noundef i32 @_ZNK9resampler21MultiChannelResampler10getNumTapsEv(ptr noundef nonnull align 8 dereferenceable(124) %0)
  %27 = mul nsw i32 %.037, %26
  %28 = sext i32 %27 to i64
  %29 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %28) #5
  %30 = call noundef i32 @_ZNK9resampler21MultiChannelResampler10getNumTapsEv(ptr noundef nonnull align 8 dereferenceable(124) %0)
  %31 = mul nsw i32 %.039, %30
  %32 = sext i32 %31 to i64
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %32) #5
  %34 = getelementptr inbounds i8, ptr %0, i64 40
  %35 = getelementptr inbounds i8, ptr %0, i64 36
  %36 = load i32, ptr %35, align 4, !tbaa !20
  %37 = call noundef i32 @_ZNK9resampler21MultiChannelResampler15getChannelCountEv(ptr noundef nonnull align 8 dereferenceable(124) %0)
  %38 = mul nsw i32 %37, %36
  %39 = sext i32 %38 to i64
  %40 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %34, i64 noundef %39) #5
  %41 = getelementptr inbounds i8, ptr %0, i64 32
  %42 = load i32, ptr %41, align 8, !tbaa !21
  %43 = icmp sgt i32 %42, 0
  br i1 %43, label %.lr.ph59, label %._crit_edge60

._crit_edge60:                                    ; preds = %._crit_edge, %2
  %44 = sitofp i32 %.037 to double
  %45 = fsub double %.0, %44
  %46 = fptrunc double %45 to float
  %47 = call noundef i32 @_ZNK9resampler21MultiChannelResampler15getChannelCountEv(ptr noundef nonnull align 8 dereferenceable(124) %0)
  %48 = icmp sgt i32 %47, 0
  br i1 %48, label %.lr.ph63, label %._crit_edge64

.lr.ph59:                                         ; preds = %2, %._crit_edge
  %.04057 = phi ptr [ %49, %._crit_edge ], [ %29, %2 ]
  %.04256 = phi ptr [ %51, %._crit_edge ], [ %33, %2 ]
  %.04355 = phi ptr [ %.1.lcssa, %._crit_edge ], [ %40, %2 ]
  %.04454 = phi i32 [ %55, %._crit_edge ], [ 0, %2 ]
  %49 = getelementptr inbounds i8, ptr %.04057, i64 4
  %50 = load float, ptr %.04057, align 4, !tbaa !22
  %51 = getelementptr inbounds i8, ptr %.04256, i64 4
  %52 = load float, ptr %.04256, align 4, !tbaa !22
  %53 = call noundef i32 @_ZNK9resampler21MultiChannelResampler15getChannelCountEv(ptr noundef nonnull align 8 dereferenceable(124) %0)
  %54 = icmp sgt i32 %53, 0
  br i1 %54, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph59
  %.1.lcssa = phi ptr [ %.04355, %.lr.ph59 ], [ %58, %.lr.ph ]
  %55 = add nuw nsw i32 %.04454, 1
  %56 = load i32, ptr %41, align 8, !tbaa !21
  %57 = icmp slt i32 %55, %56
  br i1 %57, label %.lr.ph59, label %._crit_edge60, !llvm.loop !24

.lr.ph:                                           ; preds = %.lr.ph59, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.lr.ph59 ]
  %.152 = phi ptr [ %58, %.lr.ph ], [ %.04355, %.lr.ph59 ]
  %58 = getelementptr inbounds i8, ptr %.152, i64 4
  %59 = load float, ptr %.152, align 4, !tbaa !22
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv) #5
  %61 = load float, ptr %60, align 4, !tbaa !22
  %62 = call float @llvm.fmuladd.f32(float %59, float %50, float %61)
  store float %62, ptr %60, align 4, !tbaa !22
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %indvars.iv) #5
  %64 = load float, ptr %63, align 4, !tbaa !22
  %65 = call float @llvm.fmuladd.f32(float %59, float %52, float %64)
  store float %65, ptr %63, align 4, !tbaa !22
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %66 = call noundef i32 @_ZNK9resampler21MultiChannelResampler15getChannelCountEv(ptr noundef nonnull align 8 dereferenceable(124) %0)
  %67 = sext i32 %66 to i64
  %68 = icmp slt i64 %indvars.iv.next, %67
  br i1 %68, label %.lr.ph, label %._crit_edge, !llvm.loop !26

._crit_edge64:                                    ; preds = %.lr.ph63, %._crit_edge60
  ret void

.lr.ph63:                                         ; preds = %._crit_edge60, %.lr.ph63
  %indvars.iv66 = phi i64 [ %indvars.iv.next67, %.lr.ph63 ], [ 0, %._crit_edge60 ]
  %69 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv66) #5
  %70 = load float, ptr %69, align 4, !tbaa !22
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %indvars.iv66) #5
  %72 = load float, ptr %71, align 4, !tbaa !22
  %73 = fsub float %72, %70
  %74 = call float @llvm.fmuladd.f32(float %46, float %73, float %70)
  %75 = getelementptr inbounds float, ptr %1, i64 %indvars.iv66
  store float %74, ptr %75, align 4, !tbaa !22
  %indvars.iv.next67 = add nuw nsw i64 %indvars.iv66, 1
  %76 = call noundef i32 @_ZNK9resampler21MultiChannelResampler15getChannelCountEv(ptr noundef nonnull align 8 dereferenceable(124) %0)
  %77 = sext i32 %76 to i64
  %78 = icmp slt i64 %indvars.iv.next67, %77
  br i1 %78, label %.lr.ph63, label %._crit_edge64, !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 #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN9resampler21MultiChannelResampler15getIntegerPhaseEv(ptr noundef nonnull align 8 dereferenceable(124)) local_unnamed_addr #1 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 nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK9resampler21MultiChannelResampler15getChannelCountEv(ptr noundef nonnull align 8 dereferenceable(124)) local_unnamed_addr #1 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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