; LLVM IR from kacperks/Fractal_Engine :: Engine/Thirdparty/cmake/Engine/Thirdparty/cmake/openal-soft/al (effect)

; 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.EffectList = type { [16 x i8], i32, i32 }
%"class.al::intrusive_ptr" = type { ptr }
%"class.std::lock_guard" = type { ptr }
%struct.ALCcontext = type { %"class.al::intrusive_ref", [12 x i8], %struct.ContextBase, %"class.al::intrusive_ptr.25", %"class.std::vector.26", %"struct.al::atomic_invflag", %"struct.std::atomic.0", %"class.std::mutex", %"struct.std::atomic.30", i8, i8, float, float, float, %"class.std::mutex", ptr, ptr, %struct.ALlistener, %"class.std::vector.33", i32, %"class.std::mutex", %"class.std::vector.37", i32, %"class.std::mutex", %"class.std::unique_ptr.41", ptr }
%"class.al::intrusive_ref" = type { %"struct.std::atomic" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%struct.ContextBase = type { ptr, %"struct.std::atomic", %"struct.std::atomic.0", %"struct.std::atomic.0", float, %"struct.std::atomic.2", %"struct.std::atomic.4", %"struct.std::atomic.6", %"struct.std::atomic.8", ptr, %"struct.std::atomic.10", [8 x i8], %struct.ContextParams, %"struct.std::atomic.13", %"struct.std::atomic.15", %"struct.std::atomic.17", %"class.std::thread", %"class.al::semaphore", %"class.std::unique_ptr", %"struct.std::atomic", %"class.std::vector", %"class.std::vector.21" }
%"struct.std::atomic.2" = type { %"struct.std::__atomic_base.3" }
%"struct.std::__atomic_base.3" = type { ptr }
%"struct.std::atomic.4" = type { %"struct.std::__atomic_base.5" }
%"struct.std::__atomic_base.5" = type { ptr }
%"struct.std::atomic.6" = type { %"struct.std::__atomic_base.7" }
%"struct.std::__atomic_base.7" = type { ptr }
%"struct.std::atomic.8" = type { %"struct.std::__atomic_base.9" }
%"struct.std::__atomic_base.9" = type { ptr }
%"struct.std::atomic.10" = type { %"struct.std::__atomic_base.11" }
%"struct.std::__atomic_base.11" = type { ptr }
%struct.ContextParams = type <{ %"struct.std::atomic.2", %"struct.std::atomic.4", %"class.alu::VectorR", %"class.alu::MatrixR", %"class.alu::VectorR", float, float, float, float, i8, i8, [14 x i8] }>
%"class.alu::MatrixR" = type { %"struct.std::array.12" }
%"struct.std::array.12" = type { [16 x float] }
%"class.alu::VectorR" = type { %"struct.std::array" }
%"struct.std::array" = type { [4 x float] }
%"struct.std::atomic.13" = type { %"struct.std::__atomic_base.14" }
%"struct.std::__atomic_base.14" = type { ptr }
%"struct.std::atomic.15" = type { %"struct.std::__atomic_base.16" }
%"struct.std::__atomic_base.16" = type { i64 }
%"struct.std::atomic.17" = type { %"struct.std::__atomic_base.18" }
%"struct.std::__atomic_base.18" = 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" = 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.20" }
%"struct.std::_Head_base.20" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::unique_ptr<VoiceChange[]>, al::allocator<std::unique_ptr<VoiceChange[]>, 8>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<VoiceChange[]>, al::allocator<std::unique_ptr<VoiceChange[]>, 8>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<VoiceChange[]>, al::allocator<std::unique_ptr<VoiceChange[]>, 8>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<VoiceChange[]>, al::allocator<std::unique_ptr<VoiceChange[]>, 8>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.21" = type { %"struct.std::_Vector_base.22" }
%"struct.std::_Vector_base.22" = type { %"struct.std::_Vector_base<std::unique_ptr<Voice[]>, al::allocator<std::unique_ptr<Voice[]>, 8>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<Voice[]>, al::allocator<std::unique_ptr<Voice[]>, 8>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<Voice[]>, al::allocator<std::unique_ptr<Voice[]>, 8>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<Voice[]>, al::allocator<std::unique_ptr<Voice[]>, 8>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.al::intrusive_ptr.25" = type { ptr }
%"class.std::vector.26" = type { %"struct.std::_Vector_base.27" }
%"struct.std::_Vector_base.27" = type { %"struct.std::_Vector_base<std::unique_ptr<WetBuffer>, al::allocator<std::unique_ptr<WetBuffer>, 8>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<WetBuffer>, al::allocator<std::unique_ptr<WetBuffer>, 8>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<WetBuffer>, al::allocator<std::unique_ptr<WetBuffer>, 8>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<WetBuffer>, al::allocator<std::unique_ptr<WetBuffer>, 8>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.al::atomic_invflag" = type { %"struct.std::atomic_flag" }
%"struct.std::atomic_flag" = type { %"struct.std::__atomic_flag_base" }
%"struct.std::__atomic_flag_base" = type { i8 }
%"struct.std::atomic.0" = type { %"struct.std::__atomic_base.1" }
%"struct.std::__atomic_base.1" = type { i8 }
%"struct.std::atomic.30" = type { %"struct.std::__atomic_base.31" }
%"struct.std::__atomic_base.31" = type { i32 }
%struct.ALlistener = type <{ %"struct.std::array.32", %"struct.std::array.32", %"struct.std::array.32", %"struct.std::array.32", float, float, %"struct.al::atomic_invflag", [3 x i8] }>
%"struct.std::array.32" = type { [3 x float] }
%"class.std::vector.33" = type { %"struct.std::_Vector_base.34" }
%"struct.std::_Vector_base.34" = type { %"struct.std::_Vector_base<SourceSubList, al::allocator<SourceSubList, 8>>::_Vector_impl" }
%"struct.std::_Vector_base<SourceSubList, al::allocator<SourceSubList, 8>>::_Vector_impl" = type { %"struct.std::_Vector_base<SourceSubList, al::allocator<SourceSubList, 8>>::_Vector_impl_data" }
%"struct.std::_Vector_base<SourceSubList, al::allocator<SourceSubList, 8>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.37" = type { %"struct.std::_Vector_base.38" }
%"struct.std::_Vector_base.38" = type { %"struct.std::_Vector_base<EffectSlotSubList, al::allocator<EffectSlotSubList, 8>>::_Vector_impl" }
%"struct.std::_Vector_base<EffectSlotSubList, al::allocator<EffectSlotSubList, 8>>::_Vector_impl" = type { %"struct.std::_Vector_base<EffectSlotSubList, al::allocator<EffectSlotSubList, 8>>::_Vector_impl_data" }
%"struct.std::_Vector_base<EffectSlotSubList, al::allocator<EffectSlotSubList, 8>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::mutex" = type { %"class.std::__mutex_base" }
%"class.std::__mutex_base" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::unique_ptr.41" = type { %"struct.std::__uniq_ptr_data.42" }
%"struct.std::__uniq_ptr_data.42" = type { %"class.std::__uniq_ptr_impl.43" }
%"class.std::__uniq_ptr_impl.43" = type { %"class.std::tuple.44" }
%"class.std::tuple.44" = type { %"struct.std::_Tuple_impl.45" }
%"struct.std::_Tuple_impl.45" = type { %"struct.std::_Head_base.48" }
%"struct.std::_Head_base.48" = type { ptr }
%struct.ALCdevice = type { %"class.al::intrusive_ref.49", [12 x i8], %struct.DeviceBase, i32, i32, i32, i32, %"class.std::__cxx11::basic_string", %"class.std::vector.120", i32, i32, %"struct.std::atomic.30", %"class.std::mutex", %"class.std::vector.124", %"class.std::mutex", %"class.std::vector.128", %"class.std::mutex", %"class.std::vector.132", [8 x i8] }
%"class.al::intrusive_ref.49" = type { %"struct.std::atomic" }
%struct.DeviceBase = type { %"struct.std::atomic.0", i8, i32, i32, i32, i8, i8, i8, i32, float, i8, i8, %"class.std::__cxx11::basic_string", %"class.std::bitset", i32, i8, float, i32, %"class.std::chrono::duration", %"class.std::chrono::duration", [8 x i8], %"struct.std::array.50", [1024 x float], [1024 x float], %union.anon.52, [1408 x %"struct.std::array.53"], %"class.std::vector.54", %struct.MixParams, [4 x i32], %struct.RealMixParams, %"class.std::unique_ptr.61", %"class.al::intrusive_ptr.69", i32, %"class.std::unique_ptr.70", %"class.std::unique_ptr.78", %"class.std::unique_ptr.86", { i64, i64 }, %"class.std::unique_ptr.94", %"class.std::unique_ptr.102", float, i32, %"struct.std::atomic", %"struct.std::atomic.110", %"class.std::mutex", %"class.std::unique_ptr.112" }
%"class.std::bitset" = type { %"struct.std::_Base_bitset" }
%"struct.std::_Base_bitset" = type { i64 }
%"class.std::chrono::duration" = type { i64 }
%"struct.std::array.50" = type { [16 x %"struct.std::array.51"] }
%"struct.std::array.51" = type { [1200 x float] }
%union.anon.52 = type { [1088 x float] }
%"struct.std::array.53" = type { [2 x float] }
%"class.std::vector.54" = type { %"struct.std::_Vector_base.55" }
%"struct.std::_Vector_base.55" = 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.58", %"class.al::span" }
%"struct.std::array.58" = type { [16 x %struct.BFChannelConfig] }
%struct.BFChannelConfig = type { float, i32 }
%"class.al::span" = type { ptr, ptr }
%struct.RealMixParams = type { %"class.al::span.59", %"struct.std::array.60", %"class.al::span" }
%"class.al::span.59" = type { ptr, ptr }
%"struct.std::array.60" = type { [16 x i32] }
%"class.std::unique_ptr.61" = type { %"struct.std::__uniq_ptr_data.62" }
%"struct.std::__uniq_ptr_data.62" = type { %"class.std::__uniq_ptr_impl.63" }
%"class.std::__uniq_ptr_impl.63" = type { %"class.std::tuple.64" }
%"class.std::tuple.64" = type { %"struct.std::_Tuple_impl.65" }
%"struct.std::_Tuple_impl.65" = type { %"struct.std::_Head_base.68" }
%"struct.std::_Head_base.68" = type { ptr }
%"class.al::intrusive_ptr.69" = type { ptr }
%"class.std::unique_ptr.70" = type { %"struct.std::__uniq_ptr_data.71" }
%"struct.std::__uniq_ptr_data.71" = type { %"class.std::__uniq_ptr_impl.72" }
%"class.std::__uniq_ptr_impl.72" = type { %"class.std::tuple.73" }
%"class.std::tuple.73" = type { %"struct.std::_Tuple_impl.74" }
%"struct.std::_Tuple_impl.74" = type { %"struct.std::_Head_base.77" }
%"struct.std::_Head_base.77" = type { ptr }
%"class.std::unique_ptr.78" = type { %"struct.std::__uniq_ptr_data.79" }
%"struct.std::__uniq_ptr_data.79" = type { %"class.std::__uniq_ptr_impl.80" }
%"class.std::__uniq_ptr_impl.80" = type { %"class.std::tuple.81" }
%"class.std::tuple.81" = type { %"struct.std::_Tuple_impl.82" }
%"struct.std::_Tuple_impl.82" = type { %"struct.std::_Head_base.85" }
%"struct.std::_Head_base.85" = type { ptr }
%"class.std::unique_ptr.86" = type { %"struct.std::__uniq_ptr_data.87" }
%"struct.std::__uniq_ptr_data.87" = type { %"class.std::__uniq_ptr_impl.88" }
%"class.std::__uniq_ptr_impl.88" = type { %"class.std::tuple.89" }
%"class.std::tuple.89" = type { %"struct.std::_Tuple_impl.90" }
%"struct.std::_Tuple_impl.90" = type { %"struct.std::_Head_base.93" }
%"struct.std::_Head_base.93" = type { ptr }
%"class.std::unique_ptr.94" = type { %"struct.std::__uniq_ptr_data.95" }
%"struct.std::__uniq_ptr_data.95" = type { %"class.std::__uniq_ptr_impl.96" }
%"class.std::__uniq_ptr_impl.96" = type { %"class.std::tuple.97" }
%"class.std::tuple.97" = type { %"struct.std::_Tuple_impl.98" }
%"struct.std::_Tuple_impl.98" = type { %"struct.std::_Head_base.101" }
%"struct.std::_Head_base.101" = type { ptr }
%"class.std::unique_ptr.102" = type { %"struct.std::__uniq_ptr_data.103" }
%"struct.std::__uniq_ptr_data.103" = type { %"class.std::__uniq_ptr_impl.104" }
%"class.std::__uniq_ptr_impl.104" = type { %"class.std::tuple.105" }
%"class.std::tuple.105" = type { %"struct.std::_Tuple_impl.106" }
%"struct.std::_Tuple_impl.106" = type { %"struct.std::_Head_base.109" }
%"struct.std::_Head_base.109" = type { ptr }
%"struct.std::atomic.110" = type { %"struct.std::__atomic_base.111" }
%"struct.std::__atomic_base.111" = type { ptr }
%"class.std::unique_ptr.112" = type { %"struct.std::__uniq_ptr_data.113" }
%"struct.std::__uniq_ptr_data.113" = type { %"class.std::__uniq_ptr_impl.114" }
%"class.std::__uniq_ptr_impl.114" = type { %"class.std::tuple.115" }
%"class.std::tuple.115" = type { %"struct.std::_Tuple_impl.116" }
%"struct.std::_Tuple_impl.116" = type { %"struct.std::_Head_base.119" }
%"struct.std::_Head_base.119" = type { ptr }
%"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::vector.120" = type { %"struct.std::_Vector_base.121" }
%"struct.std::_Vector_base.121" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, al::allocator<std::__cxx11::basic_string<char>, 8>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, al::allocator<std::__cxx11::basic_string<char>, 8>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, al::allocator<std::__cxx11::basic_string<char>, 8>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, al::allocator<std::__cxx11::basic_string<char>, 8>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.124" = type { %"struct.std::_Vector_base.125" }
%"struct.std::_Vector_base.125" = type { %"struct.std::_Vector_base<BufferSubList, al::allocator<BufferSubList, 8>>::_Vector_impl" }
%"struct.std::_Vector_base<BufferSubList, al::allocator<BufferSubList, 8>>::_Vector_impl" = type { %"struct.std::_Vector_base<BufferSubList, al::allocator<BufferSubList, 8>>::_Vector_impl_data" }
%"struct.std::_Vector_base<BufferSubList, al::allocator<BufferSubList, 8>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.128" = type { %"struct.std::_Vector_base.129" }
%"struct.std::_Vector_base.129" = type { %"struct.std::_Vector_base<EffectSubList, al::allocator<EffectSubList, 8>>::_Vector_impl" }
%"struct.std::_Vector_base<EffectSubList, al::allocator<EffectSubList, 8>>::_Vector_impl" = type { %"struct.std::_Vector_base<EffectSubList, al::allocator<EffectSubList, 8>>::_Vector_impl_data" }
%"struct.std::_Vector_base<EffectSubList, al::allocator<EffectSubList, 8>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.132" = type { %"struct.std::_Vector_base.133" }
%"struct.std::_Vector_base.133" = type { %"struct.std::_Vector_base<FilterSubList, al::allocator<FilterSubList, 8>>::_Vector_impl" }
%"struct.std::_Vector_base<FilterSubList, al::allocator<FilterSubList, 8>>::_Vector_impl" = type { %"struct.std::_Vector_base<FilterSubList, al::allocator<FilterSubList, 8>>::_Vector_impl_data" }
%"struct.std::_Vector_base<FilterSubList, al::allocator<FilterSubList, 8>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@gEffectList = external dso_local constant [16 x %struct.EffectList], align 16
@DisabledEffects = external dso_local global [15 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [33 x i8], align 1
@_ZTI16effect_exception = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

declare void @_Z13GetContextRefv(ptr dead_on_unwind writable sret(%"class.al::intrusive_ptr") align 8) #1

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #3

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

declare void @_ZN10ALCcontext8setErrorEiPKcz(ptr noundef nonnull align 16 dereferenceable(752), i32 noundef, ptr noundef, ...) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4 align 2

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

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

declare ptr @__cxa_begin_catch(ptr)

; Function Attrs: noreturn nounwind
declare void @_ZSt9terminatev() #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZN12_GLOBAL__N_112LookupEffectEP9ALCdevicej(ptr noundef, i32 noundef) #6

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z9alEffectijii(i32 noundef %0, i32 noundef %1, i32 noundef %2) #2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.al::intrusive_ptr", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca %"class.std::lock_guard", align 8
  %13 = alloca ptr, align 8
  %14 = alloca i8, align 1
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  store i32 %0, ptr %4, align 4, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #9
  invoke void @_Z13GetContextRefv(ptr dead_on_unwind writable sret(%"class.al::intrusive_ptr") align 8 %7)
          to label %20 unwind label %29

20:                                               ; preds = %3
  %21 = call noundef zeroext i1 @_ZNK2al13intrusive_ptrI10ALCcontextEcvbEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #9
  %22 = xor i1 %21, true
  %23 = xor i1 %22, true
  %24 = xor i1 %23, true
  %25 = zext i1 %24 to i64
  %26 = call i64 @llvm.expect.i64(i64 %25, i64 0)
  %27 = icmp ne i64 %26, 0
  br i1 %27, label %28, label %33

28:                                               ; preds = %20
  store i32 1, ptr %10, align 4
  br label %156

29:                                               ; preds = %3
  %30 = landingpad { ptr, i32 }
          catch ptr null
  %31 = extractvalue { ptr, i32 } %30, 0
  store ptr %31, ptr %8, align 8
  %32 = extractvalue { ptr, i32 } %30, 1
  store i32 %32, ptr %9, align 4
  br label %161

33:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  %34 = call noundef ptr @_ZNK2al13intrusive_ptrI10ALCcontextEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #9
  %35 = getelementptr inbounds %struct.ALCcontext, ptr %34, i32 0, i32 3
  %36 = call noundef ptr @_ZNK2al13intrusive_ptrI9ALCdeviceE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %35) #9
  store ptr %36, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  %37 = load ptr, ptr %11, align 8, !tbaa !9
  %38 = getelementptr inbounds %struct.ALCdevice, ptr %37, i32 0, i32 14
  invoke void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(40) %38)
          to label %39 unwind label %56

39:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  %40 = load ptr, ptr %11, align 8, !tbaa !9
  %41 = load i32, ptr %4, align 4, !tbaa !5
  %42 = invoke noundef ptr @_ZN12_GLOBAL__N_112LookupEffectEP9ALCdevicej(ptr noundef %40, i32 noundef %41)
          to label %43 unwind label %60

43:                                               ; preds = %39
  store ptr %42, ptr %13, align 8, !tbaa !9
  %44 = load ptr, ptr %13, align 8, !tbaa !9
  %45 = icmp ne ptr %44, null
  %46 = xor i1 %45, true
  %47 = xor i1 %46, true
  %48 = xor i1 %47, true
  %49 = zext i1 %48 to i64
  %50 = call i64 @llvm.expect.i64(i64 %49, i64 0)
  %51 = icmp ne i64 %50, 0
  br i1 %51, label %52, label %64

52:                                               ; preds = %43
  %53 = call noundef ptr @_ZNK2al13intrusive_ptrI10ALCcontextEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #9
  %54 = load i32, ptr %4, align 4, !tbaa !5
  invoke void (ptr, i32, ptr, ...) @_ZN10ALCcontext8setErrorEiPKcz(ptr noundef nonnull align 16 dereferenceable(752) %53, i32 noundef 40961, ptr noundef @.str.5, i32 noundef %54)
          to label %55 unwind label %60

55:                                               ; preds = %52
  br label %155

56:                                               ; preds = %33
  %57 = landingpad { ptr, i32 }
          catch ptr null
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %8, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %9, align 4
  br label %160

60:                                               ; preds = %52, %39
  %61 = landingpad { ptr, i32 }
          catch ptr null
  %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 %159

64:                                               ; preds = %43
  %65 = load i32, ptr %5, align 4, !tbaa !5
  %66 = icmp eq i32 %65, 32769
  br i1 %66, label %67, label %120

67:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #9
  %68 = load i32, ptr %6, align 4, !tbaa !5
  %69 = icmp eq i32 %68, 0
  %70 = zext i1 %69 to i8
  store i8 %70, ptr %14, align 1, !tbaa !11
  %71 = load i8, ptr %14, align 1, !tbaa !11, !range !13, !noundef !14
  %72 = trunc i8 %71 to i1
  br i1 %72, label %104, label %73

73:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  store ptr @gEffectList, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  store ptr @gEffectList, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #9
  store ptr getelementptr inbounds (%struct.EffectList, ptr @gEffectList, i64 16), ptr %17, align 8, !tbaa !9
  br label %74

74:                                               ; preds = %99, %73
  %75 = load ptr, ptr %16, align 8, !tbaa !9
  %76 = load ptr, ptr %17, align 8, !tbaa !9
  %77 = icmp ne ptr %75, %76
  br i1 %77, label %79, label %78

78:                                               ; preds = %74
  store i32 2, ptr %10, align 4
  br label %102

79:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  %80 = load ptr, ptr %16, align 8, !tbaa !9
  store ptr %80, ptr %18, align 8, !tbaa !9
  %81 = load i32, ptr %6, align 4, !tbaa !5
  %82 = load ptr, ptr %18, align 8, !tbaa !9
  %83 = getelementptr inbounds %struct.EffectList, ptr %82, i32 0, i32 2
  %84 = load i32, ptr %83, align 4, !tbaa !15
  %85 = icmp eq i32 %81, %84
  br i1 %85, label %86, label %95

86:                                               ; preds = %79
  %87 = load ptr, ptr %18, align 8, !tbaa !9
  %88 = getelementptr inbounds %struct.EffectList, ptr %87, i32 0, i32 1
  %89 = load i32, ptr %88, align 4, !tbaa !17
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [15 x i8], ptr @DisabledEffects, i64 0, i64 %90
  %92 = load i8, ptr %91, align 1, !tbaa !11, !range !13, !noundef !14
  %93 = trunc i8 %92 to i1
  br i1 %93, label %95, label %94

94:                                               ; preds = %86
  store i8 1, ptr %14, align 1, !tbaa !11
  store i32 2, ptr %10, align 4
  br label %96

95:                                               ; preds = %86, %79
  store i32 0, ptr %10, align 4
  br label %96

96:                                               ; preds = %95, %94
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  %97 = load i32, ptr %10, align 4
  switch i32 %97, label %102 [
    i32 0, label %98
  ]

98:                                               ; preds = %96
  br label %99

99:                                               ; preds = %98
  %100 = load ptr, ptr %16, align 8, !tbaa !9
  %101 = getelementptr inbounds %struct.EffectList, ptr %100, i32 1
  store ptr %101, ptr %16, align 8, !tbaa !9
  br label %74

102:                                              ; preds = %96, %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  br label %103

103:                                              ; preds = %102
  br label %104

104:                                              ; preds = %103, %67
  %105 = load i8, ptr %14, align 1, !tbaa !11, !range !13, !noundef !14
  %106 = trunc i8 %105 to i1
  br i1 %106, label %107, label %115

107:                                              ; preds = %104
  %108 = load ptr, ptr %13, align 8, !tbaa !9
  %109 = load i32, ptr %6, align 4, !tbaa !5
  invoke void @_ZN12_GLOBAL__N_116InitEffectParamsEP8ALeffecti(ptr noundef %108, i32 noundef %109)
          to label %110 unwind label %111

110:                                              ; preds = %107
  br label %119

111:                                              ; preds = %115, %107
  %112 = landingpad { ptr, i32 }
          catch ptr null
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %8, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #9
  br label %159

115:                                              ; preds = %104
  %116 = call noundef ptr @_ZNK2al13intrusive_ptrI10ALCcontextEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #9
  %117 = load i32, ptr %6, align 4, !tbaa !5
  invoke void (ptr, i32, ptr, ...) @_ZN10ALCcontext8setErrorEiPKcz(ptr noundef nonnull align 16 dereferenceable(752) %116, i32 noundef 40963, ptr noundef @.str.6, i32 noundef %117)
          to label %118 unwind label %111

118:                                              ; preds = %115
  br label %119

119:                                              ; preds = %118, %110
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #9
  br label %154

120:                                              ; preds = %64
  %121 = load ptr, ptr %13, align 8, !tbaa !9
  %122 = load i32, ptr %5, align 4, !tbaa !5
  %123 = load i32, ptr %6, align 4, !tbaa !5
  invoke void @_ZN12_GLOBAL__N_118ALeffect_setParamiEP8ALeffectii(ptr noundef %121, i32 noundef %122, i32 noundef %123)
          to label %124 unwind label %125

124:                                              ; preds = %120
  br label %143

125:                                              ; preds = %120
  %126 = landingpad { ptr, i32 }
          catch ptr @_ZTI16effect_exception
          catch ptr null
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %8, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %9, align 4
  br label %129

129:                                              ; preds = %125
  %130 = load i32, ptr %9, align 4
  %131 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTI16effect_exception) #9
  %132 = icmp eq i32 %130, %131
  br i1 %132, label %133, label %159

133:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  %134 = load ptr, ptr %8, align 8
  %135 = call ptr @__cxa_begin_catch(ptr %134) #9
  store ptr %135, ptr %19, align 8
  %136 = call noundef ptr @_ZNK2al13intrusive_ptrI10ALCcontextEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #9
  %137 = load ptr, ptr %19, align 8, !tbaa !9
  %138 = call noundef i32 @_ZNK16effect_exception9errorCodeEv(ptr noundef nonnull align 8 dereferenceable(48) %137) #9
  %139 = load ptr, ptr %19, align 8, !tbaa !9
  %140 = call noundef ptr @_ZNK2al14base_exception4whatEv(ptr noundef nonnull align 8 dereferenceable(40) %139) #9
  invoke void (ptr, i32, ptr, ...) @_ZN10ALCcontext8setErrorEiPKcz(ptr noundef nonnull align 16 dereferenceable(752) %136, i32 noundef %138, ptr noundef @.str.7, ptr noundef %140)
          to label %141 unwind label %144

141:                                              ; preds = %133
  invoke void @__cxa_end_catch()
          to label %142 unwind label %148

142:                                              ; preds = %141
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  br label %143

143:                                              ; preds = %142, %124
  br label %154

144:                                              ; preds = %133
  %145 = landingpad { ptr, i32 }
          catch ptr null
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %8, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %9, align 4
  invoke void @__cxa_end_catch()
          to label %152 unwind label %166

148:                                              ; preds = %141
  %149 = landingpad { ptr, i32 }
          catch ptr null
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %8, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %9, align 4
  br label %153

152:                                              ; preds = %144
  br label %153

153:                                              ; preds = %152, %148
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  br label %159

154:                                              ; preds = %143, %119
  br label %155

155:                                              ; preds = %154, %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  store i32 0, ptr %10, align 4
  br label %156

156:                                              ; preds = %155, %28
  call void @_ZN2al13intrusive_ptrI10ALCcontextED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  %157 = load i32, ptr %10, align 4
  switch i32 %157, label %169 [
    i32 0, label %158
    i32 1, label %165
  ]

158:                                              ; preds = %156
  br label %165

159:                                              ; preds = %153, %129, %111, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #9
  br label %160

160:                                              ; preds = %159, %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @_ZN2al13intrusive_ptrI10ALCcontextED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #9
  br label %161

161:                                              ; preds = %160, %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  br label %162

162:                                              ; preds = %161
  %163 = load ptr, ptr %8, align 8
  %164 = call ptr @__cxa_begin_catch(ptr %163) #9
  call void @_ZSt9terminatev() #10
  unreachable

165:                                              ; preds = %158, %156
  ret void

166:                                              ; preds = %144
  %167 = landingpad { ptr, i32 }
          catch ptr null
  %168 = extractvalue { ptr, i32 } %167, 0
  call void @__clang_call_terminate(ptr %168) #10
  unreachable

169:                                              ; preds = %156
  unreachable
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_116InitEffectParamsEP8ALeffecti(ptr noundef, i32 noundef) #4

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_118ALeffect_setParamiEP8ALeffectii(ptr noundef, i32 noundef, i32 noundef) #4

; Function Attrs: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #7

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

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

declare void @__cxa_end_catch()

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #8

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #4 = { 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 #5 = { noreturn 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 = { inlinehint 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 #7 = { nounwind memory(none) }
attributes #8 = { noinline noreturn nounwind uwtable "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 #9 = { nounwind }
attributes #10 = { noreturn 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !6, i64 20}
!16 = !{!"_ZTS10EffectList", !7, i64 0, !6, i64 16, !6, i64 20}
!17 = !{!16, !6, i64 16}


; 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.EffectList = type { [16 x i8], i32, i32 }
%"class.al::intrusive_ptr" = type { ptr }
%"class.std::lock_guard" = type { ptr }

@gEffectList = external dso_local local_unnamed_addr constant [16 x %struct.EffectList], align 16
@DisabledEffects = external dso_local local_unnamed_addr global [15 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [33 x i8], align 1
@_ZTI16effect_exception = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

declare void @_Z13GetContextRefv(ptr dead_on_unwind writable sret(%"class.al::intrusive_ptr") align 8) local_unnamed_addr #1

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

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

declare void @_ZN10ALCcontext8setErrorEiPKcz(ptr noundef nonnull align 16 dereferenceable(752), i32 noundef, ptr noundef, ...) local_unnamed_addr #1

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

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

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

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

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

; Function Attrs: noreturn nounwind
declare void @_ZSt9terminatev() local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZN12_GLOBAL__N_112LookupEffectEP9ALCdevicej(ptr noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z9alEffectijii(i32 noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.al::intrusive_ptr", align 8
  %5 = alloca %"class.std::lock_guard", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  invoke void @_Z13GetContextRefv(ptr dead_on_unwind nonnull writable sret(%"class.al::intrusive_ptr") align 8 %4)
          to label %6 unwind label %8

6:                                                ; preds = %3
  %7 = call noundef zeroext i1 @_ZNK2al13intrusive_ptrI10ALCcontextEcvbEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  br i1 %7, label %11, label %179, !prof !5

8:                                                ; preds = %3
  %9 = landingpad { ptr, i32 }
          catch ptr null
  %10 = extractvalue { ptr, i32 } %9, 0
  br label %182

11:                                               ; preds = %6
  %12 = call noundef ptr @_ZNK2al13intrusive_ptrI10ALCcontextEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  %13 = getelementptr inbounds i8, ptr %12, i64 368
  %14 = call noundef ptr @_ZNK2al13intrusive_ptrI9ALCdeviceE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  %15 = getelementptr inbounds i8, ptr %14, i64 101320
  invoke void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(40) %15)
          to label %16 unwind label %20

16:                                               ; preds = %11
  %17 = call noundef ptr @_ZN12_GLOBAL__N_112LookupEffectEP9ALCdevicej(ptr noundef %14, i32 noundef %0)
  %.not = icmp eq ptr %17, null
  br i1 %.not, label %18, label %25, !prof !6

18:                                               ; preds = %16
  %19 = call noundef ptr @_ZNK2al13intrusive_ptrI10ALCcontextEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  invoke void (ptr, i32, ptr, ...) @_ZN10ALCcontext8setErrorEiPKcz(ptr noundef nonnull align 16 dereferenceable(752) %19, i32 noundef 40961, ptr noundef nonnull @.str.5, i32 noundef %0)
          to label %178 unwind label %23

20:                                               ; preds = %11
  %21 = landingpad { ptr, i32 }
          catch ptr null
  %22 = extractvalue { ptr, i32 } %21, 0
  br label %181

23:                                               ; preds = %18
  %24 = landingpad { ptr, i32 }
          catch ptr null
  br label %.sink.split

25:                                               ; preds = %16
  %26 = icmp eq i32 %1, 32769
  br i1 %26, label %27, label %161

27:                                               ; preds = %25
  %28 = icmp eq i32 %2, 0
  br i1 %28, label %.thread39, label %.preheader.preheader

.preheader.preheader:                             ; preds = %27
  %29 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 20), align 4, !tbaa !7
  %30 = icmp eq i32 %29, %2
  br i1 %30, label %31, label %.preheader.1

31:                                               ; preds = %.preheader.preheader
  %32 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 16), align 16, !tbaa !12
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [15 x i8], ptr @DisabledEffects, i64 0, i64 %33
  %35 = load i8, ptr %34, align 1, !tbaa !13, !range !15, !noundef !16
  %36 = trunc nuw i8 %35 to i1
  br i1 %36, label %.preheader.1, label %.thread39

.preheader.1:                                     ; preds = %.preheader.preheader, %31
  %37 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 44), align 4, !tbaa !7
  %38 = icmp eq i32 %37, %2
  br i1 %38, label %39, label %.preheader.2

39:                                               ; preds = %.preheader.1
  %40 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 40), align 8, !tbaa !12
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [15 x i8], ptr @DisabledEffects, i64 0, i64 %41
  %43 = load i8, ptr %42, align 1, !tbaa !13, !range !15, !noundef !16
  %44 = trunc nuw i8 %43 to i1
  br i1 %44, label %.preheader.2, label %.thread39

.preheader.2:                                     ; preds = %39, %.preheader.1
  %45 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 68), align 4, !tbaa !7
  %46 = icmp eq i32 %45, %2
  br i1 %46, label %47, label %.preheader.3

47:                                               ; preds = %.preheader.2
  %48 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 64), align 16, !tbaa !12
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [15 x i8], ptr @DisabledEffects, i64 0, i64 %49
  %51 = load i8, ptr %50, align 1, !tbaa !13, !range !15, !noundef !16
  %52 = trunc nuw i8 %51 to i1
  br i1 %52, label %.preheader.3, label %.thread39

.preheader.3:                                     ; preds = %47, %.preheader.2
  %53 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 92), align 4, !tbaa !7
  %54 = icmp eq i32 %53, %2
  br i1 %54, label %55, label %.preheader.4

55:                                               ; preds = %.preheader.3
  %56 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 88), align 8, !tbaa !12
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [15 x i8], ptr @DisabledEffects, i64 0, i64 %57
  %59 = load i8, ptr %58, align 1, !tbaa !13, !range !15, !noundef !16
  %60 = trunc nuw i8 %59 to i1
  br i1 %60, label %.preheader.4, label %.thread39

.preheader.4:                                     ; preds = %55, %.preheader.3
  %61 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 116), align 4, !tbaa !7
  %62 = icmp eq i32 %61, %2
  br i1 %62, label %63, label %.preheader.5

63:                                               ; preds = %.preheader.4
  %64 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 112), align 16, !tbaa !12
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [15 x i8], ptr @DisabledEffects, i64 0, i64 %65
  %67 = load i8, ptr %66, align 1, !tbaa !13, !range !15, !noundef !16
  %68 = trunc nuw i8 %67 to i1
  br i1 %68, label %.preheader.5, label %.thread39

.preheader.5:                                     ; preds = %63, %.preheader.4
  %69 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 140), align 4, !tbaa !7
  %70 = icmp eq i32 %69, %2
  br i1 %70, label %71, label %.preheader.6

71:                                               ; preds = %.preheader.5
  %72 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 136), align 8, !tbaa !12
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [15 x i8], ptr @DisabledEffects, i64 0, i64 %73
  %75 = load i8, ptr %74, align 1, !tbaa !13, !range !15, !noundef !16
  %76 = trunc nuw i8 %75 to i1
  br i1 %76, label %.preheader.6, label %.thread39

.preheader.6:                                     ; preds = %71, %.preheader.5
  %77 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 164), align 4, !tbaa !7
  %78 = icmp eq i32 %77, %2
  br i1 %78, label %79, label %.preheader.7

79:                                               ; preds = %.preheader.6
  %80 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 160), align 16, !tbaa !12
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [15 x i8], ptr @DisabledEffects, i64 0, i64 %81
  %83 = load i8, ptr %82, align 1, !tbaa !13, !range !15, !noundef !16
  %84 = trunc nuw i8 %83 to i1
  br i1 %84, label %.preheader.7, label %.thread39

.preheader.7:                                     ; preds = %79, %.preheader.6
  %85 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 188), align 4, !tbaa !7
  %86 = icmp eq i32 %85, %2
  br i1 %86, label %87, label %.preheader.8

87:                                               ; preds = %.preheader.7
  %88 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 184), align 8, !tbaa !12
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [15 x i8], ptr @DisabledEffects, i64 0, i64 %89
  %91 = load i8, ptr %90, align 1, !tbaa !13, !range !15, !noundef !16
  %92 = trunc nuw i8 %91 to i1
  br i1 %92, label %.preheader.8, label %.thread39

.preheader.8:                                     ; preds = %87, %.preheader.7
  %93 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 212), align 4, !tbaa !7
  %94 = icmp eq i32 %93, %2
  br i1 %94, label %95, label %.preheader.9

95:                                               ; preds = %.preheader.8
  %96 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 208), align 16, !tbaa !12
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [15 x i8], ptr @DisabledEffects, i64 0, i64 %97
  %99 = load i8, ptr %98, align 1, !tbaa !13, !range !15, !noundef !16
  %100 = trunc nuw i8 %99 to i1
  br i1 %100, label %.preheader.9, label %.thread39

.preheader.9:                                     ; preds = %95, %.preheader.8
  %101 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 236), align 4, !tbaa !7
  %102 = icmp eq i32 %101, %2
  br i1 %102, label %103, label %.preheader.10

103:                                              ; preds = %.preheader.9
  %104 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 232), align 8, !tbaa !12
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [15 x i8], ptr @DisabledEffects, i64 0, i64 %105
  %107 = load i8, ptr %106, align 1, !tbaa !13, !range !15, !noundef !16
  %108 = trunc nuw i8 %107 to i1
  br i1 %108, label %.preheader.10, label %.thread39

.preheader.10:                                    ; preds = %103, %.preheader.9
  %109 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 260), align 4, !tbaa !7
  %110 = icmp eq i32 %109, %2
  br i1 %110, label %111, label %.preheader.11

111:                                              ; preds = %.preheader.10
  %112 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 256), align 16, !tbaa !12
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [15 x i8], ptr @DisabledEffects, i64 0, i64 %113
  %115 = load i8, ptr %114, align 1, !tbaa !13, !range !15, !noundef !16
  %116 = trunc nuw i8 %115 to i1
  br i1 %116, label %.preheader.11, label %.thread39

.preheader.11:                                    ; preds = %111, %.preheader.10
  %117 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 284), align 4, !tbaa !7
  %118 = icmp eq i32 %117, %2
  br i1 %118, label %119, label %.preheader.12

119:                                              ; preds = %.preheader.11
  %120 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 280), align 8, !tbaa !12
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [15 x i8], ptr @DisabledEffects, i64 0, i64 %121
  %123 = load i8, ptr %122, align 1, !tbaa !13, !range !15, !noundef !16
  %124 = trunc nuw i8 %123 to i1
  br i1 %124, label %.preheader.12, label %.thread39

.preheader.12:                                    ; preds = %119, %.preheader.11
  %125 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 308), align 4, !tbaa !7
  %126 = icmp eq i32 %125, %2
  br i1 %126, label %127, label %.preheader.13

127:                                              ; preds = %.preheader.12
  %128 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 304), align 16, !tbaa !12
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [15 x i8], ptr @DisabledEffects, i64 0, i64 %129
  %131 = load i8, ptr %130, align 1, !tbaa !13, !range !15, !noundef !16
  %132 = trunc nuw i8 %131 to i1
  br i1 %132, label %.preheader.13, label %.thread39

.preheader.13:                                    ; preds = %127, %.preheader.12
  %133 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 332), align 4, !tbaa !7
  %134 = icmp eq i32 %133, %2
  br i1 %134, label %135, label %.preheader.14

135:                                              ; preds = %.preheader.13
  %136 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 328), align 8, !tbaa !12
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [15 x i8], ptr @DisabledEffects, i64 0, i64 %137
  %139 = load i8, ptr %138, align 1, !tbaa !13, !range !15, !noundef !16
  %140 = trunc nuw i8 %139 to i1
  br i1 %140, label %.preheader.14, label %.thread39

.preheader.14:                                    ; preds = %135, %.preheader.13
  %141 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 356), align 4, !tbaa !7
  %142 = icmp eq i32 %141, %2
  br i1 %142, label %143, label %.preheader.15

143:                                              ; preds = %.preheader.14
  %144 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 352), align 16, !tbaa !12
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [15 x i8], ptr @DisabledEffects, i64 0, i64 %145
  %147 = load i8, ptr %146, align 1, !tbaa !13, !range !15, !noundef !16
  %148 = trunc nuw i8 %147 to i1
  br i1 %148, label %.preheader.15, label %.thread39

.preheader.15:                                    ; preds = %143, %.preheader.14
  %149 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 380), align 4, !tbaa !7
  %150 = icmp eq i32 %149, %2
  br i1 %150, label %151, label %157

151:                                              ; preds = %.preheader.15
  %152 = load i32, ptr getelementptr inbounds (i8, ptr @gEffectList, i64 376), align 8, !tbaa !12
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [15 x i8], ptr @DisabledEffects, i64 0, i64 %153
  %155 = load i8, ptr %154, align 1, !tbaa !13, !range !15, !noundef !16
  %156 = trunc nuw i8 %155 to i1
  br i1 %156, label %157, label %.thread39

157:                                              ; preds = %151, %.preheader.15
  %158 = call noundef ptr @_ZNK2al13intrusive_ptrI10ALCcontextEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  invoke void (ptr, i32, ptr, ...) @_ZN10ALCcontext8setErrorEiPKcz(ptr noundef nonnull align 16 dereferenceable(752) %158, i32 noundef 40963, ptr noundef nonnull @.str.6, i32 noundef %2)
          to label %178 unwind label %159

.thread39:                                        ; preds = %31, %39, %47, %55, %63, %71, %79, %87, %95, %103, %111, %119, %127, %135, %143, %151, %27
  invoke void @_ZN12_GLOBAL__N_116InitEffectParamsEP8ALeffecti(ptr noundef nonnull %17, i32 noundef %2)
          to label %178 unwind label %159

159:                                              ; preds = %157, %.thread39
  %160 = landingpad { ptr, i32 }
          catch ptr null
  br label %.sink.split

161:                                              ; preds = %25
  invoke void @_ZN12_GLOBAL__N_118ALeffect_setParamiEP8ALeffectii(ptr noundef nonnull %17, i32 noundef %1, i32 noundef %2)
          to label %178 unwind label %162

162:                                              ; preds = %161
  %163 = landingpad { ptr, i32 }
          catch ptr @_ZTI16effect_exception
          catch ptr null
  %164 = extractvalue { ptr, i32 } %163, 0
  %165 = extractvalue { ptr, i32 } %163, 1
  %166 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTI16effect_exception) #8
  %167 = icmp eq i32 %165, %166
  br i1 %167, label %168, label %180

168:                                              ; preds = %162
  %169 = call ptr @__cxa_begin_catch(ptr %164) #8
  %170 = call noundef ptr @_ZNK2al13intrusive_ptrI10ALCcontextEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  %171 = call noundef i32 @_ZNK16effect_exception9errorCodeEv(ptr noundef nonnull align 8 dereferenceable(48) %169) #8
  %172 = call noundef ptr @_ZNK2al14base_exception4whatEv(ptr noundef nonnull align 8 dereferenceable(40) %169) #8
  invoke void (ptr, i32, ptr, ...) @_ZN10ALCcontext8setErrorEiPKcz(ptr noundef nonnull align 16 dereferenceable(752) %170, i32 noundef %171, ptr noundef nonnull @.str.7, ptr noundef %172)
          to label %173 unwind label %174

173:                                              ; preds = %168
  invoke void @__cxa_end_catch()
          to label %178 unwind label %176

174:                                              ; preds = %168
  %175 = landingpad { ptr, i32 }
          catch ptr null
  invoke void @__cxa_end_catch()
          to label %.sink.split unwind label %184

176:                                              ; preds = %173
  %177 = landingpad { ptr, i32 }
          catch ptr null
  br label %.sink.split

178:                                              ; preds = %173, %.thread39, %157, %161, %18
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  br label %179

179:                                              ; preds = %6, %178
  call void @_ZN2al13intrusive_ptrI10ALCcontextED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  ret void

.sink.split:                                      ; preds = %176, %174, %23, %159
  %.pn.sink = phi { ptr, i32 } [ %160, %159 ], [ %24, %23 ], [ %177, %176 ], [ %175, %174 ]
  %.0 = extractvalue { ptr, i32 } %.pn.sink, 0
  br label %180

180:                                              ; preds = %.sink.split, %162
  %.1 = phi ptr [ %164, %162 ], [ %.0, %.sink.split ]
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  br label %181

181:                                              ; preds = %180, %20
  %.2 = phi ptr [ %.1, %180 ], [ %22, %20 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @_ZN2al13intrusive_ptrI10ALCcontextED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  br label %182

182:                                              ; preds = %181, %8
  %.3 = phi ptr [ %.2, %181 ], [ %10, %8 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  %183 = call ptr @__cxa_begin_catch(ptr %.3) #8
  call void @_ZSt9terminatev() #9
  unreachable

184:                                              ; preds = %174
  %185 = landingpad { ptr, i32 }
          catch ptr null
  %186 = extractvalue { ptr, i32 } %185, 0
  call void @__clang_call_terminate(ptr %186) #9
  unreachable
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_116InitEffectParamsEP8ALeffecti(ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_118ALeffect_setParamiEP8ALeffectii(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nofree nosync nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #6

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

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

declare void @__cxa_end_catch() local_unnamed_addr

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #7

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 = { noreturn 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 = { inlinehint 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 #6 = { nofree nosync nounwind memory(none) }
attributes #7 = { noinline noreturn nounwind uwtable "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 #8 = { nounwind }
attributes #9 = { noreturn 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 = !{!"branch_weights", !"expected", i32 2000, i32 1}
!6 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!7 = !{!8, !11, i64 20}
!8 = !{!"_ZTS10EffectList", !9, i64 0, !11, i64 16, !11, i64 20}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!8, !11, i64 16}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !9, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LowerExpectIntrinsicPass,SROAPass,SimplifyCFGPass