; LLVM IR from Try/Tempest :: Engine/thirdparty/openal-soft/core/context.ll (ZN11ContextBase17allocContextPropsEv)

; 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::unique_ptr.257" = type { %"struct.std::__uniq_ptr_data.258" }
%"struct.std::__uniq_ptr_data.258" = type { %"class.std::__uniq_ptr_impl.259" }
%"class.std::__uniq_ptr_impl.259" = type { %"class.std::tuple.260" }
%"class.std::tuple.260" = type { %"struct.std::_Tuple_impl.261" }
%"struct.std::_Tuple_impl.261" = type { %"struct.std::_Head_base.264" }
%"struct.std::_Head_base.264" = type { ptr }
%"class.al::span.265" = type { ptr }
%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", ptr, %"struct.std::atomic.8", %struct.ContextParams, %"class.al::atomic_unique_ptr", %"struct.std::atomic.13", %"class.al::atomic_unique_ptr.15", %"class.std::thread", %"class.al::semaphore", %"class.std::unique_ptr", %"struct.std::atomic.20", %"class.std::vector", %"class.std::vector.21", %"class.std::vector.26", %"class.std::vector.31", %"class.std::vector.36", %"class.std::vector.41" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"struct.std::atomic.0" = type { %"struct.std::__atomic_base.1" }
%"struct.std::__atomic_base.1" = type { i8 }
%"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.ContextParams = type <{ %"struct.std::atomic.2", [8 x i8], %"class.alu::Vector", %"class.alu::Matrix", %"class.alu::Vector", float, float, float, float, float, i8, i8, [10 x i8] }>
%"class.alu::Matrix" = type { %"struct.std::array.10" }
%"struct.std::array.10" = type { [16 x float] }
%"class.alu::Vector" = type { %"struct.std::array" }
%"struct.std::array" = type { [4 x float] }
%"class.al::atomic_unique_ptr" = type { %"struct.std::atomic.11" }
%"struct.std::atomic.11" = type { %"struct.std::__atomic_base.12" }
%"struct.std::__atomic_base.12" = type { ptr }
%"struct.std::atomic.13" = type { %"struct.std::__atomic_base.14" }
%"struct.std::__atomic_base.14" = type { i64 }
%"class.al::atomic_unique_ptr.15" = type { %"struct.std::atomic.16" }
%"struct.std::atomic.16" = type { %"struct.std::__atomic_base.17" }
%"struct.std::__atomic_base.17" = 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.19" }
%"struct.std::_Head_base.19" = type { ptr }
%"struct.std::atomic.20" = type { %"class.std::bitset" }
%"class.std::bitset" = type { %"struct.std::_Base_bitset" }
%"struct.std::_Base_bitset" = type { i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::unique_ptr<std::array<VoiceChange, 128>>, std::allocator<std::unique_ptr<std::array<VoiceChange, 128>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<std::array<VoiceChange, 128>>, std::allocator<std::unique_ptr<std::array<VoiceChange, 128>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<std::array<VoiceChange, 128>>, std::allocator<std::unique_ptr<std::array<VoiceChange, 128>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<std::array<VoiceChange, 128>>, std::allocator<std::unique_ptr<std::array<VoiceChange, 128>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.21" = type { %"struct.std::_Vector_base.22" }
%"struct.std::_Vector_base.22" = type { %"struct.std::_Vector_base<std::unique_ptr<std::array<Voice, 32>>, std::allocator<std::unique_ptr<std::array<Voice, 32>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<std::array<Voice, 32>>, std::allocator<std::unique_ptr<std::array<Voice, 32>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<std::array<Voice, 32>>, std::allocator<std::unique_ptr<std::array<Voice, 32>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<std::array<Voice, 32>>, std::allocator<std::unique_ptr<std::array<Voice, 32>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.26" = type { %"struct.std::_Vector_base.27" }
%"struct.std::_Vector_base.27" = type { %"struct.std::_Vector_base<std::unique_ptr<std::array<VoicePropsItem, 32>>, std::allocator<std::unique_ptr<std::array<VoicePropsItem, 32>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<std::array<VoicePropsItem, 32>>, std::allocator<std::unique_ptr<std::array<VoicePropsItem, 32>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<std::array<VoicePropsItem, 32>>, std::allocator<std::unique_ptr<std::array<VoicePropsItem, 32>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<std::array<VoicePropsItem, 32>>, std::allocator<std::unique_ptr<std::array<VoicePropsItem, 32>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.31" = type { %"struct.std::_Vector_base.32" }
%"struct.std::_Vector_base.32" = type { %"struct.std::_Vector_base<std::unique_ptr<std::array<EffectSlot, 4>>, std::allocator<std::unique_ptr<std::array<EffectSlot, 4>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<std::array<EffectSlot, 4>>, std::allocator<std::unique_ptr<std::array<EffectSlot, 4>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<std::array<EffectSlot, 4>>, std::allocator<std::unique_ptr<std::array<EffectSlot, 4>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<std::array<EffectSlot, 4>>, std::allocator<std::unique_ptr<std::array<EffectSlot, 4>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.36" = type { %"struct.std::_Vector_base.37" }
%"struct.std::_Vector_base.37" = type { %"struct.std::_Vector_base<std::unique_ptr<std::array<EffectSlotProps, 4>>, std::allocator<std::unique_ptr<std::array<EffectSlotProps, 4>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<std::array<EffectSlotProps, 4>>, std::allocator<std::unique_ptr<std::array<EffectSlotProps, 4>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<std::array<EffectSlotProps, 4>>, std::allocator<std::unique_ptr<std::array<EffectSlotProps, 4>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<std::array<EffectSlotProps, 4>>, std::allocator<std::unique_ptr<std::array<EffectSlotProps, 4>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.41" = type { %"struct.std::_Vector_base.42" }
%"struct.std::_Vector_base.42" = type { %"struct.std::_Vector_base<std::unique_ptr<std::array<ContextProps, 2>>, std::allocator<std::unique_ptr<std::array<ContextProps, 2>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<std::array<ContextProps, 2>>, std::allocator<std::unique_ptr<std::array<ContextProps, 2>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<std::array<ContextProps, 2>>, std::allocator<std::unique_ptr<std::array<ContextProps, 2>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<std::array<ContextProps, 2>>, std::allocator<std::unique_ptr<std::array<ContextProps, 2>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.ContextProps = type { %"struct.std::array.66", %"struct.std::array.66", %"struct.std::array.66", %"struct.std::array.66", float, float, float, float, float, float, i8, i8, %"struct.std::atomic.2" }
%"struct.std::array.66" = type { [3 x float] }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nounwind
declare void @_Z8al_print8LogLevelPKcz(i32 noundef, ptr noundef, ...) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11ContextBase17allocContextPropsEv(ptr noundef nonnull align 16 dereferenceable(432) %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.std::unique_ptr.257", align 8
  %4 = alloca %"class.al::span.265", align 8
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %10 = load ptr, ptr %2, align 8
  %11 = getelementptr inbounds %struct.ContextBase, ptr %10, i32 0, i32 23
  %12 = call noundef i64 @_ZNKSt6vectorISt10unique_ptrISt5arrayI12ContextPropsLm2EESt14default_deleteIS3_EESaIS6_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  %13 = add i64 %12, 1
  %14 = mul i64 %13, 2
  call void (i32, ptr, ...) @_Z8al_print8LogLevelPKcz(i32 noundef 3, ptr noundef @.str.11, i64 noundef %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  call void @_ZSt11make_uniqueISt5arrayI12ContextPropsLm2EEJEENSt8__detail9_MakeUniqIT_E15__single_objectEDpOT0_(ptr dead_on_unwind writable sret(%"class.std::unique_ptr.257") align 8 %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %15 = call noundef nonnull align 8 dereferenceable(176) ptr @_ZNKSt10unique_ptrISt5arrayI12ContextPropsLm2EESt14default_deleteIS2_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @_ZN2al4spanI12ContextPropsLm2EEC2ILm2EEERSt5arrayIS1_XT_EE(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(176) %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store i64 1, ptr %5, align 8, !tbaa !9
  br label %16

16:                                               ; preds = %29, %1
  %17 = load i64, ptr %5, align 8, !tbaa !9
  %18 = icmp ult i64 %17, 2
  br i1 %18, label %20, label %19

19:                                               ; preds = %16
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %36

20:                                               ; preds = %16
  %21 = load i64, ptr %5, align 8, !tbaa !9
  %22 = sub i64 %21, 1
  %23 = invoke noundef nonnull align 8 dereferenceable(88) ptr @_ZNK2al4spanI12ContextPropsLm2EEixEm(ptr noundef nonnull align 8 dereferenceable(8) %4, i64 noundef %22)
          to label %24 unwind label %32

24:                                               ; preds = %20
  %25 = getelementptr inbounds %struct.ContextProps, ptr %23, i32 0, i32 12
  %26 = load i64, ptr %5, align 8, !tbaa !9
  %27 = invoke noundef nonnull align 8 dereferenceable(88) ptr @_ZNK2al4spanI12ContextPropsLm2EEixEm(ptr noundef nonnull align 8 dereferenceable(8) %4, i64 noundef %26)
          to label %28 unwind label %32

28:                                               ; preds = %24
  call void @_ZNSt6atomicIP12ContextPropsE5storeES1_St12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef %27, i32 noundef 0) #6
  br label %29

29:                                               ; preds = %28
  %30 = load i64, ptr %5, align 8, !tbaa !9
  %31 = add i64 %30, 1
  store i64 %31, ptr %5, align 8, !tbaa !9
  br label %16, !llvm.loop !11

32:                                               ; preds = %24, %20
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %6, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %60

36:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %37 = getelementptr inbounds %struct.ContextBase, ptr %10, i32 0, i32 23
  %38 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorISt10unique_ptrISt5arrayI12ContextPropsLm2EESt14default_deleteIS3_EESaIS6_EE12emplace_backIJS6_EEERS6_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %37, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %39 unwind label %56

39:                                               ; preds = %36
  %40 = call noundef ptr @_ZNKSt10unique_ptrISt5arrayI12ContextPropsLm2EESt14default_deleteIS2_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %38) #6
  store ptr %40, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %41 = getelementptr inbounds %struct.ContextBase, ptr %10, i32 0, i32 5
  %42 = call noundef ptr @_ZNKSt6atomicIP12ContextPropsE4loadESt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %41, i32 noundef 2) #6
  store ptr %42, ptr %9, align 8, !tbaa !5
  br label %43

43:                                               ; preds = %48, %39
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt5arrayI12ContextPropsLm2EE4backEv(ptr noundef nonnull align 8 dereferenceable(176) %44) #6
  %46 = getelementptr inbounds %struct.ContextProps, ptr %45, i32 0, i32 12
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZNSt6atomicIP12ContextPropsE5storeES1_St12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef %47, i32 noundef 0) #6
  br label %48

48:                                               ; preds = %43
  %49 = getelementptr inbounds %struct.ContextBase, ptr %10, i32 0, i32 5
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = call noundef ptr @_ZNSt5arrayI12ContextPropsLm2EE4dataEv(ptr noundef nonnull align 8 dereferenceable(176) %50) #7
  %52 = call noundef zeroext i1 @_ZNSt6atomicIP12ContextPropsE21compare_exchange_weakERS1_S1_St12memory_orderS4_(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef %51, i32 noundef 4, i32 noundef 2) #6
  %53 = zext i1 %52 to i32
  %54 = icmp eq i32 %53, 0
  br i1 %54, label %43, label %55, !llvm.loop !13

55:                                               ; preds = %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @_ZNSt10unique_ptrISt5arrayI12ContextPropsLm2EESt14default_deleteIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  ret void

56:                                               ; preds = %36
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %6, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %60

60:                                               ; preds = %56, %32
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @_ZNSt10unique_ptrISt5arrayI12ContextPropsLm2EESt14default_deleteIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  br label %61

61:                                               ; preds = %60
  %62 = load ptr, ptr %6, align 8
  %63 = load i32, ptr %7, align 4
  %64 = insertvalue { ptr, i32 } poison, ptr %62, 0
  %65 = insertvalue { ptr, i32 } %64, i32 %63, 1
  resume { ptr, i32 } %65
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11make_uniqueISt5arrayI12ContextPropsLm2EEJEENSt8__detail9_MakeUniqIT_E15__single_objectEDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.std::unique_ptr.257") align 8) #4

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(88) ptr @_ZNK2al4spanI12ContextPropsLm2EEixEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #3 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind willreturn memory(none) uwtable
declare dso_local noundef ptr @_ZNSt5arrayI12ContextPropsLm2EE4dataEv(ptr noundef nonnull align 8 dereferenceable(176)) #5 align 2

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

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

!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 = !{!"long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


; 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::unique_ptr.257" = type { %"struct.std::__uniq_ptr_data.258" }
%"struct.std::__uniq_ptr_data.258" = type { %"class.std::__uniq_ptr_impl.259" }
%"class.std::__uniq_ptr_impl.259" = type { %"class.std::tuple.260" }
%"class.std::tuple.260" = type { %"struct.std::_Tuple_impl.261" }
%"struct.std::_Tuple_impl.261" = type { %"struct.std::_Head_base.264" }
%"struct.std::_Head_base.264" = type { ptr }
%"class.al::span.265" = type { ptr }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nounwind
declare void @_Z8al_print8LogLevelPKcz(i32 noundef, ptr noundef, ...) local_unnamed_addr #1

; 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 uwtable
define dso_local void @_ZN11ContextBase17allocContextPropsEv(ptr noundef nonnull align 16 dereferenceable(432) %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
.critedge:
  %1 = alloca %"class.std::unique_ptr.257", align 8
  %2 = alloca %"class.al::span.265", align 8
  %3 = alloca ptr, align 8
  %4 = getelementptr inbounds i8, ptr %0, i64 408
  %5 = tail call noundef i64 @_ZNKSt6vectorISt10unique_ptrISt5arrayI12ContextPropsLm2EESt14default_deleteIS3_EESaIS6_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  %6 = shl i64 %5, 1
  %7 = add i64 %6, 2
  tail call void (i32, ptr, ...) @_Z8al_print8LogLevelPKcz(i32 noundef 3, ptr noundef nonnull @.str.11, i64 noundef %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  call void @_ZSt11make_uniqueISt5arrayI12ContextPropsLm2EEJEENSt8__detail9_MakeUniqIT_E15__single_objectEDpOT0_(ptr dead_on_unwind nonnull writable sret(%"class.std::unique_ptr.257") align 8 %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %8 = call noundef nonnull align 8 dereferenceable(176) ptr @_ZNKSt10unique_ptrISt5arrayI12ContextPropsLm2EESt14default_deleteIS2_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #6
  call void @_ZN2al4spanI12ContextPropsLm2EEC2ILm2EEERSt5arrayIS1_XT_EE(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(176) %8) #6
  %9 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNK2al4spanI12ContextPropsLm2EEixEm(ptr noundef nonnull align 8 dereferenceable(8) %2, i64 noundef 0)
  %10 = getelementptr inbounds i8, ptr %9, i64 80
  %11 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNK2al4spanI12ContextPropsLm2EEixEm(ptr noundef nonnull align 8 dereferenceable(8) %2, i64 noundef 1)
  call void @_ZNSt6atomicIP12ContextPropsE5storeES1_St12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull %11, i32 noundef 0) #6
  %12 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorISt10unique_ptrISt5arrayI12ContextPropsLm2EESt14default_deleteIS3_EESaIS6_EE12emplace_backIJS6_EEERS6_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %13 unwind label %24

13:                                               ; preds = %.critedge
  %14 = call noundef ptr @_ZNKSt10unique_ptrISt5arrayI12ContextPropsLm2EESt14default_deleteIS2_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %15 = getelementptr inbounds i8, ptr %0, i64 24
  %16 = call noundef ptr @_ZNKSt6atomicIP12ContextPropsE4loadESt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %15, i32 noundef 2) #6
  store ptr %16, ptr %3, align 8, !tbaa !5
  br label %17

17:                                               ; preds = %17, %13
  %18 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt5arrayI12ContextPropsLm2EE4backEv(ptr noundef nonnull align 8 dereferenceable(176) %14) #6
  %19 = getelementptr inbounds i8, ptr %18, i64 80
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZNSt6atomicIP12ContextPropsE5storeES1_St12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef %20, i32 noundef 0) #6
  %21 = call noundef ptr @_ZNSt5arrayI12ContextPropsLm2EE4dataEv(ptr noundef nonnull align 8 dereferenceable(176) %14) #7
  %22 = call noundef zeroext i1 @_ZNSt6atomicIP12ContextPropsE21compare_exchange_weakERS1_S1_St12memory_orderS4_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef %21, i32 noundef 4, i32 noundef 2) #6
  br i1 %22, label %23, label %17, !llvm.loop !9

23:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @_ZNSt10unique_ptrISt5arrayI12ContextPropsLm2EESt14default_deleteIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %1) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret void

24:                                               ; preds = %.critedge
  %25 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @_ZNSt10unique_ptrISt5arrayI12ContextPropsLm2EESt14default_deleteIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %1) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  resume { ptr, i32 } %25
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11make_uniqueISt5arrayI12ContextPropsLm2EEJEENSt8__detail9_MakeUniqIT_E15__single_objectEDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.std::unique_ptr.257") align 8) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(88) ptr @_ZNK2al4spanI12ContextPropsLm2EEixEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #3 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
declare dso_local noundef ptr @_ZNSt5arrayI12ContextPropsLm2EE4dataEv(ptr noundef nonnull align 8 dereferenceable(176)) local_unnamed_addr #5 align 2

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

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

!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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


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