; LLVM IR from software-mansion/react-native-audio-api :: packages/react-native-audio-api/common/cpp/audioapi/core/effects/StereoPannerN_0ded31d7 (8AudioBusEEi)

; 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.audioapi::AudioNode" = type { ptr, %"class.std::enable_shared_from_this", ptr, %"class.std::shared_ptr", i32, i32, i32, i32, i32, %"class.std::unordered_set", %"class.std::unordered_set.2", i32, i8, i8, i64, %"class.std::vector" }
%"class.std::enable_shared_from_this" = type { %"class.std::weak_ptr" }
%"class.std::weak_ptr" = type { %"class.std::__weak_ptr" }
%"class.std::__weak_ptr" = type { ptr, %"class.std::__weak_count" }
%"class.std::__weak_count" = type { ptr }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::unordered_set" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::unordered_set.2" = type { %"class.std::_Hashtable.3" }
%"class.std::_Hashtable.3" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::shared_ptr<audioapi::AudioBus>, std::allocator<std::shared_ptr<audioapi::AudioBus>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<audioapi::AudioBus>, std::allocator<std::shared_ptr<audioapi::AudioBus>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<audioapi::AudioBus>, std::allocator<std::shared_ptr<audioapi::AudioBus>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<audioapi::AudioBus>, std::allocator<std::shared_ptr<audioapi::AudioBus>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.audioapi::StereoPannerNode" = type { %"class.audioapi::AudioNode", %"class.std::shared_ptr.25" }
%"class.std::shared_ptr.25" = type { %"class.std::__shared_ptr.26" }
%"class.std::__shared_ptr.26" = type { ptr, %"class.std::__shared_count" }

; 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 uwtable
define dso_local void @_ZN8audioapi16StereoPannerNode11processNodeERKSt10shared_ptrINS_8AudioBusEEi(ptr noundef nonnull align 8 dereferenceable(240) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, i32 noundef %2) unnamed_addr #1 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  %18 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %19 = getelementptr inbounds %"class.audioapi::AudioNode", ptr %18, i32 0, i32 2
  %20 = load ptr, ptr %19, align 8, !tbaa !11
  %21 = call noundef double @_ZNK8audioapi16BaseAudioContext14getCurrentTimeEv(ptr noundef nonnull align 8 dereferenceable(128) %20)
  store double %21, ptr %7, align 8, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %22 = getelementptr inbounds %"class.audioapi::AudioNode", ptr %18, i32 0, i32 2
  %23 = load ptr, ptr %22, align 8, !tbaa !11
  %24 = call noundef float @_ZNK8audioapi16BaseAudioContext13getSampleRateEv(ptr noundef nonnull align 8 dereferenceable(128) %23)
  %25 = fpext float %24 to double
  %26 = fdiv double 1.000000e+00, %25
  store double %26, ptr %8, align 8, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN8audioapi8AudioBusELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %27) #6
  %29 = call noundef ptr @_ZNK8audioapi8AudioBus16getChannelByTypeEi(ptr noundef nonnull align 8 dereferenceable(40) %28, i32 noundef 0)
  store ptr %29, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN8audioapi8AudioBusELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %30) #6
  %32 = call noundef ptr @_ZNK8audioapi8AudioBus16getChannelByTypeEi(ptr noundef nonnull align 8 dereferenceable(40) %31, i32 noundef 1)
  store ptr %32, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %33

33:                                               ; preds = %112, %3
  %34 = load i32, ptr %11, align 4, !tbaa !9
  %35 = load i32, ptr %6, align 4, !tbaa !9
  %36 = icmp slt i32 %34, %35
  br i1 %36, label %38, label %37

37:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %115

38:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %39 = getelementptr inbounds %"class.audioapi::StereoPannerNode", ptr %18, i32 0, i32 1
  %40 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN8audioapi10AudioParamELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %39) #6
  %41 = load double, ptr %7, align 8, !tbaa !35
  %42 = call noundef float @_ZN8audioapi10AudioParam14getValueAtTimeEd(ptr noundef nonnull align 8 dereferenceable(152) %40, double noundef %41)
  store float %42, ptr %12, align 4, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %43 = load float, ptr %12, align 4, !tbaa !37
  %44 = fcmp ole float %43, 0.000000e+00
  br i1 %44, label %45, label %48

45:                                               ; preds = %38
  %46 = load float, ptr %12, align 4, !tbaa !37
  %47 = fadd float %46, 1.000000e+00
  br label %50

48:                                               ; preds = %38
  %49 = load float, ptr %12, align 4, !tbaa !37
  br label %50

50:                                               ; preds = %48, %45
  %51 = phi float [ %47, %45 ], [ %49, %48 ]
  store float %51, ptr %13, align 4, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %52 = load float, ptr %13, align 4, !tbaa !37
  %53 = fmul float %52, 0x400921FB60000000
  %54 = fdiv float %53, 2.000000e+00
  %55 = fpext float %54 to double
  %56 = call double @cos(double noundef %55) #6
  %57 = fptrunc double %56 to float
  store float %57, ptr %14, align 4, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %58 = load float, ptr %13, align 4, !tbaa !37
  %59 = fmul float %58, 0x400921FB60000000
  %60 = fdiv float %59, 2.000000e+00
  %61 = fpext float %60 to double
  %62 = call double @sin(double noundef %61) #6
  %63 = fptrunc double %62 to float
  store float %63, ptr %15, align 4, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = load i32, ptr %11, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8audioapi10AudioArrayixEm(ptr noundef nonnull align 8 dereferenceable(16) %64, i64 noundef %66)
  %68 = load float, ptr %67, align 4, !tbaa !37
  store float %68, ptr %16, align 4, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %69 = load ptr, ptr %10, align 8, !tbaa !5
  %70 = load i32, ptr %11, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8audioapi10AudioArrayixEm(ptr noundef nonnull align 8 dereferenceable(16) %69, i64 noundef %71)
  %73 = load float, ptr %72, align 4, !tbaa !37
  store float %73, ptr %17, align 4, !tbaa !37
  %74 = load float, ptr %12, align 4, !tbaa !37
  %75 = fcmp ole float %74, 0.000000e+00
  br i1 %75, label %76, label %92

76:                                               ; preds = %50
  %77 = load float, ptr %16, align 4, !tbaa !37
  %78 = load float, ptr %17, align 4, !tbaa !37
  %79 = load float, ptr %14, align 4, !tbaa !37
  %80 = call float @llvm.fmuladd.f32(float %78, float %79, float %77)
  %81 = load ptr, ptr %9, align 8, !tbaa !5
  %82 = load i32, ptr %11, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8audioapi10AudioArrayixEm(ptr noundef nonnull align 8 dereferenceable(16) %81, i64 noundef %83)
  store float %80, ptr %84, align 4, !tbaa !37
  %85 = load float, ptr %17, align 4, !tbaa !37
  %86 = load float, ptr %15, align 4, !tbaa !37
  %87 = fmul float %85, %86
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  %89 = load i32, ptr %11, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8audioapi10AudioArrayixEm(ptr noundef nonnull align 8 dereferenceable(16) %88, i64 noundef %90)
  store float %87, ptr %91, align 4, !tbaa !37
  br label %108

92:                                               ; preds = %50
  %93 = load float, ptr %16, align 4, !tbaa !37
  %94 = load float, ptr %14, align 4, !tbaa !37
  %95 = fmul float %93, %94
  %96 = load ptr, ptr %9, align 8, !tbaa !5
  %97 = load i32, ptr %11, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8audioapi10AudioArrayixEm(ptr noundef nonnull align 8 dereferenceable(16) %96, i64 noundef %98)
  store float %95, ptr %99, align 4, !tbaa !37
  %100 = load float, ptr %17, align 4, !tbaa !37
  %101 = load float, ptr %16, align 4, !tbaa !37
  %102 = load float, ptr %15, align 4, !tbaa !37
  %103 = call float @llvm.fmuladd.f32(float %101, float %102, float %100)
  %104 = load ptr, ptr %10, align 8, !tbaa !5
  %105 = load i32, ptr %11, align 4, !tbaa !9
  %106 = sext i32 %105 to i64
  %107 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8audioapi10AudioArrayixEm(ptr noundef nonnull align 8 dereferenceable(16) %104, i64 noundef %106)
  store float %103, ptr %107, align 4, !tbaa !37
  br label %108

108:                                              ; preds = %92, %76
  %109 = load double, ptr %8, align 8, !tbaa !35
  %110 = load double, ptr %7, align 8, !tbaa !35
  %111 = fadd double %110, %109
  store double %111, ptr %7, align 8, !tbaa !35
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %112

112:                                              ; preds = %108
  %113 = load i32, ptr %11, align 4, !tbaa !9
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %11, align 4, !tbaa !9
  br label %33, !llvm.loop !38

115:                                              ; preds = %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  ret void
}

declare noundef double @_ZNK8audioapi16BaseAudioContext14getCurrentTimeEv(ptr noundef nonnull align 8 dereferenceable(128)) #2

declare noundef float @_ZNK8audioapi16BaseAudioContext13getSampleRateEv(ptr noundef nonnull align 8 dereferenceable(128)) #2

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

declare noundef ptr @_ZNK8audioapi8AudioBus16getChannelByTypeEi(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) #2

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

declare noundef float @_ZN8audioapi10AudioParam14getValueAtTimeEd(ptr noundef nonnull align 8 dereferenceable(152), double noundef) #2

; Function Attrs: nounwind
declare double @cos(double noundef) #4

; Function Attrs: nounwind
declare double @sin(double noundef) #4

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZN8audioapi10AudioArrayixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 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 #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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, !6, i64 24}
!12 = !{!"_ZTSN8audioapi9AudioNodeE", !13, i64 8, !6, i64 24, !17, i64 32, !10, i64 48, !10, i64 52, !10, i64 56, !20, i64 60, !21, i64 64, !22, i64 72, !28, i64 128, !10, i64 184, !30, i64 188, !30, i64 189, !24, i64 192, !31, i64 200}
!13 = !{!"_ZTSSt23enable_shared_from_thisIN8audioapi9AudioNodeEE", !14, i64 0}
!14 = !{!"_ZTSSt8weak_ptrIN8audioapi9AudioNodeEE", !15, i64 0}
!15 = !{!"_ZTSSt10__weak_ptrIN8audioapi9AudioNodeELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !16, i64 8}
!16 = !{!"_ZTSSt12__weak_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!17 = !{!"_ZTSSt10shared_ptrIN8audioapi8AudioBusEE", !18, i64 0}
!18 = !{!"_ZTSSt12__shared_ptrIN8audioapi8AudioBusELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !19, i64 8}
!19 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!20 = !{!"_ZTSN8audioapi16ChannelCountModeE", !7, i64 0}
!21 = !{!"_ZTSN8audioapi21ChannelInterpretationE", !7, i64 0}
!22 = !{!"_ZTSSt13unordered_setIPN8audioapi9AudioNodeESt4hashIS2_ESt8equal_toIS2_ESaIS2_EE", !23, i64 0}
!23 = !{!"_ZTSSt10_HashtableIPN8audioapi9AudioNodeES2_SaIS2_ENSt8__detail9_IdentityESt8equal_toIS2_ESt4hashIS2_ENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb1ELb1EEEE", !6, i64 0, !24, i64 8, !25, i64 16, !24, i64 24, !26, i64 32, !6, i64 48}
!24 = !{!"long", !7, i64 0}
!25 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!26 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !27, i64 0, !24, i64 8}
!27 = !{!"float", !7, i64 0}
!28 = !{!"_ZTSSt13unordered_setISt10shared_ptrIN8audioapi9AudioNodeEESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE", !29, i64 0}
!29 = !{!"_ZTSSt10_HashtableISt10shared_ptrIN8audioapi9AudioNodeEES3_SaIS3_ENSt8__detail9_IdentityESt8equal_toIS3_ESt4hashIS3_ENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb1ELb1EEEE", !6, i64 0, !24, i64 8, !25, i64 16, !24, i64 24, !26, i64 32, !6, i64 48}
!30 = !{!"bool", !7, i64 0}
!31 = !{!"_ZTSSt6vectorISt10shared_ptrIN8audioapi8AudioBusEESaIS3_EE", !32, i64 0}
!32 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN8audioapi8AudioBusEESaIS3_EE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN8audioapi8AudioBusEESaIS3_EE12_Vector_implE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN8audioapi8AudioBusEESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!35 = !{!36, !36, i64 0}
!36 = !{!"double", !7, i64 0}
!37 = !{!27, !27, i64 0}
!38 = distinct !{!38, !39}
!39 = !{!"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"

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8audioapi16StereoPannerNode11processNodeERKSt10shared_ptrINS_8AudioBusEEi(ptr noundef nonnull align 8 dereferenceable(240) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, i32 noundef %2) unnamed_addr #0 align 2 {
  %4 = getelementptr inbounds i8, ptr %0, i64 24
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = tail call noundef double @_ZNK8audioapi16BaseAudioContext14getCurrentTimeEv(ptr noundef nonnull align 8 dereferenceable(128) %5)
  %7 = load ptr, ptr %4, align 8, !tbaa !5
  %8 = tail call noundef float @_ZNK8audioapi16BaseAudioContext13getSampleRateEv(ptr noundef nonnull align 8 dereferenceable(128) %7)
  %9 = fpext float %8 to double
  %10 = fdiv double 1.000000e+00, %9
  %11 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN8audioapi8AudioBusELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #5
  %12 = tail call noundef ptr @_ZNK8audioapi8AudioBus16getChannelByTypeEi(ptr noundef nonnull align 8 dereferenceable(40) %11, i32 noundef 0)
  %13 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN8audioapi8AudioBusELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #5
  %14 = tail call noundef ptr @_ZNK8audioapi8AudioBus16getChannelByTypeEi(ptr noundef nonnull align 8 dereferenceable(40) %13, i32 noundef 1)
  %15 = icmp sgt i32 %2, 0
  br i1 %15, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %3
  %16 = getelementptr inbounds i8, ptr %0, i64 224
  %wide.trip.count = zext nneg i32 %2 to i64
  br label %17

._crit_edge:                                      ; preds = %41, %3
  ret void

17:                                               ; preds = %.lr.ph, %41
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %41 ]
  %.038 = phi double [ %6, %.lr.ph ], [ %43, %41 ]
  %18 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN8audioapi10AudioParamELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  %19 = tail call noundef float @_ZN8audioapi10AudioParam14getValueAtTimeEd(ptr noundef nonnull align 8 dereferenceable(152) %18, double noundef %.038)
  %20 = fcmp ole float %19, 0.000000e+00
  %21 = fadd float %19, 1.000000e+00
  %22 = select i1 %20, float %21, float %19
  %23 = fmul float %22, 0x400921FB60000000
  %24 = fmul float %23, 5.000000e-01
  %25 = fpext float %24 to double
  %26 = tail call double @cos(double noundef %25) #5
  %27 = fptrunc double %26 to float
  %28 = tail call double @sin(double noundef %25) #5
  %29 = fptrunc double %28 to float
  %30 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8audioapi10AudioArrayixEm(ptr noundef nonnull align 8 dereferenceable(16) %12, i64 noundef %indvars.iv)
  %31 = load float, ptr %30, align 4, !tbaa !33
  %32 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8audioapi10AudioArrayixEm(ptr noundef nonnull align 8 dereferenceable(16) %14, i64 noundef %indvars.iv)
  %33 = load float, ptr %32, align 4, !tbaa !33
  %34 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8audioapi10AudioArrayixEm(ptr noundef nonnull align 8 dereferenceable(16) %12, i64 noundef %indvars.iv)
  br i1 %20, label %35, label %38

35:                                               ; preds = %17
  %36 = tail call float @llvm.fmuladd.f32(float %33, float %27, float %31)
  store float %36, ptr %34, align 4, !tbaa !33
  %37 = fmul float %33, %29
  br label %41

38:                                               ; preds = %17
  %39 = fmul float %31, %27
  store float %39, ptr %34, align 4, !tbaa !33
  %40 = tail call float @llvm.fmuladd.f32(float %31, float %29, float %33)
  br label %41

41:                                               ; preds = %38, %35
  %.sink = phi float [ %40, %38 ], [ %37, %35 ]
  %42 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8audioapi10AudioArrayixEm(ptr noundef nonnull align 8 dereferenceable(16) %14, i64 noundef %indvars.iv)
  store float %.sink, ptr %42, align 4, !tbaa !33
  %43 = fadd double %10, %.038
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %17, !llvm.loop !34
}

declare noundef double @_ZNK8audioapi16BaseAudioContext14getCurrentTimeEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #1

declare noundef float @_ZNK8audioapi16BaseAudioContext13getSampleRateEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #1

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

declare noundef ptr @_ZNK8audioapi8AudioBus16getChannelByTypeEi(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) local_unnamed_addr #1

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

declare noundef float @_ZN8audioapi10AudioParam14getValueAtTimeEd(ptr noundef nonnull align 8 dereferenceable(152), double noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @cos(double noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sin(double noundef) local_unnamed_addr #3

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZN8audioapi10AudioArrayixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #1

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

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 = { "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 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 = { mustprogress nofree nounwind willreturn memory(write) "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, !10, i64 24}
!6 = !{!"_ZTSN8audioapi9AudioNodeE", !7, i64 8, !10, i64 24, !14, i64 32, !17, i64 48, !17, i64 52, !17, i64 56, !18, i64 60, !19, i64 64, !20, i64 72, !26, i64 128, !17, i64 184, !28, i64 188, !28, i64 189, !22, i64 192, !29, i64 200}
!7 = !{!"_ZTSSt23enable_shared_from_thisIN8audioapi9AudioNodeEE", !8, i64 0}
!8 = !{!"_ZTSSt8weak_ptrIN8audioapi9AudioNodeEE", !9, i64 0}
!9 = !{!"_ZTSSt10__weak_ptrIN8audioapi9AudioNodeELN9__gnu_cxx12_Lock_policyE2EE", !10, i64 0, !13, i64 8}
!10 = !{!"any pointer", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!"_ZTSSt12__weak_countILN9__gnu_cxx12_Lock_policyE2EE", !10, i64 0}
!14 = !{!"_ZTSSt10shared_ptrIN8audioapi8AudioBusEE", !15, i64 0}
!15 = !{!"_ZTSSt12__shared_ptrIN8audioapi8AudioBusELN9__gnu_cxx12_Lock_policyE2EE", !10, i64 0, !16, i64 8}
!16 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !10, i64 0}
!17 = !{!"int", !11, i64 0}
!18 = !{!"_ZTSN8audioapi16ChannelCountModeE", !11, i64 0}
!19 = !{!"_ZTSN8audioapi21ChannelInterpretationE", !11, i64 0}
!20 = !{!"_ZTSSt13unordered_setIPN8audioapi9AudioNodeESt4hashIS2_ESt8equal_toIS2_ESaIS2_EE", !21, i64 0}
!21 = !{!"_ZTSSt10_HashtableIPN8audioapi9AudioNodeES2_SaIS2_ENSt8__detail9_IdentityESt8equal_toIS2_ESt4hashIS2_ENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb1ELb1EEEE", !10, i64 0, !22, i64 8, !23, i64 16, !22, i64 24, !24, i64 32, !10, i64 48}
!22 = !{!"long", !11, i64 0}
!23 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !10, i64 0}
!24 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !25, i64 0, !22, i64 8}
!25 = !{!"float", !11, i64 0}
!26 = !{!"_ZTSSt13unordered_setISt10shared_ptrIN8audioapi9AudioNodeEESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE", !27, i64 0}
!27 = !{!"_ZTSSt10_HashtableISt10shared_ptrIN8audioapi9AudioNodeEES3_SaIS3_ENSt8__detail9_IdentityESt8equal_toIS3_ESt4hashIS3_ENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb1ELb1EEEE", !10, i64 0, !22, i64 8, !23, i64 16, !22, i64 24, !24, i64 32, !10, i64 48}
!28 = !{!"bool", !11, i64 0}
!29 = !{!"_ZTSSt6vectorISt10shared_ptrIN8audioapi8AudioBusEESaIS3_EE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN8audioapi8AudioBusEESaIS3_EE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN8audioapi8AudioBusEESaIS3_EE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN8audioapi8AudioBusEESaIS3_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!33 = !{!25, !25, i64 0}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}


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