; LLVM IR from software-mansion/react-native-audio-api :: packages/react-native-audio-api/common/cpp/audioapi/core/utils/AudioNodeManage_80407735 (ZN8audioapi16AudioNodeManager7cleanupEv)

; 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.audioapi::Locker" = type { ptr }
%"struct.std::__detail::_Node_iterator.36" = type { %"struct.std::__detail::_Node_iterator_base.37" }
%"struct.std::__detail::_Node_iterator_base.37" = type { ptr }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"class.audioapi::AudioNodeManager" = type { %"class.std::mutex", %"class.audioapi::AudioNodeDestructor", %"class.std::unordered_set", %"class.std::unordered_set.5", %"class.std::vector.25" }
%"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.audioapi::AudioNodeDestructor" = type <{ %"class.std::mutex", %"class.std::thread", %"class.std::condition_variable", %"class.std::vector", %"struct.std::atomic", [7 x i8] }>
%"class.std::thread" = type { %"class.std::thread::id" }
%"class.std::thread::id" = type { i64 }
%"class.std::condition_variable" = type { %"class.std::__condvar" }
%"class.std::__condvar" = type { %union.pthread_cond_t }
%union.pthread_cond_t = type { %struct.__pthread_cond_s }
%struct.__pthread_cond_s = type { %union.__atomic_wide_counter, %union.__atomic_wide_counter, [2 x i32], [2 x i32], i32, i32, [2 x i32] }
%union.__atomic_wide_counter = type { i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::shared_ptr<audioapi::AudioNode>, std::allocator<std::shared_ptr<audioapi::AudioNode>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<audioapi::AudioNode>, std::allocator<std::shared_ptr<audioapi::AudioNode>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<audioapi::AudioNode>, std::allocator<std::shared_ptr<audioapi::AudioNode>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<audioapi::AudioNode>, std::allocator<std::shared_ptr<audioapi::AudioNode>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i8 }
%"class.std::unordered_set" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::unordered_set.5" = type { %"class.std::_Hashtable.6" }
%"class.std::_Hashtable.6" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::vector.25" = type { %"struct.std::_Vector_base.26" }
%"struct.std::_Vector_base.26" = type { %"struct.std::_Vector_base<std::tuple<std::shared_ptr<audioapi::AudioNode>, std::shared_ptr<audioapi::AudioNode>, audioapi::AudioNodeManager::ConnectionType>, std::allocator<std::tuple<std::shared_ptr<audioapi::AudioNode>, std::shared_ptr<audioapi::AudioNode>, audioapi::AudioNodeManager::ConnectionType>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::tuple<std::shared_ptr<audioapi::AudioNode>, std::shared_ptr<audioapi::AudioNode>, audioapi::AudioNodeManager::ConnectionType>, std::allocator<std::tuple<std::shared_ptr<audioapi::AudioNode>, std::shared_ptr<audioapi::AudioNode>, audioapi::AudioNodeManager::ConnectionType>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::tuple<std::shared_ptr<audioapi::AudioNode>, std::shared_ptr<audioapi::AudioNode>, audioapi::AudioNodeManager::ConnectionType>, std::allocator<std::tuple<std::shared_ptr<audioapi::AudioNode>, std::shared_ptr<audioapi::AudioNode>, audioapi::AudioNodeManager::ConnectionType>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::tuple<std::shared_ptr<audioapi::AudioNode>, std::shared_ptr<audioapi::AudioNode>, audioapi::AudioNodeManager::ConnectionType>, std::allocator<std::tuple<std::shared_ptr<audioapi::AudioNode>, std::shared_ptr<audioapi::AudioNode>, audioapi::AudioNodeManager::ConnectionType>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8audioapi16AudioNodeManager7cleanupEv(ptr noundef nonnull align 8 dereferenceable(304) %0) #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.audioapi::Locker", align 8
  %4 = alloca %"struct.std::__detail::_Node_iterator.36", align 8
  %5 = alloca %"struct.std::__detail::_Node_iterator.36", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %9 = alloca %"struct.std::__detail::_Node_iterator", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %10 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %11 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN8audioapi16AudioNodeManager12getGraphLockEv(ptr noundef nonnull align 8 dereferenceable(304) %10)
  call void @_ZN8audioapi6LockerC2ERSt5mutex(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(40) %11)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %12 = getelementptr inbounds %"class.audioapi::AudioNodeManager", ptr %10, i32 0, i32 2
  %13 = call ptr @_ZNSt13unordered_setISt10shared_ptrIN8audioapi24AudioScheduledSourceNodeEESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %12) #4
  %14 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.36", ptr %4, i32 0, i32 0
  %15 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.37", ptr %14, i32 0, i32 0
  store ptr %13, ptr %15, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %16 = getelementptr inbounds %"class.audioapi::AudioNodeManager", ptr %10, i32 0, i32 2
  %17 = call ptr @_ZNSt13unordered_setISt10shared_ptrIN8audioapi24AudioScheduledSourceNodeEESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %16) #4
  %18 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.36", ptr %5, i32 0, i32 0
  %19 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.37", ptr %18, i32 0, i32 0
  store ptr %17, ptr %19, align 8
  br label %20

20:                                               ; preds = %27, %1
  %21 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt10shared_ptrIN8audioapi24AudioScheduledSourceNodeEELb0EEES7_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  br i1 %21, label %23, label %22

22:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  br label %33

23:                                               ; preds = %20
  %24 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt10shared_ptrIN8audioapi24AudioScheduledSourceNodeEELb1ELb0EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %25 = call noundef ptr @_ZNKSt12__shared_ptrIN8audioapi24AudioScheduledSourceNodeELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %24) #4
  invoke void @_ZN8audioapi9AudioNode7cleanupEv(ptr noundef nonnull align 8 dereferenceable(224) %25)
          to label %26 unwind label %29

26:                                               ; preds = %23
  br label %27

27:                                               ; preds = %26
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt10shared_ptrIN8audioapi24AudioScheduledSourceNodeEELb1ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  br label %20, !llvm.loop !9

29:                                               ; preds = %23
  %30 = landingpad { ptr, i32 }
          cleanup
  %31 = extractvalue { ptr, i32 } %30, 0
  store ptr %31, ptr %6, align 8
  %32 = extractvalue { ptr, i32 } %30, 1
  store i32 %32, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  br label %58

33:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %34 = getelementptr inbounds %"class.audioapi::AudioNodeManager", ptr %10, i32 0, i32 3
  %35 = call ptr @_ZNSt13unordered_setISt10shared_ptrIN8audioapi9AudioNodeEESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %34) #4
  %36 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %8, i32 0, i32 0
  %37 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %36, i32 0, i32 0
  store ptr %35, ptr %37, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %38 = getelementptr inbounds %"class.audioapi::AudioNodeManager", ptr %10, i32 0, i32 3
  %39 = call ptr @_ZNSt13unordered_setISt10shared_ptrIN8audioapi9AudioNodeEESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %38) #4
  %40 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %9, i32 0, i32 0
  %41 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %40, i32 0, i32 0
  store ptr %39, ptr %41, align 8
  br label %42

42:                                               ; preds = %49, %33
  %43 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt10shared_ptrIN8audioapi9AudioNodeEELb0EEES7_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  br i1 %43, label %45, label %44

44:                                               ; preds = %42
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %55

45:                                               ; preds = %42
  %46 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt10shared_ptrIN8audioapi9AudioNodeEELb1ELb0EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  %47 = call noundef ptr @_ZNKSt12__shared_ptrIN8audioapi9AudioNodeELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %46) #4
  invoke void @_ZN8audioapi9AudioNode7cleanupEv(ptr noundef nonnull align 8 dereferenceable(224) %47)
          to label %48 unwind label %51

48:                                               ; preds = %45
  br label %49

49:                                               ; preds = %48
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt10shared_ptrIN8audioapi9AudioNodeEELb1ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  br label %42, !llvm.loop !11

51:                                               ; preds = %45
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %6, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %58

55:                                               ; preds = %44
  %56 = getelementptr inbounds %"class.audioapi::AudioNodeManager", ptr %10, i32 0, i32 2
  call void @_ZNSt13unordered_setISt10shared_ptrIN8audioapi24AudioScheduledSourceNodeEESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(56) %56) #4
  %57 = getelementptr inbounds %"class.audioapi::AudioNodeManager", ptr %10, i32 0, i32 3
  call void @_ZNSt13unordered_setISt10shared_ptrIN8audioapi9AudioNodeEESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(56) %57) #4
  call void @_ZN8audioapi6LockerD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  ret void

58:                                               ; preds = %51, %29
  call void @_ZN8audioapi6LockerD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  br label %59

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

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) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8audioapi6LockerC2ERSt5mutex(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #0 align 2

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

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

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

declare void @_ZN8audioapi9AudioNode7cleanupEv(ptr noundef nonnull align 8 dereferenceable(224)) #3

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_setISt10shared_ptrIN8audioapi9AudioNodeEESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(56)) #2 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 = { 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 = { "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 = { 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 = distinct !{!11, !10}


; 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.audioapi::Locker" = type { ptr }
%"struct.std::__detail::_Node_iterator.36" = type { %"struct.std::__detail::_Node_iterator_base.37" }
%"struct.std::__detail::_Node_iterator_base.37" = type { ptr }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8audioapi16AudioNodeManager7cleanupEv(ptr noundef nonnull align 8 dereferenceable(304) %0) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.audioapi::Locker", align 8
  %3 = alloca %"struct.std::__detail::_Node_iterator.36", align 8
  %4 = alloca %"struct.std::__detail::_Node_iterator.36", align 8
  %5 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %6 = alloca %"struct.std::__detail::_Node_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  %7 = tail call noundef nonnull align 8 dereferenceable(40) ptr @_ZN8audioapi16AudioNodeManager12getGraphLockEv(ptr noundef nonnull align 8 dereferenceable(304) %0)
  call void @_ZN8audioapi6LockerC2ERSt5mutex(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(40) %7)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %8 = getelementptr inbounds i8, ptr %0, i64 168
  %9 = call ptr @_ZNSt13unordered_setISt10shared_ptrIN8audioapi24AudioScheduledSourceNodeEESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %8) #4
  store ptr %9, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %10 = call ptr @_ZNSt13unordered_setISt10shared_ptrIN8audioapi24AudioScheduledSourceNodeEESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %8) #4
  store ptr %10, ptr %4, align 8
  %11 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt10shared_ptrIN8audioapi24AudioScheduledSourceNodeEELb0EEES7_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  br i1 %11, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %18, %1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %12 = getelementptr inbounds i8, ptr %0, i64 224
  %13 = call ptr @_ZNSt13unordered_setISt10shared_ptrIN8audioapi9AudioNodeEESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %12) #4
  store ptr %13, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %14 = call ptr @_ZNSt13unordered_setISt10shared_ptrIN8audioapi9AudioNodeEESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %12) #4
  store ptr %14, ptr %6, align 8
  %15 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt10shared_ptrIN8audioapi9AudioNodeEELb0EEES7_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  br i1 %15, label %.lr.ph5, label %._crit_edge6

.lr.ph:                                           ; preds = %1, %18
  %16 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt10shared_ptrIN8audioapi24AudioScheduledSourceNodeEELb1ELb0EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %17 = call noundef ptr @_ZNKSt12__shared_ptrIN8audioapi24AudioScheduledSourceNodeELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %16) #4
  invoke void @_ZN8audioapi9AudioNode7cleanupEv(ptr noundef nonnull align 8 dereferenceable(224) %17)
          to label %18 unwind label %21

18:                                               ; preds = %.lr.ph
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt10shared_ptrIN8audioapi24AudioScheduledSourceNodeEELb1ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %20 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt10shared_ptrIN8audioapi24AudioScheduledSourceNodeEELb0EEES7_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  br i1 %20, label %.lr.ph, label %._crit_edge, !llvm.loop !5

21:                                               ; preds = %.lr.ph
  %22 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  br label %30

._crit_edge6:                                     ; preds = %25, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @_ZNSt13unordered_setISt10shared_ptrIN8audioapi24AudioScheduledSourceNodeEESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(56) %8) #4
  call void @_ZNSt13unordered_setISt10shared_ptrIN8audioapi9AudioNodeEESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(56) %12) #4
  call void @_ZN8audioapi6LockerD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  ret void

.lr.ph5:                                          ; preds = %._crit_edge, %25
  %23 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt10shared_ptrIN8audioapi9AudioNodeEELb1ELb0EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  %24 = call noundef ptr @_ZNKSt12__shared_ptrIN8audioapi9AudioNodeELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %23) #4
  invoke void @_ZN8audioapi9AudioNode7cleanupEv(ptr noundef nonnull align 8 dereferenceable(224) %24)
          to label %25 unwind label %28

25:                                               ; preds = %.lr.ph5
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt10shared_ptrIN8audioapi9AudioNodeEELb1ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  %27 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt10shared_ptrIN8audioapi9AudioNodeEELb0EEES7_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  br i1 %27, label %.lr.ph5, label %._crit_edge6, !llvm.loop !7

28:                                               ; preds = %.lr.ph5
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  br label %30

30:                                               ; preds = %28, %21
  %.pn = phi { ptr, i32 } [ %22, %21 ], [ %29, %28 ]
  call void @_ZN8audioapi6LockerD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  resume { ptr, i32 } %.pn
}

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) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8audioapi6LockerC2ERSt5mutex(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #0 align 2

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

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

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

declare void @_ZN8audioapi9AudioNode7cleanupEv(ptr noundef nonnull align 8 dereferenceable(224)) local_unnamed_addr #3

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_setISt10shared_ptrIN8audioapi9AudioNodeEESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #2 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 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 = { "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 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass