; LLVM IR from dynexcoin/Dynex :: src/Wallet (WalletRpcServer)

; 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::Hash" = 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] }
%"class.std::allocator" = type { i8 }
%"struct.DynexCN::WalletLegacyTransaction" = type <{ i64, i64, i64, i64, i64, i64, %"struct.Crypto::Hash", %"class.boost::optional.109", i8, [2 x i8], i32, i64, %"class.std::__cxx11::basic_string", i8, [7 x i8] }>
%"class.boost::optional.109" = type { %"class.boost::optional_detail::optional_base.110" }
%"class.boost::optional_detail::optional_base.110" = type { i8, %"class.boost::optional_detail::aligned_storage.111" }
%"class.boost::optional_detail::aligned_storage.111" = 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] }
%"struct.DynexCN::WalletLegacyTransfer" = type { %"class.std::__cxx11::basic_string", i64 }
%"struct.Tools::wallet_rpc::Transfer" = type { i64, i8, %"class.std::__cxx11::basic_string", i64, i64, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i64, i64, i64, %"class.std::__cxx11::basic_string" }
%"class.std::vector.47" = type { %"struct.std::_Vector_base.48" }
%"struct.std::_Vector_base.48" = 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 }
%"class.__gnu_cxx::__normal_iterator.113" = type { ptr }
%class.anon.124 = type { ptr }
%"struct.Tools::wallet_rpc::COMMAND_RPC_GET_TRANSFERS::response" = type { %"class.std::__cxx11::list.119" }
%"class.std::__cxx11::list.119" = type { %"class.std::__cxx11::_List_base.120" }
%"class.std::__cxx11::_List_base.120" = type { %"struct.std::__cxx11::_List_base<Tools::wallet_rpc::Transfer, std::allocator<Tools::wallet_rpc::Transfer>>::_List_impl" }
%"struct.std::__cxx11::_List_base<Tools::wallet_rpc::Transfer, std::allocator<Tools::wallet_rpc::Transfer>>::_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.Tools::wallet_rpc_server" = type { %"class.DynexCN::HttpServer", %"class.Logging::LoggerRef", ptr, ptr, i16, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", ptr, %"class.std::__cxx11::basic_string", ptr, %"class.System::Event" }
%"class.DynexCN::HttpServer" = type { ptr, ptr, %"class.System::ContextGroup", %"class.Logging::LoggerRef", %"class.System::TcpListener", %"class.std::unordered_set", %"class.std::__cxx11::basic_string" }
%"class.System::ContextGroup" = type { ptr, %"struct.System::NativeContextGroup" }
%"struct.System::NativeContextGroup" = type { ptr, ptr, ptr, ptr }
%"class.System::TcpListener" = type { ptr, i32, ptr }
%"class.std::unordered_set" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.Logging::LoggerRef" = type { ptr, %"class.std::__cxx11::basic_string" }
%"class.System::Event" = type { ptr, i8, ptr, ptr }

@_ZN7DynexCNL9NULL_HASHE = external hidden global %"struct.Crypto::Hash", align 1
@_ZN7DynexCNL15NULL_SECRET_KEYE = external hidden global %"struct.Crypto::SecretKey", align 1
@.str.16 = external hidden unnamed_addr constant [1 x i8], align 1
@_ZTISt9exception = external constant ptr
@_ZTIN7DynexCN7JsonRpc12JsonRpcErrorE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.53 = external hidden unnamed_addr constant [34 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)

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

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

declare void @__cxa_end_catch()

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN5Tools17wallet_rpc_server16on_get_transfersERKN7DynexCN12EMPTY_STRUCTERNS_10wallet_rpc25COMMAND_RPC_GET_TRANSFERS8responseE(ptr noundef nonnull align 8 dereferenceable(448) %0, ptr noundef nonnull align 1 dereferenceable(1) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::allocator", align 1
  %15 = alloca i1, align 1
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  %18 = alloca %"struct.DynexCN::WalletLegacyTransaction", align 8
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::allocator", align 1
  %21 = alloca %"struct.DynexCN::WalletLegacyTransfer", align 8
  %22 = alloca %"struct.Tools::wallet_rpc::Transfer", align 8
  %23 = alloca %"class.std::__cxx11::basic_string", align 8
  %24 = alloca %"class.std::vector.47", align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator.113", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator.113", align 8
  %27 = alloca %class.anon.124, align 8
  %28 = alloca %class.anon.124, align 8
  %29 = alloca %"struct.Crypto::Hash", align 1
  %30 = alloca %"class.std::__cxx11::basic_string", align 8
  %31 = alloca %"class.std::allocator", align 1
  %32 = alloca i1, align 1
  %33 = alloca i1, align 1
  %34 = alloca %"class.std::__cxx11::basic_string", align 8
  %35 = alloca %"class.std::allocator", align 1
  %36 = alloca i1, align 1
  %37 = alloca i1, align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %38 = load ptr, ptr %4, align 8
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds %"struct.Tools::wallet_rpc::COMMAND_RPC_GET_TRANSFERS::response", ptr %39, i32 0, i32 0
  call void @_ZNSt7__cxx114listIN5Tools10wallet_rpc8TransferESaIS3_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %41 = getelementptr inbounds %"class.Tools::wallet_rpc_server", ptr %38, i32 0, i32 2
  %42 = load ptr, ptr %41, align 8, !tbaa !9
  %43 = load ptr, ptr %42, align 8, !tbaa !28
  %44 = getelementptr inbounds ptr, ptr %43, i64 18
  %45 = load ptr, ptr %44, align 8
  %46 = call noundef i64 %45(ptr noundef nonnull align 8 dereferenceable(8) %42)
  store i64 %46, ptr %7, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %47 = getelementptr inbounds %"class.Tools::wallet_rpc_server", ptr %38, i32 0, i32 3
  %48 = load ptr, ptr %47, align 8, !tbaa !31
  %49 = load ptr, ptr %48, align 8, !tbaa !28
  %50 = getelementptr inbounds ptr, ptr %49, i64 10
  %51 = load ptr, ptr %50, align 8
  %52 = invoke noundef i32 %51(ptr noundef nonnull align 8 dereferenceable(8) %48)
          to label %53 unwind label %55

53:                                               ; preds = %3
  %54 = zext i32 %52 to i64
  store i64 %54, ptr %8, align 8, !tbaa !30
  br label %93

55:                                               ; preds = %3
  %56 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %9, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %10, align 4
  br label %59

59:                                               ; preds = %55
  %60 = load i32, ptr %10, align 4
  %61 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #8
  %62 = icmp eq i32 %60, %61
  br i1 %62, label %63, label %317

63:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %64 = load ptr, ptr %9, align 8
  %65 = call ptr @__cxa_begin_catch(ptr %64) #8
  store ptr %65, ptr %11, align 8
  store i1 true, ptr %15, align 1
  %66 = call ptr @__cxa_allocate_exception(i64 48) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef @.str.53, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %67 unwind label %75

67:                                               ; preds = %63
  %68 = load ptr, ptr %11, align 8, !tbaa !5
  %69 = load ptr, ptr %68, align 8, !tbaa !28
  %70 = getelementptr inbounds ptr, ptr %69, i64 2
  %71 = load ptr, ptr %70, align 8
  %72 = call noundef ptr %71(ptr noundef nonnull align 8 dereferenceable(8) %68) #8
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef %72)
          to label %73 unwind label %79

73:                                               ; preds = %67
  invoke void @_ZN7DynexCN7JsonRpc12JsonRpcErrorC1EiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(48) %66, i32 noundef -1, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %74 unwind label %83

74:                                               ; preds = %73
  store i1 false, ptr %15, align 1
  invoke void @__cxa_throw(ptr %66, ptr @_ZTIN7DynexCN7JsonRpc12JsonRpcErrorE, ptr @_ZN7DynexCN7JsonRpc12JsonRpcErrorD2Ev) #9
          to label %326 unwind label %83

75:                                               ; preds = %63
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %9, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %10, align 4
  br label %88

79:                                               ; preds = %67
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %9, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %10, align 4
  br label %87

83:                                               ; preds = %74, %73
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %9, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %10, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #8
  br label %87

87:                                               ; preds = %83, %79
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #8
  br label %88

88:                                               ; preds = %87, %75
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #8
  %89 = load i1, ptr %15, align 1
  br i1 %89, label %90, label %91

90:                                               ; preds = %88
  call void @__cxa_free_exception(ptr %66) #8
  br label %91

91:                                               ; preds = %90, %88
  invoke void @__cxa_end_catch()
          to label %92 unwind label %323

92:                                               ; preds = %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %317

93:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  store i64 0, ptr %16, align 8, !tbaa !30
  br label %94

94:                                               ; preds = %261, %93
  %95 = load i64, ptr %16, align 8, !tbaa !30
  %96 = load i64, ptr %7, align 8, !tbaa !30
  %97 = icmp ult i64 %95, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %94
  store i32 2, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %316

99:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 168, ptr %18) #8
  call void @_ZN7DynexCN23WalletLegacyTransactionC2Ev(ptr noundef nonnull align 8 dereferenceable(161) %18)
  %100 = getelementptr inbounds %"class.Tools::wallet_rpc_server", ptr %38, i32 0, i32 2
  %101 = load ptr, ptr %100, align 8, !tbaa !9
  %102 = load i64, ptr %16, align 8, !tbaa !30
  %103 = load ptr, ptr %101, align 8, !tbaa !28
  %104 = getelementptr inbounds ptr, ptr %103, i64 24
  %105 = load ptr, ptr %104, align 8
  %106 = invoke noundef zeroext i1 %105(ptr noundef nonnull align 8 dereferenceable(8) %101, i64 noundef %102, ptr noundef nonnull align 8 dereferenceable(161) %18)
          to label %107 unwind label %120

107:                                              ; preds = %99
  %108 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %18, i32 0, i32 13
  %109 = load i8, ptr %108, align 8, !tbaa !32
  %110 = icmp eq i8 %109, 3
  br i1 %110, label %119, label %111

111:                                              ; preds = %107
  %112 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %18, i32 0, i32 13
  %113 = load i8, ptr %112, align 8, !tbaa !32
  %114 = icmp eq i8 %113, 1
  br i1 %114, label %119, label %115

115:                                              ; preds = %111
  %116 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %18, i32 0, i32 13
  %117 = load i8, ptr %116, align 8, !tbaa !32
  %118 = icmp eq i8 %117, 4
  br i1 %118, label %119, label %124

119:                                              ; preds = %115, %111, %107
  store i32 4, ptr %17, align 4
  br label %258

120:                                              ; preds = %99
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %9, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %10, align 4
  br label %315

124:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef @.str.16, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %125 unwind label %146

125:                                              ; preds = %124
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #8
  %126 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %18, i32 0, i32 2
  %127 = load i64, ptr %126, align 8, !tbaa !39
  %128 = icmp slt i64 %127, 0
  br i1 %128, label %129, label %154

129:                                              ; preds = %125
  %130 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %18, i32 0, i32 1
  %131 = load i64, ptr %130, align 8, !tbaa !40
  %132 = icmp ugt i64 %131, 0
  br i1 %132, label %133, label %154

133:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 40, ptr %21) #8
  call void @_ZN7DynexCN20WalletLegacyTransferC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %21) #8
  %134 = getelementptr inbounds %"class.Tools::wallet_rpc_server", ptr %38, i32 0, i32 2
  %135 = load ptr, ptr %134, align 8, !tbaa !9
  %136 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %18, i32 0, i32 0
  %137 = load i64, ptr %136, align 8, !tbaa !41
  %138 = load ptr, ptr %135, align 8, !tbaa !28
  %139 = getelementptr inbounds ptr, ptr %138, i64 25
  %140 = load ptr, ptr %139, align 8
  %141 = invoke noundef zeroext i1 %140(ptr noundef nonnull align 8 dereferenceable(8) %135, i64 noundef %137, ptr noundef nonnull align 8 dereferenceable(40) %21)
          to label %142 unwind label %150

142:                                              ; preds = %133
  %143 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransfer", ptr %21, i32 0, i32 0
  %144 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(32) %143)
          to label %145 unwind label %150

145:                                              ; preds = %142
  call void @_ZN7DynexCN20WalletLegacyTransferD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %21) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr %21) #8
  br label %154

146:                                              ; preds = %124
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %9, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %10, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #8
  br label %314

150:                                              ; preds = %142, %133
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %9, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %10, align 4
  call void @_ZN7DynexCN20WalletLegacyTransferD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %21) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr %21) #8
  br label %313

154:                                              ; preds = %145, %129, %125
  call void @llvm.lifetime.start.p0(i64 184, ptr %22) #8
  call void @_ZN5Tools10wallet_rpc8TransferC2Ev(ptr noundef nonnull align 8 dereferenceable(184) %22) #8
  %155 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %18, i32 0, i32 11
  %156 = load i64, ptr %155, align 8, !tbaa !42
  %157 = getelementptr inbounds %"struct.Tools::wallet_rpc::Transfer", ptr %22, i32 0, i32 0
  store i64 %156, ptr %157, align 8, !tbaa !43
  %158 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %18, i32 0, i32 2
  %159 = load i64, ptr %158, align 8, !tbaa !39
  %160 = icmp slt i64 %159, 0
  %161 = getelementptr inbounds %"struct.Tools::wallet_rpc::Transfer", ptr %22, i32 0, i32 1
  %162 = zext i1 %160 to i8
  store i8 %162, ptr %161, align 8, !tbaa !45
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #8
  %163 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %18, i32 0, i32 6
  invoke void @_ZN6Common8podToHexIN6Crypto4HashEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %23, ptr noundef nonnull align 1 dereferenceable(32) %163)
          to label %164 unwind label %264

164:                                              ; preds = %154
  %165 = getelementptr inbounds %"struct.Tools::wallet_rpc::Transfer", ptr %22, i32 0, i32 2
  %166 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %165, ptr noundef nonnull align 8 dereferenceable(32) %23) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #8
  %167 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %18, i32 0, i32 2
  %168 = load i64, ptr %167, align 8, !tbaa !39
  %169 = invoke noundef i64 @_ZSt3absl(i64 noundef %168)
          to label %170 unwind label %268

170:                                              ; preds = %164
  %171 = getelementptr inbounds %"struct.Tools::wallet_rpc::Transfer", ptr %22, i32 0, i32 3
  store i64 %169, ptr %171, align 8, !tbaa !46
  %172 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %18, i32 0, i32 3
  %173 = load i64, ptr %172, align 8, !tbaa !47
  %174 = getelementptr inbounds %"struct.Tools::wallet_rpc::Transfer", ptr %22, i32 0, i32 4
  store i64 %173, ptr %174, align 8, !tbaa !48
  %175 = getelementptr inbounds %"struct.Tools::wallet_rpc::Transfer", ptr %22, i32 0, i32 6
  %176 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %175, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %177 unwind label %268

177:                                              ; preds = %170
  %178 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %18, i32 0, i32 10
  %179 = load i32, ptr %178, align 4, !tbaa !49
  %180 = zext i32 %179 to i64
  %181 = getelementptr inbounds %"struct.Tools::wallet_rpc::Transfer", ptr %22, i32 0, i32 7
  store i64 %180, ptr %181, align 8, !tbaa !50
  %182 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %18, i32 0, i32 5
  %183 = load i64, ptr %182, align 8, !tbaa !51
  %184 = getelementptr inbounds %"struct.Tools::wallet_rpc::Transfer", ptr %22, i32 0, i32 8
  store i64 %183, ptr %184, align 8, !tbaa !52
  %185 = getelementptr inbounds %"struct.Tools::wallet_rpc::Transfer", ptr %22, i32 0, i32 5
  %186 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %185, ptr noundef @.str.16)
          to label %187 unwind label %268

187:                                              ; preds = %177
  %188 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %18, i32 0, i32 10
  %189 = load i32, ptr %188, align 4, !tbaa !49
  %190 = icmp ne i32 %189, -1
  br i1 %190, label %191, label %197

191:                                              ; preds = %187
  %192 = load i64, ptr %8, align 8, !tbaa !30
  %193 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %18, i32 0, i32 10
  %194 = load i32, ptr %193, align 4, !tbaa !49
  %195 = zext i32 %194 to i64
  %196 = sub i64 %192, %195
  br label %198

197:                                              ; preds = %187
  br label %198

198:                                              ; preds = %197, %191
  %199 = phi i64 [ %196, %191 ], [ 0, %197 ]
  %200 = getelementptr inbounds %"struct.Tools::wallet_rpc::Transfer", ptr %22, i32 0, i32 9
  store i64 %199, ptr %200, align 8, !tbaa !53
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #8
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #8
  %201 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %18, i32 0, i32 12
  %202 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %201) #8
  invoke void @_ZNSt6vectorIhSaIhEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %202)
          to label %203 unwind label %272

203:                                              ; preds = %198
  %204 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %18, i32 0, i32 12
  %205 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %204) #8
  %206 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.113", ptr %25, i32 0, i32 0
  store ptr %205, ptr %206, align 8
  %207 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %18, i32 0, i32 12
  %208 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %207) #8
  %209 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.113", ptr %26, i32 0, i32 0
  store ptr %208, ptr %209, align 8
  %210 = getelementptr inbounds %class.anon.124, ptr %27, i32 0, i32 0
  store ptr %24, ptr %210, align 8, !tbaa !5
  %211 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.113", ptr %25, i32 0, i32 0
  %212 = load ptr, ptr %211, align 8
  %213 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.113", ptr %26, i32 0, i32 0
  %214 = load ptr, ptr %213, align 8
  %215 = getelementptr inbounds %class.anon.124, ptr %27, i32 0, i32 0
  %216 = load ptr, ptr %215, align 8
  %217 = invoke ptr @"_ZSt8for_eachIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEZN5Tools17wallet_rpc_server16on_get_transfersERKN7DynexCN12EMPTY_STRUCTERNSA_10wallet_rpc25COMMAND_RPC_GET_TRANSFERS8responseEE3$_0ET0_T_SM_SL_"(ptr %212, ptr %214, ptr %216)
          to label %218 unwind label %272

218:                                              ; preds = %203
  %219 = getelementptr inbounds %class.anon.124, ptr %28, i32 0, i32 0
  store ptr %217, ptr %219, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %29) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %30) #8
  store i1 false, ptr %32, align 1
  store i1 false, ptr %33, align 1
  %220 = invoke noundef zeroext i1 @_ZN7DynexCN23getPaymentIdFromTxExtraERKSt6vectorIhSaIhEERN6Crypto4HashE(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 1 dereferenceable(32) %29)
          to label %221 unwind label %276

221:                                              ; preds = %218
  br i1 %220, label %222, label %227

222:                                              ; preds = %221
  %223 = invoke noundef zeroext i1 @_ZN6CryptoneERKNS_4HashES2_(ptr noundef nonnull align 1 dereferenceable(32) %29, ptr noundef nonnull align 1 dereferenceable(32) @_ZN7DynexCNL9NULL_HASHE)
          to label %224 unwind label %276

224:                                              ; preds = %222
  br i1 %223, label %225, label %227

225:                                              ; preds = %224
  invoke void @_ZN6Common8podToHexIN6Crypto4HashEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %30, ptr noundef nonnull align 1 dereferenceable(32) %29)
          to label %226 unwind label %276

226:                                              ; preds = %225
  br label %229

227:                                              ; preds = %224, %221
  call void @llvm.lifetime.start.p0(i64 1, ptr %31) #8
  store i1 true, ptr %32, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #8
  store i1 true, ptr %33, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %30, ptr noundef @.str.16, ptr noundef nonnull align 1 dereferenceable(1) %31)
          to label %228 unwind label %280

228:                                              ; preds = %227
  br label %229

229:                                              ; preds = %228, %226
  %230 = getelementptr inbounds %"struct.Tools::wallet_rpc::Transfer", ptr %22, i32 0, i32 5
  %231 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %230, ptr noundef nonnull align 8 dereferenceable(32) %30) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #8
  %232 = load i1, ptr %33, align 1
  br i1 %232, label %233, label %234

233:                                              ; preds = %229
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #8
  br label %234

234:                                              ; preds = %233, %229
  %235 = load i1, ptr %32, align 1
  br i1 %235, label %236, label %237

236:                                              ; preds = %234
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #8
  br label %237

237:                                              ; preds = %236, %234
  call void @llvm.lifetime.end.p0(i64 32, ptr %30) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %34) #8
  %238 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %18, i32 0, i32 7
  store i1 false, ptr %36, align 1
  store i1 false, ptr %37, align 1
  %239 = invoke noundef zeroext i1 @_ZN5boostneIN6Crypto9SecretKeyEEEbRKNS_8optionalIT_EERKS4_(ptr noundef nonnull align 1 dereferenceable(33) %238, ptr noundef nonnull align 1 dereferenceable(32) @_ZN7DynexCNL15NULL_SECRET_KEYE)
          to label %240 unwind label %291

240:                                              ; preds = %237
  br i1 %239, label %241, label %244

241:                                              ; preds = %240
  %242 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %18, i32 0, i32 7
  invoke void @_ZN6Common8podToHexIN5boost8optionalIN6Crypto9SecretKeyEEEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %34, ptr noundef nonnull align 1 dereferenceable(33) %242)
          to label %243 unwind label %291

243:                                              ; preds = %241
  br label %246

244:                                              ; preds = %240
  call void @llvm.lifetime.start.p0(i64 1, ptr %35) #8
  store i1 true, ptr %36, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #8
  store i1 true, ptr %37, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %34, ptr noundef @.str.16, ptr noundef nonnull align 1 dereferenceable(1) %35)
          to label %245 unwind label %295

245:                                              ; preds = %244
  br label %246

246:                                              ; preds = %245, %243
  %247 = getelementptr inbounds %"struct.Tools::wallet_rpc::Transfer", ptr %22, i32 0, i32 10
  %248 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %247, ptr noundef nonnull align 8 dereferenceable(32) %34) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %34) #8
  %249 = load i1, ptr %37, align 1
  br i1 %249, label %250, label %251

250:                                              ; preds = %246
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #8
  br label %251

251:                                              ; preds = %250, %246
  %252 = load i1, ptr %36, align 1
  br i1 %252, label %253, label %254

253:                                              ; preds = %251
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #8
  br label %254

254:                                              ; preds = %253, %251
  call void @llvm.lifetime.end.p0(i64 32, ptr %34) #8
  %255 = load ptr, ptr %6, align 8, !tbaa !5
  %256 = getelementptr inbounds %"struct.Tools::wallet_rpc::COMMAND_RPC_GET_TRANSFERS::response", ptr %255, i32 0, i32 0
  invoke void @_ZNSt7__cxx114listIN5Tools10wallet_rpc8TransferESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %256, ptr noundef nonnull align 8 dereferenceable(184) %22)
          to label %257 unwind label %306

257:                                              ; preds = %254
  call void @llvm.lifetime.end.p0(i64 32, ptr %29) #8
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #8
  call void @_ZN5Tools10wallet_rpc8TransferD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %22) #8
  call void @llvm.lifetime.end.p0(i64 184, ptr %22) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #8
  store i32 0, ptr %17, align 4
  br label %258

258:                                              ; preds = %257, %119
  call void @_ZN7DynexCN23WalletLegacyTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(161) %18) #8
  call void @llvm.lifetime.end.p0(i64 168, ptr %18) #8
  %259 = load i32, ptr %17, align 4
  switch i32 %259, label %326 [
    i32 0, label %260
    i32 4, label %261
  ]

260:                                              ; preds = %258
  br label %261

261:                                              ; preds = %260, %258
  %262 = load i64, ptr %16, align 8, !tbaa !30
  %263 = add i64 %262, 1
  store i64 %263, ptr %16, align 8, !tbaa !30
  br label %94, !llvm.loop !54

264:                                              ; preds = %154
  %265 = landingpad { ptr, i32 }
          cleanup
  %266 = extractvalue { ptr, i32 } %265, 0
  store ptr %266, ptr %9, align 8
  %267 = extractvalue { ptr, i32 } %265, 1
  store i32 %267, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #8
  br label %312

268:                                              ; preds = %177, %170, %164
  %269 = landingpad { ptr, i32 }
          cleanup
  %270 = extractvalue { ptr, i32 } %269, 0
  store ptr %270, ptr %9, align 8
  %271 = extractvalue { ptr, i32 } %269, 1
  store i32 %271, ptr %10, align 4
  br label %312

272:                                              ; preds = %203, %198
  %273 = landingpad { ptr, i32 }
          cleanup
  %274 = extractvalue { ptr, i32 } %273, 0
  store ptr %274, ptr %9, align 8
  %275 = extractvalue { ptr, i32 } %273, 1
  store i32 %275, ptr %10, align 4
  br label %311

276:                                              ; preds = %225, %222, %218
  %277 = landingpad { ptr, i32 }
          cleanup
  %278 = extractvalue { ptr, i32 } %277, 0
  store ptr %278, ptr %9, align 8
  %279 = extractvalue { ptr, i32 } %277, 1
  store i32 %279, ptr %10, align 4
  br label %290

280:                                              ; preds = %227
  %281 = landingpad { ptr, i32 }
          cleanup
  %282 = extractvalue { ptr, i32 } %281, 0
  store ptr %282, ptr %9, align 8
  %283 = extractvalue { ptr, i32 } %281, 1
  store i32 %283, ptr %10, align 4
  %284 = load i1, ptr %33, align 1
  br i1 %284, label %285, label %286

285:                                              ; preds = %280
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #8
  br label %286

286:                                              ; preds = %285, %280
  %287 = load i1, ptr %32, align 1
  br i1 %287, label %288, label %289

288:                                              ; preds = %286
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #8
  br label %289

289:                                              ; preds = %288, %286
  br label %290

290:                                              ; preds = %289, %276
  call void @llvm.lifetime.end.p0(i64 32, ptr %30) #8
  br label %310

291:                                              ; preds = %241, %237
  %292 = landingpad { ptr, i32 }
          cleanup
  %293 = extractvalue { ptr, i32 } %292, 0
  store ptr %293, ptr %9, align 8
  %294 = extractvalue { ptr, i32 } %292, 1
  store i32 %294, ptr %10, align 4
  br label %305

295:                                              ; preds = %244
  %296 = landingpad { ptr, i32 }
          cleanup
  %297 = extractvalue { ptr, i32 } %296, 0
  store ptr %297, ptr %9, align 8
  %298 = extractvalue { ptr, i32 } %296, 1
  store i32 %298, ptr %10, align 4
  %299 = load i1, ptr %37, align 1
  br i1 %299, label %300, label %301

300:                                              ; preds = %295
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #8
  br label %301

301:                                              ; preds = %300, %295
  %302 = load i1, ptr %36, align 1
  br i1 %302, label %303, label %304

303:                                              ; preds = %301
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #8
  br label %304

304:                                              ; preds = %303, %301
  br label %305

305:                                              ; preds = %304, %291
  call void @llvm.lifetime.end.p0(i64 32, ptr %34) #8
  br label %310

306:                                              ; preds = %254
  %307 = landingpad { ptr, i32 }
          cleanup
  %308 = extractvalue { ptr, i32 } %307, 0
  store ptr %308, ptr %9, align 8
  %309 = extractvalue { ptr, i32 } %307, 1
  store i32 %309, ptr %10, align 4
  br label %310

310:                                              ; preds = %306, %305, %290
  call void @llvm.lifetime.end.p0(i64 32, ptr %29) #8
  br label %311

311:                                              ; preds = %310, %272
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #8
  br label %312

312:                                              ; preds = %311, %268, %264
  call void @_ZN5Tools10wallet_rpc8TransferD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %22) #8
  call void @llvm.lifetime.end.p0(i64 184, ptr %22) #8
  br label %313

313:                                              ; preds = %312, %150
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #8
  br label %314

314:                                              ; preds = %313, %146
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #8
  br label %315

315:                                              ; preds = %314, %120
  call void @_ZN7DynexCN23WalletLegacyTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(161) %18) #8
  call void @llvm.lifetime.end.p0(i64 168, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %317

316:                                              ; preds = %98
  store i32 1, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  ret i1 true

317:                                              ; preds = %315, %92, %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  br label %318

318:                                              ; preds = %317
  %319 = load ptr, ptr %9, align 8
  %320 = load i32, ptr %10, align 4
  %321 = insertvalue { ptr, i32 } poison, ptr %319, 0
  %322 = insertvalue { ptr, i32 } %321, i32 %320, 1
  resume { ptr, i32 } %322

323:                                              ; preds = %91
  %324 = landingpad { ptr, i32 }
          catch ptr null
  %325 = extractvalue { ptr, i32 } %324, 0
  call void @__clang_call_terminate(ptr %325) #10
  unreachable

326:                                              ; preds = %258, %74
  unreachable
}

declare ptr @__cxa_allocate_exception(i64)

declare void @__cxa_free_exception(ptr)

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

declare void @__cxa_throw(ptr, ptr, ptr)

; Function Attrs: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #5

declare void @_ZN7DynexCN7JsonRpc12JsonRpcErrorC1EiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #7

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Common8podToHexIN6Crypto4HashEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 1 dereferenceable(32)) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Common8podToHexIN5boost8optionalIN6Crypto9SecretKeyEEEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 1 dereferenceable(33)) #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 void @_ZNSt6vectorIhSaIhEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) #3 align 2

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZSt3absl(i64 noundef) #4

; Function Attrs: mustprogress uwtable
declare hidden ptr @"_ZSt8for_eachIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEZN5Tools17wallet_rpc_server16on_get_transfersERKN7DynexCN12EMPTY_STRUCTERNSA_10wallet_rpc25COMMAND_RPC_GET_TRANSFERS8responseEE3$_0ET0_T_SM_SL_"(ptr, ptr, ptr) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6CryptoneERKNS_4HashES2_(ptr noundef nonnull align 1 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(32)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN5boostneIN6Crypto9SecretKeyEEEbRKNS_8optionalIT_EERKS4_(ptr noundef nonnull align 1 dereferenceable(33), ptr noundef nonnull align 1 dereferenceable(32)) #7

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5Tools10wallet_rpc8TransferD2Ev(ptr noundef nonnull align 8 dereferenceable(184)) unnamed_addr #4 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 = { 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 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 = { 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 = { nounwind memory(none) }
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 = { 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 #8 = { nounwind }
attributes #9 = { noreturn }
attributes #10 = { 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, !6, i64 248}
!10 = !{!"_ZTSN5Tools17wallet_rpc_serverE", !11, i64 0, !14, i64 208, !6, i64 248, !6, i64 256, !25, i64 264, !15, i64 272, !15, i64 304, !15, i64 336, !6, i64 368, !15, i64 376, !6, i64 408, !26, i64 416}
!11 = !{!"_ZTSN7DynexCN10HttpServerE", !6, i64 8, !12, i64 16, !14, i64 56, !18, i64 96, !20, i64 120, !15, i64 176}
!12 = !{!"_ZTSN6System12ContextGroupE", !6, i64 0, !13, i64 8}
!13 = !{!"_ZTSN6System18NativeContextGroupE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!14 = !{!"_ZTSN7Logging9LoggerRefE", !6, i64 0, !15, i64 8}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !16, i64 0, !17, i64 8, !7, i64 16}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!"_ZTSN6System11TcpListenerE", !6, i64 0, !19, i64 8, !6, i64 16}
!19 = !{!"int", !7, i64 0}
!20 = !{!"_ZTSSt13unordered_setIPN6System13TcpConnectionESt4hashIS2_ESt8equal_toIS2_ESaIS2_EE", !21, i64 0}
!21 = !{!"_ZTSSt10_HashtableIPN6System13TcpConnectionES2_SaIS2_ENSt8__detail9_IdentityESt8equal_toIS2_ESt4hashIS2_ENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb1ELb1EEEE", !6, i64 0, !17, i64 8, !22, i64 16, !17, i64 24, !23, i64 32, !6, i64 48}
!22 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!23 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !24, i64 0, !17, i64 8}
!24 = !{!"float", !7, i64 0}
!25 = !{!"short", !7, i64 0}
!26 = !{!"_ZTSN6System5EventE", !6, i64 0, !27, i64 8, !6, i64 16, !6, i64 24}
!27 = !{!"bool", !7, i64 0}
!28 = !{!29, !29, i64 0}
!29 = !{!"vtable pointer", !8, i64 0}
!30 = !{!17, !17, i64 0}
!31 = !{!10, !6, i64 256}
!32 = !{!33, !38, i64 160}
!33 = !{!"_ZTSN7DynexCN23WalletLegacyTransactionE", !17, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !17, i64 32, !17, i64 40, !34, i64 48, !35, i64 80, !27, i64 113, !19, i64 116, !17, i64 120, !15, i64 128, !38, i64 160}
!34 = !{!"_ZTSN6Crypto4HashE", !7, i64 0}
!35 = !{!"_ZTSN5boost8optionalIN6Crypto9SecretKeyEEE", !36, i64 0}
!36 = !{!"_ZTSN5boost15optional_detail13optional_baseIN6Crypto9SecretKeyEEE", !27, i64 0, !37, i64 1}
!37 = !{!"_ZTSN5boost15optional_detail15aligned_storageIN6Crypto9SecretKeyEEE", !7, i64 0}
!38 = !{!"_ZTSN7DynexCN28WalletLegacyTransactionStateE", !7, i64 0}
!39 = !{!33, !17, i64 16}
!40 = !{!33, !17, i64 8}
!41 = !{!33, !17, i64 0}
!42 = !{!33, !17, i64 120}
!43 = !{!44, !17, i64 0}
!44 = !{!"_ZTSN5Tools10wallet_rpc8TransferE", !17, i64 0, !27, i64 8, !15, i64 16, !17, i64 48, !17, i64 56, !15, i64 64, !15, i64 96, !17, i64 128, !17, i64 136, !17, i64 144, !15, i64 152}
!45 = !{!44, !27, i64 8}
!46 = !{!44, !17, i64 48}
!47 = !{!33, !17, i64 24}
!48 = !{!44, !17, i64 56}
!49 = !{!33, !19, i64 116}
!50 = !{!44, !17, i64 128}
!51 = !{!33, !17, i64 40}
!52 = !{!44, !17, i64 136}
!53 = !{!44, !17, i64 144}
!54 = distinct !{!54, !55}
!55 = !{!"llvm.loop.mustprogress"}


; 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::Hash" = 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] }
%"class.std::allocator" = type { i8 }
%"struct.DynexCN::WalletLegacyTransaction" = type <{ i64, i64, i64, i64, i64, i64, %"struct.Crypto::Hash", %"class.boost::optional.109", i8, [2 x i8], i32, i64, %"class.std::__cxx11::basic_string", i8, [7 x i8] }>
%"class.boost::optional.109" = type { %"class.boost::optional_detail::optional_base.110" }
%"class.boost::optional_detail::optional_base.110" = type { i8, %"class.boost::optional_detail::aligned_storage.111" }
%"class.boost::optional_detail::aligned_storage.111" = 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] }
%"struct.DynexCN::WalletLegacyTransfer" = type { %"class.std::__cxx11::basic_string", i64 }
%"struct.Tools::wallet_rpc::Transfer" = type { i64, i8, %"class.std::__cxx11::basic_string", i64, i64, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i64, i64, i64, %"class.std::__cxx11::basic_string" }
%"class.std::vector.47" = type { %"struct.std::_Vector_base.48" }
%"struct.std::_Vector_base.48" = 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 }

@_ZN7DynexCNL9NULL_HASHE = external hidden global %"struct.Crypto::Hash", align 1
@_ZN7DynexCNL15NULL_SECRET_KEYE = external hidden global %"struct.Crypto::SecretKey", align 1
@.str.16 = external hidden unnamed_addr constant [1 x i8], align 1
@_ZTISt9exception = external constant ptr
@_ZTIN7DynexCN7JsonRpc12JsonRpcErrorE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.53 = external hidden unnamed_addr constant [34 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

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

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

declare void @__cxa_end_catch() local_unnamed_addr

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN5Tools17wallet_rpc_server16on_get_transfersERKN7DynexCN12EMPTY_STRUCTERNS_10wallet_rpc25COMMAND_RPC_GET_TRANSFERS8responseE(ptr nocapture noundef nonnull readonly align 8 dereferenceable(448) %0, ptr nocapture noundef nonnull readnone align 1 dereferenceable(1) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca %"struct.DynexCN::WalletLegacyTransaction", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca %"struct.DynexCN::WalletLegacyTransfer", align 8
  %11 = alloca %"struct.Tools::wallet_rpc::Transfer", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::vector.47", align 8
  %14 = alloca %"struct.Crypto::Hash", align 1
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::allocator", align 1
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::allocator", align 1
  tail call void @_ZNSt7__cxx114listIN5Tools10wallet_rpc8TransferESaIS3_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  %19 = getelementptr inbounds i8, ptr %0, i64 248
  %20 = load ptr, ptr %19, align 8, !tbaa !5
  %21 = load ptr, ptr %20, align 8, !tbaa !27
  %22 = getelementptr inbounds i8, ptr %21, i64 144
  %23 = load ptr, ptr %22, align 8
  %24 = tail call noundef i64 %23(ptr noundef nonnull align 8 dereferenceable(8) %20)
  %25 = getelementptr inbounds i8, ptr %0, i64 256
  %26 = load ptr, ptr %25, align 8, !tbaa !29
  %27 = load ptr, ptr %26, align 8, !tbaa !27
  %28 = getelementptr inbounds i8, ptr %27, i64 80
  %29 = load ptr, ptr %28, align 8
  %30 = invoke noundef i32 %29(ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %31 unwind label %53

31:                                               ; preds = %3
  %32 = zext i32 %30 to i64
  %.not73 = icmp eq i64 %24, 0
  br i1 %.not73, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %31
  %33 = getelementptr inbounds i8, ptr %7, i64 160
  %34 = getelementptr inbounds i8, ptr %7, i64 16
  %35 = getelementptr inbounds i8, ptr %7, i64 8
  %36 = getelementptr inbounds i8, ptr %7, i64 120
  %37 = getelementptr inbounds i8, ptr %11, i64 8
  %38 = getelementptr inbounds i8, ptr %7, i64 48
  %39 = getelementptr inbounds i8, ptr %11, i64 16
  %40 = getelementptr inbounds i8, ptr %11, i64 48
  %41 = getelementptr inbounds i8, ptr %7, i64 24
  %42 = getelementptr inbounds i8, ptr %11, i64 56
  %43 = getelementptr inbounds i8, ptr %11, i64 96
  %44 = getelementptr inbounds i8, ptr %7, i64 116
  %45 = getelementptr inbounds i8, ptr %11, i64 128
  %46 = getelementptr inbounds i8, ptr %7, i64 40
  %47 = getelementptr inbounds i8, ptr %11, i64 136
  %48 = getelementptr inbounds i8, ptr %11, i64 64
  %49 = getelementptr inbounds i8, ptr %11, i64 144
  %50 = getelementptr inbounds i8, ptr %7, i64 128
  %51 = getelementptr inbounds i8, ptr %7, i64 80
  %52 = getelementptr inbounds i8, ptr %11, i64 152
  br label %77

53:                                               ; preds = %3
  %54 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %55 = extractvalue { ptr, i32 } %54, 1
  %56 = tail call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9exception) #8
  %57 = icmp eq i32 %55, %56
  br i1 %57, label %58, label %176

58:                                               ; preds = %53
  %59 = extractvalue { ptr, i32 } %54, 0
  %60 = tail call ptr @__cxa_begin_catch(ptr %59) #8
  %61 = tail call ptr @__cxa_allocate_exception(i64 48) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.53, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %62 unwind label %.thread

62:                                               ; preds = %58
  %63 = load ptr, ptr %60, align 8, !tbaa !27
  %64 = getelementptr inbounds i8, ptr %63, i64 16
  %65 = load ptr, ptr %64, align 8
  %66 = call noundef ptr %65(ptr noundef nonnull align 8 dereferenceable(8) %60) #8
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %4, ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef %66)
          to label %67 unwind label %70

67:                                               ; preds = %62
  invoke void @_ZN7DynexCN7JsonRpc12JsonRpcErrorC1EiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(48) %61, i32 noundef -1, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %68 unwind label %72

68:                                               ; preds = %67
  invoke void @__cxa_throw(ptr nonnull %61, ptr nonnull @_ZTIN7DynexCN7JsonRpc12JsonRpcErrorE, ptr nonnull @_ZN7DynexCN7JsonRpc12JsonRpcErrorD2Ev) #9
          to label %180 unwind label %72

.thread:                                          ; preds = %58
  %69 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  br label %75

70:                                               ; preds = %62
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %74

72:                                               ; preds = %68, %67
  %.047 = phi i1 [ false, %68 ], [ true, %67 ]
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  br label %74

74:                                               ; preds = %70, %72
  %.148 = phi i1 [ %.047, %72 ], [ true, %70 ]
  %.pn = phi { ptr, i32 } [ %73, %72 ], [ %71, %70 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  br i1 %.148, label %75, label %76

75:                                               ; preds = %.thread, %74
  %.pn.pn71 = phi { ptr, i32 } [ %69, %.thread ], [ %.pn, %74 ]
  call void @__cxa_free_exception(ptr %61) #8
  br label %76

76:                                               ; preds = %75, %74
  %.pn.pn70 = phi { ptr, i32 } [ %.pn.pn71, %75 ], [ %.pn, %74 ]
  invoke void @__cxa_end_catch()
          to label %176 unwind label %177

._crit_edge:                                      ; preds = %150, %31
  ret i1 true

77:                                               ; preds = %.lr.ph, %150
  %.05072 = phi i64 [ 0, %.lr.ph ], [ %151, %150 ]
  call void @llvm.lifetime.start.p0(i64 168, ptr nonnull %7) #8
  call void @_ZN7DynexCN23WalletLegacyTransactionC2Ev(ptr noundef nonnull align 8 dereferenceable(161) %7)
  %78 = load ptr, ptr %19, align 8, !tbaa !5
  %79 = load ptr, ptr %78, align 8, !tbaa !27
  %80 = getelementptr inbounds i8, ptr %79, i64 192
  %81 = load ptr, ptr %80, align 8
  %82 = invoke noundef zeroext i1 %81(ptr noundef nonnull align 8 dereferenceable(8) %78, i64 noundef %.05072, ptr noundef nonnull align 8 dereferenceable(161) %7)
          to label %83 unwind label %85

83:                                               ; preds = %77
  %84 = load i8, ptr %33, align 8
  switch i8 %84, label %87 [
    i8 4, label %150
    i8 3, label %150
    i8 1, label %150
  ]

85:                                               ; preds = %77
  %86 = landingpad { ptr, i32 }
          cleanup
  br label %175

87:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str.16, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %88 unwind label %103

88:                                               ; preds = %87
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #8
  %89 = load i64, ptr %34, align 8, !tbaa !30
  %90 = icmp slt i64 %89, 0
  %91 = load i64, ptr %35, align 8
  %92 = icmp ne i64 %91, 0
  %or.cond8 = select i1 %90, i1 %92, i1 false
  br i1 %or.cond8, label %93, label %107

93:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %10) #8
  call void @_ZN7DynexCN20WalletLegacyTransferC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %10) #8
  %94 = load ptr, ptr %19, align 8, !tbaa !5
  %95 = load i64, ptr %7, align 8, !tbaa !37
  %96 = load ptr, ptr %94, align 8, !tbaa !27
  %97 = getelementptr inbounds i8, ptr %96, i64 200
  %98 = load ptr, ptr %97, align 8
  %99 = invoke noundef zeroext i1 %98(ptr noundef nonnull align 8 dereferenceable(8) %94, i64 noundef %95, ptr noundef nonnull align 8 dereferenceable(40) %10)
          to label %100 unwind label %105

100:                                              ; preds = %93
  %101 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %102 unwind label %105

102:                                              ; preds = %100
  call void @_ZN7DynexCN20WalletLegacyTransferD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %10) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #8
  br label %107

103:                                              ; preds = %87
  %104 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #8
  br label %174

105:                                              ; preds = %100, %93
  %106 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7DynexCN20WalletLegacyTransferD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %10) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #8
  br label %173

107:                                              ; preds = %102, %88
  call void @llvm.lifetime.start.p0(i64 184, ptr nonnull %11) #8
  call void @_ZN5Tools10wallet_rpc8TransferC2Ev(ptr noundef nonnull align 8 dereferenceable(184) %11) #8
  %108 = load i64, ptr %36, align 8, !tbaa !38
  store i64 %108, ptr %11, align 8, !tbaa !39
  %109 = load i64, ptr %34, align 8, !tbaa !30
  %.lobit = lshr i64 %109, 63
  %110 = trunc nuw nsw i64 %.lobit to i8
  store i8 %110, ptr %37, align 8, !tbaa !41
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #8
  invoke void @_ZN6Common8podToHexIN6Crypto4HashEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef nonnull align 1 dereferenceable(32) %38)
          to label %111 unwind label %152

111:                                              ; preds = %107
  %112 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %39, ptr noundef nonnull align 8 dereferenceable(32) %12) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #8
  %113 = load i64, ptr %34, align 8, !tbaa !30
  %114 = call noundef i64 @_ZSt3absl(i64 noundef %113)
  store i64 %114, ptr %40, align 8, !tbaa !42
  %115 = load i64, ptr %41, align 8, !tbaa !43
  store i64 %115, ptr %42, align 8, !tbaa !44
  %116 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %43, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %117 unwind label %154

117:                                              ; preds = %111
  %118 = load i32, ptr %44, align 4, !tbaa !45
  %119 = zext i32 %118 to i64
  store i64 %119, ptr %45, align 8, !tbaa !46
  %120 = load i64, ptr %46, align 8, !tbaa !47
  store i64 %120, ptr %47, align 8, !tbaa !48
  %121 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %48, ptr noundef nonnull @.str.16)
          to label %122 unwind label %154

122:                                              ; preds = %117
  %123 = load i32, ptr %44, align 4
  %.not = icmp eq i32 %123, -1
  %124 = zext i32 %123 to i64
  %125 = sub nsw i64 %32, %124
  %126 = select i1 %.not, i64 0, i64 %125
  store i64 %126, ptr %49, align 8, !tbaa !49
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #8
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  %127 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %50) #8
  invoke void @_ZNSt6vectorIhSaIhEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %127)
          to label %128 unwind label %156

128:                                              ; preds = %122
  %129 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %50) #8
  %130 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %50) #8
  %131 = invoke ptr @"_ZSt8for_eachIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEZN5Tools17wallet_rpc_server16on_get_transfersERKN7DynexCN12EMPTY_STRUCTERNSA_10wallet_rpc25COMMAND_RPC_GET_TRANSFERS8responseEE3$_0ET0_T_SM_SL_"(ptr %129, ptr %130, ptr nonnull %13)
          to label %132 unwind label %156

132:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #8
  %133 = invoke noundef zeroext i1 @_ZN7DynexCN23getPaymentIdFromTxExtraERKSt6vectorIhSaIhEERN6Crypto4HashE(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 1 dereferenceable(32) %14)
          to label %134 unwind label %158

134:                                              ; preds = %132
  br i1 %133, label %135, label %138

135:                                              ; preds = %134
  %136 = call noundef zeroext i1 @_ZN6CryptoneERKNS_4HashES2_(ptr noundef nonnull align 1 dereferenceable(32) %14, ptr noundef nonnull align 1 dereferenceable(32) @_ZN7DynexCNL9NULL_HASHE)
  br i1 %136, label %137, label %138

137:                                              ; preds = %135
  invoke void @_ZN6Common8podToHexIN6Crypto4HashEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %15, ptr noundef nonnull align 1 dereferenceable(32) %14)
          to label %.critedge.critedge unwind label %158

138:                                              ; preds = %135, %134
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %16) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull @.str.16, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %139 unwind label %160

139:                                              ; preds = %138
  %140 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %48, ptr noundef nonnull align 8 dereferenceable(32) %15) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #8
  br label %.critedge

.critedge.critedge:                               ; preds = %137
  %141 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %48, ptr noundef nonnull align 8 dereferenceable(32) %15) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #8
  br label %.critedge

.critedge:                                        ; preds = %.critedge.critedge, %139
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %17) #8
  %142 = invoke noundef zeroext i1 @_ZN5boostneIN6Crypto9SecretKeyEEEbRKNS_8optionalIT_EERKS4_(ptr noundef nonnull align 1 dereferenceable(33) %51, ptr noundef nonnull align 1 dereferenceable(32) @_ZN7DynexCNL15NULL_SECRET_KEYE)
          to label %143 unwind label %163

143:                                              ; preds = %.critedge
  br i1 %142, label %144, label %145

144:                                              ; preds = %143
  invoke void @_ZN6Common8podToHexIN5boost8optionalIN6Crypto9SecretKeyEEEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %17, ptr noundef nonnull align 1 dereferenceable(33) %51)
          to label %146 unwind label %163

145:                                              ; preds = %143
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %18) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull @.str.16, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %146 unwind label %165

146:                                              ; preds = %145, %144
  %147 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %52, ptr noundef nonnull align 8 dereferenceable(32) %17) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #8
  br i1 %142, label %.critedge66, label %148

148:                                              ; preds = %146
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #8
  br label %.critedge66

.critedge66:                                      ; preds = %146, %148
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #8
  invoke void @_ZNSt7__cxx114listIN5Tools10wallet_rpc8TransferESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(184) %11)
          to label %149 unwind label %168

149:                                              ; preds = %.critedge66
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #8
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #8
  call void @_ZN5Tools10wallet_rpc8TransferD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %11) #8
  call void @llvm.lifetime.end.p0(i64 184, ptr nonnull %11) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #8
  br label %150

150:                                              ; preds = %83, %83, %83, %149
  call void @_ZN7DynexCN23WalletLegacyTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(161) %7) #8
  call void @llvm.lifetime.end.p0(i64 168, ptr nonnull %7) #8
  %151 = add nuw i64 %.05072, 1
  %exitcond.not = icmp eq i64 %151, %24
  br i1 %exitcond.not, label %._crit_edge, label %77, !llvm.loop !50

152:                                              ; preds = %107
  %153 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #8
  br label %172

154:                                              ; preds = %117, %111
  %155 = landingpad { ptr, i32 }
          cleanup
  br label %172

156:                                              ; preds = %128, %122
  %157 = landingpad { ptr, i32 }
          cleanup
  br label %171

158:                                              ; preds = %137, %132
  %159 = landingpad { ptr, i32 }
          cleanup
  br label %162

160:                                              ; preds = %138
  %161 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #8
  br label %162

162:                                              ; preds = %160, %158
  %.pn54 = phi { ptr, i32 } [ %159, %158 ], [ %161, %160 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #8
  br label %170

163:                                              ; preds = %144, %.critedge
  %164 = landingpad { ptr, i32 }
          cleanup
  br label %167

165:                                              ; preds = %145
  %166 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #8
  br label %167

167:                                              ; preds = %165, %163
  %.pn56 = phi { ptr, i32 } [ %164, %163 ], [ %166, %165 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #8
  br label %170

168:                                              ; preds = %.critedge66
  %169 = landingpad { ptr, i32 }
          cleanup
  br label %170

170:                                              ; preds = %168, %167, %162
  %.pn58 = phi { ptr, i32 } [ %169, %168 ], [ %.pn56, %167 ], [ %.pn54, %162 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #8
  br label %171

171:                                              ; preds = %170, %156
  %.pn58.pn = phi { ptr, i32 } [ %.pn58, %170 ], [ %157, %156 ]
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #8
  br label %172

172:                                              ; preds = %171, %154, %152
  %.pn58.pn.pn = phi { ptr, i32 } [ %.pn58.pn, %171 ], [ %155, %154 ], [ %153, %152 ]
  call void @_ZN5Tools10wallet_rpc8TransferD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %11) #8
  call void @llvm.lifetime.end.p0(i64 184, ptr nonnull %11) #8
  br label %173

173:                                              ; preds = %172, %105
  %.pn58.pn.pn.pn = phi { ptr, i32 } [ %.pn58.pn.pn, %172 ], [ %106, %105 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  br label %174

174:                                              ; preds = %173, %103
  %.pn58.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn58.pn.pn.pn, %173 ], [ %104, %103 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #8
  br label %175

175:                                              ; preds = %174, %85
  %.pn58.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn58.pn.pn.pn.pn, %174 ], [ %86, %85 ]
  call void @_ZN7DynexCN23WalletLegacyTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(161) %7) #8
  call void @llvm.lifetime.end.p0(i64 168, ptr nonnull %7) #8
  br label %176

176:                                              ; preds = %76, %175, %53
  %.merged = phi { ptr, i32 } [ %.pn58.pn.pn.pn.pn.pn, %175 ], [ %54, %53 ], [ %.pn.pn70, %76 ]
  resume { ptr, i32 } %.merged

177:                                              ; preds = %76
  %178 = landingpad { ptr, i32 }
          catch ptr null
  %179 = extractvalue { ptr, i32 } %178, 0
  call void @__clang_call_terminate(ptr %179) #10
  unreachable

180:                                              ; preds = %68
  unreachable
}

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

; Function Attrs: nofree nosync nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #5

declare void @_ZN7DynexCN7JsonRpc12JsonRpcErrorC1EiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #7

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Common8podToHexIN5boost8optionalIN6Crypto9SecretKeyEEEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 1 dereferenceable(33)) local_unnamed_addr #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 void @_ZNSt6vectorIhSaIhEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3 align 2

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZSt3absl(i64 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare hidden ptr @"_ZSt8for_eachIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEZN5Tools17wallet_rpc_server16on_get_transfersERKN7DynexCN12EMPTY_STRUCTERNSA_10wallet_rpc25COMMAND_RPC_GET_TRANSFERS8responseEE3$_0ET0_T_SM_SL_"(ptr, ptr, ptr) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6CryptoneERKNS_4HashES2_(ptr noundef nonnull align 1 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(32)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN5boostneIN6Crypto9SecretKeyEEEbRKNS_8optionalIT_EERKS4_(ptr noundef nonnull align 1 dereferenceable(33), ptr noundef nonnull align 1 dereferenceable(32)) local_unnamed_addr #7

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5Tools10wallet_rpc8TransferD2Ev(ptr noundef nonnull align 8 dereferenceable(184)) unnamed_addr #4 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 = { 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 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 = { 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 = { nofree nosync nounwind memory(none) }
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 = { 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 #8 = { nounwind }
attributes #9 = { noreturn }
attributes #10 = { 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, !8, i64 248}
!6 = !{!"_ZTSN5Tools17wallet_rpc_serverE", !7, i64 0, !13, i64 208, !8, i64 248, !8, i64 256, !24, i64 264, !14, i64 272, !14, i64 304, !14, i64 336, !8, i64 368, !14, i64 376, !8, i64 408, !25, i64 416}
!7 = !{!"_ZTSN7DynexCN10HttpServerE", !8, i64 8, !11, i64 16, !13, i64 56, !17, i64 96, !19, i64 120, !14, i64 176}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSN6System12ContextGroupE", !8, i64 0, !12, i64 8}
!12 = !{!"_ZTSN6System18NativeContextGroupE", !8, i64 0, !8, i64 8, !8, i64 16, !8, i64 24}
!13 = !{!"_ZTSN7Logging9LoggerRefE", !8, i64 0, !14, i64 8}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !15, i64 0, !16, i64 8, !9, i64 16}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !8, i64 0}
!16 = !{!"long", !9, i64 0}
!17 = !{!"_ZTSN6System11TcpListenerE", !8, i64 0, !18, i64 8, !8, i64 16}
!18 = !{!"int", !9, i64 0}
!19 = !{!"_ZTSSt13unordered_setIPN6System13TcpConnectionESt4hashIS2_ESt8equal_toIS2_ESaIS2_EE", !20, i64 0}
!20 = !{!"_ZTSSt10_HashtableIPN6System13TcpConnectionES2_SaIS2_ENSt8__detail9_IdentityESt8equal_toIS2_ESt4hashIS2_ENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb1ELb1EEEE", !8, i64 0, !16, i64 8, !21, i64 16, !16, i64 24, !22, i64 32, !8, i64 48}
!21 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !8, i64 0}
!22 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !23, i64 0, !16, i64 8}
!23 = !{!"float", !9, i64 0}
!24 = !{!"short", !9, i64 0}
!25 = !{!"_ZTSN6System5EventE", !8, i64 0, !26, i64 8, !8, i64 16, !8, i64 24}
!26 = !{!"bool", !9, i64 0}
!27 = !{!28, !28, i64 0}
!28 = !{!"vtable pointer", !10, i64 0}
!29 = !{!6, !8, i64 256}
!30 = !{!31, !16, i64 16}
!31 = !{!"_ZTSN7DynexCN23WalletLegacyTransactionE", !16, i64 0, !16, i64 8, !16, i64 16, !16, i64 24, !16, i64 32, !16, i64 40, !32, i64 48, !33, i64 80, !26, i64 113, !18, i64 116, !16, i64 120, !14, i64 128, !36, i64 160}
!32 = !{!"_ZTSN6Crypto4HashE", !9, i64 0}
!33 = !{!"_ZTSN5boost8optionalIN6Crypto9SecretKeyEEE", !34, i64 0}
!34 = !{!"_ZTSN5boost15optional_detail13optional_baseIN6Crypto9SecretKeyEEE", !26, i64 0, !35, i64 1}
!35 = !{!"_ZTSN5boost15optional_detail15aligned_storageIN6Crypto9SecretKeyEEE", !9, i64 0}
!36 = !{!"_ZTSN7DynexCN28WalletLegacyTransactionStateE", !9, i64 0}
!37 = !{!31, !16, i64 0}
!38 = !{!31, !16, i64 120}
!39 = !{!40, !16, i64 0}
!40 = !{!"_ZTSN5Tools10wallet_rpc8TransferE", !16, i64 0, !26, i64 8, !14, i64 16, !16, i64 48, !16, i64 56, !14, i64 64, !14, i64 96, !16, i64 128, !16, i64 136, !16, i64 144, !14, i64 152}
!41 = !{!40, !26, i64 8}
!42 = !{!40, !16, i64 48}
!43 = !{!31, !16, i64 24}
!44 = !{!40, !16, i64 56}
!45 = !{!31, !18, i64 116}
!46 = !{!40, !16, i64 128}
!47 = !{!31, !16, i64 40}
!48 = !{!40, !16, i64 136}
!49 = !{!40, !16, i64 144}
!50 = distinct !{!50, !51}
!51 = !{!"llvm.loop.mustprogress"}


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