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

; 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.anon = type { ptr }
%"class.audioapi::AudioParam" = type { float, float, float, float, %"class.std::deque", double, double, float, float, %"class.std::function" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<audioapi::ParamChangeEvent, std::allocator<audioapi::ParamChangeEvent>>::_Deque_impl" }
%"struct.std::_Deque_base<audioapi::ParamChangeEvent, std::allocator<audioapi::ParamChangeEvent>>::_Deque_impl" = type { %"struct.std::_Deque_base<audioapi::ParamChangeEvent, std::allocator<audioapi::ParamChangeEvent>>::_Deque_impl_data" }
%"struct.std::_Deque_base<audioapi::ParamChangeEvent, std::allocator<audioapi::ParamChangeEvent>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8audioapi10AudioParamC2Efff(ptr noundef nonnull align 8 dereferenceable(152) %0, float noundef %1, float noundef %2, float noundef %3) unnamed_addr #0 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca float, align 4
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca %class.anon, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store float %1, ptr %6, align 4, !tbaa !9
  store float %2, ptr %7, align 4, !tbaa !9
  store float %3, ptr %8, align 4, !tbaa !9
  %10 = load ptr, ptr %5, align 8
  %11 = getelementptr inbounds %"class.audioapi::AudioParam", ptr %10, i32 0, i32 0
  %12 = load float, ptr %6, align 4, !tbaa !9
  store float %12, ptr %11, align 8, !tbaa !11
  %13 = getelementptr inbounds %"class.audioapi::AudioParam", ptr %10, i32 0, i32 1
  %14 = load float, ptr %6, align 4, !tbaa !9
  store float %14, ptr %13, align 4, !tbaa !22
  %15 = getelementptr inbounds %"class.audioapi::AudioParam", ptr %10, i32 0, i32 2
  %16 = load float, ptr %7, align 4, !tbaa !9
  store float %16, ptr %15, align 8, !tbaa !23
  %17 = getelementptr inbounds %"class.audioapi::AudioParam", ptr %10, i32 0, i32 3
  %18 = load float, ptr %8, align 4, !tbaa !9
  store float %18, ptr %17, align 4, !tbaa !24
  %19 = getelementptr inbounds %"class.audioapi::AudioParam", ptr %10, i32 0, i32 4
  call void @_ZNSt5dequeIN8audioapi16ParamChangeEventESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %19)
  %20 = getelementptr inbounds %"class.audioapi::AudioParam", ptr %10, i32 0, i32 9
  call void @_ZNSt8functionIFfddffdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #3
  %21 = getelementptr inbounds %"class.audioapi::AudioParam", ptr %10, i32 0, i32 5
  store double 0.000000e+00, ptr %21, align 8, !tbaa !25
  %22 = getelementptr inbounds %"class.audioapi::AudioParam", ptr %10, i32 0, i32 6
  store double 0.000000e+00, ptr %22, align 8, !tbaa !26
  %23 = getelementptr inbounds %"class.audioapi::AudioParam", ptr %10, i32 0, i32 0
  %24 = load float, ptr %23, align 8, !tbaa !11
  %25 = getelementptr inbounds %"class.audioapi::AudioParam", ptr %10, i32 0, i32 7
  store float %24, ptr %25, align 8, !tbaa !27
  %26 = getelementptr inbounds %"class.audioapi::AudioParam", ptr %10, i32 0, i32 0
  %27 = load float, ptr %26, align 8, !tbaa !11
  %28 = getelementptr inbounds %"class.audioapi::AudioParam", ptr %10, i32 0, i32 8
  store float %27, ptr %28, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %29 = getelementptr inbounds %class.anon, ptr %9, i32 0, i32 0
  store ptr %10, ptr %29, align 8, !tbaa !29
  %30 = getelementptr inbounds %"class.audioapi::AudioParam", ptr %10, i32 0, i32 9
  %31 = call noundef nonnull align 8 dereferenceable(32) ptr @"_ZNSt8functionIFfddffdEEaSIZN8audioapi10AudioParamC1EfffE3$_0EENSt9enable_ifIXsrNS1_9_CallableIT_NS6_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceIS8_E4typeEE4typeES1_EE5valueESt5decayIS8_EE4type4typeESt15__invoke_resultIRSJ_JddffdEEEE5valueERS1_E4typeEOS8_"(ptr noundef nonnull align 8 dereferenceable(32) %30, ptr noundef nonnull align 8 dereferenceable(8) %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5dequeIN8audioapi16ParamChangeEventESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt8functionIFfddffdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef nonnull align 8 dereferenceable(32) ptr @"_ZNSt8functionIFfddffdEEaSIZN8audioapi10AudioParamC1EfffE3$_0EENSt9enable_ifIXsrNS1_9_CallableIT_NS6_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceIS8_E4typeEE4typeES1_EE5valueESt5decayIS8_EE4type4typeESt15__invoke_resultIRSJ_JddffdEEEE5valueERS1_E4typeEOS8_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = !{!"float", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTSN8audioapi10AudioParamE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !13, i64 16, !19, i64 96, !19, i64 104, !10, i64 112, !10, i64 116, !20, i64 120}
!13 = !{!"_ZTSSt5dequeIN8audioapi16ParamChangeEventESaIS1_EE", !14, i64 0}
!14 = !{!"_ZTSSt11_Deque_baseIN8audioapi16ParamChangeEventESaIS1_EE", !15, i64 0}
!15 = !{!"_ZTSNSt11_Deque_baseIN8audioapi16ParamChangeEventESaIS1_EE11_Deque_implE", !16, i64 0}
!16 = !{!"_ZTSNSt11_Deque_baseIN8audioapi16ParamChangeEventESaIS1_EE16_Deque_impl_dataE", !6, i64 0, !17, i64 8, !18, i64 16, !18, i64 48}
!17 = !{!"long", !7, i64 0}
!18 = !{!"_ZTSSt15_Deque_iteratorIN8audioapi16ParamChangeEventERS1_PS1_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!19 = !{!"double", !7, i64 0}
!20 = !{!"_ZTSSt8functionIFfddffdEE", !21, i64 0, !6, i64 24}
!21 = !{!"_ZTSSt14_Function_base", !7, i64 0, !6, i64 16}
!22 = !{!12, !10, i64 4}
!23 = !{!12, !10, i64 8}
!24 = !{!12, !10, i64 12}
!25 = !{!12, !19, i64 96}
!26 = !{!12, !19, i64 104}
!27 = !{!12, !10, i64 112}
!28 = !{!12, !10, i64 116}
!29 = !{!30, !6, i64 0}
!30 = !{!"_ZTSZN8audioapi10AudioParamC1EfffE3$_0", !6, i64 0}


; 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.anon = type { ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8audioapi10AudioParamC2Efff(ptr noundef nonnull align 8 dereferenceable(152) %0, float noundef %1, float noundef %2, float noundef %3) unnamed_addr #0 align 2 {
  %5 = alloca %class.anon, align 8
  store float %1, ptr %0, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 4
  store float %1, ptr %6, align 4, !tbaa !20
  %7 = getelementptr inbounds i8, ptr %0, i64 8
  store float %2, ptr %7, align 8, !tbaa !21
  %8 = getelementptr inbounds i8, ptr %0, i64 12
  store float %3, ptr %8, align 4, !tbaa !22
  %9 = getelementptr inbounds i8, ptr %0, i64 16
  tail call void @_ZNSt5dequeIN8audioapi16ParamChangeEventESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %9)
  %10 = getelementptr inbounds i8, ptr %0, i64 120
  tail call void @_ZNSt8functionIFfddffdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #4
  %11 = getelementptr inbounds i8, ptr %0, i64 96
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %11, i8 0, i64 16, i1 false)
  %12 = load float, ptr %0, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %0, i64 112
  store float %12, ptr %13, align 8, !tbaa !23
  %14 = getelementptr inbounds i8, ptr %0, i64 116
  store float %12, ptr %14, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  store ptr %0, ptr %5, align 8, !tbaa !25
  %15 = call noundef nonnull align 8 dereferenceable(32) ptr @"_ZNSt8functionIFfddffdEEaSIZN8audioapi10AudioParamC1EfffE3$_0EENSt9enable_ifIXsrNS1_9_CallableIT_NS6_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceIS8_E4typeEE4typeES1_EE5valueESt5decayIS8_EE4type4typeESt15__invoke_resultIRSJ_JddffdEEEE5valueERS1_E4typeEOS8_"(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5dequeIN8audioapi16ParamChangeEventESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt8functionIFfddffdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef nonnull align 8 dereferenceable(32) ptr @"_ZNSt8functionIFfddffdEEaSIZN8audioapi10AudioParamC1EfffE3$_0EENSt9enable_ifIXsrNS1_9_CallableIT_NS6_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceIS8_E4typeEE4typeES1_EE5valueESt5decayIS8_EE4type4typeESt15__invoke_resultIRSJ_JddffdEEEE5valueERS1_E4typeEOS8_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"_ZTSN8audioapi10AudioParamE", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !10, i64 16, !17, i64 96, !17, i64 104, !7, i64 112, !7, i64 116, !18, i64 120}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt5dequeIN8audioapi16ParamChangeEventESaIS1_EE", !11, i64 0}
!11 = !{!"_ZTSSt11_Deque_baseIN8audioapi16ParamChangeEventESaIS1_EE", !12, i64 0}
!12 = !{!"_ZTSNSt11_Deque_baseIN8audioapi16ParamChangeEventESaIS1_EE11_Deque_implE", !13, i64 0}
!13 = !{!"_ZTSNSt11_Deque_baseIN8audioapi16ParamChangeEventESaIS1_EE16_Deque_impl_dataE", !14, i64 0, !15, i64 8, !16, i64 16, !16, i64 48}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"long", !8, i64 0}
!16 = !{!"_ZTSSt15_Deque_iteratorIN8audioapi16ParamChangeEventERS1_PS1_E", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24}
!17 = !{!"double", !8, i64 0}
!18 = !{!"_ZTSSt8functionIFfddffdEE", !19, i64 0, !14, i64 24}
!19 = !{!"_ZTSSt14_Function_base", !8, i64 0, !14, i64 16}
!20 = !{!6, !7, i64 4}
!21 = !{!6, !7, i64 8}
!22 = !{!6, !7, i64 12}
!23 = !{!6, !7, i64 112}
!24 = !{!6, !7, i64 116}
!25 = !{!26, !14, i64 0}
!26 = !{!"_ZTSZN8audioapi10AudioParamC1EfffE3$_0", !14, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,SROAPass,TailCallElimPass