; LLVM IR from Try/Tempest :: Engine/thirdparty/openal-soft/alc/alu.ll (ZN10DeviceBase16handleDisconnectEPKcz)

; 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"

%"struct.DeviceBase::MixLock" = type <{ ptr, i32, [4 x i8] }>
%"class.std::variant.128" = type { %"struct.std::__detail::__variant::_Variant_base.base.150", [7 x i8] }
%"struct.std::__detail::__variant::_Variant_base.base.150" = type { %"struct.std::__detail::__variant::_Move_assign_base.base.149" }
%"struct.std::__detail::__variant::_Move_assign_base.base.149" = type { %"struct.std::__detail::__variant::_Copy_assign_base.base.148" }
%"struct.std::__detail::__variant::_Copy_assign_base.base.148" = type { %"struct.std::__detail::__variant::_Move_ctor_base.base.147" }
%"struct.std::__detail::__variant::_Move_ctor_base.base.147" = type { %"struct.std::__detail::__variant::_Copy_ctor_base.base.146" }
%"struct.std::__detail::__variant::_Copy_ctor_base.base.146" = type { %"struct.std::__detail::__variant::_Variant_storage.base.145" }
%"struct.std::__detail::__variant::_Variant_storage.base.145" = type <{ %"union.std::__detail::__variant::_Variadic_union.135", i8 }>
%"union.std::__detail::__variant::_Variadic_union.135" = type { %"union.std::__detail::__variant::_Variadic_union.136" }
%"union.std::__detail::__variant::_Variadic_union.136" = type { %"union.std::__detail::__variant::_Variadic_union.138" }
%"union.std::__detail::__variant::_Variadic_union.138" = type { %"union.std::__detail::__variant::_Variadic_union.140" }
%"union.std::__detail::__variant::_Variadic_union.140" = type { %"struct.std::__detail::__variant::_Uninitialized.141", [24 x i8] }
%"struct.std::__detail::__variant::_Uninitialized.141" = type { %struct.AsyncEffectReleaseEvent }
%struct.AsyncEffectReleaseEvent = type { ptr }
%"struct.std::in_place_type_t" = type { i8 }
%struct.__va_list_tag = type { i32, i32, ptr, ptr }
%"class.al::ptr_wrapper.158" = type { ptr }
%"struct.RingBuffer::Data" = type { ptr, i64 }
%"struct.std::pair" = type { %"struct.RingBuffer::Data", %"struct.RingBuffer::Data" }
%"class.al::span.217" = type { ptr, i64 }
%class.anon = type { i8 }
%"class.al::ptr_wrapper.218" = type { ptr }
%struct.DeviceBase = type { %"struct.std::atomic", i8, i32, i32, i32, i8, i8, i32, float, i8, i8, i8, %"class.std::__cxx11::basic_string", %"class.std::bitset.9", i8, i32, i8, float, %class.NfcFilter, %"struct.std::atomic.13", %"struct.std::atomic.15", %"class.std::chrono::duration", %"struct.std::array.16", %"struct.std::array.16", [8 x i8], %"struct.std::array.18", %"struct.std::array.19", %"struct.std::array.20", %"struct.std::array.21", %"struct.std::array.22", %"class.std::vector", %struct.MixParams, %"struct.std::array.25", %struct.RealMixParams, %"class.std::unique_ptr", %"class.al::intrusive_ptr", i32, %"class.std::unique_ptr.30", %"class.std::unique_ptr.38", %"class.std::unique_ptr.46", { i64, i64 }, %"class.std::unique_ptr.54", %"class.std::unique_ptr.62", float, i32, %"struct.std::atomic.13", %"class.al::atomic_unique_ptr", [8 x i8] }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i8 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::bitset.9" = type { %"struct.std::_Base_bitset" }
%"struct.std::_Base_bitset" = type { i64 }
%class.NfcFilter = type { %struct.NfcFilter1, %struct.NfcFilter2, %struct.NfcFilter3, %struct.NfcFilter4 }
%struct.NfcFilter1 = type { float, float, float, float, %"struct.std::array.10" }
%"struct.std::array.10" = type { [1 x float] }
%struct.NfcFilter2 = type { float, float, float, float, float, float, %"struct.std::array.11" }
%"struct.std::array.11" = type { [2 x float] }
%struct.NfcFilter3 = type { float, float, float, float, float, float, float, float, %"struct.std::array.12" }
%"struct.std::array.12" = type { [3 x float] }
%struct.NfcFilter4 = type { float, float, float, float, float, float, float, float, float, float, %"struct.std::array.0" }
%"struct.std::array.0" = type { [4 x float] }
%"struct.std::atomic.15" = type { %"class.std::chrono::duration" }
%"class.std::chrono::duration" = type { i64 }
%"struct.std::array.16" = type { [16 x %"struct.std::array.17"] }
%"struct.std::array.17" = type { [16 x float] }
%"struct.std::array.18" = type { [20480 x float] }
%"struct.std::array.19" = type { [1328 x float] }
%"struct.std::array.20" = type { [1024 x float] }
%"struct.std::array.21" = type { [1088 x float] }
%"struct.std::array.22" = type { [1152 x %"struct.std::array.11"] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::array<float, 1024>, al::allocator<std::array<float, 1024>, 16>>::_Vector_impl" }
%"struct.std::_Vector_base<std::array<float, 1024>, al::allocator<std::array<float, 1024>, 16>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::array<float, 1024>, al::allocator<std::array<float, 1024>, 16>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::array<float, 1024>, al::allocator<std::array<float, 1024>, 16>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.MixParams = type { %"struct.std::array.23", %"class.al::span.24" }
%"struct.std::array.23" = type { [16 x %struct.BFChannelConfig] }
%struct.BFChannelConfig = type { float, i32 }
%"class.al::span.24" = type { ptr, i64 }
%"struct.std::array.25" = type { [4 x i32] }
%struct.RealMixParams = type { %"class.al::span.26", %"struct.std::array.27", %"class.al::span.24" }
%"class.al::span.26" = type { ptr, i64 }
%"struct.std::array.27" = type { [36 x i8] }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.29" }
%"struct.std::_Head_base.29" = type { ptr }
%"class.al::intrusive_ptr" = type { ptr }
%"class.std::unique_ptr.30" = type { %"struct.std::__uniq_ptr_data.31" }
%"struct.std::__uniq_ptr_data.31" = type { %"class.std::__uniq_ptr_impl.32" }
%"class.std::__uniq_ptr_impl.32" = type { %"class.std::tuple.33" }
%"class.std::tuple.33" = type { %"struct.std::_Tuple_impl.34" }
%"struct.std::_Tuple_impl.34" = type { %"struct.std::_Head_base.37" }
%"struct.std::_Head_base.37" = type { ptr }
%"class.std::unique_ptr.38" = type { %"struct.std::__uniq_ptr_data.39" }
%"struct.std::__uniq_ptr_data.39" = type { %"class.std::__uniq_ptr_impl.40" }
%"class.std::__uniq_ptr_impl.40" = type { %"class.std::tuple.41" }
%"class.std::tuple.41" = type { %"struct.std::_Tuple_impl.42" }
%"struct.std::_Tuple_impl.42" = type { %"struct.std::_Head_base.45" }
%"struct.std::_Head_base.45" = type { ptr }
%"class.std::unique_ptr.46" = type { %"struct.std::__uniq_ptr_data.47" }
%"struct.std::__uniq_ptr_data.47" = type { %"class.std::__uniq_ptr_impl.48" }
%"class.std::__uniq_ptr_impl.48" = type { %"class.std::tuple.49" }
%"class.std::tuple.49" = type { %"struct.std::_Tuple_impl.50" }
%"struct.std::_Tuple_impl.50" = type { %"struct.std::_Head_base.53" }
%"struct.std::_Head_base.53" = type { ptr }
%"class.std::unique_ptr.54" = type { %"struct.std::__uniq_ptr_data.55" }
%"struct.std::__uniq_ptr_data.55" = type { %"class.std::__uniq_ptr_impl.56" }
%"class.std::__uniq_ptr_impl.56" = type { %"class.std::tuple.57" }
%"class.std::tuple.57" = type { %"struct.std::_Tuple_impl.58" }
%"struct.std::_Tuple_impl.58" = type { %"struct.std::_Head_base.61" }
%"struct.std::_Head_base.61" = type { ptr }
%"class.std::unique_ptr.62" = type { %"struct.std::__uniq_ptr_data.63" }
%"struct.std::__uniq_ptr_data.63" = type { %"class.std::__uniq_ptr_impl.64" }
%"class.std::__uniq_ptr_impl.64" = type { %"class.std::tuple.65" }
%"class.std::tuple.65" = type { %"struct.std::_Tuple_impl.66" }
%"struct.std::_Tuple_impl.66" = type { %"struct.std::_Head_base.69" }
%"struct.std::_Head_base.69" = type { ptr }
%"struct.std::atomic.13" = type { %"struct.std::__atomic_base.14" }
%"struct.std::__atomic_base.14" = type { i32 }
%"class.al::atomic_unique_ptr" = type { %"struct.std::atomic.70" }
%"struct.std::atomic.70" = type { %"struct.std::__atomic_base.71" }
%"struct.std::__atomic_base.71" = type { ptr }
%struct.AsyncDisconnectEvent = type { %"class.std::__cxx11::basic_string" }
%struct.ContextBase = type { ptr, %"struct.std::atomic.13", %"struct.std::atomic", %"struct.std::atomic", float, %"struct.std::atomic.159", %"struct.std::atomic.161", %"struct.std::atomic.163", ptr, %"struct.std::atomic.165", %struct.ContextParams, %"class.al::atomic_unique_ptr.167", %"struct.std::atomic.170", %"class.al::atomic_unique_ptr.172", %"class.std::thread", %"class.al::semaphore", %"class.std::unique_ptr.175", %"struct.std::atomic.183", %"class.std::vector.184", %"class.std::vector.189", %"class.std::vector.194", %"class.std::vector.199", %"class.std::vector.204", %"class.std::vector.209" }
%"struct.std::atomic.159" = type { %"struct.std::__atomic_base.160" }
%"struct.std::__atomic_base.160" = type { ptr }
%"struct.std::atomic.161" = type { %"struct.std::__atomic_base.162" }
%"struct.std::__atomic_base.162" = type { ptr }
%"struct.std::atomic.163" = type { %"struct.std::__atomic_base.164" }
%"struct.std::__atomic_base.164" = type { ptr }
%"struct.std::atomic.165" = type { %"struct.std::__atomic_base.166" }
%"struct.std::__atomic_base.166" = type { ptr }
%struct.ContextParams = type <{ %"struct.std::atomic.159", [8 x i8], %"class.alu::Vector", %"class.alu::Matrix", %"class.alu::Vector", float, float, float, float, float, i8, i8, [10 x i8] }>
%"class.alu::Matrix" = type { %"struct.std::array.17" }
%"class.alu::Vector" = type { %"struct.std::array.0" }
%"class.al::atomic_unique_ptr.167" = type { %"struct.std::atomic.168" }
%"struct.std::atomic.168" = type { %"struct.std::__atomic_base.169" }
%"struct.std::__atomic_base.169" = type { ptr }
%"struct.std::atomic.170" = type { %"struct.std::__atomic_base.171" }
%"struct.std::__atomic_base.171" = type { i64 }
%"class.al::atomic_unique_ptr.172" = type { %"struct.std::atomic.173" }
%"struct.std::atomic.173" = type { %"struct.std::__atomic_base.174" }
%"struct.std::__atomic_base.174" = type { ptr }
%"class.std::thread" = type { %"class.std::thread::id" }
%"class.std::thread::id" = type { i64 }
%"class.al::semaphore" = type { %union.sem_t }
%union.sem_t = type { i64, [24 x i8] }
%"class.std::unique_ptr.175" = type { %"struct.std::__uniq_ptr_data.176" }
%"struct.std::__uniq_ptr_data.176" = type { %"class.std::__uniq_ptr_impl.177" }
%"class.std::__uniq_ptr_impl.177" = type { %"class.std::tuple.178" }
%"class.std::tuple.178" = type { %"struct.std::_Tuple_impl.179" }
%"struct.std::_Tuple_impl.179" = type { %"struct.std::_Head_base.182" }
%"struct.std::_Head_base.182" = type { ptr }
%"struct.std::atomic.183" = type { %"class.std::bitset" }
%"class.std::bitset" = type { %"struct.std::_Base_bitset" }
%"class.std::vector.184" = type { %"struct.std::_Vector_base.185" }
%"struct.std::_Vector_base.185" = type { %"struct.std::_Vector_base<std::unique_ptr<std::array<VoiceChange, 128>>, std::allocator<std::unique_ptr<std::array<VoiceChange, 128>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<std::array<VoiceChange, 128>>, std::allocator<std::unique_ptr<std::array<VoiceChange, 128>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<std::array<VoiceChange, 128>>, std::allocator<std::unique_ptr<std::array<VoiceChange, 128>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<std::array<VoiceChange, 128>>, std::allocator<std::unique_ptr<std::array<VoiceChange, 128>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.189" = type { %"struct.std::_Vector_base.190" }
%"struct.std::_Vector_base.190" = type { %"struct.std::_Vector_base<std::unique_ptr<std::array<Voice, 32>>, std::allocator<std::unique_ptr<std::array<Voice, 32>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<std::array<Voice, 32>>, std::allocator<std::unique_ptr<std::array<Voice, 32>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<std::array<Voice, 32>>, std::allocator<std::unique_ptr<std::array<Voice, 32>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<std::array<Voice, 32>>, std::allocator<std::unique_ptr<std::array<Voice, 32>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.194" = type { %"struct.std::_Vector_base.195" }
%"struct.std::_Vector_base.195" = type { %"struct.std::_Vector_base<std::unique_ptr<std::array<VoicePropsItem, 32>>, std::allocator<std::unique_ptr<std::array<VoicePropsItem, 32>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<std::array<VoicePropsItem, 32>>, std::allocator<std::unique_ptr<std::array<VoicePropsItem, 32>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<std::array<VoicePropsItem, 32>>, std::allocator<std::unique_ptr<std::array<VoicePropsItem, 32>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<std::array<VoicePropsItem, 32>>, std::allocator<std::unique_ptr<std::array<VoicePropsItem, 32>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.199" = type { %"struct.std::_Vector_base.200" }
%"struct.std::_Vector_base.200" = type { %"struct.std::_Vector_base<std::unique_ptr<std::array<EffectSlot, 4>>, std::allocator<std::unique_ptr<std::array<EffectSlot, 4>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<std::array<EffectSlot, 4>>, std::allocator<std::unique_ptr<std::array<EffectSlot, 4>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<std::array<EffectSlot, 4>>, std::allocator<std::unique_ptr<std::array<EffectSlot, 4>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<std::array<EffectSlot, 4>>, std::allocator<std::unique_ptr<std::array<EffectSlot, 4>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.204" = type { %"struct.std::_Vector_base.205" }
%"struct.std::_Vector_base.205" = type { %"struct.std::_Vector_base<std::unique_ptr<std::array<EffectSlotProps, 4>>, std::allocator<std::unique_ptr<std::array<EffectSlotProps, 4>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<std::array<EffectSlotProps, 4>>, std::allocator<std::unique_ptr<std::array<EffectSlotProps, 4>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<std::array<EffectSlotProps, 4>>, std::allocator<std::unique_ptr<std::array<EffectSlotProps, 4>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<std::array<EffectSlotProps, 4>>, std::allocator<std::unique_ptr<std::array<EffectSlotProps, 4>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.209" = type { %"struct.std::_Vector_base.210" }
%"struct.std::_Vector_base.210" = type { %"struct.std::_Vector_base<std::unique_ptr<std::array<ContextProps, 2>>, std::allocator<std::unique_ptr<std::array<ContextProps, 2>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<std::array<ContextProps, 2>>, std::allocator<std::unique_ptr<std::array<ContextProps, 2>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<std::array<ContextProps, 2>>, std::allocator<std::unique_ptr<std::array<ContextProps, 2>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<std::array<ContextProps, 2>>, std::allocator<std::unique_ptr<std::array<ContextProps, 2>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [30 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; 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 void @_ZN10DeviceBase15getWriteMixLockEv(ptr dead_on_unwind noalias writable sret(%"struct.DeviceBase::MixLock") align 8, ptr noundef nonnull align 16 dereferenceable(107576)) #1 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10DeviceBase16handleDisconnectEPKcz(ptr noundef nonnull align 16 dereferenceable(107576) %0, ptr noundef %1, ...) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"struct.DeviceBase::MixLock", align 8
  %6 = alloca %"class.std::variant.128", align 8
  %7 = alloca %"struct.std::in_place_type_t", align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca [1 x %struct.__va_list_tag], align 16
  %12 = alloca [1 x %struct.__va_list_tag], align 16
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca %"class.al::ptr_wrapper.158", align 8
  %16 = alloca %"class.al::ptr_wrapper.158", align 8
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca %"struct.RingBuffer::Data", align 8
  %21 = alloca %"struct.std::pair", align 8
  %22 = alloca %"class.al::span.217", align 8
  %23 = alloca %class.anon, align 1
  %24 = alloca %"class.al::ptr_wrapper.218", align 8
  %25 = alloca %"class.al::ptr_wrapper.218", align 8
  %26 = alloca %class.anon, align 1
  %27 = alloca %class.anon, align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %28 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #7
  call void @_ZN10DeviceBase15getWriteMixLockEv(ptr dead_on_unwind writable sret(%"struct.DeviceBase::MixLock") align 8 %5, ptr noundef nonnull align 16 dereferenceable(107576) %28) #7
  %29 = getelementptr inbounds %struct.DeviceBase, ptr %28, i32 0, i32 0
  %30 = call noundef zeroext i1 @_ZNSt6atomicIbE8exchangeEbSt12memory_order(ptr noundef nonnull align 1 dereferenceable(1) %29, i1 noundef zeroext false, i32 noundef 4) #7
  br i1 %30, label %31, label %172

31:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 40, ptr %6) #7
  invoke void @_ZNSt7variantIJSt9monostate21AsyncSourceStateEvent24AsyncBufferCompleteEvent23AsyncEffectReleaseEvent20AsyncDisconnectEventEEC2IS4_JEvEESt15in_place_type_tIT_EDpOT0_(ptr noundef nonnull align 8 dereferenceable(33) %6)
          to label %32 unwind label %60

32:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %33 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZSt3getI20AsyncDisconnectEventJSt9monostate21AsyncSourceStateEvent24AsyncBufferCompleteEvent23AsyncEffectReleaseEventS0_EERT_RSt7variantIJDpT0_EE(ptr noundef nonnull align 8 dereferenceable(33) %6)
          to label %34 unwind label %64

34:                                               ; preds = %32
  store ptr %33, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #7
  %35 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %11, i64 0, i64 0
  call void @llvm.va_start.p0(ptr %35)
  %36 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %12, i64 0, i64 0
  %37 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %11, i64 0, i64 0
  call void @llvm.va_copy.p0(ptr %36, ptr %37)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %11, i64 0, i64 0
  %40 = call i32 @vsnprintf(ptr noundef null, i64 noundef 0, ptr noundef %38, ptr noundef %39) #7
  store i32 %40, ptr %13, align 4, !tbaa !9
  %41 = load i32, ptr %13, align 4, !tbaa !9
  %42 = icmp sgt i32 %41, 0
  br i1 %42, label %43, label %72

43:                                               ; preds = %34
  %44 = load ptr, ptr %10, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.AsyncDisconnectEvent, ptr %44, i32 0, i32 0
  %46 = load i32, ptr %13, align 4, !tbaa !9
  %47 = zext i32 %46 to i64
  %48 = call noundef i64 @_Zli3_uzy(i64 noundef 1) #7
  %49 = add i64 %47, %48
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(32) %45, i64 noundef %49)
          to label %50 unwind label %68

50:                                               ; preds = %43
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.AsyncDisconnectEvent, ptr %51, i32 0, i32 0
  %53 = call noundef ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv(ptr noundef nonnull align 8 dereferenceable(32) %52) #7
  %54 = load ptr, ptr %10, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.AsyncDisconnectEvent, ptr %54, i32 0, i32 0
  %56 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %55) #7
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %12, i64 0, i64 0
  %59 = call i32 @vsnprintf(ptr noundef %53, i64 noundef %56, ptr noundef %57, ptr noundef %58) #7
  br label %77

60:                                               ; preds = %31
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %8, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %9, align 4
  br label %171

64:                                               ; preds = %32
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %8, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %9, align 4
  br label %170

68:                                               ; preds = %72, %43
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %8, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %169

72:                                               ; preds = %34
  %73 = load ptr, ptr %10, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.AsyncDisconnectEvent, ptr %73, i32 0, i32 0
  %75 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %74, ptr noundef @.str)
          to label %76 unwind label %68

76:                                               ; preds = %72
  br label %77

77:                                               ; preds = %76, %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  %78 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %12, i64 0, i64 0
  call void @llvm.va_end.p0(ptr %78)
  %79 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %11, i64 0, i64 0
  call void @llvm.va_end.p0(ptr %79)
  br label %80

80:                                               ; preds = %93, %77
  %81 = load ptr, ptr %10, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.AsyncDisconnectEvent, ptr %81, i32 0, i32 0
  %83 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %82) #7
  br i1 %83, label %91, label %84

84:                                               ; preds = %80
  %85 = load ptr, ptr %10, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.AsyncDisconnectEvent, ptr %85, i32 0, i32 0
  %87 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %86) #7
  %88 = load i8, ptr %87, align 1, !tbaa !11
  %89 = sext i8 %88 to i32
  %90 = icmp eq i32 %89, 0
  br label %91

91:                                               ; preds = %84, %80
  %92 = phi i1 [ false, %80 ], [ %90, %84 ]
  br i1 %92, label %93, label %96

93:                                               ; preds = %91
  %94 = load ptr, ptr %10, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.AsyncDisconnectEvent, ptr %94, i32 0, i32 0
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(32) %95) #7
  br label %80, !llvm.loop !12

96:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %97 = getelementptr inbounds %struct.DeviceBase, ptr %28, i32 0, i32 46
  %98 = call noundef ptr @_ZNK2al17atomic_unique_ptrINS_9FlexArrayIP11ContextBaseLm8EEESt14default_deleteIS4_EE4loadESt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %97, i32 noundef 5) #7
  store ptr %98, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %99 = load ptr, ptr %14, align 8, !tbaa !5
  %100 = call ptr @_ZN2al9FlexArrayIP11ContextBaseLm8EE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %99) #7
  %101 = getelementptr inbounds %"class.al::ptr_wrapper.158", ptr %15, i32 0, i32 0
  store ptr %100, ptr %101, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %102 = load ptr, ptr %14, align 8, !tbaa !5
  %103 = call ptr @_ZN2al9FlexArrayIP11ContextBaseLm8EE3endEv(ptr noundef nonnull align 8 dereferenceable(16) %102) #7
  %104 = getelementptr inbounds %"class.al::ptr_wrapper.158", ptr %16, i32 0, i32 0
  store ptr %103, ptr %104, align 8
  br label %105

105:                                              ; preds = %161, %96
  %106 = call noundef zeroext i1 @_ZN2alneERKNS_11ptr_wrapperIPP11ContextBaseEES6_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  br i1 %106, label %108, label %107

107:                                              ; preds = %105
  store i32 4, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %168

108:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK2al11ptr_wrapperIPP11ContextBaseEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  %110 = load ptr, ptr %109, align 8, !tbaa !5
  store ptr %110, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %111 = load ptr, ptr %18, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.ContextBase, ptr %111, i32 0, i32 16
  %113 = call noundef ptr @_ZNKSt10unique_ptrI10RingBufferSt14default_deleteIS0_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %112) #7
  store ptr %113, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #7
  %114 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN10RingBuffer14getWriteVectorEv(ptr dead_on_unwind writable sret(%"struct.std::pair") align 8 %21, ptr noundef nonnull align 64 dereferenceable(176) %114) #7
  %115 = getelementptr inbounds %"struct.std::pair", ptr %21, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %20, ptr align 8 %115, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #7
  %116 = getelementptr inbounds %"struct.RingBuffer::Data", ptr %20, i32 0, i32 1
  %117 = load i64, ptr %116, align 8, !tbaa !17
  %118 = icmp ugt i64 %117, 0
  br i1 %118, label %119, label %132

119:                                              ; preds = %108
  %120 = getelementptr inbounds %"struct.RingBuffer::Data", ptr %20, i32 0, i32 0
  %121 = load ptr, ptr %120, align 8, !tbaa !19
  %122 = invoke noundef ptr @_ZN2al12construct_atISt7variantIJSt9monostate21AsyncSourceStateEvent24AsyncBufferCompleteEvent23AsyncEffectReleaseEvent20AsyncDisconnectEventEEJRS7_EEEPT_SA_DpOT0_(ptr noundef %121, ptr noundef nonnull align 8 dereferenceable(33) %6)
          to label %123 unwind label %128

123:                                              ; preds = %119
  %124 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN10RingBuffer12writeAdvanceEm(ptr noundef nonnull align 64 dereferenceable(176) %124, i64 noundef 1) #7
  %125 = load ptr, ptr %18, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.ContextBase, ptr %125, i32 0, i32 15
  invoke void @_ZN2al9semaphore4postEv(ptr noundef nonnull align 8 dereferenceable(32) %126)
          to label %127 unwind label %128

127:                                              ; preds = %123
  br label %132

128:                                              ; preds = %136, %123, %119
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %8, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %9, align 4
  br label %167

132:                                              ; preds = %127, %108
  %133 = load ptr, ptr %18, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.ContextBase, ptr %133, i32 0, i32 3
  %135 = call noundef zeroext i1 @_ZNKSt6atomicIbE4loadESt12memory_order(ptr noundef nonnull align 1 dereferenceable(1) %134, i32 noundef 5) #7
  br i1 %135, label %139, label %136

136:                                              ; preds = %132
  %137 = load ptr, ptr %18, align 8, !tbaa !5
  invoke void @_ZN12_GLOBAL__N_119ProcessVoiceChangesEP11ContextBase(ptr noundef %137)
          to label %138 unwind label %128

138:                                              ; preds = %136
  store i32 5, ptr %17, align 4
  br label %155

139:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #7
  %140 = load ptr, ptr %18, align 8, !tbaa !5
  %141 = call { ptr, i64 } @_ZNK11ContextBase21getVoicesSpanAcquiredEv(ptr noundef nonnull align 16 dereferenceable(432) %140) #7
  %142 = getelementptr inbounds { ptr, i64 }, ptr %22, i32 0, i32 0
  %143 = extractvalue { ptr, i64 } %141, 0
  store ptr %143, ptr %142, align 8
  %144 = getelementptr inbounds { ptr, i64 }, ptr %22, i32 0, i32 1
  %145 = extractvalue { ptr, i64 } %141, 1
  store i64 %145, ptr %144, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #7
  %146 = call ptr @_ZNK2al4spanIP5VoiceLm18446744073709551615EE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %22) #7
  %147 = getelementptr inbounds %"class.al::ptr_wrapper.218", ptr %24, i32 0, i32 0
  store ptr %146, ptr %147, align 8
  %148 = call ptr @_ZNK2al4spanIP5VoiceLm18446744073709551615EE3endEv(ptr noundef nonnull align 8 dereferenceable(16) %22) #7
  %149 = getelementptr inbounds %"class.al::ptr_wrapper.218", ptr %25, i32 0, i32 0
  store ptr %148, ptr %149, align 8
  %150 = getelementptr inbounds %"class.al::ptr_wrapper.218", ptr %24, i32 0, i32 0
  %151 = load ptr, ptr %150, align 8
  %152 = getelementptr inbounds %"class.al::ptr_wrapper.218", ptr %25, i32 0, i32 0
  %153 = load ptr, ptr %152, align 8
  invoke void @"_ZSt8for_eachIN2al11ptr_wrapperIPP5VoiceEEZN10DeviceBase16handleDisconnectEPKczE3$_0ET0_T_SB_SA_"(ptr %151, ptr %153)
          to label %154 unwind label %163

154:                                              ; preds = %139
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #7
  store i32 0, ptr %17, align 4
  br label %155

155:                                              ; preds = %154, %138
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  %156 = load i32, ptr %17, align 4
  switch i32 %156, label %158 [
    i32 0, label %157
  ]

157:                                              ; preds = %155
  store i32 0, ptr %17, align 4
  br label %158

158:                                              ; preds = %157, %155
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  %159 = load i32, ptr %17, align 4
  switch i32 %159, label %178 [
    i32 0, label %160
    i32 5, label %161
  ]

160:                                              ; preds = %158
  br label %161

161:                                              ; preds = %160, %158
  %162 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN2al11ptr_wrapperIPP11ContextBaseEppEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  br label %105

163:                                              ; preds = %139
  %164 = landingpad { ptr, i32 }
          cleanup
  %165 = extractvalue { ptr, i32 } %164, 0
  store ptr %165, ptr %8, align 8
  %166 = extractvalue { ptr, i32 } %164, 1
  store i32 %166, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #7
  br label %167

167:                                              ; preds = %163, %128
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %169

168:                                              ; preds = %107
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @_ZNSt8__detail9__variant16_Variant_storageILb0EJSt9monostate21AsyncSourceStateEvent24AsyncBufferCompleteEvent23AsyncEffectReleaseEvent20AsyncDisconnectEventEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %6) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %6) #7
  br label %172

169:                                              ; preds = %167, %68
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #7
  br label %170

170:                                              ; preds = %169, %64
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @_ZNSt8__detail9__variant16_Variant_storageILb0EJSt9monostate21AsyncSourceStateEvent24AsyncBufferCompleteEvent23AsyncEffectReleaseEvent20AsyncDisconnectEventEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %6) #7
  br label %171

171:                                              ; preds = %170, %60
  call void @llvm.lifetime.end.p0(i64 40, ptr %6) #7
  call void @_ZN10DeviceBase7MixLockD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #7
  br label %173

172:                                              ; preds = %168, %2
  call void @_ZN10DeviceBase7MixLockD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #7
  ret void

173:                                              ; preds = %171
  %174 = load ptr, ptr %8, align 8
  %175 = load i32, ptr %9, align 4
  %176 = insertvalue { ptr, i32 } poison, ptr %174, 0
  %177 = insertvalue { ptr, i32 } %176, i32 %175, 1
  resume { ptr, i32 } %177

178:                                              ; preds = %158
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt6atomicIbE8exchangeEbSt12memory_order(ptr noundef nonnull align 1 dereferenceable(1), i1 noundef zeroext, i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7variantIJSt9monostate21AsyncSourceStateEvent24AsyncBufferCompleteEvent23AsyncEffectReleaseEvent20AsyncDisconnectEventEEC2IS4_JEvEESt15in_place_type_tIT_EDpOT0_(ptr noundef nonnull align 8 dereferenceable(33)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZSt3getI20AsyncDisconnectEventJSt9monostate21AsyncSourceStateEvent24AsyncBufferCompleteEvent23AsyncEffectReleaseEventS0_EERT_RSt7variantIJDpT0_EE(ptr noundef nonnull align 8 dereferenceable(33)) #3

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.va_start.p0(ptr) #4

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.va_copy.p0(ptr, ptr) #4

; Function Attrs: nounwind
declare i32 @vsnprintf(ptr noundef, i64 noundef, ptr noundef, ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Zli3_uzy(i64 noundef) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #3 align 2

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.va_end.p0(ptr) #4

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN2alneERKNS_11ptr_wrapperIPP11ContextBaseEES6_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

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

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

; Function Attrs: nounwind
declare void @_ZN10RingBuffer14getWriteVectorEv(ptr dead_on_unwind writable sret(%"struct.std::pair") align 8, ptr noundef nonnull align 64 dereferenceable(176)) #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN2al12construct_atISt7variantIJSt9monostate21AsyncSourceStateEvent24AsyncBufferCompleteEvent23AsyncEffectReleaseEvent20AsyncDisconnectEventEEJRS7_EEEPT_SA_DpOT0_(ptr noundef, ptr noundef nonnull align 8 dereferenceable(33)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10RingBuffer12writeAdvanceEm(ptr noundef nonnull align 64 dereferenceable(176), i64 noundef) #1 align 2

declare void @_ZN2al9semaphore4postEv(ptr noundef nonnull align 8 dereferenceable(32)) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6atomicIbE4loadESt12memory_order(ptr noundef nonnull align 1 dereferenceable(1), i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_119ProcessVoiceChangesEP11ContextBase(ptr noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, i64 } @_ZNK11ContextBase21getVoicesSpanAcquiredEv(ptr noundef nonnull align 16 dereferenceable(432)) #1 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZSt8for_eachIN2al11ptr_wrapperIPP5VoiceEEZN10DeviceBase16handleDisconnectEPKczE3$_0ET0_T_SB_SA_"(ptr, ptr) #3

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

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

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

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

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nosync nounwind willreturn }
attributes #5 = { 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 = { "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 #7 = { 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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{i64 0, i64 8, !5, i64 8, i64 8, !15}
!15 = !{!16, !16, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!18, !16, i64 8}
!18 = !{!"_ZTSN10RingBuffer4DataE", !6, i64 0, !16, i64 8}
!19 = !{!18, !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"

%"struct.DeviceBase::MixLock" = type <{ ptr, i32, [4 x i8] }>
%"class.std::variant.128" = type { %"struct.std::__detail::__variant::_Variant_base.base.150", [7 x i8] }
%"struct.std::__detail::__variant::_Variant_base.base.150" = type { %"struct.std::__detail::__variant::_Move_assign_base.base.149" }
%"struct.std::__detail::__variant::_Move_assign_base.base.149" = type { %"struct.std::__detail::__variant::_Copy_assign_base.base.148" }
%"struct.std::__detail::__variant::_Copy_assign_base.base.148" = type { %"struct.std::__detail::__variant::_Move_ctor_base.base.147" }
%"struct.std::__detail::__variant::_Move_ctor_base.base.147" = type { %"struct.std::__detail::__variant::_Copy_ctor_base.base.146" }
%"struct.std::__detail::__variant::_Copy_ctor_base.base.146" = type { %"struct.std::__detail::__variant::_Variant_storage.base.145" }
%"struct.std::__detail::__variant::_Variant_storage.base.145" = type <{ %"union.std::__detail::__variant::_Variadic_union.135", i8 }>
%"union.std::__detail::__variant::_Variadic_union.135" = type { %"union.std::__detail::__variant::_Variadic_union.136" }
%"union.std::__detail::__variant::_Variadic_union.136" = type { %"union.std::__detail::__variant::_Variadic_union.138" }
%"union.std::__detail::__variant::_Variadic_union.138" = type { %"union.std::__detail::__variant::_Variadic_union.140" }
%"union.std::__detail::__variant::_Variadic_union.140" = type { %"struct.std::__detail::__variant::_Uninitialized.141", [24 x i8] }
%"struct.std::__detail::__variant::_Uninitialized.141" = type { %struct.AsyncEffectReleaseEvent }
%struct.AsyncEffectReleaseEvent = type { ptr }
%struct.__va_list_tag = type { i32, i32, ptr, ptr }
%"class.al::ptr_wrapper.158" = type { ptr }
%"struct.std::pair" = type { %"struct.RingBuffer::Data", %"struct.RingBuffer::Data" }
%"struct.RingBuffer::Data" = type { ptr, i64 }
%"class.al::span.217" = type { ptr, i64 }

@.str = external hidden unnamed_addr constant [30 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; 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 void @_ZN10DeviceBase15getWriteMixLockEv(ptr dead_on_unwind noalias writable sret(%"struct.DeviceBase::MixLock") align 8, ptr noundef nonnull align 16 dereferenceable(107576)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10DeviceBase16handleDisconnectEPKcz(ptr noundef nonnull align 16 dereferenceable(107576) %0, ptr nocapture noundef readonly %1, ...) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"struct.DeviceBase::MixLock", align 8
  %4 = alloca %"class.std::variant.128", align 8
  %5 = alloca [1 x %struct.__va_list_tag], align 16
  %6 = alloca [1 x %struct.__va_list_tag], align 16
  %7 = alloca %"class.al::ptr_wrapper.158", align 8
  %8 = alloca %"class.al::ptr_wrapper.158", align 8
  %9 = alloca %"struct.std::pair", align 8
  %10 = alloca %"class.al::span.217", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  call void @_ZN10DeviceBase15getWriteMixLockEv(ptr dead_on_unwind nonnull writable sret(%"struct.DeviceBase::MixLock") align 8 %3, ptr noundef nonnull align 16 dereferenceable(107576) %0) #7
  %11 = call noundef zeroext i1 @_ZNSt6atomicIbE8exchangeEbSt12memory_order(ptr noundef nonnull align 1 dereferenceable(1) %0, i1 noundef zeroext false, i32 noundef 4) #7
  br i1 %11, label %12, label %78

12:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #7
  invoke void @_ZNSt7variantIJSt9monostate21AsyncSourceStateEvent24AsyncBufferCompleteEvent23AsyncEffectReleaseEvent20AsyncDisconnectEventEEC2IS4_JEvEESt15in_place_type_tIT_EDpOT0_(ptr noundef nonnull align 8 dereferenceable(33) %4)
          to label %13 unwind label %26

13:                                               ; preds = %12
  %14 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZSt3getI20AsyncDisconnectEventJSt9monostate21AsyncSourceStateEvent24AsyncBufferCompleteEvent23AsyncEffectReleaseEventS0_EERT_RSt7variantIJDpT0_EE(ptr noundef nonnull align 8 dereferenceable(33) %4)
          to label %15 unwind label %28

15:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #7
  call void @llvm.va_start.p0(ptr nonnull %5)
  call void @llvm.va_copy.p0(ptr nonnull %6, ptr nonnull %5)
  %16 = call i32 @vsnprintf(ptr noundef null, i64 noundef 0, ptr noundef %1, ptr noundef nonnull %5) #7
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %18, label %32

18:                                               ; preds = %15
  %19 = zext nneg i32 %16 to i64
  %20 = call noundef i64 @_Zli3_uzy(i64 noundef 1) #7
  %21 = add i64 %20, %19
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(32) %14, i64 noundef %21)
          to label %22 unwind label %30

22:                                               ; preds = %18
  %23 = call noundef ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  %24 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  %25 = call i32 @vsnprintf(ptr noundef %23, i64 noundef %24, ptr noundef %1, ptr noundef nonnull %6) #7
  br label %34

26:                                               ; preds = %12
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %77

28:                                               ; preds = %13
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %76

30:                                               ; preds = %32, %18
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %75

32:                                               ; preds = %15
  %33 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull @.str)
          to label %34 unwind label %30

34:                                               ; preds = %32, %22
  call void @llvm.va_end.p0(ptr nonnull %6)
  call void @llvm.va_end.p0(ptr nonnull %5)
  %35 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  br i1 %35, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %34, %39
  %36 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  %37 = load i8, ptr %36, align 1, !tbaa !5
  %38 = icmp eq i8 %37, 0
  br i1 %38, label %39, label %.critedge

39:                                               ; preds = %.lr.ph
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  %40 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  br i1 %40, label %.critedge, label %.lr.ph, !llvm.loop !8

.critedge:                                        ; preds = %.lr.ph, %39, %34
  %41 = getelementptr inbounds i8, ptr %0, i64 107568
  %42 = call noundef ptr @_ZNK2al17atomic_unique_ptrINS_9FlexArrayIP11ContextBaseLm8EEESt14default_deleteIS4_EE4loadESt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %41, i32 noundef 5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %43 = call ptr @_ZN2al9FlexArrayIP11ContextBaseLm8EE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %42) #7
  store ptr %43, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %44 = call ptr @_ZN2al9FlexArrayIP11ContextBaseLm8EE3endEv(ptr noundef nonnull align 8 dereferenceable(16) %42) #7
  store ptr %44, ptr %8, align 8
  %45 = call noundef zeroext i1 @_ZN2alneERKNS_11ptr_wrapperIPP11ContextBaseEES6_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  br i1 %45, label %.lr.ph37, label %._crit_edge

.lr.ph37:                                         ; preds = %.critedge
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  %46 = getelementptr inbounds i8, ptr %10, i64 8
  br label %47

._crit_edge:                                      ; preds = %69, %.critedge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  call void @_ZNSt8__detail9__variant16_Variant_storageILb0EJSt9monostate21AsyncSourceStateEvent24AsyncBufferCompleteEvent23AsyncEffectReleaseEvent20AsyncDisconnectEventEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %4) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #7
  br label %78

47:                                               ; preds = %.lr.ph37, %69
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK2al11ptr_wrapperIPP11ContextBaseEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  %49 = load ptr, ptr %48, align 8, !tbaa !10
  %50 = getelementptr inbounds i8, ptr %49, i64 272
  %51 = call noundef ptr @_ZNKSt10unique_ptrI10RingBufferSt14default_deleteIS0_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %50) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #7
  call void @_ZN10RingBuffer14getWriteVectorEv(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair") align 8 %9, ptr noundef nonnull align 64 dereferenceable(176) %51) #7
  %.sroa.03.0.copyload = load ptr, ptr %9, align 8, !tbaa !10
  %.sroa.5.0.copyload = load i64, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #7
  %.not = icmp eq i64 %.sroa.5.0.copyload, 0
  br i1 %.not, label %58, label %52

52:                                               ; preds = %47
  %53 = invoke noundef ptr @_ZN2al12construct_atISt7variantIJSt9monostate21AsyncSourceStateEvent24AsyncBufferCompleteEvent23AsyncEffectReleaseEvent20AsyncDisconnectEventEEJRS7_EEEPT_SA_DpOT0_(ptr noundef %.sroa.03.0.copyload, ptr noundef nonnull align 8 dereferenceable(33) %4)
          to label %54 unwind label %56

54:                                               ; preds = %52
  call void @_ZN10RingBuffer12writeAdvanceEm(ptr noundef nonnull align 64 dereferenceable(176) %51, i64 noundef 1) #7
  %55 = getelementptr inbounds i8, ptr %49, i64 240
  invoke void @_ZN2al9semaphore4postEv(ptr noundef nonnull align 8 dereferenceable(32) %55)
          to label %58 unwind label %56

56:                                               ; preds = %61, %54, %52
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %74

58:                                               ; preds = %54, %47
  %59 = getelementptr inbounds i8, ptr %49, i64 13
  %60 = call noundef zeroext i1 @_ZNKSt6atomicIbE4loadESt12memory_order(ptr noundef nonnull align 1 dereferenceable(1) %59, i32 noundef 5) #7
  br i1 %60, label %62, label %61

61:                                               ; preds = %58
  invoke void @_ZN12_GLOBAL__N_119ProcessVoiceChangesEP11ContextBase(ptr noundef %49)
          to label %69 unwind label %56

62:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #7
  %63 = call { ptr, i64 } @_ZNK11ContextBase21getVoicesSpanAcquiredEv(ptr noundef nonnull align 16 dereferenceable(432) %49) #7
  %64 = extractvalue { ptr, i64 } %63, 0
  store ptr %64, ptr %10, align 8
  %65 = extractvalue { ptr, i64 } %63, 1
  store i64 %65, ptr %46, align 8
  %66 = call ptr @_ZNK2al4spanIP5VoiceLm18446744073709551615EE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %10) #7
  %67 = call ptr @_ZNK2al4spanIP5VoiceLm18446744073709551615EE3endEv(ptr noundef nonnull align 8 dereferenceable(16) %10) #7
  invoke void @"_ZSt8for_eachIN2al11ptr_wrapperIPP5VoiceEEZN10DeviceBase16handleDisconnectEPKczE3$_0ET0_T_SB_SA_"(ptr %66, ptr %67)
          to label %68 unwind label %72

68:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  br label %69

69:                                               ; preds = %61, %68
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN2al11ptr_wrapperIPP11ContextBaseEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  %71 = call noundef zeroext i1 @_ZN2alneERKNS_11ptr_wrapperIPP11ContextBaseEES6_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  br i1 %71, label %47, label %._crit_edge

72:                                               ; preds = %62
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  br label %74

74:                                               ; preds = %72, %56
  %.pn = phi { ptr, i32 } [ %73, %72 ], [ %57, %56 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %75

75:                                               ; preds = %74, %30
  %.pn.pn = phi { ptr, i32 } [ %.pn, %74 ], [ %31, %30 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  br label %76

76:                                               ; preds = %75, %28
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %75 ], [ %29, %28 ]
  call void @_ZNSt8__detail9__variant16_Variant_storageILb0EJSt9monostate21AsyncSourceStateEvent24AsyncBufferCompleteEvent23AsyncEffectReleaseEvent20AsyncDisconnectEventEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %4) #7
  br label %77

77:                                               ; preds = %76, %26
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %76 ], [ %27, %26 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #7
  call void @_ZN10DeviceBase7MixLockD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %3) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn.pn.pn.pn

78:                                               ; preds = %._crit_edge, %2
  call void @_ZN10DeviceBase7MixLockD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %3) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt6atomicIbE8exchangeEbSt12memory_order(ptr noundef nonnull align 1 dereferenceable(1), i1 noundef zeroext, i32 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZSt3getI20AsyncDisconnectEventJSt9monostate21AsyncSourceStateEvent24AsyncBufferCompleteEvent23AsyncEffectReleaseEventS0_EERT_RSt7variantIJDpT0_EE(ptr noundef nonnull align 8 dereferenceable(33)) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.va_start.p0(ptr) #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.va_copy.p0(ptr, ptr) #3

; Function Attrs: nofree nounwind
declare noundef i32 @vsnprintf(ptr nocapture noundef, i64 noundef, ptr nocapture noundef readonly, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Zli3_uzy(i64 noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.va_end.p0(ptr) #3

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN2alneERKNS_11ptr_wrapperIPP11ContextBaseEES6_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

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

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

; Function Attrs: nounwind
declare void @_ZN10RingBuffer14getWriteVectorEv(ptr dead_on_unwind writable sret(%"struct.std::pair") align 8, ptr noundef nonnull align 64 dereferenceable(176)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN2al12construct_atISt7variantIJSt9monostate21AsyncSourceStateEvent24AsyncBufferCompleteEvent23AsyncEffectReleaseEvent20AsyncDisconnectEventEEJRS7_EEEPT_SA_DpOT0_(ptr noundef, ptr noundef nonnull align 8 dereferenceable(33)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10RingBuffer12writeAdvanceEm(ptr noundef nonnull align 64 dereferenceable(176), i64 noundef) local_unnamed_addr #1 align 2

declare void @_ZN2al9semaphore4postEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6atomicIbE4loadESt12memory_order(ptr noundef nonnull align 1 dereferenceable(1), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_119ProcessVoiceChangesEP11ContextBase(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, i64 } @_ZNK11ContextBase21getVoicesSpanAcquiredEv(ptr noundef nonnull align 16 dereferenceable(432)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZSt8for_eachIN2al11ptr_wrapperIPP5VoiceEEZN10DeviceBase16handleDisconnectEPKczE3$_0ET0_T_SB_SA_"(ptr, ptr) local_unnamed_addr #2

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

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

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

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

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 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #4 = { nofree 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 = { 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 = { "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 #7 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !6, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !6, i64 0}


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