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

; 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.resampler::IntegerRatio" = type { i32, i32 }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK9resampler21MultiChannelResampler7Builder10getNumTapsEv(ptr noundef nonnull align 4 dereferenceable(20)) #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK9resampler21MultiChannelResampler7Builder15getChannelCountEv(ptr noundef nonnull align 4 dereferenceable(20)) #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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK9resampler21MultiChannelResampler7Builder12getInputRateEv(ptr noundef nonnull align 4 dereferenceable(20)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK9resampler21MultiChannelResampler7Builder13getOutputRateEv(ptr noundef nonnull align 4 dereferenceable(20)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9resampler12IntegerRatioC2Eii(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, i32 noundef) unnamed_addr #0 align 2

declare void @_ZN9resampler12IntegerRatio6reduceEv(ptr noundef nonnull align 4 dereferenceable(8)) #2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN9resampler21MultiChannelResampler7Builder5buildEv(ptr noundef nonnull align 4 dereferenceable(20) %0) #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.resampler::IntegerRatio", align 4
  %7 = alloca i8, align 1
  %8 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %9 = load ptr, ptr %3, align 8
  %10 = call noundef i32 @_ZNK9resampler21MultiChannelResampler7Builder10getNumTapsEv(ptr noundef nonnull align 4 dereferenceable(20) %9)
  %11 = icmp eq i32 %10, 2
  br i1 %11, label %12, label %19

12:                                               ; preds = %1
  %13 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 144) #6
  invoke void @_ZN9resampler15LinearResamplerC1ERKNS_21MultiChannelResampler7BuilderE(ptr noundef nonnull align 8 dereferenceable(144) %13, ptr noundef nonnull align 4 dereferenceable(20) %9)
          to label %14 unwind label %15

14:                                               ; preds = %12
  store ptr %13, ptr %2, align 8
  br label %75

15:                                               ; preds = %12
  %16 = landingpad { ptr, i32 }
          cleanup
  %17 = extractvalue { ptr, i32 } %16, 0
  store ptr %17, ptr %4, align 8
  %18 = extractvalue { ptr, i32 } %16, 1
  store i32 %18, ptr %5, align 4
  call void @_ZdlPvm(ptr noundef %13, i64 noundef 144) #7
  br label %77

19:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %20 = call noundef i32 @_ZNK9resampler21MultiChannelResampler7Builder12getInputRateEv(ptr noundef nonnull align 4 dereferenceable(20) %9)
  %21 = call noundef i32 @_ZNK9resampler21MultiChannelResampler7Builder13getOutputRateEv(ptr noundef nonnull align 4 dereferenceable(20) %9)
  call void @_ZN9resampler12IntegerRatioC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %6, i32 noundef %20, i32 noundef %21)
  call void @_ZN9resampler12IntegerRatio6reduceEv(ptr noundef nonnull align 4 dereferenceable(8) %6)
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #8
  %22 = call noundef i32 @_ZNK9resampler21MultiChannelResampler7Builder10getNumTapsEv(ptr noundef nonnull align 4 dereferenceable(20) %9)
  %23 = call noundef i32 @_ZN9resampler12IntegerRatio14getDenominatorEv(ptr noundef nonnull align 4 dereferenceable(8) %6)
  %24 = mul nsw i32 %22, %23
  %25 = icmp sle i32 %24, 8192
  %26 = zext i1 %25 to i8
  store i8 %26, ptr %7, align 1, !tbaa !9
  %27 = load i8, ptr %7, align 1, !tbaa !9, !range !11, !noundef !12
  %28 = trunc i8 %27 to i1
  br i1 %28, label %29, label %56

29:                                               ; preds = %19
  %30 = call noundef i32 @_ZNK9resampler21MultiChannelResampler7Builder15getChannelCountEv(ptr noundef nonnull align 4 dereferenceable(20) %9)
  %31 = icmp eq i32 %30, 1
  br i1 %31, label %32, label %39

32:                                               ; preds = %29
  %33 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 128) #6
  invoke void @_ZN9resampler22PolyphaseResamplerMonoC1ERKNS_21MultiChannelResampler7BuilderE(ptr noundef nonnull align 8 dereferenceable(128) %33, ptr noundef nonnull align 4 dereferenceable(20) %9)
          to label %34 unwind label %35

34:                                               ; preds = %32
  store ptr %33, ptr %2, align 8
  store i32 1, ptr %8, align 4
  br label %73

35:                                               ; preds = %32
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %4, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %5, align 4
  call void @_ZdlPvm(ptr noundef %33, i64 noundef 128) #7
  br label %74

39:                                               ; preds = %29
  %40 = call noundef i32 @_ZNK9resampler21MultiChannelResampler7Builder15getChannelCountEv(ptr noundef nonnull align 4 dereferenceable(20) %9)
  %41 = icmp eq i32 %40, 2
  br i1 %41, label %42, label %49

42:                                               ; preds = %39
  %43 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 128) #6
  invoke void @_ZN9resampler24PolyphaseResamplerStereoC1ERKNS_21MultiChannelResampler7BuilderE(ptr noundef nonnull align 8 dereferenceable(128) %43, ptr noundef nonnull align 4 dereferenceable(20) %9)
          to label %44 unwind label %45

44:                                               ; preds = %42
  store ptr %43, ptr %2, align 8
  store i32 1, ptr %8, align 4
  br label %73

45:                                               ; preds = %42
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %4, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %5, align 4
  call void @_ZdlPvm(ptr noundef %43, i64 noundef 128) #7
  br label %74

49:                                               ; preds = %39
  %50 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 128) #6
  invoke void @_ZN9resampler18PolyphaseResamplerC1ERKNS_21MultiChannelResampler7BuilderE(ptr noundef nonnull align 8 dereferenceable(128) %50, ptr noundef nonnull align 4 dereferenceable(20) %9)
          to label %51 unwind label %52

51:                                               ; preds = %49
  store ptr %50, ptr %2, align 8
  store i32 1, ptr %8, align 4
  br label %73

52:                                               ; preds = %49
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %4, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %5, align 4
  call void @_ZdlPvm(ptr noundef %50, i64 noundef 128) #7
  br label %74

56:                                               ; preds = %19
  %57 = call noundef i32 @_ZNK9resampler21MultiChannelResampler7Builder15getChannelCountEv(ptr noundef nonnull align 4 dereferenceable(20) %9)
  %58 = icmp eq i32 %57, 2
  br i1 %58, label %59, label %66

59:                                               ; preds = %56
  %60 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 168) #6
  invoke void @_ZN9resampler19SincResamplerStereoC1ERKNS_21MultiChannelResampler7BuilderE(ptr noundef nonnull align 8 dereferenceable(168) %60, ptr noundef nonnull align 4 dereferenceable(20) %9)
          to label %61 unwind label %62

61:                                               ; preds = %59
  store ptr %60, ptr %2, align 8
  store i32 1, ptr %8, align 4
  br label %73

62:                                               ; preds = %59
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %4, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %5, align 4
  call void @_ZdlPvm(ptr noundef %60, i64 noundef 168) #7
  br label %74

66:                                               ; preds = %56
  %67 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 168) #6
  invoke void @_ZN9resampler13SincResamplerC1ERKNS_21MultiChannelResampler7BuilderE(ptr noundef nonnull align 8 dereferenceable(168) %67, ptr noundef nonnull align 4 dereferenceable(20) %9)
          to label %68 unwind label %69

68:                                               ; preds = %66
  store ptr %67, ptr %2, align 8
  store i32 1, ptr %8, align 4
  br label %73

69:                                               ; preds = %66
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %4, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %5, align 4
  call void @_ZdlPvm(ptr noundef %67, i64 noundef 168) #7
  br label %74

73:                                               ; preds = %68, %61, %51, %44, %34
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  br label %75

74:                                               ; preds = %69, %62, %52, %45, %35
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  br label %77

75:                                               ; preds = %73, %14
  %76 = load ptr, ptr %2, align 8
  ret ptr %76

77:                                               ; preds = %74, %15
  %78 = load ptr, ptr %4, align 8
  %79 = load i32, ptr %5, align 4
  %80 = insertvalue { ptr, i32 } poison, ptr %78, 0
  %81 = insertvalue { ptr, i32 } %80, i32 %79, 1
  resume { ptr, i32 } %81
}

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #4

declare void @_ZN9resampler15LinearResamplerC1ERKNS_21MultiChannelResampler7BuilderE(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 4 dereferenceable(20)) unnamed_addr #2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #5

declare void @_ZN9resampler22PolyphaseResamplerMonoC1ERKNS_21MultiChannelResampler7BuilderE(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 4 dereferenceable(20)) unnamed_addr #2

declare void @_ZN9resampler24PolyphaseResamplerStereoC1ERKNS_21MultiChannelResampler7BuilderE(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 4 dereferenceable(20)) unnamed_addr #2

declare void @_ZN9resampler18PolyphaseResamplerC1ERKNS_21MultiChannelResampler7BuilderE(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 4 dereferenceable(20)) unnamed_addr #2

declare void @_ZN9resampler19SincResamplerStereoC1ERKNS_21MultiChannelResampler7BuilderE(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 4 dereferenceable(20)) unnamed_addr #2

declare void @_ZN9resampler13SincResamplerC1ERKNS_21MultiChannelResampler7BuilderE(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 4 dereferenceable(20)) unnamed_addr #2

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 = { "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 = { 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 = { nobuiltin allocsize(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 #5 = { nobuiltin 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 #6 = { builtin allocsize(0) }
attributes #7 = { builtin nounwind }
attributes #8 = { 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 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}


; 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.resampler::IntegerRatio" = type { i32, i32 }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK9resampler21MultiChannelResampler7Builder10getNumTapsEv(ptr noundef nonnull align 4 dereferenceable(20)) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK9resampler21MultiChannelResampler7Builder15getChannelCountEv(ptr noundef nonnull align 4 dereferenceable(20)) 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK9resampler21MultiChannelResampler7Builder12getInputRateEv(ptr noundef nonnull align 4 dereferenceable(20)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK9resampler21MultiChannelResampler7Builder13getOutputRateEv(ptr noundef nonnull align 4 dereferenceable(20)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9resampler12IntegerRatioC2Eii(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, i32 noundef) unnamed_addr #0 align 2

declare void @_ZN9resampler12IntegerRatio6reduceEv(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull ptr @_ZN9resampler21MultiChannelResampler7Builder5buildEv(ptr noundef nonnull align 4 dereferenceable(20) %0) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.resampler::IntegerRatio", align 4
  %3 = tail call noundef i32 @_ZNK9resampler21MultiChannelResampler7Builder10getNumTapsEv(ptr noundef nonnull align 4 dereferenceable(20) %0)
  %4 = icmp eq i32 %3, 2
  br i1 %4, label %5, label %9

5:                                                ; preds = %1
  %6 = tail call noalias noundef nonnull dereferenceable(144) ptr @_Znwm(i64 noundef 144) #6
  invoke void @_ZN9resampler15LinearResamplerC1ERKNS_21MultiChannelResampler7BuilderE(ptr noundef nonnull align 8 dereferenceable(144) %6, ptr noundef nonnull align 4 dereferenceable(20) %0)
          to label %44 unwind label %7

7:                                                ; preds = %5
  %8 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %6, i64 noundef 144) #7
  br label %45

9:                                                ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  %10 = tail call noundef i32 @_ZNK9resampler21MultiChannelResampler7Builder12getInputRateEv(ptr noundef nonnull align 4 dereferenceable(20) %0)
  %11 = tail call noundef i32 @_ZNK9resampler21MultiChannelResampler7Builder13getOutputRateEv(ptr noundef nonnull align 4 dereferenceable(20) %0)
  call void @_ZN9resampler12IntegerRatioC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %2, i32 noundef %10, i32 noundef %11)
  call void @_ZN9resampler12IntegerRatio6reduceEv(ptr noundef nonnull align 4 dereferenceable(8) %2)
  %12 = call noundef i32 @_ZNK9resampler21MultiChannelResampler7Builder10getNumTapsEv(ptr noundef nonnull align 4 dereferenceable(20) %0)
  %13 = call noundef i32 @_ZN9resampler12IntegerRatio14getDenominatorEv(ptr noundef nonnull align 4 dereferenceable(8) %2)
  %14 = mul nsw i32 %13, %12
  %15 = icmp slt i32 %14, 8193
  %16 = call noundef i32 @_ZNK9resampler21MultiChannelResampler7Builder15getChannelCountEv(ptr noundef nonnull align 4 dereferenceable(20) %0)
  br i1 %15, label %17, label %33

17:                                               ; preds = %9
  %18 = icmp eq i32 %16, 1
  br i1 %18, label %19, label %23

19:                                               ; preds = %17
  %20 = call noalias noundef nonnull dereferenceable(128) ptr @_Znwm(i64 noundef 128) #6
  invoke void @_ZN9resampler22PolyphaseResamplerMonoC1ERKNS_21MultiChannelResampler7BuilderE(ptr noundef nonnull align 8 dereferenceable(128) %20, ptr noundef nonnull align 4 dereferenceable(20) %0)
          to label %42 unwind label %21

21:                                               ; preds = %19
  %22 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %20, i64 noundef 128) #7
  br label %43

23:                                               ; preds = %17
  %24 = call noundef i32 @_ZNK9resampler21MultiChannelResampler7Builder15getChannelCountEv(ptr noundef nonnull align 4 dereferenceable(20) %0)
  %25 = icmp eq i32 %24, 2
  %26 = call noalias noundef nonnull dereferenceable(128) ptr @_Znwm(i64 noundef 128) #6
  br i1 %25, label %27, label %30

27:                                               ; preds = %23
  invoke void @_ZN9resampler24PolyphaseResamplerStereoC1ERKNS_21MultiChannelResampler7BuilderE(ptr noundef nonnull align 8 dereferenceable(128) %26, ptr noundef nonnull align 4 dereferenceable(20) %0)
          to label %42 unwind label %28

28:                                               ; preds = %27
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %26, i64 noundef 128) #7
  br label %43

30:                                               ; preds = %23
  invoke void @_ZN9resampler18PolyphaseResamplerC1ERKNS_21MultiChannelResampler7BuilderE(ptr noundef nonnull align 8 dereferenceable(128) %26, ptr noundef nonnull align 4 dereferenceable(20) %0)
          to label %42 unwind label %31

31:                                               ; preds = %30
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %26, i64 noundef 128) #7
  br label %43

33:                                               ; preds = %9
  %34 = icmp eq i32 %16, 2
  %35 = call noalias noundef nonnull dereferenceable(168) ptr @_Znwm(i64 noundef 168) #6
  br i1 %34, label %36, label %39

36:                                               ; preds = %33
  invoke void @_ZN9resampler19SincResamplerStereoC1ERKNS_21MultiChannelResampler7BuilderE(ptr noundef nonnull align 8 dereferenceable(168) %35, ptr noundef nonnull align 4 dereferenceable(20) %0)
          to label %42 unwind label %37

37:                                               ; preds = %36
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %35, i64 noundef 168) #7
  br label %43

39:                                               ; preds = %33
  invoke void @_ZN9resampler13SincResamplerC1ERKNS_21MultiChannelResampler7BuilderE(ptr noundef nonnull align 8 dereferenceable(168) %35, ptr noundef nonnull align 4 dereferenceable(20) %0)
          to label %42 unwind label %40

40:                                               ; preds = %39
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %35, i64 noundef 168) #7
  br label %43

42:                                               ; preds = %39, %36, %30, %27, %19
  %.0 = phi ptr [ %20, %19 ], [ %26, %27 ], [ %26, %30 ], [ %35, %36 ], [ %35, %39 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  br label %44

43:                                               ; preds = %40, %37, %31, %28, %21
  %.pn = phi { ptr, i32 } [ %22, %21 ], [ %29, %28 ], [ %32, %31 ], [ %38, %37 ], [ %41, %40 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  br label %45

44:                                               ; preds = %5, %42
  %.1 = phi ptr [ %.0, %42 ], [ %6, %5 ]
  ret ptr %.1

45:                                               ; preds = %43, %7
  %.pn9 = phi { ptr, i32 } [ %8, %7 ], [ %.pn, %43 ]
  resume { ptr, i32 } %.pn9
}

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #4

declare void @_ZN9resampler15LinearResamplerC1ERKNS_21MultiChannelResampler7BuilderE(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 4 dereferenceable(20)) unnamed_addr #2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #5

declare void @_ZN9resampler22PolyphaseResamplerMonoC1ERKNS_21MultiChannelResampler7BuilderE(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 4 dereferenceable(20)) unnamed_addr #2

declare void @_ZN9resampler24PolyphaseResamplerStereoC1ERKNS_21MultiChannelResampler7BuilderE(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 4 dereferenceable(20)) unnamed_addr #2

declare void @_ZN9resampler18PolyphaseResamplerC1ERKNS_21MultiChannelResampler7BuilderE(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 4 dereferenceable(20)) unnamed_addr #2

declare void @_ZN9resampler19SincResamplerStereoC1ERKNS_21MultiChannelResampler7BuilderE(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 4 dereferenceable(20)) unnamed_addr #2

declare void @_ZN9resampler13SincResamplerC1ERKNS_21MultiChannelResampler7BuilderE(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 4 dereferenceable(20)) unnamed_addr #2

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 = { "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 = { 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 = { nobuiltin allocsize(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 #5 = { nobuiltin 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 #6 = { builtin allocsize(0) }
attributes #7 = { builtin nounwind }
attributes #8 = { 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)"}


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