; 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] }
%"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.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] }
%"class.__gnu_cxx::__normal_iterator.113" = type { ptr }
%class.anon.112 = type { ptr }
%"struct.Tools::wallet_rpc::payment_details" = type { %"class.std::__cxx11::basic_string", i64, i64, i64 }
%"struct.Tools::wallet_rpc::COMMAND_RPC_GET_PAYMENTS::request" = type { %"class.std::__cxx11::basic_string" }
%"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 }
%"struct.Tools::wallet_rpc::COMMAND_RPC_GET_PAYMENTS::response" = type { %"class.std::__cxx11::list.114" }
%"class.std::__cxx11::list.114" = type { %"class.std::__cxx11::_List_base.115" }
%"class.std::__cxx11::_List_base.115" = type { %"struct.std::__cxx11::_List_base<Tools::wallet_rpc::payment_details, std::allocator<Tools::wallet_rpc::payment_details>>::_List_impl" }
%"struct.std::__cxx11::_List_base<Tools::wallet_rpc::payment_details, std::allocator<Tools::wallet_rpc::payment_details>>::_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 }

@_ZTIN7DynexCN7JsonRpc12JsonRpcErrorE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.51 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [28 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN5Tools17wallet_rpc_server15on_get_paymentsERKNS_10wallet_rpc24COMMAND_RPC_GET_PAYMENTS7requestERNS2_8responseE(ptr noundef nonnull align 8 dereferenceable(448) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"struct.Crypto::Hash", align 1
  %8 = alloca %"class.std::vector.47", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca i1, align 1
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::allocator", align 1
  %16 = alloca i1, align 1
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i32, align 4
  %20 = alloca %"struct.DynexCN::WalletLegacyTransaction", align 8
  %21 = alloca %"class.std::vector.47", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator.113", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator.113", align 8
  %24 = alloca %class.anon.112, align 8
  %25 = alloca %class.anon.112, align 8
  %26 = alloca %"struct.Crypto::Hash", align 1
  %27 = alloca %"struct.Tools::wallet_rpc::payment_details", align 8
  %28 = alloca %"class.std::__cxx11::basic_string", align 8
  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
  %29 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #7
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.Tools::wallet_rpc::COMMAND_RPC_GET_PAYMENTS::request", ptr %30, i32 0, i32 0
  %32 = invoke noundef zeroext i1 @_ZN6Common7fromHexERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIhSaIhEE(ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %33 unwind label %38

33:                                               ; preds = %3
  br i1 %32, label %54, label %34

34:                                               ; preds = %33
  store i1 true, ptr %13, align 1
  %35 = call ptr @__cxa_allocate_exception(i64 48) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef @.str.51, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %36 unwind label %42

36:                                               ; preds = %34
  invoke void @_ZN7DynexCN7JsonRpc12JsonRpcErrorC1EiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(48) %35, i32 noundef -5, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %37 unwind label %46

37:                                               ; preds = %36
  store i1 false, ptr %13, align 1
  invoke void @__cxa_throw(ptr %35, ptr @_ZTIN7DynexCN7JsonRpc12JsonRpcErrorE, ptr @_ZN7DynexCN7JsonRpc12JsonRpcErrorD2Ev) #8
          to label %201 unwind label %46

38:                                               ; preds = %3
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %9, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %10, align 4
  br label %195

42:                                               ; preds = %34
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %9, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %10, align 4
  br label %50

46:                                               ; preds = %37, %36
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %9, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %10, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  br label %50

50:                                               ; preds = %46, %42
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  %51 = load i1, ptr %13, align 1
  br i1 %51, label %52, label %53

52:                                               ; preds = %50
  call void @__cxa_free_exception(ptr %35) #7
  br label %53

53:                                               ; preds = %52, %50
  br label %195

54:                                               ; preds = %33
  %55 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %56 = icmp ne i64 32, %55
  br i1 %56, label %57, label %73

57:                                               ; preds = %54
  store i1 true, ptr %16, align 1
  %58 = call ptr @__cxa_allocate_exception(i64 48) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef @.str.52, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %59 unwind label %61

59:                                               ; preds = %57
  invoke void @_ZN7DynexCN7JsonRpc12JsonRpcErrorC1EiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(48) %58, i32 noundef -5, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %60 unwind label %65

60:                                               ; preds = %59
  store i1 false, ptr %16, align 1
  invoke void @__cxa_throw(ptr %58, ptr @_ZTIN7DynexCN7JsonRpc12JsonRpcErrorE, ptr @_ZN7DynexCN7JsonRpc12JsonRpcErrorD2Ev) #8
          to label %201 unwind label %65

61:                                               ; preds = %57
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %9, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %10, align 4
  br label %69

65:                                               ; preds = %60, %59
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %9, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %10, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  br label %69

69:                                               ; preds = %65, %61
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #7
  %70 = load i1, ptr %16, align 1
  br i1 %70, label %71, label %72

71:                                               ; preds = %69
  call void @__cxa_free_exception(ptr %58) #7
  br label %72

72:                                               ; preds = %71, %69
  br label %195

73:                                               ; preds = %54
  %74 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %7, ptr align 1 %74, i64 32, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %75 = getelementptr inbounds %"class.Tools::wallet_rpc_server", ptr %29, i32 0, i32 2
  %76 = load ptr, ptr %75, align 8, !tbaa !11
  %77 = load ptr, ptr %76, align 8, !tbaa !30
  %78 = getelementptr inbounds ptr, ptr %77, i64 18
  %79 = load ptr, ptr %78, align 8
  %80 = invoke noundef i64 %79(ptr noundef nonnull align 8 dereferenceable(8) %76)
          to label %81 unwind label %87

81:                                               ; preds = %73
  store i64 %80, ptr %17, align 8, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  store i64 0, ptr %18, align 8, !tbaa !32
  br label %82

82:                                               ; preds = %186, %81
  %83 = load i64, ptr %18, align 8, !tbaa !32
  %84 = load i64, ptr %17, align 8, !tbaa !32
  %85 = icmp ult i64 %83, %84
  br i1 %85, label %91, label %86

86:                                               ; preds = %82
  store i32 2, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %193

87:                                               ; preds = %73
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %9, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %10, align 4
  br label %194

91:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 168, ptr %20) #7
  invoke void @_ZN7DynexCN23WalletLegacyTransactionC2Ev(ptr noundef nonnull align 8 dereferenceable(161) %20)
          to label %92 unwind label %109

92:                                               ; preds = %91
  %93 = getelementptr inbounds %"class.Tools::wallet_rpc_server", ptr %29, i32 0, i32 2
  %94 = load ptr, ptr %93, align 8, !tbaa !11
  %95 = load i64, ptr %18, align 8, !tbaa !32
  %96 = load ptr, ptr %94, align 8, !tbaa !30
  %97 = getelementptr inbounds ptr, ptr %96, i64 24
  %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(161) %20)
          to label %100 unwind label %113

100:                                              ; preds = %92
  %101 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %20, i32 0, i32 13
  %102 = load i8, ptr %101, align 8, !tbaa !33
  %103 = icmp ne i8 %102, 0
  br i1 %103, label %108, label %104

104:                                              ; preds = %100
  %105 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %20, i32 0, i32 10
  %106 = load i32, ptr %105, align 4, !tbaa !40
  %107 = icmp eq i32 %106, -1
  br i1 %107, label %108, label %117

108:                                              ; preds = %104, %100
  store i32 4, ptr %19, align 4
  br label %183

109:                                              ; preds = %91
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %9, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %10, align 4
  br label %192

113:                                              ; preds = %92
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %9, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %10, align 4
  br label %191

117:                                              ; preds = %104
  %118 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %20, i32 0, i32 2
  %119 = load i64, ptr %118, align 8, !tbaa !41
  %120 = icmp slt i64 %119, 0
  br i1 %120, label %121, label %122

121:                                              ; preds = %117
  store i32 4, ptr %19, align 4
  br label %183

122:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #7
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #7
  %123 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %20, i32 0, i32 12
  %124 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %123) #7
  invoke void @_ZNSt6vectorIhSaIhEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %124)
          to label %125 unwind label %165

125:                                              ; preds = %122
  %126 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %20, i32 0, i32 12
  %127 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %126) #7
  %128 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.113", ptr %22, i32 0, i32 0
  store ptr %127, ptr %128, align 8
  %129 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %20, i32 0, i32 12
  %130 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %129) #7
  %131 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.113", ptr %23, i32 0, i32 0
  store ptr %130, ptr %131, align 8
  %132 = getelementptr inbounds %class.anon.112, ptr %24, i32 0, i32 0
  store ptr %21, ptr %132, align 8, !tbaa !5
  %133 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.113", ptr %22, i32 0, i32 0
  %134 = load ptr, ptr %133, align 8
  %135 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.113", ptr %23, i32 0, i32 0
  %136 = load ptr, ptr %135, align 8
  %137 = getelementptr inbounds %class.anon.112, ptr %24, i32 0, i32 0
  %138 = load ptr, ptr %137, align 8
  %139 = invoke ptr @"_ZSt8for_eachIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEZN5Tools17wallet_rpc_server15on_get_paymentsERKNSA_10wallet_rpc24COMMAND_RPC_GET_PAYMENTS7requestERNSD_8responseEE3$_0ET0_T_SL_SK_"(ptr %134, ptr %136, ptr %138)
          to label %140 unwind label %165

140:                                              ; preds = %125
  %141 = getelementptr inbounds %class.anon.112, ptr %25, i32 0, i32 0
  store ptr %139, ptr %141, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %26) #7
  %142 = invoke noundef zeroext i1 @_ZN7DynexCN23getPaymentIdFromTxExtraERKSt6vectorIhSaIhEERN6Crypto4HashE(ptr noundef nonnull align 8 dereferenceable(24) %21, ptr noundef nonnull align 1 dereferenceable(32) %26)
          to label %143 unwind label %169

143:                                              ; preds = %140
  br i1 %142, label %144, label %182

144:                                              ; preds = %143
  %145 = invoke noundef zeroext i1 @_ZN6CryptoeqERKNS_4HashES2_(ptr noundef nonnull align 1 dereferenceable(32) %26, ptr noundef nonnull align 1 dereferenceable(32) %7)
          to label %146 unwind label %169

146:                                              ; preds = %144
  br i1 %145, label %147, label %182

147:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 56, ptr %27) #7
  call void @_ZN5Tools10wallet_rpc15payment_detailsC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %27) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %28) #7
  %148 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %20, i32 0, i32 6
  invoke void @_ZN6Common8podToHexIN6Crypto4HashEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %28, ptr noundef nonnull align 1 dereferenceable(32) %148)
          to label %149 unwind label %173

149:                                              ; preds = %147
  %150 = getelementptr inbounds %"struct.Tools::wallet_rpc::payment_details", ptr %27, i32 0, i32 0
  %151 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %150, ptr noundef nonnull align 8 dereferenceable(32) %28) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %28) #7
  %152 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %20, i32 0, i32 2
  %153 = load i64, ptr %152, align 8, !tbaa !41
  %154 = getelementptr inbounds %"struct.Tools::wallet_rpc::payment_details", ptr %27, i32 0, i32 1
  store i64 %153, ptr %154, align 8, !tbaa !42
  %155 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %20, i32 0, i32 10
  %156 = load i32, ptr %155, align 4, !tbaa !40
  %157 = zext i32 %156 to i64
  %158 = getelementptr inbounds %"struct.Tools::wallet_rpc::payment_details", ptr %27, i32 0, i32 2
  store i64 %157, ptr %158, align 8, !tbaa !44
  %159 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %20, i32 0, i32 5
  %160 = load i64, ptr %159, align 8, !tbaa !45
  %161 = getelementptr inbounds %"struct.Tools::wallet_rpc::payment_details", ptr %27, i32 0, i32 3
  store i64 %160, ptr %161, align 8, !tbaa !46
  %162 = load ptr, ptr %6, align 8, !tbaa !5
  %163 = getelementptr inbounds %"struct.Tools::wallet_rpc::COMMAND_RPC_GET_PAYMENTS::response", ptr %162, i32 0, i32 0
  invoke void @_ZNSt7__cxx114listIN5Tools10wallet_rpc15payment_detailsESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %163, ptr noundef nonnull align 8 dereferenceable(56) %27)
          to label %164 unwind label %177

164:                                              ; preds = %149
  call void @_ZN5Tools10wallet_rpc15payment_detailsD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %27) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %27) #7
  br label %182

165:                                              ; preds = %125, %122
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %9, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %10, align 4
  br label %190

169:                                              ; preds = %144, %140
  %170 = landingpad { ptr, i32 }
          cleanup
  %171 = extractvalue { ptr, i32 } %170, 0
  store ptr %171, ptr %9, align 8
  %172 = extractvalue { ptr, i32 } %170, 1
  store i32 %172, ptr %10, align 4
  br label %189

173:                                              ; preds = %147
  %174 = landingpad { ptr, i32 }
          cleanup
  %175 = extractvalue { ptr, i32 } %174, 0
  store ptr %175, ptr %9, align 8
  %176 = extractvalue { ptr, i32 } %174, 1
  store i32 %176, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %28) #7
  br label %181

177:                                              ; preds = %149
  %178 = landingpad { ptr, i32 }
          cleanup
  %179 = extractvalue { ptr, i32 } %178, 0
  store ptr %179, ptr %9, align 8
  %180 = extractvalue { ptr, i32 } %178, 1
  store i32 %180, ptr %10, align 4
  br label %181

181:                                              ; preds = %177, %173
  call void @_ZN5Tools10wallet_rpc15payment_detailsD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %27) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %27) #7
  br label %189

182:                                              ; preds = %164, %146, %143
  call void @llvm.lifetime.end.p0(i64 32, ptr %26) #7
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #7
  store i32 0, ptr %19, align 4
  br label %183

183:                                              ; preds = %182, %121, %108
  call void @_ZN7DynexCN23WalletLegacyTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(161) %20) #7
  call void @llvm.lifetime.end.p0(i64 168, ptr %20) #7
  %184 = load i32, ptr %19, align 4
  switch i32 %184, label %201 [
    i32 0, label %185
    i32 4, label %186
  ]

185:                                              ; preds = %183
  br label %186

186:                                              ; preds = %185, %183
  %187 = load i64, ptr %18, align 8, !tbaa !32
  %188 = add i64 %187, 1
  store i64 %188, ptr %18, align 8, !tbaa !32
  br label %82, !llvm.loop !47

189:                                              ; preds = %181, %169
  call void @llvm.lifetime.end.p0(i64 32, ptr %26) #7
  br label %190

190:                                              ; preds = %189, %165
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #7
  br label %191

191:                                              ; preds = %190, %113
  call void @_ZN7DynexCN23WalletLegacyTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(161) %20) #7
  br label %192

192:                                              ; preds = %191, %109
  call void @llvm.lifetime.end.p0(i64 168, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %194

193:                                              ; preds = %86
  store i32 1, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #7
  ret i1 true

194:                                              ; preds = %192, %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %195

195:                                              ; preds = %194, %72, %53, %38
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #7
  br label %196

196:                                              ; preds = %195
  %197 = load ptr, ptr %9, align 8
  %198 = load i32, ptr %10, align 4
  %199 = insertvalue { ptr, i32 } poison, ptr %197, 0
  %200 = insertvalue { ptr, i32 } %199, i32 %198, 1
  resume { ptr, i32 } %200

201:                                              ; preds = %183, %60, %37
  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)

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7DynexCN23WalletLegacyTransactionC2Ev(ptr noundef nonnull align 8 dereferenceable(161)) unnamed_addr #6 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)) #3

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

declare noundef zeroext i1 @_ZN6Common7fromHexERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIhSaIhEE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24)) #5

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden ptr @"_ZSt8for_eachIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEZN5Tools17wallet_rpc_server15on_get_paymentsERKNSA_10wallet_rpc24COMMAND_RPC_GET_PAYMENTS7requestERNSD_8responseEE3$_0ET0_T_SL_SK_"(ptr, ptr, ptr) #3

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

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

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

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

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

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

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

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

!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 = !{i64 0, i64 32, !10}
!10 = !{!7, !7, i64 0}
!11 = !{!12, !6, i64 248}
!12 = !{!"_ZTSN5Tools17wallet_rpc_serverE", !13, i64 0, !16, i64 208, !6, i64 248, !6, i64 256, !27, i64 264, !17, i64 272, !17, i64 304, !17, i64 336, !6, i64 368, !17, i64 376, !6, i64 408, !28, i64 416}
!13 = !{!"_ZTSN7DynexCN10HttpServerE", !6, i64 8, !14, i64 16, !16, i64 56, !20, i64 96, !22, i64 120, !17, i64 176}
!14 = !{!"_ZTSN6System12ContextGroupE", !6, i64 0, !15, i64 8}
!15 = !{!"_ZTSN6System18NativeContextGroupE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!16 = !{!"_ZTSN7Logging9LoggerRefE", !6, i64 0, !17, i64 8}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !18, i64 0, !19, i64 8, !7, i64 16}
!18 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!"_ZTSN6System11TcpListenerE", !6, i64 0, !21, i64 8, !6, i64 16}
!21 = !{!"int", !7, i64 0}
!22 = !{!"_ZTSSt13unordered_setIPN6System13TcpConnectionESt4hashIS2_ESt8equal_toIS2_ESaIS2_EE", !23, i64 0}
!23 = !{!"_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, !19, i64 8, !24, i64 16, !19, i64 24, !25, i64 32, !6, i64 48}
!24 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!25 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !26, i64 0, !19, i64 8}
!26 = !{!"float", !7, i64 0}
!27 = !{!"short", !7, i64 0}
!28 = !{!"_ZTSN6System5EventE", !6, i64 0, !29, i64 8, !6, i64 16, !6, i64 24}
!29 = !{!"bool", !7, i64 0}
!30 = !{!31, !31, i64 0}
!31 = !{!"vtable pointer", !8, i64 0}
!32 = !{!19, !19, i64 0}
!33 = !{!34, !39, i64 160}
!34 = !{!"_ZTSN7DynexCN23WalletLegacyTransactionE", !19, i64 0, !19, i64 8, !19, i64 16, !19, i64 24, !19, i64 32, !19, i64 40, !35, i64 48, !36, i64 80, !29, i64 113, !21, i64 116, !19, i64 120, !17, i64 128, !39, i64 160}
!35 = !{!"_ZTSN6Crypto4HashE", !7, i64 0}
!36 = !{!"_ZTSN5boost8optionalIN6Crypto9SecretKeyEEE", !37, i64 0}
!37 = !{!"_ZTSN5boost15optional_detail13optional_baseIN6Crypto9SecretKeyEEE", !29, i64 0, !38, i64 1}
!38 = !{!"_ZTSN5boost15optional_detail15aligned_storageIN6Crypto9SecretKeyEEE", !7, i64 0}
!39 = !{!"_ZTSN7DynexCN28WalletLegacyTransactionStateE", !7, i64 0}
!40 = !{!34, !21, i64 116}
!41 = !{!34, !19, i64 16}
!42 = !{!43, !19, i64 32}
!43 = !{!"_ZTSN5Tools10wallet_rpc15payment_detailsE", !17, i64 0, !19, i64 32, !19, i64 40, !19, i64 48}
!44 = !{!43, !19, i64 40}
!45 = !{!34, !19, i64 40}
!46 = !{!43, !19, i64 48}
!47 = distinct !{!47, !48}
!48 = !{!"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] }
%"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.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.Tools::wallet_rpc::payment_details" = type { %"class.std::__cxx11::basic_string", i64, i64, i64 }

@_ZTIN7DynexCN7JsonRpc12JsonRpcErrorE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.51 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [28 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN5Tools17wallet_rpc_server15on_get_paymentsERKNS_10wallet_rpc24COMMAND_RPC_GET_PAYMENTS7requestERNS2_8responseE(ptr nocapture noundef nonnull readonly align 8 dereferenceable(448) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"struct.Crypto::Hash", align 1
  %5 = alloca %"class.std::vector.47", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca %"struct.DynexCN::WalletLegacyTransaction", align 8
  %11 = alloca %"class.std::vector.47", align 8
  %12 = alloca %"struct.Crypto::Hash", align 1
  %13 = alloca %"struct.Tools::wallet_rpc::payment_details", align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #7
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %15 = invoke noundef zeroext i1 @_ZN6Common7fromHexERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIhSaIhEE(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %16 unwind label %21

16:                                               ; preds = %3
  br i1 %15, label %27, label %17

17:                                               ; preds = %16
  %18 = call ptr @__cxa_allocate_exception(i64 48) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.51, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %19 unwind label %.thread

19:                                               ; preds = %17
  invoke void @_ZN7DynexCN7JsonRpc12JsonRpcErrorC1EiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(48) %18, i32 noundef -5, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %20 unwind label %24

20:                                               ; preds = %19
  invoke void @__cxa_throw(ptr nonnull %18, ptr nonnull @_ZTIN7DynexCN7JsonRpc12JsonRpcErrorE, ptr nonnull @_ZN7DynexCN7JsonRpc12JsonRpcErrorD2Ev) #8
          to label %110 unwind label %24

21:                                               ; preds = %3
  %22 = landingpad { ptr, i32 }
          cleanup
  br label %109

.thread:                                          ; preds = %17
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  br label %26

24:                                               ; preds = %19, %20
  %.024 = phi i1 [ false, %20 ], [ true, %19 ]
  %25 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  br i1 %.024, label %26, label %109

26:                                               ; preds = %.thread, %24
  %.pn42 = phi { ptr, i32 } [ %23, %.thread ], [ %25, %24 ]
  call void @__cxa_free_exception(ptr %18) #7
  br label %109

27:                                               ; preds = %16
  %28 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %.not = icmp eq i64 %28, 32
  br i1 %.not, label %37, label %29

29:                                               ; preds = %27
  %30 = call ptr @__cxa_allocate_exception(i64 48) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str.52, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %31 unwind label %.thread43

31:                                               ; preds = %29
  invoke void @_ZN7DynexCN7JsonRpc12JsonRpcErrorC1EiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(48) %30, i32 noundef -5, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %32 unwind label %34

32:                                               ; preds = %31
  invoke void @__cxa_throw(ptr nonnull %30, ptr nonnull @_ZTIN7DynexCN7JsonRpc12JsonRpcErrorE, ptr nonnull @_ZN7DynexCN7JsonRpc12JsonRpcErrorD2Ev) #8
          to label %110 unwind label %34

.thread43:                                        ; preds = %29
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  br label %36

34:                                               ; preds = %31, %32
  %.026 = phi i1 [ false, %32 ], [ true, %31 ]
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  br i1 %.026, label %36, label %109

36:                                               ; preds = %.thread43, %34
  %.pn3746 = phi { ptr, i32 } [ %33, %.thread43 ], [ %35, %34 ]
  call void @__cxa_free_exception(ptr %30) #7
  br label %109

37:                                               ; preds = %27
  %38 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(32) %4, ptr noundef nonnull align 1 dereferenceable(32) %38, i64 32, i1 false), !tbaa.struct !5
  %39 = getelementptr inbounds i8, ptr %0, i64 248
  %40 = load ptr, ptr %39, align 8, !tbaa !9
  %41 = load ptr, ptr %40, align 8, !tbaa !29
  %42 = getelementptr inbounds i8, ptr %41, i64 144
  %43 = load ptr, ptr %42, align 8
  %44 = invoke noundef i64 %43(ptr noundef nonnull align 8 dereferenceable(8) %40)
          to label %.preheader unwind label %54

.preheader:                                       ; preds = %37
  %.not50 = icmp eq i64 %44, 0
  br i1 %.not50, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %45 = getelementptr inbounds i8, ptr %10, i64 160
  %46 = getelementptr inbounds i8, ptr %10, i64 116
  %47 = getelementptr inbounds i8, ptr %10, i64 16
  %48 = getelementptr inbounds i8, ptr %10, i64 128
  %49 = getelementptr inbounds i8, ptr %10, i64 48
  %50 = getelementptr inbounds i8, ptr %13, i64 32
  %51 = getelementptr inbounds i8, ptr %13, i64 40
  %52 = getelementptr inbounds i8, ptr %10, i64 40
  %53 = getelementptr inbounds i8, ptr %13, i64 48
  br label %56

._crit_edge:                                      ; preds = %103, %.preheader
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  ret i1 true

54:                                               ; preds = %37
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %109

56:                                               ; preds = %.lr.ph, %103
  %.02847 = phi i64 [ 0, %.lr.ph ], [ %104, %103 ]
  call void @llvm.lifetime.start.p0(i64 168, ptr nonnull %10) #7
  invoke void @_ZN7DynexCN23WalletLegacyTransactionC2Ev(ptr noundef nonnull align 8 dereferenceable(161) %10)
          to label %57 unwind label %70

57:                                               ; preds = %56
  %58 = load ptr, ptr %39, align 8, !tbaa !9
  %59 = load ptr, ptr %58, align 8, !tbaa !29
  %60 = getelementptr inbounds i8, ptr %59, i64 192
  %61 = load ptr, ptr %60, align 8
  %62 = invoke noundef zeroext i1 %61(ptr noundef nonnull align 8 dereferenceable(8) %58, i64 noundef %.02847, ptr noundef nonnull align 8 dereferenceable(161) %10)
          to label %63 unwind label %72

63:                                               ; preds = %57
  %64 = load i8, ptr %45, align 8, !tbaa !31
  %65 = icmp ne i8 %64, 0
  %66 = load i32, ptr %46, align 4
  %67 = icmp eq i32 %66, -1
  %or.cond = select i1 %65, i1 true, i1 %67
  %68 = load i64, ptr %47, align 8
  %69 = icmp slt i64 %68, 0
  %or.cond49 = select i1 %or.cond, i1 true, i1 %69
  br i1 %or.cond49, label %103, label %74

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

72:                                               ; preds = %57
  %73 = landingpad { ptr, i32 }
          cleanup
  br label %107

74:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #7
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  %75 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %48) #7
  invoke void @_ZNSt6vectorIhSaIhEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %75)
          to label %76 unwind label %93

76:                                               ; preds = %74
  %77 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %48) #7
  %78 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %48) #7
  %79 = invoke ptr @"_ZSt8for_eachIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEZN5Tools17wallet_rpc_server15on_get_paymentsERKNSA_10wallet_rpc24COMMAND_RPC_GET_PAYMENTS7requestERNSD_8responseEE3$_0ET0_T_SL_SK_"(ptr %77, ptr %78, ptr nonnull %11)
          to label %80 unwind label %93

80:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #7
  %81 = invoke noundef zeroext i1 @_ZN7DynexCN23getPaymentIdFromTxExtraERKSt6vectorIhSaIhEERN6Crypto4HashE(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 1 dereferenceable(32) %12)
          to label %82 unwind label %95

82:                                               ; preds = %80
  br i1 %81, label %83, label %102

83:                                               ; preds = %82
  %84 = call noundef zeroext i1 @_ZN6CryptoeqERKNS_4HashES2_(ptr noundef nonnull align 1 dereferenceable(32) %12, ptr noundef nonnull align 1 dereferenceable(32) %4)
  br i1 %84, label %85, label %102

85:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %13) #7
  call void @_ZN5Tools10wallet_rpc15payment_detailsC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #7
  invoke void @_ZN6Common8podToHexIN6Crypto4HashEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %14, ptr noundef nonnull align 1 dereferenceable(32) %49)
          to label %86 unwind label %97

86:                                               ; preds = %85
  %87 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #7
  %88 = load i64, ptr %47, align 8, !tbaa !38
  store i64 %88, ptr %50, align 8, !tbaa !39
  %89 = load i32, ptr %46, align 4, !tbaa !41
  %90 = zext i32 %89 to i64
  store i64 %90, ptr %51, align 8, !tbaa !42
  %91 = load i64, ptr %52, align 8, !tbaa !43
  store i64 %91, ptr %53, align 8, !tbaa !44
  invoke void @_ZNSt7__cxx114listIN5Tools10wallet_rpc15payment_detailsESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(56) %13)
          to label %92 unwind label %99

92:                                               ; preds = %86
  call void @_ZN5Tools10wallet_rpc15payment_detailsD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %13) #7
  br label %102

93:                                               ; preds = %76, %74
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %106

95:                                               ; preds = %80
  %96 = landingpad { ptr, i32 }
          cleanup
  br label %105

97:                                               ; preds = %85
  %98 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #7
  br label %101

99:                                               ; preds = %86
  %100 = landingpad { ptr, i32 }
          cleanup
  br label %101

101:                                              ; preds = %99, %97
  %.pn30 = phi { ptr, i32 } [ %100, %99 ], [ %98, %97 ]
  call void @_ZN5Tools10wallet_rpc15payment_detailsD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %13) #7
  br label %105

102:                                              ; preds = %92, %83, %82
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #7
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #7
  br label %103

103:                                              ; preds = %63, %102
  call void @_ZN7DynexCN23WalletLegacyTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(161) %10) #7
  call void @llvm.lifetime.end.p0(i64 168, ptr nonnull %10) #7
  %104 = add nuw i64 %.02847, 1
  %exitcond.not = icmp eq i64 %104, %44
  br i1 %exitcond.not, label %._crit_edge, label %56, !llvm.loop !45

105:                                              ; preds = %101, %95
  %.pn30.pn = phi { ptr, i32 } [ %.pn30, %101 ], [ %96, %95 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #7
  br label %106

106:                                              ; preds = %105, %93
  %.pn30.pn.pn = phi { ptr, i32 } [ %.pn30.pn, %105 ], [ %94, %93 ]
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #7
  br label %107

107:                                              ; preds = %106, %72
  %.pn30.pn.pn.pn = phi { ptr, i32 } [ %.pn30.pn.pn, %106 ], [ %73, %72 ]
  call void @_ZN7DynexCN23WalletLegacyTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(161) %10) #7
  br label %108

108:                                              ; preds = %107, %70
  %.pn30.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn30.pn.pn.pn, %107 ], [ %71, %70 ]
  call void @llvm.lifetime.end.p0(i64 168, ptr nonnull %10) #7
  br label %109

109:                                              ; preds = %54, %108, %34, %36, %24, %26, %21
  %.pn37.pn = phi { ptr, i32 } [ %.pn3746, %36 ], [ %35, %34 ], [ %.pn42, %26 ], [ %25, %24 ], [ %22, %21 ], [ %.pn30.pn.pn.pn.pn, %108 ], [ %55, %54 ]
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  resume { ptr, i32 } %.pn37.pn

110:                                              ; preds = %32, %20
  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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7DynexCN23WalletLegacyTransactionC2Ev(ptr noundef nonnull align 8 dereferenceable(161)) unnamed_addr #6 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 #3

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

declare noundef zeroext i1 @_ZN6Common7fromHexERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIhSaIhEE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden ptr @"_ZSt8for_eachIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEZN5Tools17wallet_rpc_server15on_get_paymentsERKNSA_10wallet_rpc24COMMAND_RPC_GET_PAYMENTS7requestERNSD_8responseEE3$_0ET0_T_SL_SK_"(ptr, ptr, ptr) local_unnamed_addr #3

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

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

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

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

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

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

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

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

!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 = !{i64 0, i64 32, !6}
!6 = !{!7, !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 248}
!10 = !{!"_ZTSN5Tools17wallet_rpc_serverE", !11, i64 0, !15, i64 208, !12, i64 248, !12, i64 256, !26, i64 264, !16, i64 272, !16, i64 304, !16, i64 336, !12, i64 368, !16, i64 376, !12, i64 408, !27, i64 416}
!11 = !{!"_ZTSN7DynexCN10HttpServerE", !12, i64 8, !13, i64 16, !15, i64 56, !19, i64 96, !21, i64 120, !16, i64 176}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"_ZTSN6System12ContextGroupE", !12, i64 0, !14, i64 8}
!14 = !{!"_ZTSN6System18NativeContextGroupE", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!15 = !{!"_ZTSN7Logging9LoggerRefE", !12, i64 0, !16, i64 8}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !17, i64 0, !18, i64 8, !7, i64 16}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !12, i64 0}
!18 = !{!"long", !7, i64 0}
!19 = !{!"_ZTSN6System11TcpListenerE", !12, i64 0, !20, i64 8, !12, i64 16}
!20 = !{!"int", !7, i64 0}
!21 = !{!"_ZTSSt13unordered_setIPN6System13TcpConnectionESt4hashIS2_ESt8equal_toIS2_ESaIS2_EE", !22, i64 0}
!22 = !{!"_ZTSSt10_HashtableIPN6System13TcpConnectionES2_SaIS2_ENSt8__detail9_IdentityESt8equal_toIS2_ESt4hashIS2_ENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb1ELb1EEEE", !12, i64 0, !18, i64 8, !23, i64 16, !18, i64 24, !24, i64 32, !12, i64 48}
!23 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !12, i64 0}
!24 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !25, i64 0, !18, i64 8}
!25 = !{!"float", !7, i64 0}
!26 = !{!"short", !7, i64 0}
!27 = !{!"_ZTSN6System5EventE", !12, i64 0, !28, i64 8, !12, i64 16, !12, i64 24}
!28 = !{!"bool", !7, i64 0}
!29 = !{!30, !30, i64 0}
!30 = !{!"vtable pointer", !8, i64 0}
!31 = !{!32, !37, i64 160}
!32 = !{!"_ZTSN7DynexCN23WalletLegacyTransactionE", !18, i64 0, !18, i64 8, !18, i64 16, !18, i64 24, !18, i64 32, !18, i64 40, !33, i64 48, !34, i64 80, !28, i64 113, !20, i64 116, !18, i64 120, !16, i64 128, !37, i64 160}
!33 = !{!"_ZTSN6Crypto4HashE", !7, i64 0}
!34 = !{!"_ZTSN5boost8optionalIN6Crypto9SecretKeyEEE", !35, i64 0}
!35 = !{!"_ZTSN5boost15optional_detail13optional_baseIN6Crypto9SecretKeyEEE", !28, i64 0, !36, i64 1}
!36 = !{!"_ZTSN5boost15optional_detail15aligned_storageIN6Crypto9SecretKeyEEE", !7, i64 0}
!37 = !{!"_ZTSN7DynexCN28WalletLegacyTransactionStateE", !7, i64 0}
!38 = !{!32, !18, i64 16}
!39 = !{!40, !18, i64 32}
!40 = !{!"_ZTSN5Tools10wallet_rpc15payment_detailsE", !16, i64 0, !18, i64 32, !18, i64 40, !18, i64 48}
!41 = !{!32, !20, i64 116}
!42 = !{!40, !18, i64 40}
!43 = !{!32, !18, i64 40}
!44 = !{!40, !18, i64 48}
!45 = distinct !{!45, !46}
!46 = !{!"llvm.loop.mustprogress"}


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