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

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

%"struct.Crypto::SecretKey" = type { [32 x i8] }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"struct.DynexCN::WalletLegacyTransaction" = type <{ i64, i64, i64, i64, i64, i64, %"struct.Crypto::Hash", %"class.boost::optional", i8, [2 x i8], i32, i64, %"class.std::__cxx11::basic_string", i8, [7 x i8] }>
%"struct.Crypto::Hash" = type { [32 x i8] }
%"class.boost::optional" = type { %"class.boost::optional_detail::optional_base" }
%"class.boost::optional_detail::optional_base" = type { i8, %"class.boost::optional_detail::aligned_storage" }
%"class.boost::optional_detail::aligned_storage" = type { %"union.boost::optional_detail::aligned_storage<Crypto::SecretKey>::dummy_u" }
%"union.boost::optional_detail::aligned_storage<Crypto::SecretKey>::dummy_u" = 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] }
%"class.__gnu_cxx::__normal_iterator.61" = type { ptr }
%"class.std::shared_ptr.78" = type { %"class.std::__shared_ptr.79" }
%"class.std::__shared_ptr.79" = type { ptr, %"class.std::__shared_count" }
%"class.std::shared_ptr.81" = type { %"class.std::__shared_ptr.82" }
%"class.std::__shared_ptr.82" = type { ptr, %"class.std::__shared_count" }
%"class.DynexCN::WalletUserTransactionsCache" = type { %"class.std::vector", %"class.std::vector.4", %"class.DynexCN::WalletUnconfirmedTransactions", %"class.std::unordered_map.31" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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.4" = type { %"struct.std::_Vector_base.5" }
%"struct.std::_Vector_base.5" = 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", %"class.std::unordered_set", i64 }
%"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_set" = type { %"class.std::_Hashtable.14" }
%"class.std::_Hashtable.14" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::unordered_map.31" = type { %"class.std::_Hashtable.32" }
%"class.std::_Hashtable.32" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.DynexCN::TransactionInformation" = type { %"struct.Crypto::Hash", %"struct.Crypto::PublicKey", i32, i64, i64, i64, i64, %"class.std::vector.55", %"struct.Crypto::Hash" }
%"struct.Crypto::PublicKey" = type { [32 x i8] }
%"class.std::vector.55" = type { %"struct.std::_Vector_base.56" }
%"struct.std::_Vector_base.56" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZN7DynexCNL15NULL_SECRET_KEYE = external hidden global %"struct.Crypto::SecretKey", align 1

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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 1 dereferenceable(33) ptr @_ZN5boost8optionalIN6Crypto9SecretKeyEEaSIRKS2_EENS_9enable_ifINS_7is_sameIS2_NS_5decayIT_E4typeEEERS3_E4typeEOSA_(ptr noundef nonnull align 1 dereferenceable(33), ptr noundef nonnull align 1 dereferenceable(32)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN7DynexCN27WalletUserTransactionsCache17insertTransactionEONS_23WalletLegacyTransactionE(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef nonnull align 8 dereferenceable(161)) #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignIN9__gnu_cxx17__normal_iteratorIPKhSt6vectorIhSaIhEEEEvEERS4_T_SF_(ptr noundef nonnull align 8 dereferenceable(32), ptr, ptr) #3 align 2

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

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

declare void @_ZN7DynexCN29WalletUnconfirmedTransactions5eraseERKN6Crypto4HashE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 1 dereferenceable(32)) #6

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7DynexCN27WalletUserTransactionsCache20onTransactionUpdatedERKNS_22TransactionInformationEl(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr") align 8 %0, ptr noundef nonnull align 8 dereferenceable(224) %1, ptr noundef nonnull align 8 dereferenceable(160) %2, i64 noundef %3) #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i1, align 1
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i8, align 1
  %14 = alloca %"struct.DynexCN::WalletLegacyTransaction", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator.61", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator.61", align 8
  %17 = alloca %"class.std::shared_ptr.78", align 8
  %18 = alloca ptr, align 8
  %19 = alloca %"class.std::shared_ptr.81", align 8
  store ptr %0, ptr %5, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store i64 %3, ptr %8, align 8, !tbaa !9
  %20 = load ptr, ptr %6, align 8
  store i1 false, ptr %9, align 1
  call void @_ZNSt10shared_ptrIN7DynexCN17WalletLegacyEventEEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store i64 -1, ptr %10, align 8, !tbaa !9
  %21 = getelementptr inbounds %"class.DynexCN::WalletUserTransactionsCache", ptr %20, i32 0, i32 2
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  %23 = getelementptr inbounds %"struct.DynexCN::TransactionInformation", ptr %22, i32 0, i32 0
  %24 = invoke noundef zeroext i1 @_ZN7DynexCN29WalletUnconfirmedTransactions17findTransactionIdERKN6Crypto4HashERm(ptr noundef nonnull align 8 dereferenceable(120) %21, ptr noundef nonnull align 1 dereferenceable(32) %23, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %25 unwind label %31

25:                                               ; preds = %4
  br i1 %24, label %35, label %26

26:                                               ; preds = %25
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = getelementptr inbounds %"struct.DynexCN::TransactionInformation", ptr %27, i32 0, i32 0
  %29 = invoke noundef i64 @_ZN7DynexCN27WalletUserTransactionsCache21findTransactionByHashERKN6Crypto4HashE(ptr noundef nonnull align 8 dereferenceable(224) %20, ptr noundef nonnull align 1 dereferenceable(32) %28)
          to label %30 unwind label %31

30:                                               ; preds = %26
  store i64 %29, ptr %10, align 8, !tbaa !9
  br label %40

31:                                               ; preds = %35, %26, %4
  %32 = landingpad { ptr, i32 }
          cleanup
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %11, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %12, align 4
  br label %155

35:                                               ; preds = %25
  %36 = getelementptr inbounds %"class.DynexCN::WalletUserTransactionsCache", ptr %20, i32 0, i32 2
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.DynexCN::TransactionInformation", ptr %37, i32 0, i32 0
  invoke void @_ZN7DynexCN29WalletUnconfirmedTransactions5eraseERKN6Crypto4HashE(ptr noundef nonnull align 8 dereferenceable(120) %36, ptr noundef nonnull align 1 dereferenceable(32) %38)
          to label %39 unwind label %31

39:                                               ; preds = %35
  br label %40

40:                                               ; preds = %39, %30
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #7
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.DynexCN::TransactionInformation", ptr %41, i32 0, i32 5
  %43 = load i64, ptr %42, align 8, !tbaa !11
  %44 = icmp eq i64 %43, 0
  %45 = zext i1 %44 to i8
  store i8 %45, ptr %13, align 1, !tbaa !20
  %46 = load i64, ptr %10, align 8, !tbaa !9
  %47 = icmp eq i64 %46, -1
  br i1 %47, label %48, label %125

48:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 168, ptr %14) #7
  invoke void @_ZN7DynexCN23WalletLegacyTransactionC2Ev(ptr noundef nonnull align 8 dereferenceable(161) %14)
          to label %49 unwind label %111

49:                                               ; preds = %48
  %50 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %14, i32 0, i32 0
  store i64 -1, ptr %50, align 8, !tbaa !22
  %51 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %14, i32 0, i32 1
  store i64 0, ptr %51, align 8, !tbaa !30
  %52 = load i64, ptr %8, align 8, !tbaa !9
  %53 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %14, i32 0, i32 2
  store i64 %52, ptr %53, align 8, !tbaa !31
  %54 = load i8, ptr %13, align 1, !tbaa !20, !range !32, !noundef !33
  %55 = trunc i8 %54 to i1
  br i1 %55, label %56, label %57

56:                                               ; preds = %49
  br label %65

57:                                               ; preds = %49
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.DynexCN::TransactionInformation", ptr %58, i32 0, i32 5
  %60 = load i64, ptr %59, align 8, !tbaa !11
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.DynexCN::TransactionInformation", ptr %61, i32 0, i32 6
  %63 = load i64, ptr %62, align 8, !tbaa !34
  %64 = sub i64 %60, %63
  br label %65

65:                                               ; preds = %57, %56
  %66 = phi i64 [ 0, %56 ], [ %64, %57 ]
  %67 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %14, i32 0, i32 3
  store i64 %66, ptr %67, align 8, !tbaa !35
  %68 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %14, i32 0, i32 4
  store i64 0, ptr %68, align 8, !tbaa !36
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.DynexCN::TransactionInformation", ptr %69, i32 0, i32 0
  %71 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %14, i32 0, i32 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %71, ptr align 8 %70, i64 32, i1 false), !tbaa.struct !37
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = getelementptr inbounds %"struct.DynexCN::TransactionInformation", ptr %72, i32 0, i32 2
  %74 = load i32, ptr %73, align 8, !tbaa !39
  %75 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %14, i32 0, i32 10
  store i32 %74, ptr %75, align 4, !tbaa !40
  %76 = load i8, ptr %13, align 1, !tbaa !20, !range !32, !noundef !33
  %77 = trunc i8 %76 to i1
  %78 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %14, i32 0, i32 8
  %79 = zext i1 %77 to i8
  store i8 %79, ptr %78, align 1, !tbaa !41
  %80 = load ptr, ptr %7, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.DynexCN::TransactionInformation", ptr %80, i32 0, i32 3
  %82 = load i64, ptr %81, align 8, !tbaa !42
  %83 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %14, i32 0, i32 11
  store i64 %82, ptr %83, align 8, !tbaa !43
  %84 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %14, i32 0, i32 12
  %85 = load ptr, ptr %7, align 8, !tbaa !5
  %86 = getelementptr inbounds %"struct.DynexCN::TransactionInformation", ptr %85, i32 0, i32 7
  %87 = call ptr @_ZNKSt6vectorIhSaIhEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %86) #7
  %88 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.61", ptr %15, i32 0, i32 0
  store ptr %87, ptr %88, align 8
  %89 = load ptr, ptr %7, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.DynexCN::TransactionInformation", ptr %89, i32 0, i32 7
  %91 = call ptr @_ZNKSt6vectorIhSaIhEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %90) #7
  %92 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.61", ptr %16, i32 0, i32 0
  store ptr %91, ptr %92, align 8
  %93 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.61", ptr %15, i32 0, i32 0
  %94 = load ptr, ptr %93, align 8
  %95 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.61", ptr %16, i32 0, i32 0
  %96 = load ptr, ptr %95, align 8
  %97 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignIN9__gnu_cxx17__normal_iteratorIPKhSt6vectorIhSaIhEEEEvEERS4_T_SF_(ptr noundef nonnull align 8 dereferenceable(32) %84, ptr %94, ptr %96)
          to label %98 unwind label %115

98:                                               ; preds = %65
  %99 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %14, i32 0, i32 13
  store i8 0, ptr %99, align 8, !tbaa !44
  %100 = load ptr, ptr %7, align 8, !tbaa !5
  %101 = getelementptr inbounds %"struct.DynexCN::TransactionInformation", ptr %100, i32 0, i32 4
  %102 = load i64, ptr %101, align 8, !tbaa !45
  %103 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %14, i32 0, i32 5
  store i64 %102, ptr %103, align 8, !tbaa !46
  %104 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %14, i32 0, i32 7
  %105 = invoke noundef nonnull align 1 dereferenceable(33) ptr @_ZN5boost8optionalIN6Crypto9SecretKeyEEaSIRKS2_EENS_9enable_ifINS_7is_sameIS2_NS_5decayIT_E4typeEEERS3_E4typeEOSA_(ptr noundef nonnull align 1 dereferenceable(33) %104, ptr noundef nonnull align 1 dereferenceable(32) @_ZN7DynexCNL15NULL_SECRET_KEYE)
          to label %106 unwind label %115

106:                                              ; preds = %98
  %107 = invoke noundef i64 @_ZN7DynexCN27WalletUserTransactionsCache17insertTransactionEONS_23WalletLegacyTransactionE(ptr noundef nonnull align 8 dereferenceable(224) %20, ptr noundef nonnull align 8 dereferenceable(161) %14)
          to label %108 unwind label %115

108:                                              ; preds = %106
  store i64 %107, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #7
  invoke void @_ZSt11make_sharedIN7DynexCN37WalletExternalTransactionCreatedEventEJRmEESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueES5_E4typeEEDpOT0_(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.78") align 8 %17, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %109 unwind label %119

109:                                              ; preds = %108
  %110 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN7DynexCN17WalletLegacyEventEEaSINS0_37WalletExternalTransactionCreatedEventEEENSt9enable_ifIXsr13is_assignableIRSt12__shared_ptrIS1_LN9__gnu_cxx12_Lock_policyE2EES_IT_EEE5valueERS2_E4typeEOSC_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(16) %17) #7
  call void @_ZNSt12__shared_ptrIN7DynexCN37WalletExternalTransactionCreatedEventELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  call void @_ZN7DynexCN23WalletLegacyTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(161) %14) #7
  call void @llvm.lifetime.end.p0(i64 168, ptr %14) #7
  br label %152

111:                                              ; preds = %48
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %11, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %12, align 4
  br label %124

115:                                              ; preds = %106, %98, %65
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %11, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %12, align 4
  br label %123

119:                                              ; preds = %108
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %11, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  br label %123

123:                                              ; preds = %119, %115
  call void @_ZN7DynexCN23WalletLegacyTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(161) %14) #7
  br label %124

124:                                              ; preds = %123, %111
  call void @llvm.lifetime.end.p0(i64 168, ptr %14) #7
  br label %154

125:                                              ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %126 = load i64, ptr %10, align 8, !tbaa !9
  %127 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZN7DynexCN27WalletUserTransactionsCache14getTransactionEm(ptr noundef nonnull align 8 dereferenceable(224) %20, i64 noundef %126)
          to label %128 unwind label %143

128:                                              ; preds = %125
  store ptr %127, ptr %18, align 8, !tbaa !5
  %129 = load ptr, ptr %7, align 8, !tbaa !5
  %130 = getelementptr inbounds %"struct.DynexCN::TransactionInformation", ptr %129, i32 0, i32 2
  %131 = load i32, ptr %130, align 8, !tbaa !39
  %132 = load ptr, ptr %18, align 8, !tbaa !5
  %133 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %132, i32 0, i32 10
  store i32 %131, ptr %133, align 4, !tbaa !40
  %134 = load ptr, ptr %7, align 8, !tbaa !5
  %135 = getelementptr inbounds %"struct.DynexCN::TransactionInformation", ptr %134, i32 0, i32 3
  %136 = load i64, ptr %135, align 8, !tbaa !42
  %137 = load ptr, ptr %18, align 8, !tbaa !5
  %138 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %137, i32 0, i32 11
  store i64 %136, ptr %138, align 8, !tbaa !43
  %139 = load ptr, ptr %18, align 8, !tbaa !5
  %140 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %139, i32 0, i32 13
  store i8 0, ptr %140, align 8, !tbaa !44
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #7
  invoke void @_ZSt11make_sharedIN7DynexCN29WalletTransactionUpdatedEventEJRmEESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueES5_E4typeEEDpOT0_(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.81") align 8 %19, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %141 unwind label %147

141:                                              ; preds = %128
  %142 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN7DynexCN17WalletLegacyEventEEaSINS0_29WalletTransactionUpdatedEventEEENSt9enable_ifIXsr13is_assignableIRSt12__shared_ptrIS1_LN9__gnu_cxx12_Lock_policyE2EES_IT_EEE5valueERS2_E4typeEOSC_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(16) %19) #7
  call void @_ZNSt12__shared_ptrIN7DynexCN29WalletTransactionUpdatedEventELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %152

143:                                              ; preds = %125
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %11, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %12, align 4
  br label %151

147:                                              ; preds = %128
  %148 = landingpad { ptr, i32 }
          cleanup
  %149 = extractvalue { ptr, i32 } %148, 0
  store ptr %149, ptr %11, align 8
  %150 = extractvalue { ptr, i32 } %148, 1
  store i32 %150, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #7
  br label %151

151:                                              ; preds = %147, %143
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %154

152:                                              ; preds = %141, %109
  store i1 true, ptr %9, align 1
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  %153 = load i1, ptr %9, align 1
  br i1 %153, label %157, label %156

154:                                              ; preds = %151, %124
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #7
  br label %155

155:                                              ; preds = %154, %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @_ZNSt12__shared_ptrIN7DynexCN17WalletLegacyEventELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #7
  br label %158

156:                                              ; preds = %152
  call void @_ZNSt12__shared_ptrIN7DynexCN17WalletLegacyEventELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #7
  br label %157

157:                                              ; preds = %156, %152
  ret void

158:                                              ; preds = %155
  %159 = load ptr, ptr %11, align 8
  %160 = load i32, ptr %12, align 4
  %161 = insertvalue { ptr, i32 } poison, ptr %159, 0
  %162 = insertvalue { ptr, i32 } %161, i32 %160, 1
  resume { ptr, i32 } %162
}

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

declare noundef zeroext i1 @_ZN7DynexCN29WalletUnconfirmedTransactions17findTransactionIdERKN6Crypto4HashERm(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 1 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) #6

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN7DynexCN27WalletUserTransactionsCache21findTransactionByHashERKN6Crypto4HashE(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef nonnull align 1 dereferenceable(32)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11make_sharedIN7DynexCN37WalletExternalTransactionCreatedEventEJRmEESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueES5_E4typeEEDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.78") align 8, ptr noundef nonnull align 8 dereferenceable(8)) #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZN7DynexCN27WalletUserTransactionsCache14getTransactionEm(ptr noundef nonnull align 8 dereferenceable(224), i64 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11make_sharedIN7DynexCN29WalletTransactionUpdatedEventEJRmEESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueES5_E4typeEEDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.81") align 8, ptr noundef nonnull align 8 dereferenceable(8)) #2

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { 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 #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { "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 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 88}
!12 = !{!"_ZTSN7DynexCN22TransactionInformationE", !13, i64 0, !14, i64 32, !15, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !16, i64 104, !13, i64 128}
!13 = !{!"_ZTSN6Crypto4HashE", !7, i64 0}
!14 = !{!"_ZTSN6Crypto9PublicKeyE", !7, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTSSt6vectorIhSaIhEE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!21, !21, i64 0}
!21 = !{!"bool", !7, i64 0}
!22 = !{!23, !10, i64 0}
!23 = !{!"_ZTSN7DynexCN23WalletLegacyTransactionE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !13, i64 48, !24, i64 80, !21, i64 113, !15, i64 116, !10, i64 120, !27, i64 128, !29, i64 160}
!24 = !{!"_ZTSN5boost8optionalIN6Crypto9SecretKeyEEE", !25, i64 0}
!25 = !{!"_ZTSN5boost15optional_detail13optional_baseIN6Crypto9SecretKeyEEE", !21, i64 0, !26, i64 1}
!26 = !{!"_ZTSN5boost15optional_detail15aligned_storageIN6Crypto9SecretKeyEEE", !7, i64 0}
!27 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !28, i64 0, !10, i64 8, !7, i64 16}
!28 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!29 = !{!"_ZTSN7DynexCN28WalletLegacyTransactionStateE", !7, i64 0}
!30 = !{!23, !10, i64 8}
!31 = !{!23, !10, i64 16}
!32 = !{i8 0, i8 2}
!33 = !{}
!34 = !{!12, !10, i64 96}
!35 = !{!23, !10, i64 24}
!36 = !{!23, !10, i64 32}
!37 = !{i64 0, i64 32, !38}
!38 = !{!7, !7, i64 0}
!39 = !{!12, !15, i64 64}
!40 = !{!23, !15, i64 116}
!41 = !{!23, !21, i64 113}
!42 = !{!12, !10, i64 72}
!43 = !{!23, !10, i64 120}
!44 = !{!23, !29, i64 160}
!45 = !{!12, !10, i64 80}
!46 = !{!23, !10, i64 40}


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

%"struct.Crypto::SecretKey" = type { [32 x i8] }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"struct.DynexCN::WalletLegacyTransaction" = type <{ i64, i64, i64, i64, i64, i64, %"struct.Crypto::Hash", %"class.boost::optional", i8, [2 x i8], i32, i64, %"class.std::__cxx11::basic_string", i8, [7 x i8] }>
%"struct.Crypto::Hash" = type { [32 x i8] }
%"class.boost::optional" = type { %"class.boost::optional_detail::optional_base" }
%"class.boost::optional_detail::optional_base" = type { i8, %"class.boost::optional_detail::aligned_storage" }
%"class.boost::optional_detail::aligned_storage" = type { %"union.boost::optional_detail::aligned_storage<Crypto::SecretKey>::dummy_u" }
%"union.boost::optional_detail::aligned_storage<Crypto::SecretKey>::dummy_u" = 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] }
%"class.std::shared_ptr.78" = type { %"class.std::__shared_ptr.79" }
%"class.std::__shared_ptr.79" = type { ptr, %"class.std::__shared_count" }
%"class.std::shared_ptr.81" = type { %"class.std::__shared_ptr.82" }
%"class.std::__shared_ptr.82" = type { ptr, %"class.std::__shared_count" }

@_ZN7DynexCNL15NULL_SECRET_KEYE = external hidden global %"struct.Crypto::SecretKey", align 1

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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 1 dereferenceable(33) ptr @_ZN5boost8optionalIN6Crypto9SecretKeyEEaSIRKS2_EENS_9enable_ifINS_7is_sameIS2_NS_5decayIT_E4typeEEERS3_E4typeEOSA_(ptr noundef nonnull align 1 dereferenceable(33), ptr noundef nonnull align 1 dereferenceable(32)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN7DynexCN27WalletUserTransactionsCache17insertTransactionEONS_23WalletLegacyTransactionE(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef nonnull align 8 dereferenceable(161)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignIN9__gnu_cxx17__normal_iteratorIPKhSt6vectorIhSaIhEEEEvEERS4_T_SF_(ptr noundef nonnull align 8 dereferenceable(32), ptr, ptr) local_unnamed_addr #3 align 2

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

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

declare void @_ZN7DynexCN29WalletUnconfirmedTransactions5eraseERKN6Crypto4HashE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 1 dereferenceable(32)) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7DynexCN27WalletUserTransactionsCache20onTransactionUpdatedERKNS_22TransactionInformationEl(ptr dead_on_unwind noalias nonnull writable sret(%"class.std::shared_ptr") align 8 %0, ptr noundef nonnull align 8 dereferenceable(224) %1, ptr noundef nonnull align 8 dereferenceable(160) %2, i64 noundef %3) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca i64, align 8
  %6 = alloca %"struct.DynexCN::WalletLegacyTransaction", align 8
  %7 = alloca %"class.std::shared_ptr.78", align 8
  %8 = alloca %"class.std::shared_ptr.81", align 8
  tail call void @_ZNSt10shared_ptrIN7DynexCN17WalletLegacyEventEEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  store i64 -1, ptr %5, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %1, i64 48
  %10 = invoke noundef zeroext i1 @_ZN7DynexCN29WalletUnconfirmedTransactions17findTransactionIdERKN6Crypto4HashERm(ptr noundef nonnull align 8 dereferenceable(120) %9, ptr noundef nonnull align 1 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %11 unwind label %15

11:                                               ; preds = %4
  br i1 %10, label %17, label %12

12:                                               ; preds = %11
  %13 = invoke noundef i64 @_ZN7DynexCN27WalletUserTransactionsCache21findTransactionByHashERKN6Crypto4HashE(ptr noundef nonnull align 8 dereferenceable(224) %1, ptr noundef nonnull align 1 dereferenceable(32) %2)
          to label %14 unwind label %15

14:                                               ; preds = %12
  store i64 %13, ptr %5, align 8, !tbaa !5
  br label %18

15:                                               ; preds = %17, %12, %4
  %16 = landingpad { ptr, i32 }
          cleanup
  br label %86

17:                                               ; preds = %11
  invoke void @_ZN7DynexCN29WalletUnconfirmedTransactions5eraseERKN6Crypto4HashE(ptr noundef nonnull align 8 dereferenceable(120) %9, ptr noundef nonnull align 1 dereferenceable(32) %2)
          to label %thread-pre-split unwind label %15

thread-pre-split:                                 ; preds = %17
  %.pr = load i64, ptr %5, align 8, !tbaa !5
  br label %18

18:                                               ; preds = %thread-pre-split, %14
  %19 = phi i64 [ %.pr, %thread-pre-split ], [ %13, %14 ]
  %20 = getelementptr inbounds i8, ptr %2, i64 88
  %21 = load i64, ptr %20, align 8, !tbaa !9
  %22 = icmp eq i64 %21, 0
  %23 = zext i1 %22 to i8
  %24 = icmp eq i64 %19, -1
  br i1 %24, label %25, label %69

25:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 168, ptr nonnull %6) #7
  invoke void @_ZN7DynexCN23WalletLegacyTransactionC2Ev(ptr noundef nonnull align 8 dereferenceable(161) %6)
          to label %26 unwind label %61

26:                                               ; preds = %25
  store i64 -1, ptr %6, align 8, !tbaa !19
  %27 = getelementptr inbounds i8, ptr %6, i64 8
  store i64 0, ptr %27, align 8, !tbaa !28
  %28 = getelementptr inbounds i8, ptr %6, i64 16
  store i64 %3, ptr %28, align 8, !tbaa !29
  %29 = load i64, ptr %20, align 8
  %30 = getelementptr inbounds i8, ptr %2, i64 96
  %31 = load i64, ptr %30, align 8
  %32 = sub i64 %29, %31
  %33 = select i1 %22, i64 0, i64 %32
  %34 = getelementptr inbounds i8, ptr %6, i64 24
  store i64 %33, ptr %34, align 8, !tbaa !30
  %35 = getelementptr inbounds i8, ptr %6, i64 32
  store i64 0, ptr %35, align 8, !tbaa !31
  %36 = getelementptr inbounds i8, ptr %6, i64 48
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %36, ptr noundef nonnull align 8 dereferenceable(32) %2, i64 32, i1 false), !tbaa.struct !32
  %37 = getelementptr inbounds i8, ptr %2, i64 64
  %38 = load i32, ptr %37, align 8, !tbaa !34
  %39 = getelementptr inbounds i8, ptr %6, i64 116
  store i32 %38, ptr %39, align 4, !tbaa !35
  %40 = getelementptr inbounds i8, ptr %6, i64 113
  store i8 %23, ptr %40, align 1, !tbaa !36
  %41 = getelementptr inbounds i8, ptr %2, i64 72
  %42 = load i64, ptr %41, align 8, !tbaa !37
  %43 = getelementptr inbounds i8, ptr %6, i64 120
  store i64 %42, ptr %43, align 8, !tbaa !38
  %44 = getelementptr inbounds i8, ptr %6, i64 128
  %45 = getelementptr inbounds i8, ptr %2, i64 104
  %46 = call ptr @_ZNKSt6vectorIhSaIhEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %45) #7
  %47 = call ptr @_ZNKSt6vectorIhSaIhEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %45) #7
  %48 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignIN9__gnu_cxx17__normal_iteratorIPKhSt6vectorIhSaIhEEEEvEERS4_T_SF_(ptr noundef nonnull align 8 dereferenceable(32) %44, ptr %46, ptr %47)
          to label %49 unwind label %63

49:                                               ; preds = %26
  %50 = getelementptr inbounds i8, ptr %6, i64 160
  store i8 0, ptr %50, align 8, !tbaa !39
  %51 = getelementptr inbounds i8, ptr %2, i64 80
  %52 = load i64, ptr %51, align 8, !tbaa !40
  %53 = getelementptr inbounds i8, ptr %6, i64 40
  store i64 %52, ptr %53, align 8, !tbaa !41
  %54 = getelementptr inbounds i8, ptr %6, i64 80
  %55 = invoke noundef nonnull align 1 dereferenceable(33) ptr @_ZN5boost8optionalIN6Crypto9SecretKeyEEaSIRKS2_EENS_9enable_ifINS_7is_sameIS2_NS_5decayIT_E4typeEEERS3_E4typeEOSA_(ptr noundef nonnull align 1 dereferenceable(33) %54, ptr noundef nonnull align 1 dereferenceable(32) @_ZN7DynexCNL15NULL_SECRET_KEYE)
          to label %56 unwind label %63

56:                                               ; preds = %49
  %57 = invoke noundef i64 @_ZN7DynexCN27WalletUserTransactionsCache17insertTransactionEONS_23WalletLegacyTransactionE(ptr noundef nonnull align 8 dereferenceable(224) %1, ptr noundef nonnull align 8 dereferenceable(161) %6)
          to label %58 unwind label %63

58:                                               ; preds = %56
  store i64 %57, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  invoke void @_ZSt11make_sharedIN7DynexCN37WalletExternalTransactionCreatedEventEJRmEESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueES5_E4typeEEDpOT0_(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.78") align 8 %7, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %59 unwind label %65

59:                                               ; preds = %58
  %60 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN7DynexCN17WalletLegacyEventEEaSINS0_37WalletExternalTransactionCreatedEventEEENSt9enable_ifIXsr13is_assignableIRSt12__shared_ptrIS1_LN9__gnu_cxx12_Lock_policyE2EES_IT_EEE5valueERS2_E4typeEOSC_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(16) %7) #7
  call void @_ZNSt12__shared_ptrIN7DynexCN37WalletExternalTransactionCreatedEventELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  call void @_ZN7DynexCN23WalletLegacyTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(161) %6) #7
  call void @llvm.lifetime.end.p0(i64 168, ptr nonnull %6) #7
  br label %85

61:                                               ; preds = %25
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %68

63:                                               ; preds = %56, %49, %26
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %67

65:                                               ; preds = %58
  %66 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  br label %67

67:                                               ; preds = %65, %63
  %.pn31 = phi { ptr, i32 } [ %66, %65 ], [ %64, %63 ]
  call void @_ZN7DynexCN23WalletLegacyTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(161) %6) #7
  br label %68

68:                                               ; preds = %67, %61
  %.pn31.pn = phi { ptr, i32 } [ %.pn31, %67 ], [ %62, %61 ]
  call void @llvm.lifetime.end.p0(i64 168, ptr nonnull %6) #7
  br label %86

69:                                               ; preds = %18
  %70 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZN7DynexCN27WalletUserTransactionsCache14getTransactionEm(ptr noundef nonnull align 8 dereferenceable(224) %1, i64 noundef %19)
          to label %71 unwind label %81

71:                                               ; preds = %69
  %72 = getelementptr inbounds i8, ptr %2, i64 64
  %73 = load i32, ptr %72, align 8, !tbaa !34
  %74 = getelementptr inbounds i8, ptr %70, i64 116
  store i32 %73, ptr %74, align 4, !tbaa !35
  %75 = getelementptr inbounds i8, ptr %2, i64 72
  %76 = load i64, ptr %75, align 8, !tbaa !37
  %77 = getelementptr inbounds i8, ptr %70, i64 120
  store i64 %76, ptr %77, align 8, !tbaa !38
  %78 = getelementptr inbounds i8, ptr %70, i64 160
  store i8 0, ptr %78, align 8, !tbaa !39
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #7
  invoke void @_ZSt11make_sharedIN7DynexCN29WalletTransactionUpdatedEventEJRmEESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueES5_E4typeEEDpOT0_(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.81") align 8 %8, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %79 unwind label %83

79:                                               ; preds = %71
  %80 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN7DynexCN17WalletLegacyEventEEaSINS0_29WalletTransactionUpdatedEventEEENSt9enable_ifIXsr13is_assignableIRSt12__shared_ptrIS1_LN9__gnu_cxx12_Lock_policyE2EES_IT_EEE5valueERS2_E4typeEOSC_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(16) %8) #7
  call void @_ZNSt12__shared_ptrIN7DynexCN29WalletTransactionUpdatedEventELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #7
  br label %85

81:                                               ; preds = %69
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %86

83:                                               ; preds = %71
  %84 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #7
  br label %86

85:                                               ; preds = %79, %59
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  ret void

86:                                               ; preds = %68, %83, %81, %15
  %.pn31.pn.pn.pn = phi { ptr, i32 } [ %16, %15 ], [ %.pn31.pn, %68 ], [ %84, %83 ], [ %82, %81 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @_ZNSt12__shared_ptrIN7DynexCN17WalletLegacyEventELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #7
  resume { ptr, i32 } %.pn31.pn.pn.pn
}

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

declare noundef zeroext i1 @_ZN7DynexCN29WalletUnconfirmedTransactions17findTransactionIdERKN6Crypto4HashERm(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 1 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN7DynexCN27WalletUserTransactionsCache21findTransactionByHashERKN6Crypto4HashE(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef nonnull align 1 dereferenceable(32)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11make_sharedIN7DynexCN37WalletExternalTransactionCreatedEventEJRmEESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueES5_E4typeEEDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.78") align 8, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZN7DynexCN27WalletUserTransactionsCache14getTransactionEm(ptr noundef nonnull align 8 dereferenceable(224), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11make_sharedIN7DynexCN29WalletTransactionUpdatedEventEJRmEESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueES5_E4typeEEDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.81") align 8, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { 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 #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { "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 = { 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"}
!9 = !{!10, !6, i64 88}
!10 = !{!"_ZTSN7DynexCN22TransactionInformationE", !11, i64 0, !12, i64 32, !13, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !14, i64 104, !11, i64 128}
!11 = !{!"_ZTSN6Crypto4HashE", !7, i64 0}
!12 = !{!"_ZTSN6Crypto9PublicKeyE", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSSt6vectorIhSaIhEE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !18, i64 0, !18, i64 8, !18, i64 16}
!18 = !{!"any pointer", !7, i64 0}
!19 = !{!20, !6, i64 0}
!20 = !{!"_ZTSN7DynexCN23WalletLegacyTransactionE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !11, i64 48, !21, i64 80, !23, i64 113, !13, i64 116, !6, i64 120, !25, i64 128, !27, i64 160}
!21 = !{!"_ZTSN5boost8optionalIN6Crypto9SecretKeyEEE", !22, i64 0}
!22 = !{!"_ZTSN5boost15optional_detail13optional_baseIN6Crypto9SecretKeyEEE", !23, i64 0, !24, i64 1}
!23 = !{!"bool", !7, i64 0}
!24 = !{!"_ZTSN5boost15optional_detail15aligned_storageIN6Crypto9SecretKeyEEE", !7, i64 0}
!25 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !26, i64 0, !6, i64 8, !7, i64 16}
!26 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !18, i64 0}
!27 = !{!"_ZTSN7DynexCN28WalletLegacyTransactionStateE", !7, i64 0}
!28 = !{!20, !6, i64 8}
!29 = !{!20, !6, i64 16}
!30 = !{!20, !6, i64 24}
!31 = !{!20, !6, i64 32}
!32 = !{i64 0, i64 32, !33}
!33 = !{!7, !7, i64 0}
!34 = !{!10, !13, i64 64}
!35 = !{!20, !13, i64 116}
!36 = !{!20, !23, i64 113}
!37 = !{!10, !6, i64 72}
!38 = !{!20, !6, i64 120}
!39 = !{!20, !27, i64 160}
!40 = !{!10, !6, i64 80}
!41 = !{!20, !6, i64 40}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass