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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.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 }

@.str.6 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [39 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 void @_Z13GetContextRefv(ptr dead_on_unwind writable sret(%"class.al::intrusive_ptr") align 8) #1

declare i32 @__gxx_personality_v0(...)

; 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

; 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

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

; 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: 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 @_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: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIfLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12), i64 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @alGetListenerf(i32 noundef, ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @alGetListener3f(i32 noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @alGetListenerfv(i32 noundef %0, ptr noundef %1) #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca %"class.al::intrusive_ptr", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca %"class.std::lock_guard", align 8
  store i32 %0, ptr %3, align 4, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  %11 = load i32, ptr %3, align 4, !tbaa !5
  switch i32 %11, label %23 [
    i32 4106, label %12
    i32 131076, label %12
    i32 4100, label %15
    i32 4102, label %15
  ]

12:                                               ; preds = %2, %2
  %13 = load i32, ptr %3, align 4, !tbaa !5
  %14 = load ptr, ptr %4, align 8, !tbaa !9
  call void @alGetListenerf(i32 noundef %13, ptr noundef %14)
  br label %108

15:                                               ; preds = %2, %2
  %16 = load i32, ptr %3, align 4, !tbaa !5
  %17 = load ptr, ptr %4, align 8, !tbaa !9
  %18 = getelementptr inbounds float, ptr %17, i64 0
  %19 = load ptr, ptr %4, align 8, !tbaa !9
  %20 = getelementptr inbounds float, ptr %19, i64 1
  %21 = load ptr, ptr %4, align 8, !tbaa !9
  %22 = getelementptr inbounds float, ptr %21, i64 2
  call void @alGetListener3f(i32 noundef %16, ptr noundef %18, ptr noundef %20, ptr noundef %22)
  br label %108

23:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  invoke void @_Z13GetContextRefv(ptr dead_on_unwind writable sret(%"class.al::intrusive_ptr") align 8 %5)
          to label %24 unwind label %33

24:                                               ; preds = %23
  %25 = call noundef zeroext i1 @_ZNK2al13intrusive_ptrI10ALCcontextEcvbEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %26 = xor i1 %25, true
  %27 = xor i1 %26, true
  %28 = xor i1 %27, true
  %29 = zext i1 %28 to i64
  %30 = call i64 @llvm.expect.i64(i64 %29, i64 0)
  %31 = icmp ne i64 %30, 0
  br i1 %31, label %32, label %37

32:                                               ; preds = %24
  store i32 1, ptr %8, align 4
  br label %100

33:                                               ; preds = %23
  %34 = landingpad { ptr, i32 }
          catch ptr null
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %6, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %7, align 4
  br label %104

37:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %38 = call noundef ptr @_ZNK2al13intrusive_ptrI10ALCcontextEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %39 = getelementptr inbounds %struct.ALCcontext, ptr %38, i32 0, i32 17
  store ptr %39, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %40 = call noundef ptr @_ZNK2al13intrusive_ptrI10ALCcontextEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %41 = getelementptr inbounds %struct.ALCcontext, ptr %40, i32 0, i32 7
  invoke void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(40) %41)
          to label %42 unwind label %48

42:                                               ; preds = %37
  %43 = load ptr, ptr %4, align 8, !tbaa !9
  %44 = icmp ne ptr %43, null
  br i1 %44, label %56, label %45

45:                                               ; preds = %42
  %46 = call noundef ptr @_ZNK2al13intrusive_ptrI10ALCcontextEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  invoke void (ptr, i32, ptr, ...) @_ZN10ALCcontext8setErrorEiPKcz(ptr noundef nonnull align 16 dereferenceable(752) %46, i32 noundef 40963, ptr noundef @.str.6)
          to label %47 unwind label %52

47:                                               ; preds = %45
  br label %99

48:                                               ; preds = %37
  %49 = landingpad { ptr, i32 }
          catch ptr null
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %6, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %7, align 4
  br label %103

52:                                               ; preds = %95, %45
  %53 = landingpad { ptr, i32 }
          catch ptr null
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %6, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %7, align 4
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  br label %103

56:                                               ; preds = %42
  %57 = load i32, ptr %3, align 4, !tbaa !5
  switch i32 %57, label %95 [
    i32 4111, label %58
  ]

58:                                               ; preds = %56
  %59 = load ptr, ptr %9, align 8, !tbaa !9
  %60 = getelementptr inbounds %struct.ALlistener, ptr %59, i32 0, i32 2
  %61 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIfLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12) %60, i64 noundef 0) #6
  %62 = load float, ptr %61, align 4, !tbaa !11
  %63 = load ptr, ptr %4, align 8, !tbaa !9
  %64 = getelementptr inbounds float, ptr %63, i64 0
  store float %62, ptr %64, align 4, !tbaa !11
  %65 = load ptr, ptr %9, align 8, !tbaa !9
  %66 = getelementptr inbounds %struct.ALlistener, ptr %65, i32 0, i32 2
  %67 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIfLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12) %66, i64 noundef 1) #6
  %68 = load float, ptr %67, align 4, !tbaa !11
  %69 = load ptr, ptr %4, align 8, !tbaa !9
  %70 = getelementptr inbounds float, ptr %69, i64 1
  store float %68, ptr %70, align 4, !tbaa !11
  %71 = load ptr, ptr %9, align 8, !tbaa !9
  %72 = getelementptr inbounds %struct.ALlistener, ptr %71, i32 0, i32 2
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIfLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12) %72, i64 noundef 2) #6
  %74 = load float, ptr %73, align 4, !tbaa !11
  %75 = load ptr, ptr %4, align 8, !tbaa !9
  %76 = getelementptr inbounds float, ptr %75, i64 2
  store float %74, ptr %76, align 4, !tbaa !11
  %77 = load ptr, ptr %9, align 8, !tbaa !9
  %78 = getelementptr inbounds %struct.ALlistener, ptr %77, i32 0, i32 3
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIfLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12) %78, i64 noundef 0) #6
  %80 = load float, ptr %79, align 4, !tbaa !11
  %81 = load ptr, ptr %4, align 8, !tbaa !9
  %82 = getelementptr inbounds float, ptr %81, i64 3
  store float %80, ptr %82, align 4, !tbaa !11
  %83 = load ptr, ptr %9, align 8, !tbaa !9
  %84 = getelementptr inbounds %struct.ALlistener, ptr %83, i32 0, i32 3
  %85 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIfLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12) %84, i64 noundef 1) #6
  %86 = load float, ptr %85, align 4, !tbaa !11
  %87 = load ptr, ptr %4, align 8, !tbaa !9
  %88 = getelementptr inbounds float, ptr %87, i64 4
  store float %86, ptr %88, align 4, !tbaa !11
  %89 = load ptr, ptr %9, align 8, !tbaa !9
  %90 = getelementptr inbounds %struct.ALlistener, ptr %89, i32 0, i32 3
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIfLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12) %90, i64 noundef 2) #6
  %92 = load float, ptr %91, align 4, !tbaa !11
  %93 = load ptr, ptr %4, align 8, !tbaa !9
  %94 = getelementptr inbounds float, ptr %93, i64 5
  store float %92, ptr %94, align 4, !tbaa !11
  br label %98

95:                                               ; preds = %56
  %96 = call noundef ptr @_ZNK2al13intrusive_ptrI10ALCcontextEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  invoke void (ptr, i32, ptr, ...) @_ZN10ALCcontext8setErrorEiPKcz(ptr noundef nonnull align 16 dereferenceable(752) %96, i32 noundef 40962, ptr noundef @.str.8)
          to label %97 unwind label %52

97:                                               ; preds = %95
  br label %98

98:                                               ; preds = %97, %58
  br label %99

99:                                               ; preds = %98, %47
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  store i32 0, ptr %8, align 4
  br label %100

100:                                              ; preds = %99, %32
  call void @_ZN2al13intrusive_ptrI10ALCcontextED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  %101 = load i32, ptr %8, align 4
  switch i32 %101, label %109 [
    i32 0, label %102
    i32 1, label %108
  ]

102:                                              ; preds = %100
  br label %108

103:                                              ; preds = %52, %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @_ZN2al13intrusive_ptrI10ALCcontextED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  br label %104

104:                                              ; preds = %103, %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %105

105:                                              ; preds = %104
  %106 = load ptr, ptr %6, align 8
  %107 = call ptr @__cxa_begin_catch(ptr %106) #6
  call void @_ZSt9terminatev() #7
  unreachable

108:                                              ; preds = %102, %100, %15, %12
  ret void

109:                                              ; preds = %100
  unreachable
}

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 = { nounwind }
attributes #7 = { 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 = !{!"float", !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.al::intrusive_ptr" = type { ptr }
%"class.std::lock_guard" = type { ptr }

@.str.6 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [39 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 void @_Z13GetContextRefv(ptr dead_on_unwind writable sret(%"class.al::intrusive_ptr") align 8) local_unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

; 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

; 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

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 void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

; 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 @_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: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIfLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @alGetListenerf(i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @alGetListener3f(i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @alGetListenerfv(i32 noundef %0, ptr noundef %1) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.al::intrusive_ptr", align 8
  %4 = alloca %"class.std::lock_guard", align 8
  switch i32 %0, label %9 [
    i32 4106, label %5
    i32 131076, label %5
    i32 4100, label %6
    i32 4102, label %6
  ]

5:                                                ; preds = %2, %2
  tail call void @alGetListenerf(i32 noundef %0, ptr noundef %1)
  br label %52

6:                                                ; preds = %2, %2
  %7 = getelementptr inbounds i8, ptr %1, i64 4
  %8 = getelementptr inbounds i8, ptr %1, i64 8
  tail call void @alGetListener3f(i32 noundef %0, ptr noundef %1, ptr noundef nonnull %7, ptr noundef nonnull %8)
  br label %52

9:                                                ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  invoke void @_Z13GetContextRefv(ptr dead_on_unwind nonnull writable sret(%"class.al::intrusive_ptr") align 8 %3)
          to label %10 unwind label %12

10:                                               ; preds = %9
  %11 = call noundef zeroext i1 @_ZNK2al13intrusive_ptrI10ALCcontextEcvbEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  br i1 %11, label %14, label %48, !prof !5

12:                                               ; preds = %9
  %13 = landingpad { ptr, i32 }
          catch ptr null
  br label %50

14:                                               ; preds = %10
  %15 = call noundef ptr @_ZNK2al13intrusive_ptrI10ALCcontextEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %16 = call noundef ptr @_ZNK2al13intrusive_ptrI10ALCcontextEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  %17 = getelementptr inbounds i8, ptr %16, i64 408
  invoke void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(40) %17)
          to label %18 unwind label %19

18:                                               ; preds = %14
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %.invoke, label %23

19:                                               ; preds = %14
  %20 = landingpad { ptr, i32 }
          catch ptr null
  br label %49

21:                                               ; preds = %.invoke
  %22 = landingpad { ptr, i32 }
          catch ptr null
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  br label %49

23:                                               ; preds = %18
  %cond = icmp eq i32 %0, 4111
  br i1 %cond, label %24, label %.invoke

24:                                               ; preds = %23
  %25 = getelementptr inbounds i8, ptr %15, i64 552
  %26 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIfLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12) %25, i64 noundef 0) #5
  %27 = load float, ptr %26, align 4, !tbaa !6
  store float %27, ptr %1, align 4, !tbaa !6
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIfLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12) %25, i64 noundef 1) #5
  %29 = load float, ptr %28, align 4, !tbaa !6
  %30 = getelementptr inbounds i8, ptr %1, i64 4
  store float %29, ptr %30, align 4, !tbaa !6
  %31 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIfLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12) %25, i64 noundef 2) #5
  %32 = load float, ptr %31, align 4, !tbaa !6
  %33 = getelementptr inbounds i8, ptr %1, i64 8
  store float %32, ptr %33, align 4, !tbaa !6
  %34 = getelementptr inbounds i8, ptr %15, i64 564
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIfLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12) %34, i64 noundef 0) #5
  %36 = load float, ptr %35, align 4, !tbaa !6
  %37 = getelementptr inbounds i8, ptr %1, i64 12
  store float %36, ptr %37, align 4, !tbaa !6
  %38 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIfLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12) %34, i64 noundef 1) #5
  %39 = load float, ptr %38, align 4, !tbaa !6
  %40 = getelementptr inbounds i8, ptr %1, i64 16
  store float %39, ptr %40, align 4, !tbaa !6
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIfLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12) %34, i64 noundef 2) #5
  %42 = load float, ptr %41, align 4, !tbaa !6
  %43 = getelementptr inbounds i8, ptr %1, i64 20
  store float %42, ptr %43, align 4, !tbaa !6
  br label %47

.invoke:                                          ; preds = %23, %18
  %44 = phi i32 [ 40963, %18 ], [ 40962, %23 ]
  %45 = phi ptr [ @.str.6, %18 ], [ @.str.8, %23 ]
  %46 = call noundef ptr @_ZNK2al13intrusive_ptrI10ALCcontextEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  invoke void (ptr, i32, ptr, ...) @_ZN10ALCcontext8setErrorEiPKcz(ptr noundef nonnull align 16 dereferenceable(752) %46, i32 noundef %44, ptr noundef nonnull %45)
          to label %47 unwind label %21

47:                                               ; preds = %.invoke, %24
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br label %48

48:                                               ; preds = %10, %47
  call void @_ZN2al13intrusive_ptrI10ALCcontextED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  br label %52

49:                                               ; preds = %21, %19
  %.pn = phi { ptr, i32 } [ %22, %21 ], [ %20, %19 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @_ZN2al13intrusive_ptrI10ALCcontextED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  br label %50

50:                                               ; preds = %49, %12
  %.pn.pn = phi { ptr, i32 } [ %.pn, %49 ], [ %13, %12 ]
  %.1 = extractvalue { ptr, i32 } %.pn.pn, 0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  %51 = call ptr @__cxa_begin_catch(ptr %.1) #5
  call void @_ZSt9terminatev() #6
  unreachable

52:                                               ; preds = %48, %6, %5
  ret void
}

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 = { nounwind }
attributes #6 = { 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 = !{!7, !7, i64 0}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}


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