; LLVM IR from dynexcoin/Dynex :: src/WalletLegacy (WalletLegacy)

; 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::vector.236" = type { %"struct.std::_Vector_base.237" }
%"struct.std::_Vector_base.237" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.241" = type { ptr }
%"class.DynexCN::WalletLegacy" = type { %"class.DynexCN::IWalletLegacy", %"class.DynexCN::IBlockchainSynchronizerObserver", %"class.DynexCN::ITransfersObserver", i32, %"class.std::mutex", %"class.DynexCN::AccountBase", %"class.std::__cxx11::basic_string", ptr, ptr, ptr, i8, %"struct.std::atomic", %"struct.std::atomic", %"struct.std::atomic", %"class.DynexCN::BlockchainSynchronizer", %"class.DynexCN::TransfersSyncronizer", ptr, %"class.DynexCN::WalletUserTransactionsCache", %"class.std::unique_ptr.99", %"class.DynexCN::WalletAsyncContextCounter", %"class.Tools::ObserverManager.107", %"class.std::unique_ptr.113" }
%"class.DynexCN::IWalletLegacy" = type { ptr }
%"class.DynexCN::IBlockchainSynchronizerObserver" = type { ptr }
%"class.DynexCN::ITransfersObserver" = type { ptr }
%"class.std::mutex" = type { %"class.std::__mutex_base" }
%"class.std::__mutex_base" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.DynexCN::AccountBase" = type { %"struct.DynexCN::AccountKeys", i64 }
%"struct.DynexCN::AccountKeys" = type { %"struct.DynexCN::AccountPublicAddress", %"struct.Crypto::SecretKey", %"struct.Crypto::SecretKey" }
%"struct.DynexCN::AccountPublicAddress" = type { %"struct.Crypto::PublicKey", %"struct.Crypto::PublicKey" }
%"struct.Crypto::PublicKey" = type { [32 x i8] }
%"struct.Crypto::SecretKey" = type { [32 x i8] }
%"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] }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i64 }
%"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 }
%"struct.Crypto::Hash" = type { [32 x i8] }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.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::condition_variable" = type { %"class.std::__condvar" }
%"class.std::__condvar" = type { %union.pthread_cond_t }
%union.pthread_cond_t = type { %struct.__pthread_cond_s }
%struct.__pthread_cond_s = type { %union.__atomic_wide_counter, %union.__atomic_wide_counter, [2 x i32], [2 x i32], i32, i32, [2 x i32] }
%union.__atomic_wide_counter = type { i64 }
%"class.DynexCN::TransfersSyncronizer" = type { %"class.DynexCN::ITransfersSynchronizer", %"class.DynexCN::IBlockchainConsumerObserver", %"class.Logging::LoggerRef", %"class.std::unordered_map", %"class.std::unordered_map.25", ptr, ptr, ptr }
%"class.DynexCN::ITransfersSynchronizer" = type { %"class.DynexCN::IStreamSerializable" }
%"class.DynexCN::IBlockchainConsumerObserver" = type { ptr }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::unordered_map.25" = type { %"class.std::_Hashtable.26" }
%"class.std::_Hashtable.26" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.DynexCN::WalletUserTransactionsCache" = type { %"class.std::vector.39", %"class.std::vector.44", %"class.DynexCN::WalletUnconfirmedTransactions", %"class.std::unordered_map.85" }
%"class.std::vector.39" = type { %"struct.std::_Vector_base.40" }
%"struct.std::_Vector_base.40" = type { %"struct.std::_Vector_base<DynexCN::WalletLegacyTransaction, std::allocator<DynexCN::WalletLegacyTransaction>>::_Vector_impl" }
%"struct.std::_Vector_base<DynexCN::WalletLegacyTransaction, std::allocator<DynexCN::WalletLegacyTransaction>>::_Vector_impl" = type { %"struct.std::_Vector_base<DynexCN::WalletLegacyTransaction, std::allocator<DynexCN::WalletLegacyTransaction>>::_Vector_impl_data" }
%"struct.std::_Vector_base<DynexCN::WalletLegacyTransaction, std::allocator<DynexCN::WalletLegacyTransaction>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.44" = type { %"struct.std::_Vector_base.45" }
%"struct.std::_Vector_base.45" = type { %"struct.std::_Vector_base<DynexCN::WalletLegacyTransfer, std::allocator<DynexCN::WalletLegacyTransfer>>::_Vector_impl" }
%"struct.std::_Vector_base<DynexCN::WalletLegacyTransfer, std::allocator<DynexCN::WalletLegacyTransfer>>::_Vector_impl" = type { %"struct.std::_Vector_base<DynexCN::WalletLegacyTransfer, std::allocator<DynexCN::WalletLegacyTransfer>>::_Vector_impl_data" }
%"struct.std::_Vector_base<DynexCN::WalletLegacyTransfer, std::allocator<DynexCN::WalletLegacyTransfer>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.DynexCN::WalletUnconfirmedTransactions" = type { %"class.std::unordered_map.49", %"class.std::unordered_set", i64 }
%"class.std::unordered_map.49" = type { %"class.std::_Hashtable.50" }
%"class.std::_Hashtable.50" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::unordered_set" = type { %"class.std::_Hashtable.67" }
%"class.std::_Hashtable.67" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::unordered_map.85" = type { %"class.std::_Hashtable.86" }
%"class.std::_Hashtable.86" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::unique_ptr.99" = type { %"struct.std::__uniq_ptr_data.100" }
%"struct.std::__uniq_ptr_data.100" = type { %"class.std::__uniq_ptr_impl.101" }
%"class.std::__uniq_ptr_impl.101" = type { %"class.std::tuple.102" }
%"class.std::tuple.102" = type { %"struct.std::_Tuple_impl.103" }
%"struct.std::_Tuple_impl.103" = type { %"struct.std::_Head_base.106" }
%"struct.std::_Head_base.106" = type { ptr }
%"class.DynexCN::WalletAsyncContextCounter" = type { i32, %"class.std::condition_variable", %"class.std::mutex" }
%"class.Tools::ObserverManager.107" = type { %"class.std::vector.108", %"class.std::mutex" }
%"class.std::vector.108" = type { %"struct.std::_Vector_base.109" }
%"struct.std::_Vector_base.109" = type { %"struct.std::_Vector_base<DynexCN::IWalletLegacyObserver *, std::allocator<DynexCN::IWalletLegacyObserver *>>::_Vector_impl" }
%"struct.std::_Vector_base<DynexCN::IWalletLegacyObserver *, std::allocator<DynexCN::IWalletLegacyObserver *>>::_Vector_impl" = type { %"struct.std::_Vector_base<DynexCN::IWalletLegacyObserver *, std::allocator<DynexCN::IWalletLegacyObserver *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<DynexCN::IWalletLegacyObserver *, std::allocator<DynexCN::IWalletLegacyObserver *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unique_ptr.113" = type { %"struct.std::__uniq_ptr_data.114" }
%"struct.std::__uniq_ptr_data.114" = type { %"class.std::__uniq_ptr_impl.115" }
%"class.std::__uniq_ptr_impl.115" = type { %"class.std::tuple.116" }
%"class.std::tuple.116" = type { %"struct.std::_Tuple_impl.117" }
%"struct.std::_Tuple_impl.117" = type { %"struct.std::_Head_base.120" }
%"struct.std::_Head_base.120" = type { ptr }

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7DynexCN12WalletLegacy30synchronizationProgressUpdatedEjj(ptr noundef nonnull align 8 dereferenceable(1336) %0, i32 noundef %1, i32 noundef %2) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::vector.236", align 8
  %8 = alloca { i64, i64 }, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.241", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator.241", align 8
  %14 = alloca i64, align 8
  %15 = alloca { i64, i64 }, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  %16 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #4
  call void @_ZN7DynexCN12WalletLegacy37deleteOutdatedUnconfirmedTransactionsEv(ptr dead_on_unwind writable sret(%"class.std::vector.236") align 8 %7, ptr noundef nonnull align 8 dereferenceable(1336) %16)
  %17 = getelementptr inbounds %"class.DynexCN::WalletLegacy", ptr %16, i32 0, i32 20
  %18 = load i32, ptr %5, align 4, !tbaa !9
  %19 = load i32, ptr %6, align 4, !tbaa !9
  store { i64, i64 } { i64 33, i64 0 }, ptr %8, align 8, !tbaa !11
  %20 = getelementptr inbounds { i64, i64 }, ptr %8, i32 0, i32 0
  %21 = load i64, ptr %20, align 8
  %22 = getelementptr inbounds { i64, i64 }, ptr %8, i32 0, i32 1
  %23 = load i64, ptr %22, align 8
  invoke void @_ZN5Tools15ObserverManagerIN7DynexCN21IWalletLegacyObserverEE6notifyIMS2_FvjjEJjjEEEvT_DpT0_(ptr noundef nonnull align 8 dereferenceable(64) %17, i64 %21, i64 %23, i32 noundef %18, i32 noundef %19)
          to label %24 unwind label %34

24:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  store ptr %7, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %25 = load ptr, ptr %11, align 8, !tbaa !5
  %26 = call ptr @_ZNSt6vectorImSaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #4
  %27 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.241", ptr %12, i32 0, i32 0
  store ptr %26, ptr %27, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %28 = load ptr, ptr %11, align 8, !tbaa !5
  %29 = call ptr @_ZNSt6vectorImSaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #4
  %30 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.241", ptr %13, i32 0, i32 0
  store ptr %29, ptr %30, align 8
  br label %31

31:                                               ; preds = %48, %24
  %32 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPmSt6vectorImSaImEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #4
  br i1 %32, label %38, label %33

33:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %54

34:                                               ; preds = %54, %3
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %9, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %10, align 4
  br label %56

38:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  %40 = load i64, ptr %39, align 8, !tbaa !12
  store i64 %40, ptr %14, align 8, !tbaa !12
  %41 = getelementptr inbounds %"class.DynexCN::WalletLegacy", ptr %16, i32 0, i32 20
  %42 = load i64, ptr %14, align 8, !tbaa !12
  store { i64, i64 } { i64 89, i64 0 }, ptr %15, align 8, !tbaa !11
  %43 = getelementptr inbounds { i64, i64 }, ptr %15, i32 0, i32 0
  %44 = load i64, ptr %43, align 8
  %45 = getelementptr inbounds { i64, i64 }, ptr %15, i32 0, i32 1
  %46 = load i64, ptr %45, align 8
  invoke void @_ZN5Tools15ObserverManagerIN7DynexCN21IWalletLegacyObserverEE6notifyIMS2_FvmEJmEEEvT_DpT0_(ptr noundef nonnull align 8 dereferenceable(64) %41, i64 %44, i64 %46, i64 noundef %42)
          to label %47 unwind label %50

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

48:                                               ; preds = %47
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  br label %31

50:                                               ; preds = %38
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %9, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %56

54:                                               ; preds = %33
  invoke void @_ZN7DynexCN12WalletLegacy22notifyIfBalanceChangedEv(ptr noundef nonnull align 8 dereferenceable(1336) %16)
          to label %55 unwind label %34

55:                                               ; preds = %54
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #4
  ret void

56:                                               ; preds = %50, %34
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #4
  br label %57

57:                                               ; preds = %56
  %58 = load ptr, ptr %9, align 8
  %59 = load i32, ptr %10, align 4
  %60 = insertvalue { ptr, i32 } poison, ptr %58, 0
  %61 = insertvalue { ptr, i32 } %60, i32 %59, 1
  resume { ptr, i32 } %61
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN12WalletLegacy37deleteOutdatedUnconfirmedTransactionsEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector.236") align 8, ptr noundef nonnull align 8 dereferenceable(1336)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Tools15ObserverManagerIN7DynexCN21IWalletLegacyObserverEE6notifyIMS2_FvjjEJjjEEEvT_DpT0_(ptr noundef nonnull align 8 dereferenceable(64), i64, i64, i32 noundef, i32 noundef) #1 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Tools15ObserverManagerIN7DynexCN21IWalletLegacyObserverEE6notifyIMS2_FvmEJmEEEvT_DpT0_(ptr noundef nonnull align 8 dereferenceable(64), i64, i64, i64 noundef) #1 align 2

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

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

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

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !7, 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::vector.236" = type { %"struct.std::_Vector_base.237" }
%"struct.std::_Vector_base.237" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.241" = type { ptr }

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7DynexCN12WalletLegacy30synchronizationProgressUpdatedEjj(ptr noundef nonnull align 8 dereferenceable(1336) %0, i32 noundef %1, i32 noundef %2) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::vector.236", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.241", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.241", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #4
  call void @_ZN7DynexCN12WalletLegacy37deleteOutdatedUnconfirmedTransactionsEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.236") align 8 %4, ptr noundef nonnull align 8 dereferenceable(1336) %0)
  %7 = getelementptr inbounds i8, ptr %0, i64 1264
  invoke void @_ZN5Tools15ObserverManagerIN7DynexCN21IWalletLegacyObserverEE6notifyIMS2_FvjjEJjjEEEvT_DpT0_(ptr noundef nonnull align 8 dereferenceable(64) %7, i64 33, i64 0, i32 noundef %1, i32 noundef %2)
          to label %8 unwind label %12

8:                                                ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %9 = call ptr @_ZNSt6vectorImSaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  store ptr %9, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %10 = call ptr @_ZNSt6vectorImSaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  store ptr %10, ptr %6, align 8
  %11 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPmSt6vectorImSaImEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  br i1 %11, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %16, %8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  invoke void @_ZN7DynexCN12WalletLegacy22notifyIfBalanceChangedEv(ptr noundef nonnull align 8 dereferenceable(1336) %0)
          to label %21 unwind label %12

12:                                               ; preds = %._crit_edge, %3
  %13 = landingpad { ptr, i32 }
          cleanup
  br label %22

.lr.ph:                                           ; preds = %8, %16
  %14 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  %15 = load i64, ptr %14, align 8, !tbaa !5
  invoke void @_ZN5Tools15ObserverManagerIN7DynexCN21IWalletLegacyObserverEE6notifyIMS2_FvmEJmEEEvT_DpT0_(ptr noundef nonnull align 8 dereferenceable(64) %7, i64 89, i64 0, i64 noundef %15)
          to label %16 unwind label %19

16:                                               ; preds = %.lr.ph
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  %18 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPmSt6vectorImSaImEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  br i1 %18, label %.lr.ph, label %._crit_edge

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

21:                                               ; preds = %._crit_edge
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  ret void

22:                                               ; preds = %19, %12
  %.pn = phi { ptr, i32 } [ %20, %19 ], [ %13, %12 ]
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN12WalletLegacy37deleteOutdatedUnconfirmedTransactionsEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector.236") align 8, ptr noundef nonnull align 8 dereferenceable(1336)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Tools15ObserverManagerIN7DynexCN21IWalletLegacyObserverEE6notifyIMS2_FvjjEJjjEEEvT_DpT0_(ptr noundef nonnull align 8 dereferenceable(64), i64, i64, i32 noundef, i32 noundef) local_unnamed_addr #1 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Tools15ObserverManagerIN7DynexCN21IWalletLegacyObserverEE6notifyIMS2_FvmEJmEEEvT_DpT0_(ptr noundef nonnull align 8 dereferenceable(64), i64, i64, i64 noundef) local_unnamed_addr #1 align 2

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

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

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

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


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