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

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

%struct.ContextBase = type { ptr, %"struct.std::atomic", %"struct.std::atomic.0", %"struct.std::atomic.0", float, %"struct.std::atomic.2", %"struct.std::atomic.4", %"struct.std::atomic.6", %"struct.std::atomic.8", ptr, %"struct.std::atomic.10", [8 x i8], %struct.ContextParams, %"struct.std::atomic.13", %"struct.std::atomic.15", %"struct.std::atomic.17", %"class.std::thread", %"class.al::semaphore", %"class.std::unique_ptr", %"struct.std::atomic", %"class.std::vector", %"class.std::vector.21" }
%"struct.std::atomic.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.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 }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::unique_ptr<VoiceChange[]>, al::allocator<std::unique_ptr<VoiceChange[]>, 8>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<VoiceChange[]>, al::allocator<std::unique_ptr<VoiceChange[]>, 8>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<VoiceChange[]>, al::allocator<std::unique_ptr<VoiceChange[]>, 8>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<VoiceChange[]>, al::allocator<std::unique_ptr<VoiceChange[]>, 8>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.21" = type { %"struct.std::_Vector_base.22" }
%"struct.std::_Vector_base.22" = type { %"struct.std::_Vector_base<std::unique_ptr<Voice[]>, al::allocator<std::unique_ptr<Voice[]>, 8>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<Voice[]>, al::allocator<std::unique_ptr<Voice[]>, 8>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<Voice[]>, al::allocator<std::unique_ptr<Voice[]>, 8>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<Voice[]>, al::allocator<std::unique_ptr<Voice[]>, 8>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.ListenerProps = type { %"struct.std::array.32", %"struct.std::array.32", %"struct.std::array.32", %"struct.std::array.32", float, float, %"struct.std::atomic.4" }
%"struct.std::array.32" = type { [3 x float] }
%struct.ALCcontext = type { %"class.al::intrusive_ref", [12 x i8], %struct.ContextBase, %"class.al::intrusive_ptr.25", %"class.std::vector.26", %"struct.al::atomic_invflag", %"struct.std::atomic.0", %"class.std::mutex", %"struct.std::atomic.30", i8, i8, float, float, float, %"class.std::mutex", ptr, ptr, %struct.ALlistener, %"class.std::vector.33", i32, %"class.std::mutex", %"class.std::vector.37", i32, %"class.std::mutex", %"class.std::unique_ptr.41", ptr }
%"class.al::intrusive_ref" = type { %"struct.std::atomic" }
%"class.al::intrusive_ptr.25" = type { ptr }
%"class.std::vector.26" = type { %"struct.std::_Vector_base.27" }
%"struct.std::_Vector_base.27" = type { %"struct.std::_Vector_base<std::unique_ptr<WetBuffer>, al::allocator<std::unique_ptr<WetBuffer>, 8>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<WetBuffer>, al::allocator<std::unique_ptr<WetBuffer>, 8>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<WetBuffer>, al::allocator<std::unique_ptr<WetBuffer>, 8>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<WetBuffer>, al::allocator<std::unique_ptr<WetBuffer>, 8>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.al::atomic_invflag" = type { %"struct.std::atomic_flag" }
%"struct.std::atomic_flag" = type { %"struct.std::__atomic_flag_base" }
%"struct.std::__atomic_flag_base" = type { i8 }
%"struct.std::atomic.30" = type { %"struct.std::__atomic_base.31" }
%"struct.std::__atomic_base.31" = type { i32 }
%struct.ALlistener = type <{ %"struct.std::array.32", %"struct.std::array.32", %"struct.std::array.32", %"struct.std::array.32", float, float, %"struct.al::atomic_invflag", [3 x i8] }>
%"class.std::vector.33" = type { %"struct.std::_Vector_base.34" }
%"struct.std::_Vector_base.34" = type { %"struct.std::_Vector_base<SourceSubList, al::allocator<SourceSubList, 8>>::_Vector_impl" }
%"struct.std::_Vector_base<SourceSubList, al::allocator<SourceSubList, 8>>::_Vector_impl" = type { %"struct.std::_Vector_base<SourceSubList, al::allocator<SourceSubList, 8>>::_Vector_impl_data" }
%"struct.std::_Vector_base<SourceSubList, al::allocator<SourceSubList, 8>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.37" = type { %"struct.std::_Vector_base.38" }
%"struct.std::_Vector_base.38" = type { %"struct.std::_Vector_base<EffectSlotSubList, al::allocator<EffectSlotSubList, 8>>::_Vector_impl" }
%"struct.std::_Vector_base<EffectSlotSubList, al::allocator<EffectSlotSubList, 8>>::_Vector_impl" = type { %"struct.std::_Vector_base<EffectSlotSubList, al::allocator<EffectSlotSubList, 8>>::_Vector_impl_data" }
%"struct.std::_Vector_base<EffectSlotSubList, al::allocator<EffectSlotSubList, 8>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::mutex" = type { %"class.std::__mutex_base" }
%"class.std::__mutex_base" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::unique_ptr.41" = type { %"struct.std::__uniq_ptr_data.42" }
%"struct.std::__uniq_ptr_data.42" = type { %"class.std::__uniq_ptr_impl.43" }
%"class.std::__uniq_ptr_impl.43" = type { %"class.std::tuple.44" }
%"class.std::tuple.44" = type { %"struct.std::_Tuple_impl.45" }
%"struct.std::_Tuple_impl.45" = type { %"struct.std::_Head_base.48" }
%"struct.std::_Head_base.48" = type { ptr }

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z19UpdateListenerPropsP10ALCcontext(ptr noundef %0) #1 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  %6 = load ptr, ptr %2, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %6, i64 16
  %8 = getelementptr inbounds %struct.ContextBase, ptr %7, i32 0, i32 6
  %9 = call noundef ptr @_ZNKSt6atomicIP13ListenerPropsE4loadESt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %8, i32 noundef 2) #6
  store ptr %9, ptr %3, align 8, !tbaa !5
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = icmp ne ptr %10, null
  br i1 %11, label %25, label %12

12:                                               ; preds = %1
  %13 = call noundef ptr @_ZN13ListenerPropsnwEm(i64 noundef 64)
  call void @llvm.memset.p0.i64(ptr align 8 %13, i8 0, i64 64, i1 false)
  %14 = getelementptr inbounds %struct.ListenerProps, ptr %13, i32 0, i32 0
  %15 = getelementptr inbounds %"struct.std::array.32", ptr %14, i32 0, i32 0
  %16 = getelementptr inbounds %struct.ListenerProps, ptr %13, i32 0, i32 1
  %17 = getelementptr inbounds %"struct.std::array.32", ptr %16, i32 0, i32 0
  %18 = getelementptr inbounds %struct.ListenerProps, ptr %13, i32 0, i32 2
  %19 = getelementptr inbounds %"struct.std::array.32", ptr %18, i32 0, i32 0
  %20 = getelementptr inbounds %struct.ListenerProps, ptr %13, i32 0, i32 3
  %21 = getelementptr inbounds %"struct.std::array.32", ptr %20, i32 0, i32 0
  %22 = getelementptr inbounds %struct.ListenerProps, ptr %13, i32 0, i32 4
  %23 = getelementptr inbounds %struct.ListenerProps, ptr %13, i32 0, i32 5
  %24 = getelementptr inbounds %struct.ListenerProps, ptr %13, i32 0, i32 6
  store ptr %13, ptr %3, align 8, !tbaa !5
  br label %39

25:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  br label %26

26:                                               ; preds = %30, %25
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.ListenerProps, ptr %27, i32 0, i32 6
  %29 = call noundef ptr @_ZNKSt6atomicIP13ListenerPropsE4loadESt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %28, i32 noundef 0) #6
  store ptr %29, ptr %4, align 8, !tbaa !5
  br label %30

30:                                               ; preds = %26
  %31 = load ptr, ptr %2, align 8, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %31, i64 16
  %33 = getelementptr inbounds %struct.ContextBase, ptr %32, i32 0, i32 6
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = call noundef zeroext i1 @_ZNSt6atomicIP13ListenerPropsE21compare_exchange_weakERS1_S1_St12memory_orderS4_(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef %34, i32 noundef 5, i32 noundef 2) #6
  %36 = zext i1 %35 to i32
  %37 = icmp eq i32 %36, 0
  br i1 %37, label %26, label %38, !llvm.loop !9

38:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  br label %39

39:                                               ; preds = %38, %12
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %40 = load ptr, ptr %2, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.ALCcontext, ptr %40, i32 0, i32 17
  store ptr %41, ptr %5, align 8, !tbaa !5
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.ALlistener, ptr %42, i32 0, i32 0
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.ListenerProps, ptr %44, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %45, ptr align 4 %43, i64 12, i1 false), !tbaa.struct !11
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.ALlistener, ptr %46, i32 0, i32 1
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.ListenerProps, ptr %48, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %49, ptr align 4 %47, i64 12, i1 false), !tbaa.struct !11
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.ALlistener, ptr %50, i32 0, i32 2
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.ListenerProps, ptr %52, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %53, ptr align 4 %51, i64 12, i1 false), !tbaa.struct !11
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.ALlistener, ptr %54, i32 0, i32 3
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.ListenerProps, ptr %56, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %57, ptr align 4 %55, i64 12, i1 false), !tbaa.struct !11
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.ALlistener, ptr %58, i32 0, i32 4
  %60 = load float, ptr %59, align 4, !tbaa !13
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.ListenerProps, ptr %61, i32 0, i32 4
  store float %60, ptr %62, align 8, !tbaa !21
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.ALlistener, ptr %63, i32 0, i32 5
  %65 = load float, ptr %64, align 4, !tbaa !25
  %66 = load ptr, ptr %3, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.ListenerProps, ptr %66, i32 0, i32 5
  store float %65, ptr %67, align 4, !tbaa !26
  %68 = load ptr, ptr %2, align 8, !tbaa !5
  %69 = getelementptr inbounds i8, ptr %68, i64 16
  %70 = getelementptr inbounds %struct.ContextBase, ptr %69, i32 0, i32 12
  %71 = getelementptr inbounds %struct.ContextParams, ptr %70, i32 0, i32 1
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = call noundef ptr @_ZNSt6atomicIP13ListenerPropsE8exchangeES1_St12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %71, ptr noundef %72, i32 noundef 4) #6
  store ptr %73, ptr %3, align 8, !tbaa !5
  %74 = load ptr, ptr %3, align 8, !tbaa !5
  %75 = icmp ne ptr %74, null
  br i1 %75, label %76, label %81

76:                                               ; preds = %39
  %77 = load ptr, ptr %2, align 8, !tbaa !5
  %78 = getelementptr inbounds i8, ptr %77, i64 16
  %79 = getelementptr inbounds %struct.ContextBase, ptr %78, i32 0, i32 6
  %80 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_Z17AtomicReplaceHeadIP13ListenerPropsEvRSt6atomicIT_ES3_(ptr noundef nonnull align 8 dereferenceable(8) %79, ptr noundef %80)
  br label %81

81:                                               ; preds = %76, %39
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  ret void
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN13ListenerPropsnwEm(i64 noundef) #1 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt6atomicIP13ListenerPropsE21compare_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) #2 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z17AtomicReplaceHeadIP13ListenerPropsEvRSt6atomicIT_ES3_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{i64 0, i64 12, !12}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !16, i64 48}
!14 = !{!"_ZTS10ALlistener", !15, i64 0, !15, i64 12, !15, i64 24, !15, i64 36, !16, i64 48, !16, i64 52, !17, i64 56}
!15 = !{!"_ZTSSt5arrayIfLm3EE", !7, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = !{!"_ZTSN2al14atomic_invflagE", !18, i64 0}
!18 = !{!"_ZTSSt11atomic_flag", !19, i64 0}
!19 = !{!"_ZTSSt18__atomic_flag_base", !20, i64 0}
!20 = !{!"bool", !7, i64 0}
!21 = !{!22, !16, i64 48}
!22 = !{!"_ZTS13ListenerProps", !15, i64 0, !15, i64 12, !15, i64 24, !15, i64 36, !16, i64 48, !16, i64 52, !23, i64 56}
!23 = !{!"_ZTSSt6atomicIP13ListenerPropsE", !24, i64 0}
!24 = !{!"_ZTSSt13__atomic_baseIP13ListenerPropsE", !6, i64 0}
!25 = !{!14, !16, i64 52}
!26 = !{!22, !16, i64 52}


; 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"

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z19UpdateListenerPropsP10ALCcontext(ptr noundef %0) local_unnamed_addr #1 {
  %2 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %3 = getelementptr inbounds i8, ptr %0, i64 48
  %4 = tail call noundef ptr @_ZNKSt6atomicIP13ListenerPropsE4loadESt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef 2) #6
  store ptr %4, ptr %2, align 8, !tbaa !5
  %.not = icmp eq ptr %4, null
  br i1 %.not, label %5, label %.preheader

5:                                                ; preds = %1
  %6 = tail call noundef ptr @_ZN13ListenerPropsnwEm(i64 noundef 64)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %6, i8 0, i64 64, i1 false)
  store ptr %6, ptr %2, align 8, !tbaa !5
  br label %.loopexit

.preheader:                                       ; preds = %1, %.preheader
  %7 = load ptr, ptr %2, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %7, i64 56
  %9 = call noundef ptr @_ZNKSt6atomicIP13ListenerPropsE4loadESt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %8, i32 noundef 0) #6
  %10 = call noundef zeroext i1 @_ZNSt6atomicIP13ListenerPropsE21compare_exchange_weakERS1_S1_St12memory_orderS4_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef %9, i32 noundef 5, i32 noundef 2) #6
  br i1 %10, label %.loopexit.loopexit, label %.preheader, !llvm.loop !9

.loopexit.loopexit:                               ; preds = %.preheader
  %.pre = load ptr, ptr %2, align 8, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %5
  %11 = phi ptr [ %.pre, %.loopexit.loopexit ], [ %6, %5 ]
  %12 = getelementptr inbounds i8, ptr %0, i64 528
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %11, ptr noundef nonnull align 4 dereferenceable(12) %12, i64 12, i1 false), !tbaa.struct !11
  %13 = getelementptr inbounds i8, ptr %0, i64 540
  %14 = getelementptr inbounds i8, ptr %11, i64 12
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(12) %13, i64 12, i1 false), !tbaa.struct !11
  %15 = getelementptr inbounds i8, ptr %0, i64 552
  %16 = getelementptr inbounds i8, ptr %11, i64 24
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %16, ptr noundef nonnull align 4 dereferenceable(12) %15, i64 12, i1 false), !tbaa.struct !11
  %17 = getelementptr inbounds i8, ptr %0, i64 564
  %18 = getelementptr inbounds i8, ptr %11, i64 36
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %18, ptr noundef nonnull align 4 dereferenceable(12) %17, i64 12, i1 false), !tbaa.struct !11
  %19 = getelementptr inbounds i8, ptr %0, i64 576
  %20 = getelementptr inbounds i8, ptr %11, i64 48
  %21 = load <2 x float>, ptr %19, align 4, !tbaa !13
  store <2 x float> %21, ptr %20, align 8, !tbaa !13
  %22 = getelementptr inbounds i8, ptr %0, i64 104
  %23 = call noundef ptr @_ZNSt6atomicIP13ListenerPropsE8exchangeES1_St12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef %11, i32 noundef 4) #6
  store ptr %23, ptr %2, align 8, !tbaa !5
  %.not12 = icmp eq ptr %23, null
  br i1 %.not12, label %25, label %24

24:                                               ; preds = %.loopexit
  call void @_Z17AtomicReplaceHeadIP13ListenerPropsEvRSt6atomicIT_ES3_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull %23)
  br label %25

25:                                               ; preds = %24, %.loopexit
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  ret void
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN13ListenerPropsnwEm(i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt6atomicIP13ListenerPropsE21compare_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 #2 align 2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z17AtomicReplaceHeadIP13ListenerPropsEvRSt6atomicIT_ES3_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{i64 0, i64 12, !12}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"float", !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,LoopSimplifyPass,LoopUnrollPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass