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

; 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.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<char, al::allocator<char, 1>>::_Vector_impl" }
%"struct.std::_Vector_base<char, al::allocator<char, 1>>::_Vector_impl" = type { %"struct.std::_Vector_base<char, al::allocator<char, 1>>::_Vector_impl_data" }
%"struct.std::_Vector_base<char, al::allocator<char, 1>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.al::allocator" = type { i8 }
%struct.__va_list_tag = type { i32, i32, ptr, ptr }
%struct.ALCcontext = type { %"class.al::intrusive_ref", [12 x i8], %struct.ContextBase, %"class.al::intrusive_ptr", %"class.std::vector.29", %"struct.al::atomic_invflag", %"struct.std::atomic.0", %"class.std::mutex", %"struct.std::atomic.33", i8, i8, float, float, float, %"class.std::mutex", ptr, ptr, %struct.ALlistener, %"class.std::vector.36", i32, %"class.std::mutex", %"class.std::vector.40", i32, %"class.std::mutex", %"class.std::unique_ptr.44", 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.21", %"class.std::vector.25" }
%"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.21" = type { %"struct.std::_Vector_base.22" }
%"struct.std::_Vector_base.22" = 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.25" = type { %"struct.std::_Vector_base.26" }
%"struct.std::_Vector_base.26" = 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" = type { ptr }
%"class.std::vector.29" = type { %"struct.std::_Vector_base.30" }
%"struct.std::_Vector_base.30" = 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.33" = type { %"struct.std::__atomic_base.34" }
%"struct.std::__atomic_base.34" = type { i32 }
%struct.ALlistener = type <{ %"struct.std::array.35", %"struct.std::array.35", %"struct.std::array.35", %"struct.std::array.35", float, float, %"struct.al::atomic_invflag", [3 x i8] }>
%"struct.std::array.35" = type { [3 x float] }
%"class.std::vector.36" = type { %"struct.std::_Vector_base.37" }
%"struct.std::_Vector_base.37" = 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.40" = type { %"struct.std::_Vector_base.41" }
%"struct.std::_Vector_base.41" = 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.44" = type { %"struct.std::__uniq_ptr_data.45" }
%"struct.std::__uniq_ptr_data.45" = type { %"class.std::__uniq_ptr_impl.46" }
%"class.std::__uniq_ptr_impl.46" = type { %"class.std::tuple.47" }
%"class.std::tuple.47" = type { %"struct.std::_Tuple_impl.48" }
%"struct.std::_Tuple_impl.48" = type { %"struct.std::_Head_base.51" }
%"struct.std::_Head_base.51" = type { ptr }

@TrapALError = external dso_local global i8, align 1
@.str = external hidden unnamed_addr constant [38 x i8], align 1
@gLogLevel = external global i32, align 4
@gLogFile = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [64 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10ALCcontext8setErrorEiPKcz(ptr noundef nonnull align 16 dereferenceable(752) %0, i32 noundef %1, ptr noundef %2, ...) #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %"struct.al::allocator", align 1
  %9 = alloca [1 x %struct.__va_list_tag], align 16
  %10 = alloca [1 x %struct.__va_list_tag], align 16
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !5
  %16 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #7
  call void @_ZNSt6vectorIcN2al9allocatorIcLm1EEEEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef 256, ptr noundef nonnull align 1 dereferenceable(1) %8)
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #7
  %17 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %9, i64 0, i64 0
  call void @llvm.va_start.p0(ptr %17)
  %18 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %10, i64 0, i64 0
  %19 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %9, i64 0, i64 0
  call void @llvm.va_copy.p0(ptr %18, ptr %19)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %20 = call noundef ptr @_ZNSt6vectorIcN2al9allocatorIcLm1EEEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %21 = call noundef i64 @_ZNKSt6vectorIcN2al9allocatorIcLm1EEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %9, i64 0, i64 0
  %24 = call i32 @vsnprintf(ptr noundef %20, i64 noundef %21, ptr noundef %22, ptr noundef %23) #7
  store i32 %24, ptr %11, align 4, !tbaa !9
  %25 = load i32, ptr %11, align 4, !tbaa !9
  %26 = icmp sge i32 %25, 0
  br i1 %26, label %27, label %46

27:                                               ; preds = %3
  %28 = load i32, ptr %11, align 4, !tbaa !9
  %29 = sext i32 %28 to i64
  %30 = call noundef i64 @_ZNKSt6vectorIcN2al9allocatorIcLm1EEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %31 = icmp uge i64 %29, %30
  br i1 %31, label %32, label %46

32:                                               ; preds = %27
  %33 = load i32, ptr %11, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = add i64 %34, 1
  invoke void @_ZNSt6vectorIcN2al9allocatorIcLm1EEEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %35)
          to label %36 unwind label %42

36:                                               ; preds = %32
  %37 = call noundef ptr @_ZNSt6vectorIcN2al9allocatorIcLm1EEEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %38 = call noundef i64 @_ZNKSt6vectorIcN2al9allocatorIcLm1EEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %10, i64 0, i64 0
  %41 = call i32 @vsnprintf(ptr noundef %37, i64 noundef %38, ptr noundef %39, ptr noundef %40) #7
  store i32 %41, ptr %11, align 4, !tbaa !9
  br label %46

42:                                               ; preds = %32
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %12, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #7
  call void @_ZNSt6vectorIcN2al9allocatorIcLm1EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #7
  br label %80

46:                                               ; preds = %36, %27, %3
  %47 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %10, i64 0, i64 0
  call void @llvm.va_end.p0(ptr %47)
  %48 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %9, i64 0, i64 0
  call void @llvm.va_end.p0(ptr %48)
  %49 = load i32, ptr %11, align 4, !tbaa !9
  %50 = icmp sge i32 %49, 0
  br i1 %50, label %51, label %53

51:                                               ; preds = %46
  %52 = call noundef ptr @_ZNSt6vectorIcN2al9allocatorIcLm1EEEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  store ptr %52, ptr %6, align 8, !tbaa !5
  br label %54

53:                                               ; preds = %46
  store ptr @.str, ptr %6, align 8, !tbaa !5
  br label %54

54:                                               ; preds = %53, %51
  br label %55

55:                                               ; preds = %54
  %56 = load i32, ptr @gLogLevel, align 4, !tbaa !11
  %57 = icmp sge i32 %56, 2
  %58 = xor i1 %57, true
  %59 = xor i1 %58, true
  %60 = zext i1 %59 to i64
  %61 = call i64 @llvm.expect.i64(i64 %60, i64 0)
  %62 = icmp ne i64 %61, 0
  br i1 %62, label %63, label %69

63:                                               ; preds = %55
  %64 = load ptr, ptr @gLogFile, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store ptr %16, ptr %14, align 8, !tbaa !5
  %65 = load ptr, ptr %14, align 8, !tbaa !5
  %66 = load i32, ptr %5, align 4, !tbaa !9
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef @.str.1, ptr noundef %65, i32 noundef %66, ptr noundef %67) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %69

69:                                               ; preds = %63, %55
  br label %70

70:                                               ; preds = %69
  br label %71

71:                                               ; preds = %70
  %72 = load i8, ptr @TrapALError, align 1, !tbaa !13, !range !15, !noundef !16
  %73 = trunc i8 %72 to i1
  br i1 %73, label %74, label %76

74:                                               ; preds = %71
  %75 = call i32 @raise(i32 noundef 5) #7
  br label %76

76:                                               ; preds = %74, %71
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !9
  %77 = getelementptr inbounds %struct.ALCcontext, ptr %16, i32 0, i32 8
  %78 = load i32, ptr %5, align 4, !tbaa !9
  %79 = call noundef zeroext i1 @_ZNSt13__atomic_baseIiE23compare_exchange_strongERiiSt12memory_order(ptr noundef nonnull align 4 dereferenceable(4) %77, ptr noundef nonnull align 4 dereferenceable(4) %15, i32 noundef %78, i32 noundef 5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #7
  call void @_ZNSt6vectorIcN2al9allocatorIcLm1EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #7
  ret void

80:                                               ; preds = %42
  %81 = load ptr, ptr %12, align 8
  %82 = load i32, ptr %13, align 4
  %83 = insertvalue { ptr, i32 } poison, ptr %81, 0
  %84 = insertvalue { ptr, i32 } %83, i32 %82, 1
  resume { ptr, i32 } %84
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIcN2al9allocatorIcLm1EEEEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIcN2al9allocatorIcLm1EEEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: nounwind
declare i32 @raise(i32 noundef) #3

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt13__atomic_baseIiE23compare_exchange_strongERiiSt12memory_order(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), i32 noundef, i32 noundef) #6 align 2

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind willreturn }
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 = { 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 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #6 = { alwaysinline 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 }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTS8LogLevel", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!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"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<char, al::allocator<char, 1>>::_Vector_impl" }
%"struct.std::_Vector_base<char, al::allocator<char, 1>>::_Vector_impl" = type { %"struct.std::_Vector_base<char, al::allocator<char, 1>>::_Vector_impl_data" }
%"struct.std::_Vector_base<char, al::allocator<char, 1>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.al::allocator" = type { i8 }
%struct.__va_list_tag = type { i32, i32, ptr, ptr }

@TrapALError = external dso_local local_unnamed_addr global i8, align 1
@.str = external hidden unnamed_addr constant [38 x i8], align 1
@gLogLevel = external local_unnamed_addr global i32, align 4
@gLogFile = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [64 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10ALCcontext8setErrorEiPKcz(ptr noundef nonnull align 16 dereferenceable(752) %0, i32 noundef %1, ptr nocapture noundef readonly %2, ...) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"struct.al::allocator", align 1
  %6 = alloca [1 x %struct.__va_list_tag], align 16
  %7 = alloca [1 x %struct.__va_list_tag], align 16
  %8 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #7
  call void @_ZNSt6vectorIcN2al9allocatorIcLm1EEEEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 256, ptr noundef nonnull align 1 dereferenceable(1) %5)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #7
  call void @llvm.va_start.p0(ptr nonnull %6)
  call void @llvm.va_copy.p0(ptr nonnull %7, ptr nonnull %6)
  %9 = call noundef ptr @_ZNSt6vectorIcN2al9allocatorIcLm1EEEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %10 = call noundef i64 @_ZNKSt6vectorIcN2al9allocatorIcLm1EEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %11 = call i32 @vsnprintf(ptr noundef %9, i64 noundef %10, ptr noundef %2, ptr noundef nonnull %6) #7
  %12 = icmp sgt i32 %11, -1
  br i1 %12, label %13, label %.critedge16

13:                                               ; preds = %3
  %14 = zext nneg i32 %11 to i64
  %15 = call noundef i64 @_ZNKSt6vectorIcN2al9allocatorIcLm1EEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %.not = icmp ugt i64 %15, %14
  br i1 %.not, label %.critedge, label %16

16:                                               ; preds = %13
  %17 = add nuw nsw i64 %14, 1
  invoke void @_ZNSt6vectorIcN2al9allocatorIcLm1EEEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %17)
          to label %18 unwind label %23

18:                                               ; preds = %16
  %19 = call noundef ptr @_ZNSt6vectorIcN2al9allocatorIcLm1EEEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %20 = call noundef i64 @_ZNKSt6vectorIcN2al9allocatorIcLm1EEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %21 = call i32 @vsnprintf(ptr noundef %19, i64 noundef %20, ptr noundef %2, ptr noundef nonnull %7) #7
  %22 = icmp sgt i32 %21, -1
  call void @llvm.va_end.p0(ptr nonnull %7)
  call void @llvm.va_end.p0(ptr nonnull %6)
  br i1 %22, label %25, label %27

23:                                               ; preds = %16
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  call void @_ZNSt6vectorIcN2al9allocatorIcLm1EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  resume { ptr, i32 } %24

.critedge:                                        ; preds = %13
  call void @llvm.va_end.p0(ptr nonnull %7)
  call void @llvm.va_end.p0(ptr nonnull %6)
  br label %25

25:                                               ; preds = %.critedge, %18
  %26 = call noundef ptr @_ZNSt6vectorIcN2al9allocatorIcLm1EEEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  br label %27

.critedge16:                                      ; preds = %3
  call void @llvm.va_end.p0(ptr nonnull %7)
  call void @llvm.va_end.p0(ptr nonnull %6)
  br label %27

27:                                               ; preds = %18, %.critedge16, %25
  %.0 = phi ptr [ %26, %25 ], [ @.str, %.critedge16 ], [ @.str, %18 ]
  %28 = load i32, ptr @gLogLevel, align 4, !tbaa !5
  %29 = icmp sgt i32 %28, 1
  br i1 %29, label %30, label %33, !prof !9

30:                                               ; preds = %27
  %31 = load ptr, ptr @gLogFile, align 8, !tbaa !10
  %32 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef nonnull @.str.1, ptr noundef nonnull %0, i32 noundef %1, ptr noundef %.0) #7
  br label %33

33:                                               ; preds = %30, %27
  %34 = load i8, ptr @TrapALError, align 1, !tbaa !12, !range !14, !noundef !15
  %35 = trunc nuw i8 %34 to i1
  br i1 %35, label %36, label %38

36:                                               ; preds = %33
  %37 = call i32 @raise(i32 noundef 5) #7
  br label %38

38:                                               ; preds = %36, %33
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  store i32 0, ptr %8, align 4, !tbaa !16
  %39 = getelementptr inbounds i8, ptr %0, i64 448
  %40 = call noundef zeroext i1 @_ZNSt13__atomic_baseIiE23compare_exchange_strongERiiSt12memory_order(ptr noundef nonnull align 4 dereferenceable(4) %39, ptr noundef nonnull align 4 dereferenceable(4) %8, i32 noundef %1, i32 noundef 5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  call void @_ZNSt6vectorIcN2al9allocatorIcLm1EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIcN2al9allocatorIcLm1EEEEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIcN2al9allocatorIcLm1EEEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: nounwind
declare i32 @raise(i32 noundef) local_unnamed_addr #5

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #3 = { 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 #4 = { 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 = { 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 = { alwaysinline 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 }

!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 = !{!13, !13, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!17, !17, i64 0}
!17 = !{!"int", !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,LowerExpectIntrinsicPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass