; LLVM IR from Try/Tempest :: Engine/thirdparty/openal-soft/common/polyphase_resampler.ll (ZN15PPhaseResampler4initEjj)

; 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.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.1" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { double }
%"struct.std::_Head_base.1" = type { double }
%struct.PPhaseResampler = type { i32, i32, i32, i32, %"class.std::vector" }
%"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 }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN15PPhaseResampler4initEjj(ptr noundef nonnull align 8 dereferenceable(40) %0, i32 noundef %1, i32 noundef %2) #0 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::tuple", align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  %19 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %20 = load i32, ptr %5, align 4, !tbaa !9
  %21 = load i32, ptr %6, align 4, !tbaa !9
  %22 = call noundef i32 @_ZSt3gcdIjjENSt11common_typeIJT_T0_EE4typeES1_S2_(i32 noundef %20, i32 noundef %21) #4
  store i32 %22, ptr %7, align 4, !tbaa !9
  %23 = load i32, ptr %6, align 4, !tbaa !9
  %24 = load i32, ptr %7, align 4, !tbaa !9
  %25 = udiv i32 %23, %24
  %26 = getelementptr inbounds %struct.PPhaseResampler, ptr %19, i32 0, i32 0
  store i32 %25, ptr %26, align 8, !tbaa !11
  %27 = load i32, ptr %5, align 4, !tbaa !9
  %28 = load i32, ptr %7, align 4, !tbaa !9
  %29 = udiv i32 %27, %28
  %30 = getelementptr inbounds %struct.PPhaseResampler, ptr %19, i32 0, i32 1
  store i32 %29, ptr %30, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #4
  %31 = getelementptr inbounds %struct.PPhaseResampler, ptr %19, i32 0, i32 0
  %32 = load i32, ptr %31, align 8, !tbaa !11
  %33 = getelementptr inbounds %struct.PPhaseResampler, ptr %19, i32 0, i32 1
  %34 = load i32, ptr %33, align 4, !tbaa !17
  %35 = icmp ugt i32 %32, %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  br i1 %35, label %36, label %45

36:                                               ; preds = %3
  %37 = getelementptr inbounds %struct.PPhaseResampler, ptr %19, i32 0, i32 0
  %38 = load i32, ptr %37, align 8, !tbaa !11
  %39 = uitofp i32 %38 to double
  %40 = fdiv double 4.750000e-01, %39
  store double %40, ptr %9, align 8, !tbaa !18
  %41 = getelementptr inbounds %struct.PPhaseResampler, ptr %19, i32 0, i32 0
  %42 = load i32, ptr %41, align 8, !tbaa !11
  %43 = uitofp i32 %42 to double
  %44 = fdiv double 5.000000e-02, %43
  store double %44, ptr %10, align 8, !tbaa !18
  call void @_ZSt10make_tupleIJddEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS3_(ptr dead_on_unwind writable sret(%"class.std::tuple") align 8 %8, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10)
  br label %54

45:                                               ; preds = %3
  %46 = getelementptr inbounds %struct.PPhaseResampler, ptr %19, i32 0, i32 1
  %47 = load i32, ptr %46, align 4, !tbaa !17
  %48 = uitofp i32 %47 to double
  %49 = fdiv double 4.750000e-01, %48
  store double %49, ptr %11, align 8, !tbaa !18
  %50 = getelementptr inbounds %struct.PPhaseResampler, ptr %19, i32 0, i32 1
  %51 = load i32, ptr %50, align 4, !tbaa !17
  %52 = uitofp i32 %51 to double
  %53 = fdiv double 5.000000e-02, %52
  store double %53, ptr %12, align 8, !tbaa !18
  call void @_ZSt10make_tupleIJddEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS3_(ptr dead_on_unwind writable sret(%"class.std::tuple") align 8 %8, ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12)
  br label %54

54:                                               ; preds = %45, %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EJddEEOKNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOKS4_(ptr noundef nonnull align 8 dereferenceable(16) %8) #4
  store ptr %55, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm1EJddEEOKNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOKS4_(ptr noundef nonnull align 8 dereferenceable(16) %8) #4
  store ptr %56, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %57 = load ptr, ptr %14, align 8, !tbaa !5
  %58 = load double, ptr %57, align 8, !tbaa !18
  %59 = call noundef i32 @_ZN12_GLOBAL__N_115CalcKaiserOrderEdd(double noundef 1.800000e+02, double noundef %58)
  %60 = add i32 %59, 1
  %61 = udiv i32 %60, 2
  store i32 %61, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %62 = call noundef double @_ZN12_GLOBAL__N_114CalcKaiserBetaEd(double noundef 1.800000e+02)
  store double %62, ptr %16, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %63 = call noundef double @_ZSt12cyl_bessel_iIidEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef 0, double noundef 0x4032E0941C8216C7)
  store double %63, ptr %17, align 8, !tbaa !18
  %64 = load i32, ptr %15, align 4, !tbaa !9
  %65 = mul i32 %64, 2
  %66 = add i32 %65, 1
  %67 = getelementptr inbounds %struct.PPhaseResampler, ptr %19, i32 0, i32 2
  store i32 %66, ptr %67, align 8, !tbaa !20
  %68 = load i32, ptr %15, align 4, !tbaa !9
  %69 = getelementptr inbounds %struct.PPhaseResampler, ptr %19, i32 0, i32 3
  store i32 %68, ptr %69, align 4, !tbaa !21
  %70 = getelementptr inbounds %struct.PPhaseResampler, ptr %19, i32 0, i32 4
  %71 = getelementptr inbounds %struct.PPhaseResampler, ptr %19, i32 0, i32 2
  %72 = load i32, ptr %71, align 8, !tbaa !20
  %73 = zext i32 %72 to i64
  call void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %70, i64 noundef %73)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %74

74:                                               ; preds = %94, %54
  %75 = load i32, ptr %18, align 4, !tbaa !9
  %76 = getelementptr inbounds %struct.PPhaseResampler, ptr %19, i32 0, i32 2
  %77 = load i32, ptr %76, align 8, !tbaa !20
  %78 = icmp ult i32 %75, %77
  br i1 %78, label %80, label %79

79:                                               ; preds = %74
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %97

80:                                               ; preds = %74
  %81 = load i32, ptr %15, align 4, !tbaa !9
  %82 = load double, ptr %17, align 8, !tbaa !18
  %83 = getelementptr inbounds %struct.PPhaseResampler, ptr %19, i32 0, i32 0
  %84 = load i32, ptr %83, align 8, !tbaa !11
  %85 = uitofp i32 %84 to double
  %86 = load ptr, ptr %13, align 8, !tbaa !5
  %87 = load double, ptr %86, align 8, !tbaa !18
  %88 = load i32, ptr %18, align 4, !tbaa !9
  %89 = call noundef double @_ZN12_GLOBAL__N_110SincFilterEjddddj(i32 noundef %81, double noundef 0x4032E0941C8216C7, double noundef %82, double noundef %85, double noundef %87, i32 noundef %88)
  %90 = getelementptr inbounds %struct.PPhaseResampler, ptr %19, i32 0, i32 4
  %91 = load i32, ptr %18, align 4, !tbaa !9
  %92 = zext i32 %91 to i64
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %90, i64 noundef %92) #4
  store double %89, ptr %93, align 8, !tbaa !18
  br label %94

94:                                               ; preds = %80
  %95 = load i32, ptr %18, align 4, !tbaa !9
  %96 = add i32 %95, 1
  store i32 %96, ptr %18, align 4, !tbaa !9
  br label %74, !llvm.loop !22

97:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  ret void
}

; 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 i32 @_ZSt3gcdIjjENSt11common_typeIJT_T0_EE4typeES1_S2_(i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt10make_tupleIJddEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS3_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EJddEEOKNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOKS4_(ptr noundef nonnull align 8 dereferenceable(16)) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN12_GLOBAL__N_115CalcKaiserOrderEdd(double noundef, double noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef double @_ZN12_GLOBAL__N_114CalcKaiserBetaEd(double noundef) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZSt12cyl_bessel_iIidEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef, double noundef) #3

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

; Function Attrs: mustprogress uwtable
declare hidden noundef double @_ZN12_GLOBAL__N_110SincFilterEjddddj(i32 noundef, double noundef, double noundef, double noundef, double noundef, i32 noundef) #0

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTS15PPhaseResampler", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !13, i64 16}
!13 = !{!"_ZTSSt6vectorIdSaIdEE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!12, !10, i64 4}
!18 = !{!19, !19, i64 0}
!19 = !{!"double", !7, i64 0}
!20 = !{!12, !10, i64 8}
!21 = !{!12, !10, i64 12}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}


; 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.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.1" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { double }
%"struct.std::_Head_base.1" = type { double }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN15PPhaseResampler4initEjj(ptr noundef nonnull align 8 dereferenceable(40) %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 align 2 {
  %4 = alloca %"class.std::tuple", align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = tail call noundef i32 @_ZSt3gcdIjjENSt11common_typeIJT_T0_EE4typeES1_S2_(i32 noundef %1, i32 noundef %2) #4
  %10 = udiv i32 %2, %9
  store i32 %10, ptr %0, align 8, !tbaa !5
  %11 = udiv i32 %1, %9
  %12 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 %11, ptr %12, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #4
  %13 = icmp ugt i32 %10, %11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  br i1 %13, label %14, label %18

14:                                               ; preds = %3
  %15 = uitofp i32 %10 to double
  %16 = fdiv double 4.750000e-01, %15
  store double %16, ptr %5, align 8, !tbaa !16
  %17 = fdiv double 5.000000e-02, %15
  store double %17, ptr %6, align 8, !tbaa !16
  call void @_ZSt10make_tupleIJddEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS3_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 8 %4, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  br label %22

18:                                               ; preds = %3
  %19 = uitofp i32 %11 to double
  %20 = fdiv double 4.750000e-01, %19
  store double %20, ptr %7, align 8, !tbaa !16
  %21 = fdiv double 5.000000e-02, %19
  store double %21, ptr %8, align 8, !tbaa !16
  call void @_ZSt10make_tupleIJddEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS3_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 8 %4, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8)
  br label %22

22:                                               ; preds = %18, %14
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EJddEEOKNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOKS4_(ptr noundef nonnull align 8 dereferenceable(16) %4) #4
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm1EJddEEOKNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOKS4_(ptr noundef nonnull align 8 dereferenceable(16) %4) #4
  %25 = load double, ptr %24, align 8, !tbaa !16
  %26 = call noundef i32 @_ZN12_GLOBAL__N_115CalcKaiserOrderEdd(double noundef 1.800000e+02, double noundef %25)
  %27 = add i32 %26, 1
  %28 = lshr i32 %27, 1
  %29 = call noundef double @_ZN12_GLOBAL__N_114CalcKaiserBetaEd(double noundef 1.800000e+02)
  %30 = call noundef double @_ZSt12cyl_bessel_iIidEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef 0, double noundef 0x4032E0941C8216C7)
  %31 = or i32 %27, 1
  %32 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 %31, ptr %32, align 8, !tbaa !18
  %33 = getelementptr inbounds i8, ptr %0, i64 12
  store i32 %28, ptr %33, align 4, !tbaa !19
  %34 = getelementptr inbounds i8, ptr %0, i64 16
  %35 = zext i32 %31 to i64
  call void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %34, i64 noundef %35)
  %36 = load i32, ptr %32, align 8, !tbaa !18
  %.not = icmp eq i32 %36, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %22
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #4
  ret void

.lr.ph:                                           ; preds = %22, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %22 ]
  %37 = load i32, ptr %0, align 8, !tbaa !5
  %38 = uitofp i32 %37 to double
  %39 = load double, ptr %23, align 8, !tbaa !16
  %40 = trunc nuw i64 %indvars.iv to i32
  %41 = call noundef double @_ZN12_GLOBAL__N_110SincFilterEjddddj(i32 noundef %28, double noundef 0x4032E0941C8216C7, double noundef %30, double noundef %38, double noundef %39, i32 noundef %40)
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %34, i64 noundef %indvars.iv) #4
  store double %41, ptr %42, align 8, !tbaa !16
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %43 = load i32, ptr %32, align 8, !tbaa !18
  %44 = zext i32 %43 to i64
  %45 = icmp ult i64 %indvars.iv.next, %44
  br i1 %45, label %.lr.ph, label %._crit_edge, !llvm.loop !20
}

; 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 i32 @_ZSt3gcdIjjENSt11common_typeIJT_T0_EE4typeES1_S2_(i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt10make_tupleIJddEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS3_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EJddEEOKNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOKS4_(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN12_GLOBAL__N_115CalcKaiserOrderEdd(double noundef, double noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef double @_ZN12_GLOBAL__N_114CalcKaiserBetaEd(double noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZSt12cyl_bessel_iIidEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef, double noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare hidden noundef double @_ZN12_GLOBAL__N_110SincFilterEjddddj(i32 noundef, double noundef, double noundef, double noundef, double noundef, i32 noundef) local_unnamed_addr #0

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTS15PPhaseResampler", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !10, i64 16}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt6vectorIdSaIdEE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!6, !7, i64 4}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !8, i64 0}
!18 = !{!6, !7, i64 8}
!19 = !{!6, !7, i64 12}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass