; LLVM IR from dynexcoin/Dynex :: src/Transfers (BlockchainSynchronizer)

; 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::__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.Logging::LoggerMessage" = type <{ %"class.std::basic_ostream.base", %"class.std::basic_streambuf", ptr, %"class.std::__cxx11::basic_string", i32, [4 x i8], %"class.std::__cxx11::basic_string", %"class.boost::posix_time::ptime", i8, [7 x i8], %"class.std::basic_ios" }>
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"class.boost::posix_time::ptime" = type { %"class.boost::date_time::base_time" }
%"class.boost::date_time::base_time" = type { %"struct.boost::date_time::counted_time_rep" }
%"struct.boost::date_time::counted_time_rep" = type { %"class.boost::date_time::int_adapter" }
%"class.boost::date_time::int_adapter" = type { i64 }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::unique_lock" = type <{ ptr, i8, [7 x i8] }>
%"class.std::promise.44" = type { %"class.std::shared_ptr.29", %"class.std::unique_ptr.45" }
%"class.std::shared_ptr.29" = type { %"class.std::__shared_ptr.30" }
%"class.std::__shared_ptr.30" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::unique_ptr.45" = type { %"struct.std::__uniq_ptr_data.46" }
%"struct.std::__uniq_ptr_data.46" = type { %"class.std::__uniq_ptr_impl.47" }
%"class.std::__uniq_ptr_impl.47" = type { %"class.std::tuple.48" }
%"class.std::tuple.48" = type { %"struct.std::_Tuple_impl.49" }
%"struct.std::_Tuple_impl.49" = type { %"struct.std::_Head_base.50" }
%"struct.std::_Head_base.50" = type { ptr }
%"class.std::__exception_ptr::exception_ptr" = type { ptr }
%"class.std::promise" = type { %"class.std::shared_ptr.29", %"class.std::unique_ptr.32" }
%"class.std::unique_ptr.32" = type { %"struct.std::__uniq_ptr_data.33" }
%"struct.std::__uniq_ptr_data.33" = type { %"class.std::__uniq_ptr_impl.34" }
%"class.std::__uniq_ptr_impl.34" = type { %"class.std::tuple.35" }
%"class.std::tuple.35" = type { %"struct.std::_Tuple_impl.36" }
%"struct.std::_Tuple_impl.36" = type { %"struct.std::_Head_base.39" }
%"struct.std::_Head_base.39" = type { ptr }
%"class.std::error_code" = type { i32, ptr }
%"struct.Crypto::Hash" = type { [32 x i8] }
%class.anon.55 = type { ptr }
%"class.DynexCN::BlockchainSynchronizer" = type { %"class.DynexCN::IObservableImpl", %"class.DynexCN::INodeObserver", %"class.Logging::LoggerRef", %"class.std::map", ptr, %"struct.Crypto::Hash", %"struct.Crypto::Hash", i32, i32, %"class.std::unique_ptr", %"class.std::__cxx11::list", %"class.std::__cxx11::list.15", %"class.std::mutex", %"class.std::mutex", %"class.std::condition_variable" }
%"class.DynexCN::IObservableImpl" = type { %"class.DynexCN::IBlockchainSynchronizer", %"class.Tools::ObserverManager" }
%"class.DynexCN::IBlockchainSynchronizer" = type { %"class.DynexCN::IObservable", %"class.DynexCN::IStreamSerializable" }
%"class.DynexCN::IObservable" = type { ptr }
%"class.DynexCN::IStreamSerializable" = type { ptr }
%"class.Tools::ObserverManager" = type { %"class.std::vector", %"class.std::mutex" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<DynexCN::IBlockchainSynchronizerObserver *, std::allocator<DynexCN::IBlockchainSynchronizerObserver *>>::_Vector_impl" }
%"struct.std::_Vector_base<DynexCN::IBlockchainSynchronizerObserver *, std::allocator<DynexCN::IBlockchainSynchronizerObserver *>>::_Vector_impl" = type { %"struct.std::_Vector_base<DynexCN::IBlockchainSynchronizerObserver *, std::allocator<DynexCN::IBlockchainSynchronizerObserver *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<DynexCN::IBlockchainSynchronizerObserver *, std::allocator<DynexCN::IBlockchainSynchronizerObserver *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.DynexCN::INodeObserver" = type { ptr }
%"class.Logging::LoggerRef" = type { ptr, %"class.std::__cxx11::basic_string" }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<DynexCN::IBlockchainConsumer *, std::pair<DynexCN::IBlockchainConsumer *const, std::shared_ptr<DynexCN::SynchronizationState>>, std::_Select1st<std::pair<DynexCN::IBlockchainConsumer *const, std::shared_ptr<DynexCN::SynchronizationState>>>, std::less<DynexCN::IBlockchainConsumer *>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<DynexCN::IBlockchainConsumer *, std::pair<DynexCN::IBlockchainConsumer *const, std::shared_ptr<DynexCN::SynchronizationState>>, std::_Select1st<std::pair<DynexCN::IBlockchainConsumer *const, std::shared_ptr<DynexCN::SynchronizationState>>>, std::less<DynexCN::IBlockchainConsumer *>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"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.11" }
%"struct.std::_Head_base.11" = type { ptr }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<std::pair<const DynexCN::ITransactionReader *, std::promise<std::error_code>>, std::allocator<std::pair<const DynexCN::ITransactionReader *, std::promise<std::error_code>>>>::_List_impl" }
%"struct.std::__cxx11::_List_base<std::pair<const DynexCN::ITransactionReader *, std::promise<std::error_code>>, std::allocator<std::pair<const DynexCN::ITransactionReader *, std::promise<std::error_code>>>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"class.std::__cxx11::list.15" = type { %"class.std::__cxx11::_List_base.16" }
%"class.std::__cxx11::_List_base.16" = type { %"struct.std::__cxx11::_List_base<std::pair<const Crypto::Hash *, std::promise<void>>, std::allocator<std::pair<const Crypto::Hash *, std::promise<void>>>>::_List_impl" }
%"struct.std::__cxx11::_List_base<std::pair<const Crypto::Hash *, std::promise<void>>, std::allocator<std::pair<const Crypto::Hash *, std::promise<void>>>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"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::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 }
%"struct.std::pair.51" = type { ptr, %"class.std::promise.44" }
%"struct.std::pair.40" = type { ptr, %"class.std::promise" }

@_ZN7Logging10BRIGHT_REDB5cxx11E = external global %"class.std::__cxx11::basic_string", align 8
@.str.34 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [45 x i8], align 1
@_ZN7Logging7DEFAULTB5cxx11E = external global %"class.std::__cxx11::basic_string", align 8
@.str.36 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [7 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #1

declare ptr @__cxa_begin_catch(ptr)

declare void @_ZNK7Logging9LoggerRefclENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.Logging::LoggerMessage") align 8, ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) #2

; Function Attrs: nounwind
declare void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161)) unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA48_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 1 dereferenceable(48)) #4

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEN6Crypto4HashEEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 1 dereferenceable(32)) #4

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { i32, ptr } @_ZN7DynexCN22BlockchainSynchronizer27doAddUnconfirmedTransactionERKNS_18ITransactionReaderE(ptr noundef nonnull align 8 dereferenceable(440), ptr noundef nonnull align 8 dereferenceable(8)) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN22BlockchainSynchronizer30doRemoveUnconfirmedTransactionERKN6Crypto4HashE(ptr noundef nonnull align 8 dereferenceable(440), ptr noundef nonnull align 1 dereferenceable(32)) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA7_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 1 dereferenceable(7)) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7DynexCN22BlockchainSynchronizer20actualizeFutureStateEv(ptr noundef nonnull align 8 dereferenceable(440) %0) #5 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.std::unique_lock", align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.std::promise.44", align 8
  %9 = alloca %"class.Logging::LoggerMessage", align 8
  %10 = alloca %"class.std::__exception_ptr::exception_ptr", align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca %"class.std::promise", align 8
  %14 = alloca %"class.std::error_code", align 8
  %15 = alloca %"class.Logging::LoggerMessage", align 8
  %16 = alloca %"struct.Crypto::Hash", align 1
  %17 = alloca %"class.std::__exception_ptr::exception_ptr", align 8
  %18 = alloca %"class.Logging::LoggerMessage", align 8
  %19 = alloca %class.anon.55, align 8
  %20 = alloca %"class.Logging::LoggerMessage", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %21 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %3) #8
  %22 = getelementptr inbounds %"class.DynexCN::BlockchainSynchronizer", ptr %21, i32 0, i32 13
  call void @_ZNSt11unique_lockISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(9) %3, ptr noundef nonnull align 8 dereferenceable(40) %22)
  %23 = getelementptr inbounds %"class.DynexCN::BlockchainSynchronizer", ptr %21, i32 0, i32 7
  %24 = load i32, ptr %23, align 8, !tbaa !9
  %25 = icmp eq i32 %24, 4
  br i1 %25, label %26, label %43

26:                                               ; preds = %1
  %27 = getelementptr inbounds %"class.DynexCN::BlockchainSynchronizer", ptr %21, i32 0, i32 8
  %28 = load i32, ptr %27, align 4, !tbaa !53
  %29 = icmp eq i32 %28, 3
  br i1 %29, label %30, label %43

30:                                               ; preds = %26
  %31 = getelementptr inbounds %"class.DynexCN::BlockchainSynchronizer", ptr %21, i32 0, i32 4
  %32 = load ptr, ptr %31, align 8, !tbaa !54
  %33 = getelementptr inbounds i8, ptr %21, i64 80
  %34 = load ptr, ptr %32, align 8, !tbaa !55
  %35 = getelementptr inbounds ptr, ptr %34, i64 2
  %36 = load ptr, ptr %35, align 8
  %37 = invoke noundef zeroext i1 %36(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef %33)
          to label %38 unwind label %39

38:                                               ; preds = %30
  br label %43

39:                                               ; preds = %213, %204, %198, %196, %194, %192, %190, %188, %51, %30
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %4, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %5, align 4
  br label %235

43:                                               ; preds = %38, %26, %1
  %44 = getelementptr inbounds %"class.DynexCN::BlockchainSynchronizer", ptr %21, i32 0, i32 8
  %45 = load i32, ptr %44, align 4, !tbaa !53
  %46 = icmp eq i32 %45, 4
  br i1 %46, label %47, label %60

47:                                               ; preds = %43
  %48 = getelementptr inbounds %"class.DynexCN::BlockchainSynchronizer", ptr %21, i32 0, i32 7
  %49 = load i32, ptr %48, align 8, !tbaa !9
  %50 = icmp ne i32 %49, 4
  br i1 %50, label %51, label %60

51:                                               ; preds = %47
  %52 = getelementptr inbounds %"class.DynexCN::BlockchainSynchronizer", ptr %21, i32 0, i32 4
  %53 = load ptr, ptr %52, align 8, !tbaa !54
  %54 = getelementptr inbounds i8, ptr %21, i64 80
  %55 = load ptr, ptr %53, align 8, !tbaa !55
  %56 = getelementptr inbounds ptr, ptr %55, i64 3
  %57 = load ptr, ptr %56, align 8
  %58 = invoke noundef zeroext i1 %57(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef %54)
          to label %59 unwind label %39

59:                                               ; preds = %51
  br label %60

60:                                               ; preds = %59, %47, %43
  br label %61

61:                                               ; preds = %93, %60
  %62 = getelementptr inbounds %"class.DynexCN::BlockchainSynchronizer", ptr %21, i32 0, i32 11
  %63 = call noundef zeroext i1 @_ZNKSt7__cxx114listISt4pairIPKN6Crypto4HashESt7promiseIvEESaIS8_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %62) #8
  %64 = xor i1 %63, true
  br i1 %64, label %65, label %114

65:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %66 = getelementptr inbounds %"class.DynexCN::BlockchainSynchronizer", ptr %21, i32 0, i32 11
  %67 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx114listISt4pairIPKN6Crypto4HashESt7promiseIvEESaIS8_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %66) #8
  store ptr %67, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = getelementptr inbounds %"struct.std::pair.51", ptr %68, i32 0, i32 0
  %70 = load ptr, ptr %69, align 8, !tbaa !57
  store ptr %70, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #8
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.std::pair.51", ptr %71, i32 0, i32 1
  call void @_ZNSt7promiseIvEC2EOS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %72) #8
  %73 = getelementptr inbounds %"class.DynexCN::BlockchainSynchronizer", ptr %21, i32 0, i32 11
  call void @_ZNSt7__cxx114listISt4pairIPKN6Crypto4HashESt7promiseIvEESaIS8_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(24) %73) #8
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZN7DynexCN22BlockchainSynchronizer30doRemoveUnconfirmedTransactionERKN6Crypto4HashE(ptr noundef nonnull align 8 dereferenceable(440) %21, ptr noundef nonnull align 1 dereferenceable(32) %74)
          to label %75 unwind label %77

75:                                               ; preds = %65
  invoke void @_ZNSt7promiseIvE9set_valueEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %76 unwind label %77

76:                                               ; preds = %75
  br label %93

77:                                               ; preds = %75, %65
  %78 = landingpad { ptr, i32 }
          catch ptr null
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %4, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %5, align 4
  br label %81

81:                                               ; preds = %77
  %82 = load ptr, ptr %4, align 8
  %83 = call ptr @__cxa_begin_catch(ptr %82) #8
  call void @llvm.lifetime.start.p0(i64 432, ptr %9) #8
  %84 = getelementptr inbounds %"class.DynexCN::BlockchainSynchronizer", ptr %21, i32 0, i32 2
  invoke void @_ZNK7Logging9LoggerRefclENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.Logging::LoggerMessage") align 8 %9, ptr noundef nonnull align 8 dereferenceable(40) %84, i32 noundef 1, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging10BRIGHT_REDB5cxx11E)
          to label %85 unwind label %94

85:                                               ; preds = %81
  %86 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA48_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %9, ptr noundef nonnull align 1 dereferenceable(48) @.str.34)
          to label %87 unwind label %98

87:                                               ; preds = %85
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  %89 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEN6Crypto4HashEEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %86, ptr noundef nonnull align 1 dereferenceable(32) %88)
          to label %90 unwind label %98

90:                                               ; preds = %87
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %9) #8
  call void @llvm.lifetime.end.p0(i64 432, ptr %9) #8
  call void @_ZSt17current_exceptionv(ptr dead_on_unwind writable sret(%"class.std::__exception_ptr::exception_ptr") align 8 %10) #8
  invoke void @_ZNSt7promiseIvE13set_exceptionENSt15__exception_ptr13exception_ptrE(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef %10)
          to label %91 unwind label %103

91:                                               ; preds = %90
  call void @_ZNSt15__exception_ptr13exception_ptrD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  invoke void @__cxa_end_catch()
          to label %92 unwind label %107

92:                                               ; preds = %91
  br label %93

93:                                               ; preds = %92, %76
  call void @_ZNSt7promiseIvED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  br label %61, !llvm.loop !69

94:                                               ; preds = %81
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %4, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %5, align 4
  br label %102

98:                                               ; preds = %87, %85
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %4, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %5, align 4
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %9) #8
  br label %102

102:                                              ; preds = %98, %94
  call void @llvm.lifetime.end.p0(i64 432, ptr %9) #8
  br label %111

103:                                              ; preds = %90
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %4, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %5, align 4
  call void @_ZNSt15__exception_ptr13exception_ptrD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  br label %111

107:                                              ; preds = %91
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %4, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %5, align 4
  br label %113

111:                                              ; preds = %103, %102
  invoke void @__cxa_end_catch()
          to label %112 unwind label %241

112:                                              ; preds = %111
  br label %113

113:                                              ; preds = %112, %107
  call void @_ZNSt7promiseIvED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  br label %235

114:                                              ; preds = %61
  br label %115

115:                                              ; preds = %156, %114
  %116 = getelementptr inbounds %"class.DynexCN::BlockchainSynchronizer", ptr %21, i32 0, i32 10
  %117 = call noundef zeroext i1 @_ZNKSt7__cxx114listISt4pairIPKN7DynexCN18ITransactionReaderESt7promiseISt10error_codeEESaIS9_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %116) #8
  %118 = xor i1 %117, true
  br i1 %118, label %119, label %182

119:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %120 = getelementptr inbounds %"class.DynexCN::BlockchainSynchronizer", ptr %21, i32 0, i32 10
  %121 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx114listISt4pairIPKN7DynexCN18ITransactionReaderESt7promiseISt10error_codeEESaIS9_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %120) #8
  store ptr %121, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %122 = load ptr, ptr %11, align 8, !tbaa !5
  %123 = getelementptr inbounds %"struct.std::pair.40", ptr %122, i32 0, i32 0
  %124 = load ptr, ptr %123, align 8, !tbaa !71
  store ptr %124, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #8
  %125 = load ptr, ptr %11, align 8, !tbaa !5
  %126 = getelementptr inbounds %"struct.std::pair.40", ptr %125, i32 0, i32 1
  call void @_ZNSt7promiseISt10error_codeEC2EOS1_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(24) %126) #8
  %127 = getelementptr inbounds %"class.DynexCN::BlockchainSynchronizer", ptr %21, i32 0, i32 10
  call void @_ZNSt7__cxx114listISt4pairIPKN7DynexCN18ITransactionReaderESt7promiseISt10error_codeEESaIS9_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(24) %127) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #8
  %128 = load ptr, ptr %12, align 8, !tbaa !5
  %129 = invoke { i32, ptr } @_ZN7DynexCN22BlockchainSynchronizer27doAddUnconfirmedTransactionERKNS_18ITransactionReaderE(ptr noundef nonnull align 8 dereferenceable(440) %21, ptr noundef nonnull align 8 dereferenceable(8) %128)
          to label %130 unwind label %136

130:                                              ; preds = %119
  %131 = getelementptr inbounds { i32, ptr }, ptr %14, i32 0, i32 0
  %132 = extractvalue { i32, ptr } %129, 0
  store i32 %132, ptr %131, align 8
  %133 = getelementptr inbounds { i32, ptr }, ptr %14, i32 0, i32 1
  %134 = extractvalue { i32, ptr } %129, 1
  store ptr %134, ptr %133, align 8
  invoke void @_ZNSt7promiseISt10error_codeE9set_valueERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(16) %14)
          to label %135 unwind label %136

135:                                              ; preds = %130
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #8
  br label %156

136:                                              ; preds = %130, %119
  %137 = landingpad { ptr, i32 }
          catch ptr null
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %4, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #8
  br label %140

140:                                              ; preds = %136
  %141 = load ptr, ptr %4, align 8
  %142 = call ptr @__cxa_begin_catch(ptr %141) #8
  call void @llvm.lifetime.start.p0(i64 432, ptr %15) #8
  %143 = getelementptr inbounds %"class.DynexCN::BlockchainSynchronizer", ptr %21, i32 0, i32 2
  invoke void @_ZNK7Logging9LoggerRefclENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.Logging::LoggerMessage") align 8 %15, ptr noundef nonnull align 8 dereferenceable(40) %143, i32 noundef 1, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging10BRIGHT_REDB5cxx11E)
          to label %144 unwind label %157

144:                                              ; preds = %140
  %145 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA45_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %15, ptr noundef nonnull align 1 dereferenceable(45) @.str.35)
          to label %146 unwind label %161

146:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #8
  %147 = load ptr, ptr %12, align 8, !tbaa !5
  %148 = load ptr, ptr %147, align 8, !tbaa !55
  %149 = getelementptr inbounds ptr, ptr %148, i64 2
  %150 = load ptr, ptr %149, align 8
  invoke void %150(ptr dead_on_unwind writable sret(%"struct.Crypto::Hash") align 1 %16, ptr noundef nonnull align 8 dereferenceable(8) %147)
          to label %151 unwind label %165

151:                                              ; preds = %146
  %152 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEN6Crypto4HashEEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %145, ptr noundef nonnull align 1 dereferenceable(32) %16)
          to label %153 unwind label %165

153:                                              ; preds = %151
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #8
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %15) #8
  call void @llvm.lifetime.end.p0(i64 432, ptr %15) #8
  call void @_ZSt17current_exceptionv(ptr dead_on_unwind writable sret(%"class.std::__exception_ptr::exception_ptr") align 8 %17) #8
  invoke void @_ZNSt7promiseISt10error_codeE13set_exceptionENSt15__exception_ptr13exception_ptrE(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef %17)
          to label %154 unwind label %171

154:                                              ; preds = %153
  call void @_ZNSt15__exception_ptr13exception_ptrD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  invoke void @__cxa_end_catch()
          to label %155 unwind label %175

155:                                              ; preds = %154
  br label %156

156:                                              ; preds = %155, %135
  call void @_ZNSt7promiseISt10error_codeED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %115, !llvm.loop !80

157:                                              ; preds = %140
  %158 = landingpad { ptr, i32 }
          cleanup
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %4, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %5, align 4
  br label %170

161:                                              ; preds = %144
  %162 = landingpad { ptr, i32 }
          cleanup
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %4, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %5, align 4
  br label %169

165:                                              ; preds = %151, %146
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %4, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #8
  br label %169

169:                                              ; preds = %165, %161
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %15) #8
  br label %170

170:                                              ; preds = %169, %157
  call void @llvm.lifetime.end.p0(i64 432, ptr %15) #8
  br label %179

171:                                              ; preds = %153
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %4, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %5, align 4
  call void @_ZNSt15__exception_ptr13exception_ptrD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  br label %179

175:                                              ; preds = %154
  %176 = landingpad { ptr, i32 }
          cleanup
  %177 = extractvalue { ptr, i32 } %176, 0
  store ptr %177, ptr %4, align 8
  %178 = extractvalue { ptr, i32 } %176, 1
  store i32 %178, ptr %5, align 4
  br label %181

179:                                              ; preds = %171, %170
  invoke void @__cxa_end_catch()
          to label %180 unwind label %241

180:                                              ; preds = %179
  br label %181

181:                                              ; preds = %180, %175
  call void @_ZNSt7promiseISt10error_codeED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %235

182:                                              ; preds = %115
  %183 = getelementptr inbounds %"class.DynexCN::BlockchainSynchronizer", ptr %21, i32 0, i32 8
  %184 = load i32, ptr %183, align 4, !tbaa !53
  %185 = getelementptr inbounds %"class.DynexCN::BlockchainSynchronizer", ptr %21, i32 0, i32 7
  store i32 %184, ptr %185, align 8, !tbaa !9
  %186 = getelementptr inbounds %"class.DynexCN::BlockchainSynchronizer", ptr %21, i32 0, i32 8
  %187 = load i32, ptr %186, align 4, !tbaa !53
  switch i32 %187, label %233 [
    i32 4, label %234
    i32 3, label %188
    i32 2, label %192
    i32 1, label %196
    i32 0, label %200
  ]

188:                                              ; preds = %182
  %189 = getelementptr inbounds %"class.DynexCN::BlockchainSynchronizer", ptr %21, i32 0, i32 8
  store i32 2, ptr %189, align 4, !tbaa !53
  invoke void @_ZNSt11unique_lockISt5mutexE6unlockEv(ptr noundef nonnull align 8 dereferenceable(9) %3)
          to label %190 unwind label %39

190:                                              ; preds = %188
  invoke void @_ZN7DynexCN22BlockchainSynchronizer26removeOutdatedTransactionsEv(ptr noundef nonnull align 8 dereferenceable(440) %21)
          to label %191 unwind label %39

191:                                              ; preds = %190
  br label %234

192:                                              ; preds = %182
  %193 = getelementptr inbounds %"class.DynexCN::BlockchainSynchronizer", ptr %21, i32 0, i32 8
  store i32 1, ptr %193, align 4, !tbaa !53
  invoke void @_ZNSt11unique_lockISt5mutexE6unlockEv(ptr noundef nonnull align 8 dereferenceable(9) %3)
          to label %194 unwind label %39

194:                                              ; preds = %192
  invoke void @_ZN7DynexCN22BlockchainSynchronizer19startBlockchainSyncEv(ptr noundef nonnull align 8 dereferenceable(440) %21)
          to label %195 unwind label %39

195:                                              ; preds = %194
  br label %234

196:                                              ; preds = %182
  %197 = getelementptr inbounds %"class.DynexCN::BlockchainSynchronizer", ptr %21, i32 0, i32 8
  store i32 0, ptr %197, align 4, !tbaa !53
  invoke void @_ZNSt11unique_lockISt5mutexE6unlockEv(ptr noundef nonnull align 8 dereferenceable(9) %3)
          to label %198 unwind label %39

198:                                              ; preds = %196
  invoke void @_ZN7DynexCN22BlockchainSynchronizer13startPoolSyncEv(ptr noundef nonnull align 8 dereferenceable(440) %21)
          to label %199 unwind label %39

199:                                              ; preds = %198
  br label %234

200:                                              ; preds = %182
  call void @llvm.lifetime.start.p0(i64 432, ptr %18) #8
  %201 = getelementptr inbounds %"class.DynexCN::BlockchainSynchronizer", ptr %21, i32 0, i32 2
  invoke void @_ZNK7Logging9LoggerRefclENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.Logging::LoggerMessage") align 8 %18, ptr noundef nonnull align 8 dereferenceable(40) %201, i32 noundef 4, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging7DEFAULTB5cxx11E)
          to label %202 unwind label %215

202:                                              ; preds = %200
  %203 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA5_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %18, ptr noundef nonnull align 1 dereferenceable(5) @.str.36)
          to label %204 unwind label %219

204:                                              ; preds = %202
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %18) #8
  call void @llvm.lifetime.end.p0(i64 432, ptr %18) #8
  %205 = getelementptr inbounds %"class.DynexCN::BlockchainSynchronizer", ptr %21, i32 0, i32 14
  %206 = getelementptr inbounds %class.anon.55, ptr %19, i32 0, i32 0
  store ptr %21, ptr %206, align 8, !tbaa !81
  %207 = getelementptr inbounds %class.anon.55, ptr %19, i32 0, i32 0
  %208 = load ptr, ptr %207, align 8
  invoke void @"_ZNSt18condition_variable4waitIZN7DynexCN22BlockchainSynchronizer20actualizeFutureStateEvE3$_0EEvRSt11unique_lockISt5mutexET_"(ptr noundef nonnull align 8 dereferenceable(48) %205, ptr noundef nonnull align 8 dereferenceable(9) %3, ptr %208)
          to label %209 unwind label %39

209:                                              ; preds = %204
  call void @llvm.lifetime.start.p0(i64 432, ptr %20) #8
  %210 = getelementptr inbounds %"class.DynexCN::BlockchainSynchronizer", ptr %21, i32 0, i32 2
  invoke void @_ZNK7Logging9LoggerRefclENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.Logging::LoggerMessage") align 8 %20, ptr noundef nonnull align 8 dereferenceable(40) %210, i32 noundef 4, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging7DEFAULTB5cxx11E)
          to label %211 unwind label %224

211:                                              ; preds = %209
  %212 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA7_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %20, ptr noundef nonnull align 1 dereferenceable(7) @.str.37)
          to label %213 unwind label %228

213:                                              ; preds = %211
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %20) #8
  call void @llvm.lifetime.end.p0(i64 432, ptr %20) #8
  invoke void @_ZNSt11unique_lockISt5mutexE6unlockEv(ptr noundef nonnull align 8 dereferenceable(9) %3)
          to label %214 unwind label %39

214:                                              ; preds = %213
  br label %234

215:                                              ; preds = %200
  %216 = landingpad { ptr, i32 }
          cleanup
  %217 = extractvalue { ptr, i32 } %216, 0
  store ptr %217, ptr %4, align 8
  %218 = extractvalue { ptr, i32 } %216, 1
  store i32 %218, ptr %5, align 4
  br label %223

219:                                              ; preds = %202
  %220 = landingpad { ptr, i32 }
          cleanup
  %221 = extractvalue { ptr, i32 } %220, 0
  store ptr %221, ptr %4, align 8
  %222 = extractvalue { ptr, i32 } %220, 1
  store i32 %222, ptr %5, align 4
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %18) #8
  br label %223

223:                                              ; preds = %219, %215
  call void @llvm.lifetime.end.p0(i64 432, ptr %18) #8
  br label %235

224:                                              ; preds = %209
  %225 = landingpad { ptr, i32 }
          cleanup
  %226 = extractvalue { ptr, i32 } %225, 0
  store ptr %226, ptr %4, align 8
  %227 = extractvalue { ptr, i32 } %225, 1
  store i32 %227, ptr %5, align 4
  br label %232

228:                                              ; preds = %211
  %229 = landingpad { ptr, i32 }
          cleanup
  %230 = extractvalue { ptr, i32 } %229, 0
  store ptr %230, ptr %4, align 8
  %231 = extractvalue { ptr, i32 } %229, 1
  store i32 %231, ptr %5, align 4
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %20) #8
  br label %232

232:                                              ; preds = %228, %224
  call void @llvm.lifetime.end.p0(i64 432, ptr %20) #8
  br label %235

233:                                              ; preds = %182
  br label %234

234:                                              ; preds = %233, %214, %199, %195, %191, %182
  call void @_ZNSt11unique_lockISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(9) %3) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %3) #8
  ret void

235:                                              ; preds = %232, %223, %181, %113, %39
  call void @_ZNSt11unique_lockISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(9) %3) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %3) #8
  br label %236

236:                                              ; preds = %235
  %237 = load ptr, ptr %4, align 8
  %238 = load i32, ptr %5, align 4
  %239 = insertvalue { ptr, i32 } poison, ptr %237, 0
  %240 = insertvalue { ptr, i32 } %239, i32 %238, 1
  resume { ptr, i32 } %240

241:                                              ; preds = %179, %111
  %242 = landingpad { ptr, i32 }
          catch ptr null
  %243 = extractvalue { ptr, i32 } %242, 0
  call void @__clang_call_terminate(ptr %243) #9
  unreachable
}

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

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

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

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

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

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

; Function Attrs: nounwind
declare void @_ZSt17current_exceptionv(ptr dead_on_unwind writable sret(%"class.std::__exception_ptr::exception_ptr") align 8) #3

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

declare void @__cxa_end_catch()

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA45_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 1 dereferenceable(45)) #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt11unique_lockISt5mutexE6unlockEv(ptr noundef nonnull align 8 dereferenceable(9)) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN22BlockchainSynchronizer26removeOutdatedTransactionsEv(ptr noundef nonnull align 8 dereferenceable(440)) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN22BlockchainSynchronizer19startBlockchainSyncEv(ptr noundef nonnull align 8 dereferenceable(440)) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN22BlockchainSynchronizer13startPoolSyncEv(ptr noundef nonnull align 8 dereferenceable(440)) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA5_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 1 dereferenceable(5)) #4

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt18condition_variable4waitIZN7DynexCN22BlockchainSynchronizer20actualizeFutureStateEvE3$_0EEvRSt11unique_lockISt5mutexET_"(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(9), ptr) #5 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noinline noreturn nounwind uwtable "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 = { "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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 = { noreturn 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, !36, i64 248}
!10 = !{!"_ZTSN7DynexCN22BlockchainSynchronizerE", !11, i64 0, !22, i64 80, !23, i64 88, !27, i64 128, !6, i64 176, !35, i64 184, !35, i64 216, !36, i64 248, !36, i64 252, !37, i64 256, !43, i64 264, !48, i64 288, !20, i64 312, !20, i64 352, !51, i64 392}
!11 = !{!"_ZTSN7DynexCN15IObservableImplINS_31IBlockchainSynchronizerObserverENS_23IBlockchainSynchronizerEEE", !12, i64 0, !15, i64 16}
!12 = !{!"_ZTSN7DynexCN23IBlockchainSynchronizerE", !13, i64 0, !14, i64 8}
!13 = !{!"_ZTSN7DynexCN11IObservableINS_31IBlockchainSynchronizerObserverEEE"}
!14 = !{!"_ZTSN7DynexCN19IStreamSerializableE"}
!15 = !{!"_ZTSN5Tools15ObserverManagerIN7DynexCN31IBlockchainSynchronizerObserverEEE", !16, i64 0, !20, i64 24}
!16 = !{!"_ZTSSt6vectorIPN7DynexCN31IBlockchainSynchronizerObserverESaIS2_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIPN7DynexCN31IBlockchainSynchronizerObserverESaIS2_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIPN7DynexCN31IBlockchainSynchronizerObserverESaIS2_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIPN7DynexCN31IBlockchainSynchronizerObserverESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"_ZTSSt5mutex", !21, i64 0}
!21 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!22 = !{!"_ZTSN7DynexCN13INodeObserverE"}
!23 = !{!"_ZTSN7Logging9LoggerRefE", !6, i64 0, !24, i64 8}
!24 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !25, i64 0, !26, i64 8, !7, i64 16}
!25 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!26 = !{!"long", !7, i64 0}
!27 = !{!"_ZTSSt3mapIPN7DynexCN19IBlockchainConsumerESt10shared_ptrINS0_20SynchronizationStateEESt4lessIS2_ESaISt4pairIKS2_S5_EEE", !28, i64 0}
!28 = !{!"_ZTSSt8_Rb_treeIPN7DynexCN19IBlockchainConsumerESt4pairIKS2_St10shared_ptrINS0_20SynchronizationStateEEESt10_Select1stIS8_ESt4lessIS2_ESaIS8_EE", !29, i64 0}
!29 = !{!"_ZTSNSt8_Rb_treeIPN7DynexCN19IBlockchainConsumerESt4pairIKS2_St10shared_ptrINS0_20SynchronizationStateEEESt10_Select1stIS8_ESt4lessIS2_ESaIS8_EE13_Rb_tree_implISC_Lb1EEE", !30, i64 0, !32, i64 8}
!30 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIPN7DynexCN19IBlockchainConsumerEEE", !31, i64 0}
!31 = !{!"_ZTSSt4lessIPN7DynexCN19IBlockchainConsumerEE"}
!32 = !{!"_ZTSSt15_Rb_tree_header", !33, i64 0, !26, i64 32}
!33 = !{!"_ZTSSt18_Rb_tree_node_base", !34, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!34 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!35 = !{!"_ZTSN6Crypto4HashE", !7, i64 0}
!36 = !{!"_ZTSN7DynexCN22BlockchainSynchronizer5StateE", !7, i64 0}
!37 = !{!"_ZTSSt10unique_ptrISt6threadSt14default_deleteIS0_EE", !38, i64 0}
!38 = !{!"_ZTSSt15__uniq_ptr_dataISt6threadSt14default_deleteIS0_ELb1ELb1EE", !39, i64 0}
!39 = !{!"_ZTSSt15__uniq_ptr_implISt6threadSt14default_deleteIS0_EE", !40, i64 0}
!40 = !{!"_ZTSSt5tupleIJPSt6threadSt14default_deleteIS0_EEE", !41, i64 0}
!41 = !{!"_ZTSSt11_Tuple_implILm0EJPSt6threadSt14default_deleteIS0_EEE", !42, i64 0}
!42 = !{!"_ZTSSt10_Head_baseILm0EPSt6threadLb0EE", !6, i64 0}
!43 = !{!"_ZTSNSt7__cxx114listISt4pairIPKN7DynexCN18ITransactionReaderESt7promiseISt10error_codeEESaIS9_EEE", !44, i64 0}
!44 = !{!"_ZTSNSt7__cxx1110_List_baseISt4pairIPKN7DynexCN18ITransactionReaderESt7promiseISt10error_codeEESaIS9_EEE", !45, i64 0}
!45 = !{!"_ZTSNSt7__cxx1110_List_baseISt4pairIPKN7DynexCN18ITransactionReaderESt7promiseISt10error_codeEESaIS9_EE10_List_implE", !46, i64 0}
!46 = !{!"_ZTSNSt8__detail17_List_node_headerE", !47, i64 0, !26, i64 16}
!47 = !{!"_ZTSNSt8__detail15_List_node_baseE", !6, i64 0, !6, i64 8}
!48 = !{!"_ZTSNSt7__cxx114listISt4pairIPKN6Crypto4HashESt7promiseIvEESaIS8_EEE", !49, i64 0}
!49 = !{!"_ZTSNSt7__cxx1110_List_baseISt4pairIPKN6Crypto4HashESt7promiseIvEESaIS8_EEE", !50, i64 0}
!50 = !{!"_ZTSNSt7__cxx1110_List_baseISt4pairIPKN6Crypto4HashESt7promiseIvEESaIS8_EE10_List_implE", !46, i64 0}
!51 = !{!"_ZTSSt18condition_variable", !52, i64 0}
!52 = !{!"_ZTSSt9__condvar", !7, i64 0}
!53 = !{!10, !36, i64 252}
!54 = !{!10, !6, i64 176}
!55 = !{!56, !56, i64 0}
!56 = !{!"vtable pointer", !8, i64 0}
!57 = !{!58, !6, i64 0}
!58 = !{!"_ZTSSt4pairIPKN6Crypto4HashESt7promiseIvEE", !6, i64 0, !59, i64 8}
!59 = !{!"_ZTSSt7promiseIvE", !60, i64 0, !63, i64 16}
!60 = !{!"_ZTSSt10shared_ptrINSt13__future_base13_State_baseV2EE", !61, i64 0}
!61 = !{!"_ZTSSt12__shared_ptrINSt13__future_base13_State_baseV2ELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !62, i64 8}
!62 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!63 = !{!"_ZTSSt10unique_ptrINSt13__future_base7_ResultIvEENS0_12_Result_base8_DeleterEE", !64, i64 0}
!64 = !{!"_ZTSSt15__uniq_ptr_dataINSt13__future_base7_ResultIvEENS0_12_Result_base8_DeleterELb1ELb1EE", !65, i64 0}
!65 = !{!"_ZTSSt15__uniq_ptr_implINSt13__future_base7_ResultIvEENS0_12_Result_base8_DeleterEE", !66, i64 0}
!66 = !{!"_ZTSSt5tupleIJPNSt13__future_base7_ResultIvEENS0_12_Result_base8_DeleterEEE", !67, i64 0}
!67 = !{!"_ZTSSt11_Tuple_implILm0EJPNSt13__future_base7_ResultIvEENS0_12_Result_base8_DeleterEEE", !68, i64 0}
!68 = !{!"_ZTSSt10_Head_baseILm0EPNSt13__future_base7_ResultIvEELb0EE", !6, i64 0}
!69 = distinct !{!69, !70}
!70 = !{!"llvm.loop.mustprogress"}
!71 = !{!72, !6, i64 0}
!72 = !{!"_ZTSSt4pairIPKN7DynexCN18ITransactionReaderESt7promiseISt10error_codeEE", !6, i64 0, !73, i64 8}
!73 = !{!"_ZTSSt7promiseISt10error_codeE", !60, i64 0, !74, i64 16}
!74 = !{!"_ZTSSt10unique_ptrINSt13__future_base7_ResultISt10error_codeEENS0_12_Result_base8_DeleterEE", !75, i64 0}
!75 = !{!"_ZTSSt15__uniq_ptr_dataINSt13__future_base7_ResultISt10error_codeEENS0_12_Result_base8_DeleterELb1ELb1EE", !76, i64 0}
!76 = !{!"_ZTSSt15__uniq_ptr_implINSt13__future_base7_ResultISt10error_codeEENS0_12_Result_base8_DeleterEE", !77, i64 0}
!77 = !{!"_ZTSSt5tupleIJPNSt13__future_base7_ResultISt10error_codeEENS0_12_Result_base8_DeleterEEE", !78, i64 0}
!78 = !{!"_ZTSSt11_Tuple_implILm0EJPNSt13__future_base7_ResultISt10error_codeEENS0_12_Result_base8_DeleterEEE", !79, i64 0}
!79 = !{!"_ZTSSt10_Head_baseILm0EPNSt13__future_base7_ResultISt10error_codeEELb0EE", !6, i64 0}
!80 = distinct !{!80, !70}
!81 = !{!82, !6, i64 0}
!82 = !{!"_ZTSZN7DynexCN22BlockchainSynchronizer20actualizeFutureStateEvE3$_0", !6, 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::__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.Logging::LoggerMessage" = type <{ %"class.std::basic_ostream.base", %"class.std::basic_streambuf", ptr, %"class.std::__cxx11::basic_string", i32, [4 x i8], %"class.std::__cxx11::basic_string", %"class.boost::posix_time::ptime", i8, [7 x i8], %"class.std::basic_ios" }>
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"class.boost::posix_time::ptime" = type { %"class.boost::date_time::base_time" }
%"class.boost::date_time::base_time" = type { %"struct.boost::date_time::counted_time_rep" }
%"struct.boost::date_time::counted_time_rep" = type { %"class.boost::date_time::int_adapter" }
%"class.boost::date_time::int_adapter" = type { i64 }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::unique_lock" = type <{ ptr, i8, [7 x i8] }>
%"class.std::promise.44" = type { %"class.std::shared_ptr.29", %"class.std::unique_ptr.45" }
%"class.std::shared_ptr.29" = type { %"class.std::__shared_ptr.30" }
%"class.std::__shared_ptr.30" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::unique_ptr.45" = type { %"struct.std::__uniq_ptr_data.46" }
%"struct.std::__uniq_ptr_data.46" = type { %"class.std::__uniq_ptr_impl.47" }
%"class.std::__uniq_ptr_impl.47" = type { %"class.std::tuple.48" }
%"class.std::tuple.48" = type { %"struct.std::_Tuple_impl.49" }
%"struct.std::_Tuple_impl.49" = type { %"struct.std::_Head_base.50" }
%"struct.std::_Head_base.50" = type { ptr }
%"class.std::__exception_ptr::exception_ptr" = type { ptr }
%"class.std::promise" = type { %"class.std::shared_ptr.29", %"class.std::unique_ptr.32" }
%"class.std::unique_ptr.32" = type { %"struct.std::__uniq_ptr_data.33" }
%"struct.std::__uniq_ptr_data.33" = type { %"class.std::__uniq_ptr_impl.34" }
%"class.std::__uniq_ptr_impl.34" = type { %"class.std::tuple.35" }
%"class.std::tuple.35" = type { %"struct.std::_Tuple_impl.36" }
%"struct.std::_Tuple_impl.36" = type { %"struct.std::_Head_base.39" }
%"struct.std::_Head_base.39" = type { ptr }
%"class.std::error_code" = type { i32, ptr }
%"struct.Crypto::Hash" = type { [32 x i8] }

@_ZN7Logging10BRIGHT_REDB5cxx11E = external global %"class.std::__cxx11::basic_string", align 8
@.str.34 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [45 x i8], align 1
@_ZN7Logging7DEFAULTB5cxx11E = external global %"class.std::__cxx11::basic_string", align 8
@.str.36 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [7 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #1

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

declare void @_ZNK7Logging9LoggerRefclENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.Logging::LoggerMessage") align 8, ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161)) unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA48_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 1 dereferenceable(48)) local_unnamed_addr #4

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEN6Crypto4HashEEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 1 dereferenceable(32)) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { i32, ptr } @_ZN7DynexCN22BlockchainSynchronizer27doAddUnconfirmedTransactionERKNS_18ITransactionReaderE(ptr noundef nonnull align 8 dereferenceable(440), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN22BlockchainSynchronizer30doRemoveUnconfirmedTransactionERKN6Crypto4HashE(ptr noundef nonnull align 8 dereferenceable(440), ptr noundef nonnull align 1 dereferenceable(32)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA7_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 1 dereferenceable(7)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7DynexCN22BlockchainSynchronizer20actualizeFutureStateEv(ptr noundef nonnull align 8 dereferenceable(440) %0) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::unique_lock", align 8
  %3 = alloca %"class.std::promise.44", align 8
  %4 = alloca %"class.Logging::LoggerMessage", align 8
  %5 = alloca %"class.std::__exception_ptr::exception_ptr", align 8
  %6 = alloca %"class.std::promise", align 8
  %7 = alloca %"class.std::error_code", align 8
  %8 = alloca %"class.Logging::LoggerMessage", align 8
  %9 = alloca %"struct.Crypto::Hash", align 1
  %10 = alloca %"class.std::__exception_ptr::exception_ptr", align 8
  %11 = alloca %"class.Logging::LoggerMessage", align 8
  %12 = alloca %"class.Logging::LoggerMessage", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #8
  %13 = getelementptr inbounds i8, ptr %0, i64 352
  call void @_ZNSt11unique_lockISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(9) %2, ptr noundef nonnull align 8 dereferenceable(40) %13)
  %14 = getelementptr inbounds i8, ptr %0, i64 248
  %15 = load i32, ptr %14, align 8
  %16 = icmp eq i32 %15, 4
  %17 = getelementptr inbounds i8, ptr %0, i64 252
  %18 = load i32, ptr %17, align 4
  %19 = icmp eq i32 %18, 3
  %or.cond = select i1 %16, i1 %19, i1 false
  br i1 %or.cond, label %20, label %30

20:                                               ; preds = %1
  %21 = getelementptr inbounds i8, ptr %0, i64 176
  %22 = load ptr, ptr %21, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %0, i64 80
  %24 = load ptr, ptr %22, align 8, !tbaa !52
  %25 = getelementptr inbounds i8, ptr %24, i64 16
  %26 = load ptr, ptr %25, align 8
  %27 = invoke noundef zeroext i1 %26(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull %23)
          to label %._crit_edge43 unwind label %28

._crit_edge43:                                    ; preds = %20
  %.pre = load i32, ptr %17, align 4, !tbaa !54
  %.pre44 = load i32, ptr %14, align 8
  br label %30

28:                                               ; preds = %133, %128, %123, %122, %121, %120, %119, %118, %34, %20
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %145

30:                                               ; preds = %._crit_edge43, %1
  %31 = phi i32 [ %.pre44, %._crit_edge43 ], [ %15, %1 ]
  %32 = phi i32 [ %.pre, %._crit_edge43 ], [ %18, %1 ]
  %33 = icmp ne i32 %32, 4
  %.not = icmp eq i32 %31, 4
  %or.cond41 = select i1 %33, i1 true, i1 %.not
  br i1 %or.cond41, label %42, label %34

34:                                               ; preds = %30
  %35 = getelementptr inbounds i8, ptr %0, i64 176
  %36 = load ptr, ptr %35, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %0, i64 80
  %38 = load ptr, ptr %36, align 8, !tbaa !52
  %39 = getelementptr inbounds i8, ptr %38, i64 24
  %40 = load ptr, ptr %39, align 8
  %41 = invoke noundef zeroext i1 %40(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull %37)
          to label %42 unwind label %28

42:                                               ; preds = %34, %30
  %43 = getelementptr inbounds i8, ptr %0, i64 288
  %44 = call noundef zeroext i1 @_ZNKSt7__cxx114listISt4pairIPKN6Crypto4HashESt7promiseIvEESaIS8_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %43) #8
  br i1 %44, label %.preheader, label %.lr.ph

.lr.ph:                                           ; preds = %42
  %45 = getelementptr inbounds i8, ptr %0, i64 88
  br label %50

.preheader:                                       ; preds = %65, %42
  %46 = getelementptr inbounds i8, ptr %0, i64 264
  %47 = call noundef zeroext i1 @_ZNKSt7__cxx114listISt4pairIPKN7DynexCN18ITransactionReaderESt7promiseISt10error_codeEESaIS9_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %46) #8
  br i1 %47, label %._crit_edge, label %.lr.ph42

.lr.ph42:                                         ; preds = %.preheader
  %48 = getelementptr inbounds i8, ptr %7, i64 8
  %49 = getelementptr inbounds i8, ptr %0, i64 88
  br label %78

50:                                               ; preds = %.lr.ph, %65
  %51 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx114listISt4pairIPKN6Crypto4HashESt7promiseIvEESaIS8_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %43) #8
  %52 = load ptr, ptr %51, align 8, !tbaa !55
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #8
  %53 = getelementptr inbounds i8, ptr %51, i64 8
  call void @_ZNSt7promiseIvEC2EOS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %53) #8
  call void @_ZNSt7__cxx114listISt4pairIPKN6Crypto4HashESt7promiseIvEESaIS8_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(24) %43) #8
  invoke void @_ZN7DynexCN22BlockchainSynchronizer30doRemoveUnconfirmedTransactionERKN6Crypto4HashE(ptr noundef nonnull align 8 dereferenceable(440) %0, ptr noundef nonnull align 1 dereferenceable(32) %52)
          to label %54 unwind label %55

54:                                               ; preds = %50
  invoke void @_ZNSt7promiseIvE9set_valueEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %65 unwind label %55

55:                                               ; preds = %54, %50
  %56 = landingpad { ptr, i32 }
          catch ptr null
  %57 = extractvalue { ptr, i32 } %56, 0
  %58 = call ptr @__cxa_begin_catch(ptr %57) #8
  call void @llvm.lifetime.start.p0(i64 432, ptr nonnull %4) #8
  invoke void @_ZNK7Logging9LoggerRefclENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind nonnull writable sret(%"class.Logging::LoggerMessage") align 8 %4, ptr noundef nonnull align 8 dereferenceable(40) %45, i32 noundef 1, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging10BRIGHT_REDB5cxx11E)
          to label %59 unwind label %67

59:                                               ; preds = %55
  %60 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA48_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %4, ptr noundef nonnull align 1 dereferenceable(48) @.str.34)
          to label %61 unwind label %69

61:                                               ; preds = %59
  %62 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEN6Crypto4HashEEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %60, ptr noundef nonnull align 1 dereferenceable(32) %52)
          to label %63 unwind label %69

63:                                               ; preds = %61
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %4) #8
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %4) #8
  call void @_ZSt17current_exceptionv(ptr dead_on_unwind nonnull writable sret(%"class.std::__exception_ptr::exception_ptr") align 8 %5) #8
  invoke void @_ZNSt7promiseIvE13set_exceptionENSt15__exception_ptr13exception_ptrE(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull %5)
          to label %64 unwind label %72

64:                                               ; preds = %63
  call void @_ZNSt15__exception_ptr13exception_ptrD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  invoke void @__cxa_end_catch()
          to label %65 unwind label %74

65:                                               ; preds = %64, %54
  call void @_ZNSt7promiseIvED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #8
  %66 = call noundef zeroext i1 @_ZNKSt7__cxx114listISt4pairIPKN6Crypto4HashESt7promiseIvEESaIS8_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %43) #8
  br i1 %66, label %.preheader, label %50, !llvm.loop !67

67:                                               ; preds = %55
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %71

69:                                               ; preds = %61, %59
  %70 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %4) #8
  br label %71

71:                                               ; preds = %69, %67
  %.pn32 = phi { ptr, i32 } [ %70, %69 ], [ %68, %67 ]
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %4) #8
  br label %76

72:                                               ; preds = %63
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__exception_ptr13exception_ptrD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  br label %76

74:                                               ; preds = %64
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %77

76:                                               ; preds = %72, %71
  %.pn34 = phi { ptr, i32 } [ %73, %72 ], [ %.pn32, %71 ]
  invoke void @__cxa_end_catch()
          to label %77 unwind label %146

77:                                               ; preds = %76, %74
  %.pn36 = phi { ptr, i32 } [ %75, %74 ], [ %.pn34, %76 ]
  call void @_ZNSt7promiseIvED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #8
  br label %145

78:                                               ; preds = %.lr.ph42, %101
  %79 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx114listISt4pairIPKN7DynexCN18ITransactionReaderESt7promiseISt10error_codeEESaIS9_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %46) #8
  %80 = load ptr, ptr %79, align 8, !tbaa !69
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #8
  %81 = getelementptr inbounds i8, ptr %79, i64 8
  call void @_ZNSt7promiseISt10error_codeEC2EOS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %81) #8
  call void @_ZNSt7__cxx114listISt4pairIPKN7DynexCN18ITransactionReaderESt7promiseISt10error_codeEESaIS9_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(24) %46) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #8
  %82 = invoke { i32, ptr } @_ZN7DynexCN22BlockchainSynchronizer27doAddUnconfirmedTransactionERKNS_18ITransactionReaderE(ptr noundef nonnull align 8 dereferenceable(440) %0, ptr noundef nonnull align 8 dereferenceable(8) %80)
          to label %83 unwind label %87

83:                                               ; preds = %78
  %84 = extractvalue { i32, ptr } %82, 0
  store i32 %84, ptr %7, align 8
  %85 = extractvalue { i32, ptr } %82, 1
  store ptr %85, ptr %48, align 8
  invoke void @_ZNSt7promiseISt10error_codeE9set_valueERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(16) %7)
          to label %86 unwind label %87

86:                                               ; preds = %83
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #8
  br label %101

87:                                               ; preds = %83, %78
  %88 = landingpad { ptr, i32 }
          catch ptr null
  %89 = extractvalue { ptr, i32 } %88, 0
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #8
  %90 = call ptr @__cxa_begin_catch(ptr %89) #8
  call void @llvm.lifetime.start.p0(i64 432, ptr nonnull %8) #8
  invoke void @_ZNK7Logging9LoggerRefclENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind nonnull writable sret(%"class.Logging::LoggerMessage") align 8 %8, ptr noundef nonnull align 8 dereferenceable(40) %49, i32 noundef 1, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging10BRIGHT_REDB5cxx11E)
          to label %91 unwind label %103

91:                                               ; preds = %87
  %92 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA45_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %8, ptr noundef nonnull align 1 dereferenceable(45) @.str.35)
          to label %93 unwind label %105

93:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #8
  %94 = load ptr, ptr %80, align 8, !tbaa !52
  %95 = getelementptr inbounds i8, ptr %94, i64 16
  %96 = load ptr, ptr %95, align 8
  invoke void %96(ptr dead_on_unwind nonnull writable sret(%"struct.Crypto::Hash") align 1 %9, ptr noundef nonnull align 8 dereferenceable(8) %80)
          to label %97 unwind label %107

97:                                               ; preds = %93
  %98 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEN6Crypto4HashEEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %92, ptr noundef nonnull align 1 dereferenceable(32) %9)
          to label %99 unwind label %107

99:                                               ; preds = %97
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #8
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %8) #8
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %8) #8
  call void @_ZSt17current_exceptionv(ptr dead_on_unwind nonnull writable sret(%"class.std::__exception_ptr::exception_ptr") align 8 %10) #8
  invoke void @_ZNSt7promiseISt10error_codeE13set_exceptionENSt15__exception_ptr13exception_ptrE(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull %10)
          to label %100 unwind label %111

100:                                              ; preds = %99
  call void @_ZNSt15__exception_ptr13exception_ptrD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  invoke void @__cxa_end_catch()
          to label %101 unwind label %113

101:                                              ; preds = %100, %86
  call void @_ZNSt7promiseISt10error_codeED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #8
  %102 = call noundef zeroext i1 @_ZNKSt7__cxx114listISt4pairIPKN7DynexCN18ITransactionReaderESt7promiseISt10error_codeEESaIS9_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %46) #8
  br i1 %102, label %._crit_edge, label %78, !llvm.loop !78

103:                                              ; preds = %87
  %104 = landingpad { ptr, i32 }
          cleanup
  br label %110

105:                                              ; preds = %91
  %106 = landingpad { ptr, i32 }
          cleanup
  br label %109

107:                                              ; preds = %97, %93
  %108 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #8
  br label %109

109:                                              ; preds = %107, %105
  %.pn25 = phi { ptr, i32 } [ %108, %107 ], [ %106, %105 ]
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %8) #8
  br label %110

110:                                              ; preds = %109, %103
  %.pn25.pn = phi { ptr, i32 } [ %.pn25, %109 ], [ %104, %103 ]
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %8) #8
  br label %115

111:                                              ; preds = %99
  %112 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__exception_ptr13exception_ptrD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  br label %115

113:                                              ; preds = %100
  %114 = landingpad { ptr, i32 }
          cleanup
  br label %116

115:                                              ; preds = %111, %110
  %.pn28 = phi { ptr, i32 } [ %112, %111 ], [ %.pn25.pn, %110 ]
  invoke void @__cxa_end_catch()
          to label %116 unwind label %146

116:                                              ; preds = %115, %113
  %.pn30 = phi { ptr, i32 } [ %114, %113 ], [ %.pn28, %115 ]
  call void @_ZNSt7promiseISt10error_codeED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #8
  br label %145

._crit_edge:                                      ; preds = %101, %.preheader
  %117 = load i32, ptr %17, align 4, !tbaa !54
  store i32 %117, ptr %14, align 8, !tbaa !79
  switch i32 %117, label %144 [
    i32 0, label %124
    i32 3, label %118
    i32 2, label %120
    i32 1, label %122
  ]

118:                                              ; preds = %._crit_edge
  store i32 2, ptr %17, align 4, !tbaa !54
  invoke void @_ZNSt11unique_lockISt5mutexE6unlockEv(ptr noundef nonnull align 8 dereferenceable(9) %2)
          to label %119 unwind label %28

119:                                              ; preds = %118
  invoke void @_ZN7DynexCN22BlockchainSynchronizer26removeOutdatedTransactionsEv(ptr noundef nonnull align 8 dereferenceable(440) %0)
          to label %144 unwind label %28

120:                                              ; preds = %._crit_edge
  store i32 1, ptr %17, align 4, !tbaa !54
  invoke void @_ZNSt11unique_lockISt5mutexE6unlockEv(ptr noundef nonnull align 8 dereferenceable(9) %2)
          to label %121 unwind label %28

121:                                              ; preds = %120
  invoke void @_ZN7DynexCN22BlockchainSynchronizer19startBlockchainSyncEv(ptr noundef nonnull align 8 dereferenceable(440) %0)
          to label %144 unwind label %28

122:                                              ; preds = %._crit_edge
  store i32 0, ptr %17, align 4, !tbaa !54
  invoke void @_ZNSt11unique_lockISt5mutexE6unlockEv(ptr noundef nonnull align 8 dereferenceable(9) %2)
          to label %123 unwind label %28

123:                                              ; preds = %122
  invoke void @_ZN7DynexCN22BlockchainSynchronizer13startPoolSyncEv(ptr noundef nonnull align 8 dereferenceable(440) %0)
          to label %144 unwind label %28

124:                                              ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 432, ptr nonnull %11) #8
  %125 = getelementptr inbounds i8, ptr %0, i64 88
  invoke void @_ZNK7Logging9LoggerRefclENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind nonnull writable sret(%"class.Logging::LoggerMessage") align 8 %11, ptr noundef nonnull align 8 dereferenceable(40) %125, i32 noundef 4, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging7DEFAULTB5cxx11E)
          to label %126 unwind label %134

126:                                              ; preds = %124
  %127 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA5_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %11, ptr noundef nonnull align 1 dereferenceable(5) @.str.36)
          to label %128 unwind label %136

128:                                              ; preds = %126
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %11) #8
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %11) #8
  %129 = getelementptr inbounds i8, ptr %0, i64 392
  invoke void @"_ZNSt18condition_variable4waitIZN7DynexCN22BlockchainSynchronizer20actualizeFutureStateEvE3$_0EEvRSt11unique_lockISt5mutexET_"(ptr noundef nonnull align 8 dereferenceable(48) %129, ptr noundef nonnull align 8 dereferenceable(9) %2, ptr nonnull %0)
          to label %130 unwind label %28

130:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 432, ptr nonnull %12) #8
  invoke void @_ZNK7Logging9LoggerRefclENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind nonnull writable sret(%"class.Logging::LoggerMessage") align 8 %12, ptr noundef nonnull align 8 dereferenceable(40) %125, i32 noundef 4, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging7DEFAULTB5cxx11E)
          to label %131 unwind label %139

131:                                              ; preds = %130
  %132 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA7_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %12, ptr noundef nonnull align 1 dereferenceable(7) @.str.37)
          to label %133 unwind label %141

133:                                              ; preds = %131
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %12) #8
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %12) #8
  invoke void @_ZNSt11unique_lockISt5mutexE6unlockEv(ptr noundef nonnull align 8 dereferenceable(9) %2)
          to label %144 unwind label %28

134:                                              ; preds = %124
  %135 = landingpad { ptr, i32 }
          cleanup
  br label %138

136:                                              ; preds = %126
  %137 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %11) #8
  br label %138

138:                                              ; preds = %136, %134
  %.pn = phi { ptr, i32 } [ %137, %136 ], [ %135, %134 ]
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %11) #8
  br label %145

139:                                              ; preds = %130
  %140 = landingpad { ptr, i32 }
          cleanup
  br label %143

141:                                              ; preds = %131
  %142 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %12) #8
  br label %143

143:                                              ; preds = %141, %139
  %.pn23 = phi { ptr, i32 } [ %142, %141 ], [ %140, %139 ]
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %12) #8
  br label %145

144:                                              ; preds = %._crit_edge, %133, %123, %121, %119
  call void @_ZNSt11unique_lockISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(9) %2) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #8
  ret void

145:                                              ; preds = %143, %138, %116, %77, %28
  %.pn36.pn = phi { ptr, i32 } [ %.pn36, %77 ], [ %.pn30, %116 ], [ %29, %28 ], [ %.pn23, %143 ], [ %.pn, %138 ]
  call void @_ZNSt11unique_lockISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(9) %2) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #8
  resume { ptr, i32 } %.pn36.pn

146:                                              ; preds = %115, %76
  %147 = landingpad { ptr, i32 }
          catch ptr null
  %148 = extractvalue { ptr, i32 } %147, 0
  call void @__clang_call_terminate(ptr %148) #9
  unreachable
}

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

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

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

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

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

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

; Function Attrs: nounwind
declare void @_ZSt17current_exceptionv(ptr dead_on_unwind writable sret(%"class.std::__exception_ptr::exception_ptr") align 8) local_unnamed_addr #3

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

declare void @__cxa_end_catch() local_unnamed_addr

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA45_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 1 dereferenceable(45)) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt11unique_lockISt5mutexE6unlockEv(ptr noundef nonnull align 8 dereferenceable(9)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN22BlockchainSynchronizer26removeOutdatedTransactionsEv(ptr noundef nonnull align 8 dereferenceable(440)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN22BlockchainSynchronizer19startBlockchainSyncEv(ptr noundef nonnull align 8 dereferenceable(440)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN22BlockchainSynchronizer13startPoolSyncEv(ptr noundef nonnull align 8 dereferenceable(440)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA5_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 1 dereferenceable(5)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt18condition_variable4waitIZN7DynexCN22BlockchainSynchronizer20actualizeFutureStateEvE3$_0EEvRSt11unique_lockISt5mutexET_"(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(9), ptr) local_unnamed_addr #5 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noinline noreturn nounwind uwtable "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 = { "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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 = { noreturn 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, !16, i64 176}
!6 = !{!"_ZTSN7DynexCN22BlockchainSynchronizerE", !7, i64 0, !21, i64 80, !22, i64 88, !26, i64 128, !16, i64 176, !34, i64 184, !34, i64 216, !35, i64 248, !35, i64 252, !36, i64 256, !42, i64 264, !47, i64 288, !19, i64 312, !19, i64 352, !50, i64 392}
!7 = !{!"_ZTSN7DynexCN15IObservableImplINS_31IBlockchainSynchronizerObserverENS_23IBlockchainSynchronizerEEE", !8, i64 0, !11, i64 16}
!8 = !{!"_ZTSN7DynexCN23IBlockchainSynchronizerE", !9, i64 0, !10, i64 8}
!9 = !{!"_ZTSN7DynexCN11IObservableINS_31IBlockchainSynchronizerObserverEEE"}
!10 = !{!"_ZTSN7DynexCN19IStreamSerializableE"}
!11 = !{!"_ZTSN5Tools15ObserverManagerIN7DynexCN31IBlockchainSynchronizerObserverEEE", !12, i64 0, !19, i64 24}
!12 = !{!"_ZTSSt6vectorIPN7DynexCN31IBlockchainSynchronizerObserverESaIS2_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIPN7DynexCN31IBlockchainSynchronizerObserverESaIS2_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIPN7DynexCN31IBlockchainSynchronizerObserverESaIS2_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIPN7DynexCN31IBlockchainSynchronizerObserverESaIS2_EE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!16 = !{!"any pointer", !17, i64 0}
!17 = !{!"omnipotent char", !18, i64 0}
!18 = !{!"Simple C++ TBAA"}
!19 = !{!"_ZTSSt5mutex", !20, i64 0}
!20 = !{!"_ZTSSt12__mutex_base", !17, i64 0}
!21 = !{!"_ZTSN7DynexCN13INodeObserverE"}
!22 = !{!"_ZTSN7Logging9LoggerRefE", !16, i64 0, !23, i64 8}
!23 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !24, i64 0, !25, i64 8, !17, i64 16}
!24 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !16, i64 0}
!25 = !{!"long", !17, i64 0}
!26 = !{!"_ZTSSt3mapIPN7DynexCN19IBlockchainConsumerESt10shared_ptrINS0_20SynchronizationStateEESt4lessIS2_ESaISt4pairIKS2_S5_EEE", !27, i64 0}
!27 = !{!"_ZTSSt8_Rb_treeIPN7DynexCN19IBlockchainConsumerESt4pairIKS2_St10shared_ptrINS0_20SynchronizationStateEEESt10_Select1stIS8_ESt4lessIS2_ESaIS8_EE", !28, i64 0}
!28 = !{!"_ZTSNSt8_Rb_treeIPN7DynexCN19IBlockchainConsumerESt4pairIKS2_St10shared_ptrINS0_20SynchronizationStateEEESt10_Select1stIS8_ESt4lessIS2_ESaIS8_EE13_Rb_tree_implISC_Lb1EEE", !29, i64 0, !31, i64 8}
!29 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIPN7DynexCN19IBlockchainConsumerEEE", !30, i64 0}
!30 = !{!"_ZTSSt4lessIPN7DynexCN19IBlockchainConsumerEE"}
!31 = !{!"_ZTSSt15_Rb_tree_header", !32, i64 0, !25, i64 32}
!32 = !{!"_ZTSSt18_Rb_tree_node_base", !33, i64 0, !16, i64 8, !16, i64 16, !16, i64 24}
!33 = !{!"_ZTSSt14_Rb_tree_color", !17, i64 0}
!34 = !{!"_ZTSN6Crypto4HashE", !17, i64 0}
!35 = !{!"_ZTSN7DynexCN22BlockchainSynchronizer5StateE", !17, i64 0}
!36 = !{!"_ZTSSt10unique_ptrISt6threadSt14default_deleteIS0_EE", !37, i64 0}
!37 = !{!"_ZTSSt15__uniq_ptr_dataISt6threadSt14default_deleteIS0_ELb1ELb1EE", !38, i64 0}
!38 = !{!"_ZTSSt15__uniq_ptr_implISt6threadSt14default_deleteIS0_EE", !39, i64 0}
!39 = !{!"_ZTSSt5tupleIJPSt6threadSt14default_deleteIS0_EEE", !40, i64 0}
!40 = !{!"_ZTSSt11_Tuple_implILm0EJPSt6threadSt14default_deleteIS0_EEE", !41, i64 0}
!41 = !{!"_ZTSSt10_Head_baseILm0EPSt6threadLb0EE", !16, i64 0}
!42 = !{!"_ZTSNSt7__cxx114listISt4pairIPKN7DynexCN18ITransactionReaderESt7promiseISt10error_codeEESaIS9_EEE", !43, i64 0}
!43 = !{!"_ZTSNSt7__cxx1110_List_baseISt4pairIPKN7DynexCN18ITransactionReaderESt7promiseISt10error_codeEESaIS9_EEE", !44, i64 0}
!44 = !{!"_ZTSNSt7__cxx1110_List_baseISt4pairIPKN7DynexCN18ITransactionReaderESt7promiseISt10error_codeEESaIS9_EE10_List_implE", !45, i64 0}
!45 = !{!"_ZTSNSt8__detail17_List_node_headerE", !46, i64 0, !25, i64 16}
!46 = !{!"_ZTSNSt8__detail15_List_node_baseE", !16, i64 0, !16, i64 8}
!47 = !{!"_ZTSNSt7__cxx114listISt4pairIPKN6Crypto4HashESt7promiseIvEESaIS8_EEE", !48, i64 0}
!48 = !{!"_ZTSNSt7__cxx1110_List_baseISt4pairIPKN6Crypto4HashESt7promiseIvEESaIS8_EEE", !49, i64 0}
!49 = !{!"_ZTSNSt7__cxx1110_List_baseISt4pairIPKN6Crypto4HashESt7promiseIvEESaIS8_EE10_List_implE", !45, i64 0}
!50 = !{!"_ZTSSt18condition_variable", !51, i64 0}
!51 = !{!"_ZTSSt9__condvar", !17, i64 0}
!52 = !{!53, !53, i64 0}
!53 = !{!"vtable pointer", !18, i64 0}
!54 = !{!6, !35, i64 252}
!55 = !{!56, !16, i64 0}
!56 = !{!"_ZTSSt4pairIPKN6Crypto4HashESt7promiseIvEE", !16, i64 0, !57, i64 8}
!57 = !{!"_ZTSSt7promiseIvE", !58, i64 0, !61, i64 16}
!58 = !{!"_ZTSSt10shared_ptrINSt13__future_base13_State_baseV2EE", !59, i64 0}
!59 = !{!"_ZTSSt12__shared_ptrINSt13__future_base13_State_baseV2ELN9__gnu_cxx12_Lock_policyE2EE", !16, i64 0, !60, i64 8}
!60 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !16, i64 0}
!61 = !{!"_ZTSSt10unique_ptrINSt13__future_base7_ResultIvEENS0_12_Result_base8_DeleterEE", !62, i64 0}
!62 = !{!"_ZTSSt15__uniq_ptr_dataINSt13__future_base7_ResultIvEENS0_12_Result_base8_DeleterELb1ELb1EE", !63, i64 0}
!63 = !{!"_ZTSSt15__uniq_ptr_implINSt13__future_base7_ResultIvEENS0_12_Result_base8_DeleterEE", !64, i64 0}
!64 = !{!"_ZTSSt5tupleIJPNSt13__future_base7_ResultIvEENS0_12_Result_base8_DeleterEEE", !65, i64 0}
!65 = !{!"_ZTSSt11_Tuple_implILm0EJPNSt13__future_base7_ResultIvEENS0_12_Result_base8_DeleterEEE", !66, i64 0}
!66 = !{!"_ZTSSt10_Head_baseILm0EPNSt13__future_base7_ResultIvEELb0EE", !16, i64 0}
!67 = distinct !{!67, !68}
!68 = !{!"llvm.loop.mustprogress"}
!69 = !{!70, !16, i64 0}
!70 = !{!"_ZTSSt4pairIPKN7DynexCN18ITransactionReaderESt7promiseISt10error_codeEE", !16, i64 0, !71, i64 8}
!71 = !{!"_ZTSSt7promiseISt10error_codeE", !58, i64 0, !72, i64 16}
!72 = !{!"_ZTSSt10unique_ptrINSt13__future_base7_ResultISt10error_codeEENS0_12_Result_base8_DeleterEE", !73, i64 0}
!73 = !{!"_ZTSSt15__uniq_ptr_dataINSt13__future_base7_ResultISt10error_codeEENS0_12_Result_base8_DeleterELb1ELb1EE", !74, i64 0}
!74 = !{!"_ZTSSt15__uniq_ptr_implINSt13__future_base7_ResultISt10error_codeEENS0_12_Result_base8_DeleterEE", !75, i64 0}
!75 = !{!"_ZTSSt5tupleIJPNSt13__future_base7_ResultISt10error_codeEENS0_12_Result_base8_DeleterEEE", !76, i64 0}
!76 = !{!"_ZTSSt11_Tuple_implILm0EJPNSt13__future_base7_ResultISt10error_codeEENS0_12_Result_base8_DeleterEEE", !77, i64 0}
!77 = !{!"_ZTSSt10_Head_baseILm0EPNSt13__future_base7_ResultISt10error_codeEELb0EE", !16, i64 0}
!78 = distinct !{!78, !68}
!79 = !{!6, !35, i64 248}


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