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

; 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.__gnu_cxx::__normal_iterator" = type { ptr }
%class.anon = type { i8 }
%"class.__gnu_cxx::__normal_iterator.79" = type { ptr }
%class.anon.80 = type { i8 }
%"class.__gnu_cxx::__normal_iterator.82" = type { ptr }
%class.anon.83 = type { i8 }
%struct.DeviceBase = type { %"struct.std::atomic", 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", [1024 x float], [1024 x float], %union.anon.1, [1408 x %"struct.std::array.2"], %"class.std::vector", %struct.MixParams, [4 x i32], %struct.RealMixParams, %"class.std::unique_ptr", %"class.al::intrusive_ptr", i32, %"class.std::unique_ptr.8", %"class.std::unique_ptr.16", %"class.std::unique_ptr.24", { i64, i64 }, %"class.std::unique_ptr.32", %"class.std::unique_ptr.40", float, i32, %"struct.std::atomic.48", %"struct.std::atomic.50", %"class.std::mutex", %"class.std::unique_ptr.52" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i8 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::bitset" = type { %"struct.std::_Base_bitset" }
%"struct.std::_Base_bitset" = type { i64 }
%"class.std::chrono::duration" = type { i64 }
%"struct.std::array" = type { [16 x %"struct.std::array.0"] }
%"struct.std::array.0" = type { [1200 x float] }
%union.anon.1 = type { [1088 x float] }
%"struct.std::array.2" = type { [2 x float] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::array<float, 1024>, al::allocator<std::array<float, 1024>, 16>>::_Vector_impl" }
%"struct.std::_Vector_base<std::array<float, 1024>, al::allocator<std::array<float, 1024>, 16>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::array<float, 1024>, al::allocator<std::array<float, 1024>, 16>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::array<float, 1024>, al::allocator<std::array<float, 1024>, 16>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.MixParams = type { %"struct.std::array.3", %"class.al::span" }
%"struct.std::array.3" = type { [16 x %struct.BFChannelConfig] }
%struct.BFChannelConfig = type { float, i32 }
%"class.al::span" = type { ptr, ptr }
%struct.RealMixParams = type { %"class.al::span.4", %"struct.std::array.5", %"class.al::span" }
%"class.al::span.4" = type { ptr, ptr }
%"struct.std::array.5" = type { [16 x i32] }
%"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.7" }
%"struct.std::_Head_base.7" = type { ptr }
%"class.al::intrusive_ptr" = type { ptr }
%"class.std::unique_ptr.8" = type { %"struct.std::__uniq_ptr_data.9" }
%"struct.std::__uniq_ptr_data.9" = type { %"class.std::__uniq_ptr_impl.10" }
%"class.std::__uniq_ptr_impl.10" = type { %"class.std::tuple.11" }
%"class.std::tuple.11" = type { %"struct.std::_Tuple_impl.12" }
%"struct.std::_Tuple_impl.12" = type { %"struct.std::_Head_base.15" }
%"struct.std::_Head_base.15" = type { ptr }
%"class.std::unique_ptr.16" = type { %"struct.std::__uniq_ptr_data.17" }
%"struct.std::__uniq_ptr_data.17" = type { %"class.std::__uniq_ptr_impl.18" }
%"class.std::__uniq_ptr_impl.18" = type { %"class.std::tuple.19" }
%"class.std::tuple.19" = type { %"struct.std::_Tuple_impl.20" }
%"struct.std::_Tuple_impl.20" = type { %"struct.std::_Head_base.23" }
%"struct.std::_Head_base.23" = type { ptr }
%"class.std::unique_ptr.24" = type { %"struct.std::__uniq_ptr_data.25" }
%"struct.std::__uniq_ptr_data.25" = type { %"class.std::__uniq_ptr_impl.26" }
%"class.std::__uniq_ptr_impl.26" = type { %"class.std::tuple.27" }
%"class.std::tuple.27" = type { %"struct.std::_Tuple_impl.28" }
%"struct.std::_Tuple_impl.28" = type { %"struct.std::_Head_base.31" }
%"struct.std::_Head_base.31" = type { ptr }
%"class.std::unique_ptr.32" = type { %"struct.std::__uniq_ptr_data.33" }
%"struct.std::__uniq_ptr_data.33" = type { %"class.std::__uniq_ptr_impl.34" }
%"class.std::__uniq_ptr_impl.34" = type { %"class.std::tuple.35" }
%"class.std::tuple.35" = type { %"struct.std::_Tuple_impl.36" }
%"struct.std::_Tuple_impl.36" = type { %"struct.std::_Head_base.39" }
%"struct.std::_Head_base.39" = type { ptr }
%"class.std::unique_ptr.40" = type { %"struct.std::__uniq_ptr_data.41" }
%"struct.std::__uniq_ptr_data.41" = type { %"class.std::__uniq_ptr_impl.42" }
%"class.std::__uniq_ptr_impl.42" = type { %"class.std::tuple.43" }
%"class.std::tuple.43" = type { %"struct.std::_Tuple_impl.44" }
%"struct.std::_Tuple_impl.44" = type { %"struct.std::_Head_base.47" }
%"struct.std::_Head_base.47" = type { ptr }
%"struct.std::atomic.48" = type { %"struct.std::__atomic_base.49" }
%"struct.std::__atomic_base.49" = type { i32 }
%"struct.std::atomic.50" = type { %"struct.std::__atomic_base.51" }
%"struct.std::__atomic_base.51" = type { 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.52" = type { %"struct.std::__uniq_ptr_data.53" }
%"struct.std::__uniq_ptr_data.53" = type { %"class.std::__uniq_ptr_impl.54" }
%"class.std::__uniq_ptr_impl.54" = type { %"class.std::tuple.55" }
%"class.std::tuple.55" = type { %"struct.std::_Tuple_impl.56" }
%"struct.std::_Tuple_impl.56" = type { %"struct.std::_Head_base.59" }
%"struct.std::_Head_base.59" = type { ptr }
%struct.ALCdevice = type { %"class.al::intrusive_ref", [12 x i8], %struct.DeviceBase, i32, i32, i32, i32, %"class.std::__cxx11::basic_string", %"class.std::vector.61", i32, i32, %"struct.std::atomic.65", %"class.std::mutex", %"class.std::vector.67", %"class.std::mutex", %"class.std::vector.71", %"class.std::mutex", %"class.std::vector.75", [8 x i8] }
%"class.al::intrusive_ref" = type { %"struct.std::atomic.48" }
%"class.std::vector.61" = type { %"struct.std::_Vector_base.62" }
%"struct.std::_Vector_base.62" = 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 }
%"struct.std::atomic.65" = type { %"struct.std::__atomic_base.66" }
%"struct.std::__atomic_base.66" = type { i32 }
%"class.std::vector.67" = type { %"struct.std::_Vector_base.68" }
%"struct.std::_Vector_base.68" = 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.71" = type { %"struct.std::_Vector_base.72" }
%"struct.std::_Vector_base.72" = 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.75" = type { %"struct.std::_Vector_base.76" }
%"struct.std::_Vector_base.76" = 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 }

@gLogLevel = external global i32, align 4
@gLogFile = external global ptr, align 8
@.str = external hidden unnamed_addr constant [33 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [40 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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10DeviceBaseD2Ev(ptr noundef nonnull align 16 dereferenceable(101152)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN9ALCdeviceD2Ev(ptr noundef nonnull align 16 dereferenceable(101448) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %class.anon, align 1
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.79", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.79", align 8
  %9 = alloca %class.anon.80, align 1
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.82", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.82", align 8
  %12 = alloca %class.anon.83, align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %13 = load ptr, ptr %2, align 8
  br label %14

14:                                               ; preds = %1
  %15 = load i32, ptr @gLogLevel, align 4, !tbaa !9
  %16 = icmp sge i32 %15, 3
  %17 = xor i1 %16, true
  %18 = xor i1 %17, true
  %19 = zext i1 %18 to i64
  %20 = call i64 @llvm.expect.i64(i64 %19, i64 0)
  %21 = icmp ne i64 %20, 0
  br i1 %21, label %22, label %25

22:                                               ; preds = %14
  %23 = load ptr, ptr @gLogFile, align 8, !tbaa !5
  %24 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef @.str, ptr noundef %13) #6
  br label %25

25:                                               ; preds = %22, %14
  br label %26

26:                                               ; preds = %25
  br label %27

27:                                               ; preds = %26
  %28 = getelementptr inbounds i8, ptr %13, i64 16
  %29 = getelementptr inbounds %struct.DeviceBase, ptr %28, i32 0, i32 44
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt10unique_ptrI11BackendBaseSt14default_deleteIS0_EEaSEDn(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr null) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  %31 = getelementptr inbounds %struct.ALCdevice, ptr %13, i32 0, i32 13
  %32 = call ptr @_ZNKSt6vectorI13BufferSubListN2al9allocatorIS0_Lm8EEEE6cbeginEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #6
  %33 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %4, i32 0, i32 0
  store ptr %32, ptr %33, align 8
  %34 = getelementptr inbounds %struct.ALCdevice, ptr %13, i32 0, i32 13
  %35 = call ptr @_ZNKSt6vectorI13BufferSubListN2al9allocatorIS0_Lm8EEEE4cendEv(ptr noundef nonnull align 8 dereferenceable(24) %34) #6
  %36 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %5, i32 0, i32 0
  store ptr %35, ptr %36, align 8
  %37 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %4, i32 0, i32 0
  %38 = load ptr, ptr %37, align 8
  %39 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %5, i32 0, i32 0
  %40 = load ptr, ptr %39, align 8
  %41 = invoke noundef i64 @"_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPK13BufferSubListSt6vectorIS2_N2al9allocatorIS2_Lm8EEEEEEmZN9ALCdeviceD1EvE3$_0ET0_T_SE_SD_T1_"(ptr %38, ptr %40, i64 noundef 0)
          to label %42 unwind label %142

42:                                               ; preds = %27
  store i64 %41, ptr %3, align 8, !tbaa !11
  %43 = load i64, ptr %3, align 8, !tbaa !11
  %44 = icmp ugt i64 %43, 0
  br i1 %44, label %45, label %65

45:                                               ; preds = %42
  br label %46

46:                                               ; preds = %45
  %47 = load i32, ptr @gLogLevel, align 4, !tbaa !9
  %48 = icmp sge i32 %47, 2
  %49 = xor i1 %48, true
  %50 = xor i1 %49, true
  %51 = zext i1 %50 to i64
  %52 = call i64 @llvm.expect.i64(i64 %51, i64 0)
  %53 = icmp ne i64 %52, 0
  br i1 %53, label %54, label %62

54:                                               ; preds = %46
  %55 = load ptr, ptr @gLogFile, align 8, !tbaa !5
  %56 = load i64, ptr %3, align 8, !tbaa !11
  %57 = load i64, ptr %3, align 8, !tbaa !11
  %58 = icmp eq i64 %57, 1
  %59 = zext i1 %58 to i64
  %60 = select i1 %58, ptr @.str.2, ptr @.str.3
  %61 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef @.str.1, i64 noundef %56, ptr noundef %60) #6
  br label %62

62:                                               ; preds = %54, %46
  br label %63

63:                                               ; preds = %62
  br label %64

64:                                               ; preds = %63
  br label %65

65:                                               ; preds = %64, %42
  %66 = getelementptr inbounds %struct.ALCdevice, ptr %13, i32 0, i32 15
  %67 = call ptr @_ZNKSt6vectorI13EffectSubListN2al9allocatorIS0_Lm8EEEE6cbeginEv(ptr noundef nonnull align 8 dereferenceable(24) %66) #6
  %68 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.79", ptr %7, i32 0, i32 0
  store ptr %67, ptr %68, align 8
  %69 = getelementptr inbounds %struct.ALCdevice, ptr %13, i32 0, i32 15
  %70 = call ptr @_ZNKSt6vectorI13EffectSubListN2al9allocatorIS0_Lm8EEEE4cendEv(ptr noundef nonnull align 8 dereferenceable(24) %69) #6
  %71 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.79", ptr %8, i32 0, i32 0
  store ptr %70, ptr %71, align 8
  %72 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.79", ptr %7, i32 0, i32 0
  %73 = load ptr, ptr %72, align 8
  %74 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.79", ptr %8, i32 0, i32 0
  %75 = load ptr, ptr %74, align 8
  %76 = invoke noundef i64 @"_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPK13EffectSubListSt6vectorIS2_N2al9allocatorIS2_Lm8EEEEEEmZN9ALCdeviceD1EvE3$_1ET0_T_SE_SD_T1_"(ptr %73, ptr %75, i64 noundef 0)
          to label %77 unwind label %142

77:                                               ; preds = %65
  store i64 %76, ptr %3, align 8, !tbaa !11
  %78 = load i64, ptr %3, align 8, !tbaa !11
  %79 = icmp ugt i64 %78, 0
  br i1 %79, label %80, label %100

80:                                               ; preds = %77
  br label %81

81:                                               ; preds = %80
  %82 = load i32, ptr @gLogLevel, align 4, !tbaa !9
  %83 = icmp sge i32 %82, 2
  %84 = xor i1 %83, true
  %85 = xor i1 %84, true
  %86 = zext i1 %85 to i64
  %87 = call i64 @llvm.expect.i64(i64 %86, i64 0)
  %88 = icmp ne i64 %87, 0
  br i1 %88, label %89, label %97

89:                                               ; preds = %81
  %90 = load ptr, ptr @gLogFile, align 8, !tbaa !5
  %91 = load i64, ptr %3, align 8, !tbaa !11
  %92 = load i64, ptr %3, align 8, !tbaa !11
  %93 = icmp eq i64 %92, 1
  %94 = zext i1 %93 to i64
  %95 = select i1 %93, ptr @.str.2, ptr @.str.3
  %96 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %90, ptr noundef @.str.4, i64 noundef %91, ptr noundef %95) #6
  br label %97

97:                                               ; preds = %89, %81
  br label %98

98:                                               ; preds = %97
  br label %99

99:                                               ; preds = %98
  br label %100

100:                                              ; preds = %99, %77
  %101 = getelementptr inbounds %struct.ALCdevice, ptr %13, i32 0, i32 17
  %102 = call ptr @_ZNKSt6vectorI13FilterSubListN2al9allocatorIS0_Lm8EEEE6cbeginEv(ptr noundef nonnull align 8 dereferenceable(24) %101) #6
  %103 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.82", ptr %10, i32 0, i32 0
  store ptr %102, ptr %103, align 8
  %104 = getelementptr inbounds %struct.ALCdevice, ptr %13, i32 0, i32 17
  %105 = call ptr @_ZNKSt6vectorI13FilterSubListN2al9allocatorIS0_Lm8EEEE4cendEv(ptr noundef nonnull align 8 dereferenceable(24) %104) #6
  %106 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.82", ptr %11, i32 0, i32 0
  store ptr %105, ptr %106, align 8
  %107 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.82", ptr %10, i32 0, i32 0
  %108 = load ptr, ptr %107, align 8
  %109 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.82", ptr %11, i32 0, i32 0
  %110 = load ptr, ptr %109, align 8
  %111 = invoke noundef i64 @"_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPK13FilterSubListSt6vectorIS2_N2al9allocatorIS2_Lm8EEEEEEmZN9ALCdeviceD1EvE3$_2ET0_T_SE_SD_T1_"(ptr %108, ptr %110, i64 noundef 0)
          to label %112 unwind label %142

112:                                              ; preds = %100
  store i64 %111, ptr %3, align 8, !tbaa !11
  %113 = load i64, ptr %3, align 8, !tbaa !11
  %114 = icmp ugt i64 %113, 0
  br i1 %114, label %115, label %135

115:                                              ; preds = %112
  br label %116

116:                                              ; preds = %115
  %117 = load i32, ptr @gLogLevel, align 4, !tbaa !9
  %118 = icmp sge i32 %117, 2
  %119 = xor i1 %118, true
  %120 = xor i1 %119, true
  %121 = zext i1 %120 to i64
  %122 = call i64 @llvm.expect.i64(i64 %121, i64 0)
  %123 = icmp ne i64 %122, 0
  br i1 %123, label %124, label %132

124:                                              ; preds = %116
  %125 = load ptr, ptr @gLogFile, align 8, !tbaa !5
  %126 = load i64, ptr %3, align 8, !tbaa !11
  %127 = load i64, ptr %3, align 8, !tbaa !11
  %128 = icmp eq i64 %127, 1
  %129 = zext i1 %128 to i64
  %130 = select i1 %128, ptr @.str.2, ptr @.str.3
  %131 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %125, ptr noundef @.str.5, i64 noundef %126, ptr noundef %130) #6
  br label %132

132:                                              ; preds = %124, %116
  br label %133

133:                                              ; preds = %132
  br label %134

134:                                              ; preds = %133
  br label %135

135:                                              ; preds = %134, %112
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  %136 = getelementptr inbounds %struct.ALCdevice, ptr %13, i32 0, i32 17
  call void @_ZNSt6vectorI13FilterSubListN2al9allocatorIS0_Lm8EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %136) #6
  %137 = getelementptr inbounds %struct.ALCdevice, ptr %13, i32 0, i32 15
  call void @_ZNSt6vectorI13EffectSubListN2al9allocatorIS0_Lm8EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %137) #6
  %138 = getelementptr inbounds %struct.ALCdevice, ptr %13, i32 0, i32 13
  call void @_ZNSt6vectorI13BufferSubListN2al9allocatorIS0_Lm8EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %138) #6
  %139 = getelementptr inbounds %struct.ALCdevice, ptr %13, i32 0, i32 8
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2al9allocatorIS5_Lm8EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %139) #6
  %140 = getelementptr inbounds %struct.ALCdevice, ptr %13, i32 0, i32 7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %140) #6
  %141 = getelementptr inbounds i8, ptr %13, i64 16
  call void @_ZN10DeviceBaseD2Ev(ptr noundef nonnull align 16 dereferenceable(101152) %141) #6
  ret void

142:                                              ; preds = %100, %65, %27
  %143 = landingpad { ptr, i32 }
          catch ptr null
  %144 = extractvalue { ptr, i32 } %143, 0
  call void @__clang_call_terminate(ptr %144) #7
  unreachable
}

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i64 @"_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPK13BufferSubListSt6vectorIS2_N2al9allocatorIS2_Lm8EEEEEEmZN9ALCdeviceD1EvE3$_0ET0_T_SE_SD_T1_"(ptr, ptr, i64 noundef) #4

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i64 @"_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPK13EffectSubListSt6vectorIS2_N2al9allocatorIS2_Lm8EEEEEEmZN9ALCdeviceD1EvE3$_1ET0_T_SE_SD_T1_"(ptr, ptr, i64 noundef) #4

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i64 @"_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPK13FilterSubListSt6vectorIS2_N2al9allocatorIS2_Lm8EEEEEEmZN9ALCdeviceD1EvE3$_2ET0_T_SE_SD_T1_"(ptr, ptr, i64 noundef) #4

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #3 = { 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 #4 = { 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 #5 = { 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 #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTS8LogLevel", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !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"

@gLogLevel = external local_unnamed_addr global i32, align 4
@gLogFile = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [33 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [40 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10DeviceBaseD2Ev(ptr noundef nonnull align 16 dereferenceable(101152)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN9ALCdeviceD2Ev(ptr noundef nonnull align 16 dereferenceable(101448) %0) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = load i32, ptr @gLogLevel, align 4, !tbaa !5
  %3 = icmp sgt i32 %2, 2
  br i1 %3, label %4, label %7, !prof !9

4:                                                ; preds = %1
  %5 = load ptr, ptr @gLogFile, align 8, !tbaa !10
  %6 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %5, ptr noundef nonnull @.str, ptr noundef nonnull %0) #3
  br label %7

7:                                                ; preds = %4, %1
  %8 = getelementptr inbounds i8, ptr %0, i64 101160
  %9 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt10unique_ptrI11BackendBaseSt14default_deleteIS0_EEaSEDn(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr null) #3
  %10 = getelementptr inbounds i8, ptr %0, i64 101296
  %11 = tail call ptr @_ZNKSt6vectorI13BufferSubListN2al9allocatorIS0_Lm8EEEE6cbeginEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #3
  %12 = tail call ptr @_ZNKSt6vectorI13BufferSubListN2al9allocatorIS0_Lm8EEEE4cendEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #3
  %13 = tail call noundef i64 @"_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPK13BufferSubListSt6vectorIS2_N2al9allocatorIS2_Lm8EEEEEEmZN9ALCdeviceD1EvE3$_0ET0_T_SE_SD_T1_"(ptr %11, ptr %12, i64 noundef 0)
  %.not = icmp ne i64 %13, 0
  %14 = load i32, ptr @gLogLevel, align 4
  %15 = icmp sgt i32 %14, 1
  %or.cond = select i1 %.not, i1 %15, i1 false
  br i1 %or.cond, label %16, label %21, !prof !12

16:                                               ; preds = %7
  %17 = load ptr, ptr @gLogFile, align 8, !tbaa !10
  %18 = icmp eq i64 %13, 1
  %19 = select i1 %18, ptr @.str.2, ptr @.str.3
  %20 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef nonnull @.str.1, i64 noundef %13, ptr noundef nonnull %19) #3
  br label %21

21:                                               ; preds = %16, %7
  %22 = getelementptr inbounds i8, ptr %0, i64 101360
  %23 = tail call ptr @_ZNKSt6vectorI13EffectSubListN2al9allocatorIS0_Lm8EEEE6cbeginEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #3
  %24 = tail call ptr @_ZNKSt6vectorI13EffectSubListN2al9allocatorIS0_Lm8EEEE4cendEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #3
  %25 = tail call noundef i64 @"_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPK13EffectSubListSt6vectorIS2_N2al9allocatorIS2_Lm8EEEEEEmZN9ALCdeviceD1EvE3$_1ET0_T_SE_SD_T1_"(ptr %23, ptr %24, i64 noundef 0)
  %.not16 = icmp ne i64 %25, 0
  %26 = load i32, ptr @gLogLevel, align 4
  %27 = icmp sgt i32 %26, 1
  %or.cond20 = select i1 %.not16, i1 %27, i1 false
  br i1 %or.cond20, label %28, label %33, !prof !12

28:                                               ; preds = %21
  %29 = load ptr, ptr @gLogFile, align 8, !tbaa !10
  %30 = icmp eq i64 %25, 1
  %31 = select i1 %30, ptr @.str.2, ptr @.str.3
  %32 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %29, ptr noundef nonnull @.str.4, i64 noundef %25, ptr noundef nonnull %31) #3
  br label %33

33:                                               ; preds = %28, %21
  %34 = getelementptr inbounds i8, ptr %0, i64 101424
  %35 = tail call ptr @_ZNKSt6vectorI13FilterSubListN2al9allocatorIS0_Lm8EEEE6cbeginEv(ptr noundef nonnull align 8 dereferenceable(24) %34) #3
  %36 = tail call ptr @_ZNKSt6vectorI13FilterSubListN2al9allocatorIS0_Lm8EEEE4cendEv(ptr noundef nonnull align 8 dereferenceable(24) %34) #3
  %37 = tail call noundef i64 @"_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPK13FilterSubListSt6vectorIS2_N2al9allocatorIS2_Lm8EEEEEEmZN9ALCdeviceD1EvE3$_2ET0_T_SE_SD_T1_"(ptr %35, ptr %36, i64 noundef 0)
  %.not17 = icmp ne i64 %37, 0
  %38 = load i32, ptr @gLogLevel, align 4
  %39 = icmp sgt i32 %38, 1
  %or.cond22 = select i1 %.not17, i1 %39, i1 false
  br i1 %or.cond22, label %40, label %45, !prof !12

40:                                               ; preds = %33
  %41 = load ptr, ptr @gLogFile, align 8, !tbaa !10
  %42 = icmp eq i64 %37, 1
  %43 = select i1 %42, ptr @.str.2, ptr @.str.3
  %44 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef nonnull @.str.5, i64 noundef %37, ptr noundef nonnull %43) #3
  br label %45

45:                                               ; preds = %40, %33
  %46 = getelementptr inbounds i8, ptr %0, i64 16
  tail call void @_ZNSt6vectorI13FilterSubListN2al9allocatorIS0_Lm8EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %34) #3
  tail call void @_ZNSt6vectorI13EffectSubListN2al9allocatorIS0_Lm8EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #3
  tail call void @_ZNSt6vectorI13BufferSubListN2al9allocatorIS0_Lm8EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #3
  %47 = getelementptr inbounds i8, ptr %0, i64 101216
  tail call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2al9allocatorIS5_Lm8EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %47) #3
  %48 = getelementptr inbounds i8, ptr %0, i64 101184
  tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %48) #3
  tail call void @_ZN10DeviceBaseD2Ev(ptr noundef nonnull align 16 dereferenceable(101152) %46) #3
  ret void
}

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i64 @"_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPK13BufferSubListSt6vectorIS2_N2al9allocatorIS2_Lm8EEEEEEmZN9ALCdeviceD1EvE3$_0ET0_T_SE_SD_T1_"(ptr, ptr, i64 noundef) local_unnamed_addr #2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i64 @"_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPK13EffectSubListSt6vectorIS2_N2al9allocatorIS2_Lm8EEEEEEmZN9ALCdeviceD1EvE3$_1ET0_T_SE_SD_T1_"(ptr, ptr, i64 noundef) local_unnamed_addr #2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i64 @"_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPK13FilterSubListSt6vectorIS2_N2al9allocatorIS2_Lm8EEEEEEmZN9ALCdeviceD1EvE3$_2ET0_T_SE_SD_T1_"(ptr, ptr, i64 noundef) local_unnamed_addr #2

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

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

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

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

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

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

attributes #0 = { 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 #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"_ZTS8LogLevel", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"branch_weights", i32 1, i32 4001}


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