; LLVM IR from pdeljanov/Ayane :: src/Stage.ll (ZN5Ayane5Stage4playERNS_13ClockProviderE)

; 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::lock_guard" = type { ptr }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"class.Ayane::StagePrivate" = type { ptr, %"class.std::mutex", i32, %"class.std::thread", i8, ptr, i32, 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::thread" = type { %"class.std::thread::id" }
%"class.std::thread::id" = type { i64 }
%"class.Ayane::Stage" = type { ptr, %"class.std::unordered_map", %"class.std::unordered_map.2", ptr }
%"class.std::unordered_map" = 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_map.2" = type { %"class.std::_Hashtable.3" }
%"class.std::_Hashtable.3" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::pair" = type { %"class.std::__cxx11::basic_string", %"class.std::unique_ptr" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::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.Ayane::Stage::Source" = type { ptr, ptr, %"class.std::unique_ptr.21" }
%"class.std::unique_ptr.21" = type { %"struct.std::__uniq_ptr_data.22" }
%"struct.std::__uniq_ptr_data.22" = type { %"class.std::__uniq_ptr_impl.23" }
%"class.std::__uniq_ptr_impl.23" = type { %"class.std::tuple.24" }
%"class.std::tuple.24" = type { %"struct.std::_Tuple_impl.25" }
%"struct.std::_Tuple_impl.25" = type { %"struct.std::_Head_base.28" }
%"struct.std::_Head_base.28" = type { ptr }
%"class.Ayane::Stage::SourceSinkPrivate" = type { i32, %"class.Ayane::BufferQueue", %"class.std::mutex", %"class.std::condition_variable" }
%"class.Ayane::BufferQueue" = type { i32, %"struct.std::atomic", %"struct.std::atomic", %"class.std::vector" }
%"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<Ayane::Buffer, Ayane::ManagedBufferDeallocator>, std::allocator<std::unique_ptr<Ayane::Buffer, Ayane::ManagedBufferDeallocator>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<Ayane::Buffer, Ayane::ManagedBufferDeallocator>, std::allocator<std::unique_ptr<Ayane::Buffer, Ayane::ManagedBufferDeallocator>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<Ayane::Buffer, Ayane::ManagedBufferDeallocator>, std::allocator<std::unique_ptr<Ayane::Buffer, Ayane::ManagedBufferDeallocator>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<Ayane::Buffer, Ayane::ManagedBufferDeallocator>, std::allocator<std::unique_ptr<Ayane::Buffer, Ayane::ManagedBufferDeallocator>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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 }

@.str.22 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [9 x i8], align 1

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Ayane5Trace4infoEPKcPKv(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef, ptr noundef) #3

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

; 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
declare dso_local noundef zeroext i1 @_ZNK5Ayane12StagePrivate21shouldRunAsynchronousEv(ptr noundef nonnull align 8 dereferenceable(96)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Ayane12StagePrivate17startAsyncProcessEv(ptr noundef nonnull align 8 dereferenceable(96)) #1 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Ayane5Trace5traceEPKcPKv(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef, ptr noundef) #3

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

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

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

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #5

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #6

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5Ayane5Stage4playERNS_13ClockProviderE(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull align 8 dereferenceable(48) %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.std::lock_guard", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %11 = alloca %"struct.std::__detail::_Node_iterator", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %12 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %13 = call noundef ptr @_ZN5Ayane5Stage7_d_funcEv(ptr noundef nonnull align 8 dereferenceable(128) %12)
  store ptr %13, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = getelementptr inbounds %"class.Ayane::StagePrivate", ptr %14, i32 0, i32 1
  call void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(40) %15)
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = getelementptr inbounds %"class.Ayane::StagePrivate", ptr %16, i32 0, i32 2
  %18 = load i32, ptr %17, align 8, !tbaa !9
  %19 = icmp eq i32 %18, 1
  br i1 %19, label %20, label %123

20:                                               ; preds = %2
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = invoke noundef zeroext i1 @_ZNK5Ayane12StagePrivate21shouldRunAsynchronousEv(ptr noundef nonnull align 8 dereferenceable(96) %21)
          to label %23 unwind label %60

23:                                               ; preds = %20
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = getelementptr inbounds %"class.Ayane::StagePrivate", ptr %24, i32 0, i32 4
  %26 = zext i1 %22 to i8
  store i8 %26, ptr %25, align 8, !tbaa !19
  %27 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5Ayane5Trace8instanceEv()
          to label %28 unwind label %60

28:                                               ; preds = %23
  %29 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Ayane5Trace5traceEPKcPKv(ptr noundef nonnull align 8 dereferenceable(48) %27, ptr noundef @.str.22, ptr noundef %12)
          to label %30 unwind label %60

30:                                               ; preds = %28
  %31 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef @.str.23)
          to label %32 unwind label %60

32:                                               ; preds = %30
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = getelementptr inbounds %"class.Ayane::StagePrivate", ptr %33, i32 0, i32 4
  %35 = load i8, ptr %34, align 8, !tbaa !19, !range !20, !noundef !21
  %36 = trunc i8 %35 to i1
  %37 = zext i1 %36 to i64
  %38 = select i1 %36, ptr @.str.24, ptr @.str.25
  %39 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef %38)
          to label %40 unwind label %60

40:                                               ; preds = %32
  %41 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %42 unwind label %60

42:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %"class.Ayane::StagePrivate", ptr %43, i32 0, i32 4
  %45 = load i8, ptr %44, align 8, !tbaa !19, !range !20, !noundef !21
  %46 = trunc i8 %45 to i1
  %47 = zext i1 %46 to i64
  %48 = select i1 %46, i32 0, i32 1
  store i32 %48, ptr %9, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %49 = getelementptr inbounds %"class.Ayane::Stage", ptr %12, i32 0, i32 1
  %50 = call ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10unique_ptrIN5Ayane5Stage6SourceESt14default_deleteIS9_EESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_SC_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %49) #8
  %51 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %10, i32 0, i32 0
  %52 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %51, i32 0, i32 0
  store ptr %50, ptr %52, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %53 = getelementptr inbounds %"class.Ayane::Stage", ptr %12, i32 0, i32 1
  %54 = call ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10unique_ptrIN5Ayane5Stage6SourceESt14default_deleteIS9_EESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_SC_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %53) #8
  %55 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %11, i32 0, i32 0
  %56 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %55, i32 0, i32 0
  store ptr %54, ptr %56, align 8
  br label %57

57:                                               ; preds = %72, %42
  %58 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10unique_ptrIN5Ayane5Stage6SourceESt14default_deleteISC_EEELb1EEESJ_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  br i1 %58, label %64, label %59

59:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %74

60:                                               ; preds = %40, %32, %30, %28, %23, %20
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %7, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %8, align 4
  br label %124

64:                                               ; preds = %57
  %65 = load i32, ptr %9, align 4, !tbaa !22
  %66 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10unique_ptrIN5Ayane5Stage6SourceESt14default_deleteISC_EEELb0ELb1EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  %67 = getelementptr inbounds %"struct.std::pair", ptr %66, i32 0, i32 1
  %68 = call noundef ptr @_ZNKSt10unique_ptrIN5Ayane5Stage6SourceESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %67) #8
  %69 = getelementptr inbounds %"class.Ayane::Stage::Source", ptr %68, i32 0, i32 2
  %70 = call noundef ptr @_ZNKSt10unique_ptrIN5Ayane5Stage17SourceSinkPrivateESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %69) #8
  %71 = getelementptr inbounds %"class.Ayane::Stage::SourceSinkPrivate", ptr %70, i32 0, i32 0
  store i32 %65, ptr %71, align 8, !tbaa !24
  br label %72

72:                                               ; preds = %64
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10unique_ptrIN5Ayane5Stage6SourceESt14default_deleteISC_EEELb0ELb1EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  br label %57, !llvm.loop !35

74:                                               ; preds = %59
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = getelementptr inbounds %"class.Ayane::StagePrivate", ptr %75, i32 0, i32 4
  %77 = load i8, ptr %76, align 8, !tbaa !19, !range !20, !noundef !21
  %78 = trunc i8 %77 to i1
  br i1 %78, label %79, label %98

79:                                               ; preds = %74
  %80 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 136) #9
          to label %81 unwind label %90

81:                                               ; preds = %79
  invoke void @_ZN5Ayane5ClockC1Ev(ptr noundef nonnull align 8 dereferenceable(136) %80)
          to label %82 unwind label %94

82:                                               ; preds = %81
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = getelementptr inbounds %"class.Ayane::StagePrivate", ptr %83, i32 0, i32 5
  store ptr %80, ptr %84, align 8, !tbaa !37
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = getelementptr inbounds %"class.Ayane::StagePrivate", ptr %86, i32 0, i32 5
  %88 = load ptr, ptr %87, align 8, !tbaa !37
  invoke void @_ZN5Ayane13ClockProvider13registerClockEPNS_5ClockE(ptr noundef nonnull align 8 dereferenceable(48) %85, ptr noundef %88)
          to label %89 unwind label %90

89:                                               ; preds = %82
  br label %98

90:                                               ; preds = %119, %117, %115, %111, %108, %98, %82, %79
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %7, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %8, align 4
  br label %122

94:                                               ; preds = %81
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %7, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %80, i64 noundef 136) #10
  br label %122

98:                                               ; preds = %89, %74
  %99 = load ptr, ptr %12, align 8, !tbaa !38
  %100 = getelementptr inbounds ptr, ptr %99, i64 5
  %101 = load ptr, ptr %100, align 8
  %102 = invoke noundef zeroext i1 %101(ptr noundef nonnull align 8 dereferenceable(128) %12)
          to label %103 unwind label %90

103:                                              ; preds = %98
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = getelementptr inbounds %"class.Ayane::StagePrivate", ptr %104, i32 0, i32 4
  %106 = load i8, ptr %105, align 8, !tbaa !19, !range !20, !noundef !21
  %107 = trunc i8 %106 to i1
  br i1 %107, label %108, label %111

108:                                              ; preds = %103
  %109 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN5Ayane12StagePrivate17startAsyncProcessEv(ptr noundef nonnull align 8 dereferenceable(96) %109)
          to label %110 unwind label %90

110:                                              ; preds = %108
  br label %111

111:                                              ; preds = %110, %103
  %112 = load ptr, ptr %5, align 8, !tbaa !5
  %113 = getelementptr inbounds %"class.Ayane::StagePrivate", ptr %112, i32 0, i32 2
  store i32 2, ptr %113, align 8, !tbaa !9
  %114 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5Ayane5Trace8instanceEv()
          to label %115 unwind label %90

115:                                              ; preds = %111
  %116 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Ayane5Trace4infoEPKcPKv(ptr noundef nonnull align 8 dereferenceable(48) %114, ptr noundef @.str.22, ptr noundef %12)
          to label %117 unwind label %90

117:                                              ; preds = %115
  %118 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %116, ptr noundef @.str.26)
          to label %119 unwind label %90

119:                                              ; preds = %117
  %120 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %118, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %121 unwind label %90

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

122:                                              ; preds = %94, %90
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %124

123:                                              ; preds = %121, %2
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  ret void

124:                                              ; preds = %122, %60
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  br label %125

125:                                              ; preds = %124
  %126 = load ptr, ptr %7, align 8
  %127 = load i32, ptr %8, align 4
  %128 = insertvalue { ptr, i32 } poison, ptr %126, 0
  %129 = insertvalue { ptr, i32 } %128, i32 %127, 1
  resume { ptr, i32 } %129
}

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

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

declare void @_ZN5Ayane5ClockC1Ev(ptr noundef nonnull align 8 dereferenceable(136)) unnamed_addr #3

declare void @_ZN5Ayane13ClockProvider13registerClockEPNS_5ClockE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef) #3

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 = { 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 #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 = { 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 = { nobuiltin allocsize(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 = { nobuiltin 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 #7 = { 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 #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { builtin 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, !13, i64 48}
!10 = !{!"_ZTSN5Ayane12StagePrivateE", !6, i64 0, !11, i64 8, !13, i64 48, !14, i64 56, !17, i64 64, !6, i64 72, !18, i64 80, !6, i64 88}
!11 = !{!"_ZTSSt5mutex", !12, i64 0}
!12 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!13 = !{!"_ZTSN5Ayane5Stage5StateE", !7, i64 0}
!14 = !{!"_ZTSSt6thread", !15, i64 0}
!15 = !{!"_ZTSNSt6thread2idE", !16, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = !{!10, !17, i64 64}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!23, !23, i64 0}
!23 = !{!"_ZTSN5Ayane5Stage17SynchronicityModeE", !7, i64 0}
!24 = !{!25, !23, i64 0}
!25 = !{!"_ZTSN5Ayane5Stage17SourceSinkPrivateE", !23, i64 0, !26, i64 8, !11, i64 48, !33, i64 88}
!26 = !{!"_ZTSN5Ayane11BufferQueueE", !18, i64 0, !27, i64 4, !27, i64 8, !29, i64 16}
!27 = !{!"_ZTSSt6atomicIjE", !28, i64 0}
!28 = !{!"_ZTSSt13__atomic_baseIjE", !18, i64 0}
!29 = !{!"_ZTSSt6vectorISt10unique_ptrIN5Ayane6BufferENS1_24ManagedBufferDeallocatorEESaIS4_EE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseISt10unique_ptrIN5Ayane6BufferENS1_24ManagedBufferDeallocatorEESaIS4_EE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrIN5Ayane6BufferENS1_24ManagedBufferDeallocatorEESaIS4_EE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrIN5Ayane6BufferENS1_24ManagedBufferDeallocatorEESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!33 = !{!"_ZTSSt18condition_variable", !34, i64 0}
!34 = !{!"_ZTSSt9__condvar", !7, i64 0}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = !{!10, !6, i64 72}
!38 = !{!39, !39, i64 0}
!39 = !{!"vtable pointer", !8, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::lock_guard" = type { ptr }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }

@.str.22 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [9 x i8], align 1

; 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
declare dso_local void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Ayane5Trace4infoEPKcPKv(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef, ptr noundef) local_unnamed_addr #3

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

; 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
declare dso_local noundef zeroext i1 @_ZNK5Ayane12StagePrivate21shouldRunAsynchronousEv(ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Ayane12StagePrivate17startAsyncProcessEv(ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #1 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Ayane5Trace5traceEPKcPKv(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

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

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #5

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #6

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5Ayane5Stage4playERNS_13ClockProviderE(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull align 8 dereferenceable(48) %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::lock_guard", align 8
  %4 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %5 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %6 = tail call noundef ptr @_ZN5Ayane5Stage7_d_funcEv(ptr noundef nonnull align 8 dereferenceable(128) %0)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  %7 = getelementptr inbounds i8, ptr %6, i64 8
  call void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(40) %7)
  %8 = getelementptr inbounds i8, ptr %6, i64 48
  %9 = load i32, ptr %8, align 8, !tbaa !5
  %10 = icmp eq i32 %9, 1
  br i1 %10, label %11, label %72

11:                                               ; preds = %2
  %12 = invoke noundef zeroext i1 @_ZNK5Ayane12StagePrivate21shouldRunAsynchronousEv(ptr noundef nonnull align 8 dereferenceable(96) %6)
          to label %13 unwind label %37

13:                                               ; preds = %11
  %14 = getelementptr inbounds i8, ptr %6, i64 64
  %15 = zext i1 %12 to i8
  store i8 %15, ptr %14, align 8, !tbaa !18
  %16 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5Ayane5Trace8instanceEv()
          to label %17 unwind label %37

17:                                               ; preds = %13
  %18 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Ayane5Trace5traceEPKcPKv(ptr noundef nonnull align 8 dereferenceable(48) %16, ptr noundef nonnull @.str.22, ptr noundef nonnull %0)
          to label %19 unwind label %37

19:                                               ; preds = %17
  %20 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull @.str.23)
          to label %21 unwind label %37

21:                                               ; preds = %19
  %22 = load i8, ptr %14, align 8, !tbaa !18, !range !19, !noundef !20
  %23 = trunc nuw i8 %22 to i1
  %24 = select i1 %23, ptr @.str.24, ptr @.str.25
  %25 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull %24)
          to label %26 unwind label %37

26:                                               ; preds = %21
  %27 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %28 unwind label %37

28:                                               ; preds = %26
  %29 = load i8, ptr %14, align 8, !tbaa !18, !range !19, !noundef !20
  %30 = xor i8 %29, 1
  %not. = zext nneg i8 %30 to i32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  %31 = getelementptr inbounds i8, ptr %0, i64 8
  %32 = call ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10unique_ptrIN5Ayane5Stage6SourceESt14default_deleteIS9_EESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_SC_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %31) #8
  store ptr %32, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  %33 = call ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10unique_ptrIN5Ayane5Stage6SourceESt14default_deleteIS9_EESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_SC_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %31) #8
  store ptr %33, ptr %5, align 8
  %34 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10unique_ptrIN5Ayane5Stage6SourceESt14default_deleteISC_EEELb1EEESJ_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  br i1 %34, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %28
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  %35 = load i8, ptr %14, align 8, !tbaa !18, !range !19, !noundef !20
  %36 = trunc nuw i8 %35 to i1
  br i1 %36, label %46, label %55

37:                                               ; preds = %26, %21, %19, %17, %13, %11
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %73

.lr.ph:                                           ; preds = %28, %.lr.ph
  %39 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10unique_ptrIN5Ayane5Stage6SourceESt14default_deleteISC_EEELb0ELb1EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  %40 = getelementptr inbounds i8, ptr %39, i64 32
  %41 = call noundef ptr @_ZNKSt10unique_ptrIN5Ayane5Stage6SourceESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %40) #8
  %42 = getelementptr inbounds i8, ptr %41, i64 16
  %43 = call noundef ptr @_ZNKSt10unique_ptrIN5Ayane5Stage17SourceSinkPrivateESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %42) #8
  store i32 %not., ptr %43, align 8, !tbaa !21
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10unique_ptrIN5Ayane5Stage6SourceESt14default_deleteISC_EEELb0ELb1EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  %45 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10unique_ptrIN5Ayane5Stage6SourceESt14default_deleteISC_EEELb1EEESJ_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  br i1 %45, label %.lr.ph, label %._crit_edge, !llvm.loop !33

46:                                               ; preds = %._crit_edge
  %47 = invoke noalias noundef nonnull dereferenceable(136) ptr @_Znwm(i64 noundef 136) #9
          to label %48 unwind label %51

48:                                               ; preds = %46
  invoke void @_ZN5Ayane5ClockC1Ev(ptr noundef nonnull align 8 dereferenceable(136) %47)
          to label %49 unwind label %53

49:                                               ; preds = %48
  %50 = getelementptr inbounds i8, ptr %6, i64 72
  store ptr %47, ptr %50, align 8, !tbaa !35
  invoke void @_ZN5Ayane13ClockProvider13registerClockEPNS_5ClockE(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull %47)
          to label %55 unwind label %51

51:                                               ; preds = %70, %68, %66, %64, %63, %55, %49, %46
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %73

53:                                               ; preds = %48
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %47, i64 noundef 136) #10
  br label %73

55:                                               ; preds = %49, %._crit_edge
  %56 = load ptr, ptr %0, align 8, !tbaa !36
  %57 = getelementptr inbounds i8, ptr %56, i64 40
  %58 = load ptr, ptr %57, align 8
  %59 = invoke noundef zeroext i1 %58(ptr noundef nonnull align 8 dereferenceable(128) %0)
          to label %60 unwind label %51

60:                                               ; preds = %55
  %61 = load i8, ptr %14, align 8, !tbaa !18, !range !19, !noundef !20
  %62 = trunc nuw i8 %61 to i1
  br i1 %62, label %63, label %64

63:                                               ; preds = %60
  invoke void @_ZN5Ayane12StagePrivate17startAsyncProcessEv(ptr noundef nonnull align 8 dereferenceable(96) %6)
          to label %64 unwind label %51

64:                                               ; preds = %63, %60
  store i32 2, ptr %8, align 8, !tbaa !5
  %65 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5Ayane5Trace8instanceEv()
          to label %66 unwind label %51

66:                                               ; preds = %64
  %67 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Ayane5Trace4infoEPKcPKv(ptr noundef nonnull align 8 dereferenceable(48) %65, ptr noundef nonnull @.str.22, ptr noundef nonnull %0)
          to label %68 unwind label %51

68:                                               ; preds = %66
  %69 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %67, ptr noundef nonnull @.str.26)
          to label %70 unwind label %51

70:                                               ; preds = %68
  %71 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %72 unwind label %51

72:                                               ; preds = %70, %2
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  ret void

73:                                               ; preds = %51, %53, %37
  %.pn.pn = phi { ptr, i32 } [ %38, %37 ], [ %52, %51 ], [ %54, %53 ]
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  resume { ptr, i32 } %.pn.pn
}

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

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

declare void @_ZN5Ayane5ClockC1Ev(ptr noundef nonnull align 8 dereferenceable(136)) unnamed_addr #3

declare void @_ZN5Ayane13ClockProvider13registerClockEPNS_5ClockE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef) local_unnamed_addr #3

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 = { 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 #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 = { 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 = { nobuiltin allocsize(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 = { nobuiltin 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 #7 = { 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 #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { builtin 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, !12, i64 48}
!6 = !{!"_ZTSN5Ayane12StagePrivateE", !7, i64 0, !10, i64 8, !12, i64 48, !13, i64 56, !16, i64 64, !7, i64 72, !17, i64 80, !7, i64 88}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt5mutex", !11, i64 0}
!11 = !{!"_ZTSSt12__mutex_base", !8, i64 0}
!12 = !{!"_ZTSN5Ayane5Stage5StateE", !8, i64 0}
!13 = !{!"_ZTSSt6thread", !14, i64 0}
!14 = !{!"_ZTSNSt6thread2idE", !15, i64 0}
!15 = !{!"long", !8, i64 0}
!16 = !{!"bool", !8, i64 0}
!17 = !{!"int", !8, i64 0}
!18 = !{!6, !16, i64 64}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!22, !23, i64 0}
!22 = !{!"_ZTSN5Ayane5Stage17SourceSinkPrivateE", !23, i64 0, !24, i64 8, !10, i64 48, !31, i64 88}
!23 = !{!"_ZTSN5Ayane5Stage17SynchronicityModeE", !8, i64 0}
!24 = !{!"_ZTSN5Ayane11BufferQueueE", !17, i64 0, !25, i64 4, !25, i64 8, !27, i64 16}
!25 = !{!"_ZTSSt6atomicIjE", !26, i64 0}
!26 = !{!"_ZTSSt13__atomic_baseIjE", !17, i64 0}
!27 = !{!"_ZTSSt6vectorISt10unique_ptrIN5Ayane6BufferENS1_24ManagedBufferDeallocatorEESaIS4_EE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseISt10unique_ptrIN5Ayane6BufferENS1_24ManagedBufferDeallocatorEESaIS4_EE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrIN5Ayane6BufferENS1_24ManagedBufferDeallocatorEESaIS4_EE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrIN5Ayane6BufferENS1_24ManagedBufferDeallocatorEESaIS4_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!31 = !{!"_ZTSSt18condition_variable", !32, i64 0}
!32 = !{!"_ZTSSt9__condvar", !8, i64 0}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = !{!6, !7, i64 72}
!36 = !{!37, !37, i64 0}
!37 = !{!"vtable pointer", !9, i64 0}


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