_ZN5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EEC2Ev:
   63|  8.48k|      AlignmentBuffer() : m_position(0) {}
_ZN5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE5clearEv:
   72|   161k|      void clear() {
   73|   161k|         clear_mem(m_buffer.data(), m_buffer.size());
   74|   161k|         m_position = 0;
   75|   161k|      }
_ZN5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EED2Ev:
   65|  8.48k|      ~AlignmentBuffer() { secure_scrub_memory(m_buffer.data(), m_buffer.size()); }
_ZN5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE21handle_unaligned_dataERNS_12BufferSlicerE:
  167|   313k|      [[nodiscard]] std::optional<std::span<const T>> handle_unaligned_data(BufferSlicer& slicer) {
  168|       |         // When the final block is to be deferred, we would need to store and
  169|       |         // hold a buffer that contains exactly one block until more data is
  170|       |         // passed or it is explicitly consumed.
  171|   313k|         const size_t defer = (defers_final_block()) ? 1 : 0;
  ------------------
  |  Branch (171:31): [True: 0, False: 313k]
  ------------------
  172|       |
  173|   313k|         if(in_alignment() && slicer.remaining() >= m_buffer.size() + defer) {
  ------------------
  |  Branch (173:13): [True: 271k, False: 42.4k]
  |  Branch (173:31): [True: 152k, False: 118k]
  ------------------
  174|       |            // We are currently in alignment and the passed-in data source
  175|       |            // contains enough data to benefit from aligned processing.
  176|       |            // Therefore, we don't copy anything into the intermittent buffer.
  177|   152k|            return std::nullopt;
  178|   152k|         }
  179|       |
  180|       |         // Fill the buffer with as much input data as needed to reach alignment
  181|       |         // or until the input source is depleted.
  182|   161k|         const auto elements_to_consume = std::min(m_buffer.size() - m_position, slicer.remaining());
  183|   161k|         append(slicer.take(elements_to_consume));
  184|       |
  185|       |         // If we collected enough data, we push out one full block. When
  186|       |         // deferring the final block is enabled, we additionally check that
  187|       |         // more input data is available to continue processing a consecutive
  188|       |         // block.
  189|   161k|         if(ready_to_consume() && (!defers_final_block() || !slicer.empty())) {
  ------------------
  |  Branch (189:13): [True: 0, False: 161k]
  |  Branch (189:36): [True: 0, False: 0]
  |  Branch (189:61): [True: 0, False: 0]
  ------------------
  190|      0|            return consume();
  191|   161k|         } else {
  192|   161k|            return std::nullopt;
  193|   161k|         }
  194|   161k|      }
_ZNK5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE18defers_final_blockEv:
  234|   466k|      constexpr bool defers_final_block() const {
  235|   466k|         return FINAL_BLOCK_STRATEGY == AlignmentBufferFinalBlock::must_be_deferred;
  236|   466k|      }
_ZN5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE6appendENSt3__14spanIKhLm18446744073709551615EEE:
   91|   279k|      void append(std::span<const T> elements) {
   92|   279k|         BOTAN_ASSERT_NOMSG(elements.size() <= elements_until_alignment());
  ------------------
  |  |   60|   279k|   do {                                                                     \
  |  |   61|   279k|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 279k]
  |  |  ------------------
  |  |   62|   279k|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|   279k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded, False: 279k]
  |  |  ------------------
  ------------------
   93|   279k|         std::copy(elements.begin(), elements.end(), m_buffer.begin() + m_position);
   94|   279k|         m_position += elements.size();
   95|   279k|      }
_ZNK5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE24elements_until_alignmentEv:
  222|   636k|      size_t elements_until_alignment() const { return m_buffer.size() - m_position; }
_ZNK5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE16ready_to_consumeEv:
  232|   517k|      bool ready_to_consume() const { return m_position == m_buffer.size(); }
_ZN5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE7consumeEv:
  201|   118k|      [[nodiscard]] std::span<const T> consume() {
  202|   118k|         BOTAN_ASSERT_NOMSG(ready_to_consume());
  ------------------
  |  |   60|   118k|   do {                                                                     \
  |  |   61|   118k|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 118k]
  |  |  ------------------
  |  |   62|   118k|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|   118k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded, False: 118k]
  |  |  ------------------
  ------------------
  203|   118k|         m_position = 0;
  204|   118k|         return m_buffer;
  205|   118k|      }
_ZNK5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE12in_alignmentEv:
  227|   780k|      bool in_alignment() const { return m_position == 0; }
_ZNK5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE23aligned_data_to_processERNS_12BufferSlicerE:
  127|   152k|      [[nodiscard]] std::tuple<std::span<const uint8_t>, size_t> aligned_data_to_process(BufferSlicer& slicer) const {
  128|   152k|         BOTAN_ASSERT_NOMSG(in_alignment());
  ------------------
  |  |   60|   152k|   do {                                                                     \
  |  |   61|   152k|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 152k]
  |  |  ------------------
  |  |   62|   152k|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|   152k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded, False: 152k]
  |  |  ------------------
  ------------------
  129|       |
  130|       |         // When the final block is to be deferred, the last block must not be
  131|       |         // selected for processing if there is no (unaligned) extra input data.
  132|   152k|         const size_t defer = (defers_final_block()) ? 1 : 0;
  ------------------
  |  Branch (132:31): [True: 0, False: 152k]
  ------------------
  133|   152k|         const size_t full_blocks_to_process = (slicer.remaining() - defer) / m_buffer.size();
  134|   152k|         return {slicer.take(full_blocks_to_process * m_buffer.size()), full_blocks_to_process};
  135|   152k|      }
_ZN5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE18fill_up_with_zerosEv:
   80|   118k|      void fill_up_with_zeros() {
   81|   118k|         if(!ready_to_consume()) {
  ------------------
  |  Branch (81:13): [True: 118k, False: 0]
  ------------------
   82|   118k|            clear_mem(&m_buffer[m_position], elements_until_alignment());
   83|   118k|            m_position = m_buffer.size();
   84|   118k|         }
   85|   118k|      }
_ZN5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE20directly_modify_lastEm:
  114|   118k|      std::span<T> directly_modify_last(size_t elements) {
  115|   118k|         BOTAN_ASSERT_NOMSG(size() >= elements);
  ------------------
  |  |   60|   118k|   do {                                                                     \
  |  |   61|   118k|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 118k]
  |  |  ------------------
  |  |   62|   118k|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|   118k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded, False: 118k]
  |  |  ------------------
  ------------------
  116|   118k|         return std::span(m_buffer).last(elements);
  117|   118k|      }
_ZNK5Botan15AlignmentBufferIhLm128ELNS_25AlignmentBufferFinalBlockE0EE4sizeEv:
  218|   118k|      constexpr size_t size() const { return m_buffer.size(); }

_ZN5Botan14expand_top_bitImEET_S1_Qsr3std11is_integralIS1_EE5value:
   25|  8.68M|{
   26|  8.68M|   return static_cast<T>(0) - (a >> (sizeof(T) * 8 - 1));
   27|  8.68M|}
_ZN5Botan6chooseImEET_S1_S1_S1_:
  180|  47.7M|inline constexpr T choose(T mask, T a, T b) {
  181|       |   //return (mask & a) | (~mask & b);
  182|  47.7M|   return (b ^ (mask & (a ^ b)));
  183|  47.7M|}
_ZN5Botan8majorityImEET_S1_S1_S1_:
  186|  21.7M|inline constexpr T majority(T a, T b, T c) {
  187|       |   /*
  188|       |   Considering each bit of a, b, c individually
  189|       |
  190|       |   If a xor b is set, then c is the deciding vote.
  191|       |
  192|       |   If a xor b is not set then either a and b are both set or both unset.
  193|       |   In either case the value of c doesn't matter, and examining b (or a)
  194|       |   allows us to determine which case we are in.
  195|       |   */
  196|  21.7M|   return choose(a ^ b, c, b);
  197|  21.7M|}

_ZN5Botan13reverse_bytesEm:
   50|  5.41M|inline constexpr uint64_t reverse_bytes(uint64_t x) {
   51|  5.41M|#if BOTAN_COMPILER_HAS_BUILTIN(__builtin_bswap64)
   52|  5.41M|   return __builtin_bswap64(x);
   53|       |#else
   54|       |   uint32_t hi = static_cast<uint32_t>(x >> 32);
   55|       |   uint32_t lo = static_cast<uint32_t>(x);
   56|       |
   57|       |   hi = reverse_bytes(hi);
   58|       |   lo = reverse_bytes(lo);
   59|       |
   60|       |   return (static_cast<uint64_t>(lo) << 32) | hi;
   61|       |#endif
   62|  5.41M|}

_ZN5Botan5CRC245clearEv:
   31|  44.6k|      void clear() override { m_crc = 0XCE04B7L; }
_ZNK5Botan5CRC2413output_lengthEv:
   25|  14.0k|      size_t output_length() const override { return 3; }
_ZN5Botan5CRC24D2Ev:
   35|  15.3k|      ~CRC24() override { clear(); }
_ZN5Botan5CRC24C2Ev:
   33|  15.3k|      CRC24() { clear(); }

_ZNK5Botan2CT4MaskImE5valueEv:
  283|  8.68M|      constexpr T value() const { return m_mask; }
_ZNK5Botan2CT4MaskImEcoEv:
  219|  4.34M|      constexpr Mask<T> operator~() const { return Mask<T>(~value()); }
_ZNK5Botan2CT4MaskImE6selectEmm:
  234|  4.34M|      constexpr T select(T x, T y) const { return choose(value(), x, y); }
_ZN5Botan2CT4MaskImE6is_lteEmm:
  149|  4.34M|      static constexpr Mask<T> is_lte(T x, T y) { return ~Mask<T>::is_gt(x, y); }
_ZN5Botan2CT4MaskImE5is_gtEmm:
  144|  4.34M|      static constexpr Mask<T> is_gt(T x, T y) { return Mask<T>::is_lt(y, x); }
_ZN5Botan2CT4MaskImEC2Em:
  286|  13.0M|      constexpr Mask(T m) : m_mask(m) {}
_ZN5Botan2CT4MaskImE5is_ltEmm:
  139|  8.68M|      static constexpr Mask<T> is_lt(T x, T y) { return Mask<T>(expand_top_bit<T>(x ^ ((x ^ y) | ((x - y) ^ x)))); }
_ZNK5Botan2CT4MaskImE13if_set_returnEm:
  224|  4.34M|      constexpr T if_set_return(T x) const { return m_mask & x; }

_ZN5Botan8FE_25519C2ESt16initializer_listIiE:
   37|  1.53k|      FE_25519(std::initializer_list<int32_t> x) {
   38|  1.53k|         if(x.size() != 10) {
  ------------------
  |  Branch (38:13): [True: 0, False: 1.53k]
  ------------------
   39|      0|            throw Invalid_Argument("Invalid FE_25519 initializer list");
   40|      0|         }
   41|  1.53k|         copy_mem(m_fe, x.begin(), 10);
   42|  1.53k|      }

_ZN16botan_rng_structC2ENSt3__110unique_ptrIN5Botan21RandomNumberGeneratorENS0_14default_deleteIS3_EEEE:
   53|  4.24k|         explicit NAME(std::unique_ptr<TYPE> x) : botan_struct(std::move(x)) {} \
_ZNK9Botan_FFI12botan_structIN5Botan21RandomNumberGeneratorELj1224866241EE8magic_okEv:
   42|  4.24k|      bool magic_ok() const { return (m_magic == MAGIC); }
_ZN9Botan_FFI12botan_structIN5Botan21RandomNumberGeneratorELj1224866241EEC2ENSt3__110unique_ptrIS2_NS4_14default_deleteIS2_EEEE:
   35|  4.24k|      botan_struct(std::unique_ptr<T> obj) : m_magic(MAGIC), m_obj(std::move(obj)) {}
_ZN9Botan_FFI12botan_structIN5Botan21RandomNumberGeneratorELj1224866241EED2Ev:
   37|  4.24k|      virtual ~botan_struct() {
   38|  4.24k|         m_magic = 0;
   39|  4.24k|         m_obj.reset();
   40|  4.24k|      }
_ZN9Botan_FFI17ffi_delete_objectIN5Botan21RandomNumberGeneratorELj1224866241EEEiPNS_12botan_structIT_XT0_EEEPKc:
  127|  4.24k|int ffi_delete_object(botan_struct<T, M>* obj, const char* func_name) {
  128|  4.24k|   return ffi_guard_thunk(func_name, [=]() -> int {
  129|       |      // ignore delete of null objects
  130|  4.24k|      if(obj == nullptr) {
  131|  4.24k|         return BOTAN_FFI_SUCCESS;
  132|  4.24k|      }
  133|       |
  134|  4.24k|      if(obj->magic_ok() == false) {
  135|  4.24k|         return BOTAN_FFI_ERROR_INVALID_OBJECT;
  136|  4.24k|      }
  137|       |
  138|  4.24k|      delete obj;
  139|  4.24k|      return BOTAN_FFI_SUCCESS;
  140|  4.24k|   });
  141|  4.24k|}
_ZZN9Botan_FFI17ffi_delete_objectIN5Botan21RandomNumberGeneratorELj1224866241EEEiPNS_12botan_structIT_XT0_EEEPKcENKUlvE_clEv:
  128|  4.24k|   return ffi_guard_thunk(func_name, [=]() -> int {
  129|       |      // ignore delete of null objects
  130|  4.24k|      if(obj == nullptr) {
  ------------------
  |  Branch (130:10): [True: 0, False: 4.24k]
  ------------------
  131|      0|         return BOTAN_FFI_SUCCESS;
  132|      0|      }
  133|       |
  134|  4.24k|      if(obj->magic_ok() == false) {
  ------------------
  |  Branch (134:10): [True: 0, False: 4.24k]
  ------------------
  135|      0|         return BOTAN_FFI_ERROR_INVALID_OBJECT;
  136|      0|      }
  137|       |
  138|  4.24k|      delete obj;
  139|  4.24k|      return BOTAN_FFI_SUCCESS;
  140|  4.24k|   });

_ZN5Botan6detail9store_anyILNS0_10EndiannessE0ENS0_10AutoDetectETkNS0_20unsigned_integralishEmQoosr3stdE7same_asIS3_T0_Esr3stdE7same_asIT1_S4_EEEvS5_Ph:
  677|   118k|inline constexpr void store_any(T in, uint8_t out[]) {
  678|       |   // asserts that *out points to enough bytes to write into
  679|   118k|   store_any<endianness, InT>(in, std::span<uint8_t, sizeof(T)>(out, sizeof(T)));
  680|   118k|}
_ZN5Botan6detail9store_anyILNS0_10EndiannessE0ENS0_10AutoDetectETkNS0_20unsigned_integralishEmTkNS_6ranges23contiguous_output_rangeIhEENSt3__14spanIhLm8EEEQsr3stdE7same_asIS3_T0_EEEvT1_OT2_:
  612|   118k|inline constexpr void store_any(T in, OutR&& out_range) {
  613|   118k|   store_any<endianness, T>(in, std::forward<OutR>(out_range));
  614|   118k|}
_ZN5Botan6detail9store_anyILNS0_10EndiannessE0ETkNSt3__117unsigned_integralEmTkNS_6ranges23contiguous_output_rangeIhEENS3_4spanIhLm8EEEEEvT0_OT1_:
  491|  1.06M|inline constexpr void store_any(InT in, OutR&& out_range) {
  492|  1.06M|   ranges::assert_exact_byte_length<sizeof(InT)>(out_range);
  493|  1.06M|   std::span out{out_range};
  494|       |
  495|       |   // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  496|       |   // internally to copy ranges on a byte-by-byte basis, which is not allowed
  497|       |   // in a `constexpr` context.
  498|  1.06M|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (498:7): [Folded, False: 1.06M]
  ------------------
  499|      0|      return fallback_store_any<endianness, InT>(in, std::forward<OutR>(out_range));
  500|  1.06M|   } else {
  501|       |      if constexpr(sizeof(InT) == 1) {
  502|       |         out[0] = static_cast<uint8_t>(in);
  503|       |      } else if constexpr(is_native(endianness)) {
  504|       |         typecast_copy(out, in);
  505|  1.06M|      } else if constexpr(is_opposite(endianness)) {
  506|  1.06M|         typecast_copy(out, reverse_bytes(in));
  507|       |      } else {
  508|       |         static_assert(native_endianness_is_unknown<endianness>());
  509|       |         return fallback_store_any<endianness, InT>(in, std::forward<OutR>(out_range));
  510|       |      }
  511|  1.06M|   }
  512|  1.06M|}
_ZN5Botan8get_byteILm3EjEEhT0_QltT_stS1_:
   77|  2.06M|{
   78|  2.06M|   const size_t shift = ((~B) & (sizeof(T) - 1)) << 3;
   79|  2.06M|   return static_cast<uint8_t>((input >> shift) & 0xFF);
   80|  2.06M|}
_ZN5Botan8get_byteILm2EjEEhT0_QltT_stS1_:
   77|  1.92M|{
   78|  1.92M|   const size_t shift = ((~B) & (sizeof(T) - 1)) << 3;
   79|  1.92M|   return static_cast<uint8_t>((input >> shift) & 0xFF);
   80|  1.92M|}
_ZN5Botan8get_byteILm1EjEEhT0_QltT_stS1_:
   77|  1.92M|{
   78|  1.92M|   const size_t shift = ((~B) & (sizeof(T) - 1)) << 3;
   79|  1.92M|   return static_cast<uint8_t>((input >> shift) & 0xFF);
   80|  1.92M|}
_ZN5Botan8get_byteILm0EjEEhT0_QltT_stS1_:
   77|  1.91M|{
   78|  1.91M|   const size_t shift = ((~B) & (sizeof(T) - 1)) << 3;
   79|  1.91M|   return static_cast<uint8_t>((input >> shift) & 0xFF);
   80|  1.91M|}
_ZN5Botan6detail8load_anyILNS0_10EndiannessE0ETkNSt3__117unsigned_integralEmTkNS_6ranges16contiguous_rangeIhEENS3_4spanIKhLm8EEEEET0_OT1_:
  248|  4.34M|inline constexpr OutT load_any(InR&& in_range) {
  249|  4.34M|   ranges::assert_exact_byte_length<sizeof(OutT)>(in_range);
  250|  4.34M|   std::span in{in_range};
  251|       |
  252|       |   // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  253|       |   // internally to copy ranges on a byte-by-byte basis, which is not allowed
  254|       |   // in a `constexpr` context.
  255|  4.34M|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (255:7): [Folded, False: 4.34M]
  ------------------
  256|      0|      return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  257|  4.34M|   } else {
  258|       |      if constexpr(sizeof(OutT) == 1) {
  259|       |         return static_cast<OutT>(in[0]);
  260|       |      } else if constexpr(is_native(endianness)) {
  261|       |         return typecast_copy<OutT>(in);
  262|  4.34M|      } else if constexpr(is_opposite(endianness)) {
  263|  4.34M|         return reverse_bytes(typecast_copy<OutT>(in));
  264|       |      } else {
  265|       |         static_assert(native_endianness_is_unknown<endianness>());
  266|       |         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  267|       |      }
  268|  4.34M|   }
  269|  4.34M|}
_ZN5Botan7load_beImJPKhiEEEDaDpOT0_:
  471|  4.34M|inline constexpr auto load_be(ParamTs&&... params) {
  472|  4.34M|   return detail::load_any<detail::Endianness::Big, OutT>(std::forward<ParamTs>(params)...);
  473|  4.34M|}
_ZN5Botan6detail8load_anyILNS0_10EndiannessE0ETkNS0_20unsigned_integralishEmEET0_PKhm:
  421|  4.34M|inline constexpr OutT load_any(const uint8_t in[], size_t off) {
  422|       |   // asserts that *in points to enough bytes to read at offset off
  423|  4.34M|   constexpr size_t out_size = sizeof(OutT);
  424|  4.34M|   return load_any<endianness, OutT>(std::span<const uint8_t, out_size>(in + off * out_size, out_size));
  425|  4.34M|}
_ZN5Botan7load_leINS_6detail10AutoDetectEJRA4_jPKhiEEEDaDpOT0_:
  462|   478k|inline constexpr auto load_le(ParamTs&&... params) {
  463|   478k|   return detail::load_any<detail::Endianness::Little, OutT>(std::forward<ParamTs>(params)...);
  464|   478k|}
_ZN5Botan6detail8load_anyILNS0_10EndiannessE1ENS0_10AutoDetectETkNS0_20unsigned_integralishEjQoosr3stdE7same_asIS3_T0_Esr3stdE7same_asIT1_S4_EEEvPS5_PKhm:
  450|   478k|inline constexpr void load_any(T out[], const uint8_t in[], size_t count) {
  451|       |   // asserts that *in and *out point to the correct amount of memory
  452|   478k|   load_any<endianness, OutT>(std::span<T>(out, count), std::span<const uint8_t>(in, count * sizeof(T)));
  453|   478k|}
_ZN5Botan6detail8load_anyILNS0_10EndiannessE1ENS0_10AutoDetectETkNS_6ranges23contiguous_output_rangeENSt3__14spanIjLm18446744073709551615EEETkNS4_16contiguous_rangeIhEENS6_IKhLm18446744073709551615EEEQaa20unsigned_integralishINS5_11conditionalIXsr21__is_primary_templateINS5_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS5_6ranges5__cpo5beginEEclsr3stdE7declvalIRT1_EEEEEEEEE5valueENS5_26indirectly_readable_traitsISI_EESJ_E4type10value_typeEEoosr3stdE7same_asIS3_T0_Esr3stdE7same_asISP_SO_EEEvOSF_OT2_:
  322|   478k|inline constexpr void load_any(OutR&& out, InR&& in) {
  323|   478k|   ranges::assert_equal_byte_lengths(out, in);
  324|       |
  325|   478k|   auto load_elementwise = [&] {
  326|   478k|      using element_type = std::ranges::range_value_t<OutR>;
  327|   478k|      constexpr size_t bytes_per_element = sizeof(element_type);
  328|   478k|      std::span<const uint8_t> in_s(in);
  329|   478k|      for(auto& out_elem : out) {
  330|   478k|         out_elem = load_any<endianness, element_type>(in_s.template first<bytes_per_element>());
  331|   478k|         in_s = in_s.subspan(bytes_per_element);
  332|   478k|      }
  333|   478k|   };
  334|       |
  335|       |   // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  336|       |   // internally to copy ranges on a byte-by-byte basis, which is not allowed
  337|       |   // in a `constexpr` context.
  338|   478k|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (338:7): [Folded, False: 478k]
  ------------------
  339|      0|      load_elementwise();
  340|   478k|   } else {
  341|   478k|      if constexpr(is_native(endianness)) {
  342|   478k|         typecast_copy(out, in);
  343|       |      } else {
  344|       |         load_elementwise();
  345|       |      }
  346|   478k|   }
  347|   478k|}
_ZN5Botan8store_beINS_6detail10AutoDetectEJRKmPhEEEDaDpOT0_:
  711|   118k|inline constexpr auto store_be(ParamTs&&... params) {
  712|   118k|   return detail::store_any<detail::Endianness::Big, ModifierT>(std::forward<ParamTs>(params)...);
  713|   118k|}
_ZN5Botan11copy_out_beITkNS_6ranges14spanable_rangeERNSt3__16vectorImNS_16secure_allocatorImEEEEEEvNS2_4spanIhLm18446744073709551615EEEOT_:
  739|   118k|void copy_out_be(std::span<uint8_t> out, InR&& in) {
  740|   118k|   using T = std::ranges::range_value_t<InR>;
  741|   118k|   std::span<const T> in_s{in};
  742|   118k|   const auto remaining_bytes = detail::copy_out_any_word_aligned_portion<detail::Endianness::Big>(out, in_s);
  743|       |
  744|       |   // copy remaining bytes as a partial word
  745|   118k|   for(size_t i = 0; i < remaining_bytes; ++i) {
  ------------------
  |  Branch (745:22): [True: 0, False: 118k]
  ------------------
  746|      0|      out[i] = get_byte_var(i, in_s.front());
  747|      0|   }
  748|   118k|}
_ZN5Botan6detail33copy_out_any_word_aligned_portionILNS0_10EndiannessE0ETkNS0_20unsigned_integralishEmEEmRNSt3__14spanIhLm18446744073709551615EEERNS4_IKT0_Lm18446744073709551615EEE:
  718|   118k|size_t copy_out_any_word_aligned_portion(std::span<uint8_t>& out, std::span<const T>& in) {
  719|   118k|   const size_t full_words = out.size() / sizeof(T);
  720|   118k|   const size_t full_word_bytes = full_words * sizeof(T);
  721|   118k|   const size_t remaining_bytes = out.size() - full_word_bytes;
  722|   118k|   BOTAN_ASSERT_NOMSG(in.size_bytes() >= full_word_bytes + remaining_bytes);
  ------------------
  |  |   60|   118k|   do {                                                                     \
  |  |   61|   118k|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 118k]
  |  |  ------------------
  |  |   62|   118k|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|   118k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded, False: 118k]
  |  |  ------------------
  ------------------
  723|       |
  724|       |   // copy full words
  725|   118k|   store_any<endianness, T>(out.first(full_word_bytes), in.first(full_words));
  726|   118k|   out = out.subspan(full_word_bytes);
  727|   118k|   in = in.subspan(full_words);
  728|       |
  729|   118k|   return remaining_bytes;
  730|   118k|}
_ZN5Botan6detail9store_anyILNS0_10EndiannessE0EmTkNS_6ranges23contiguous_output_rangeIhEENSt3__14spanIhLm18446744073709551615EEETkNS3_14spanable_rangeENS6_IKmLm18446744073709551615EEEQoosr3stdE7same_asINS0_10AutoDetectET0_Esr3stdE7same_asISB_NS5_11conditionalIXsr21__is_primary_templateINS5_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS5_6ranges5__cpo5beginEEclsr3stdE7declvalIRT2_EEEEEEEEE5valueENS5_26indirectly_readable_traitsISJ_EESK_E4type10value_typeEEEEvOT1_OSG_:
  569|   118k|inline constexpr void store_any(OutR&& out, InR&& in) {
  570|   118k|   ranges::assert_equal_byte_lengths(out, in);
  571|       |
  572|   118k|   auto store_elementwise = [&] {
  573|   118k|      using element_type = std::ranges::range_value_t<InR>;
  574|   118k|      constexpr size_t bytes_per_element = sizeof(element_type);
  575|   118k|      std::span<uint8_t> out_s(out);
  576|   118k|      for(auto in_elem : in) {
  577|   118k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  578|   118k|         out_s = out_s.subspan(bytes_per_element);
  579|   118k|      }
  580|   118k|   };
  581|       |
  582|       |   // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  583|       |   // internally to copy ranges on a byte-by-byte basis, which is not allowed
  584|       |   // in a `constexpr` context.
  585|   118k|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (585:7): [Folded, False: 118k]
  ------------------
  586|      0|      store_elementwise();
  587|   118k|   } else {
  588|       |      if constexpr(is_native(endianness)) {
  589|       |         typecast_copy(out, in);
  590|   118k|      } else {
  591|   118k|         store_elementwise();
  592|   118k|      }
  593|   118k|   }
  594|   118k|}
_ZZN5Botan6detail9store_anyILNS0_10EndiannessE0EmTkNS_6ranges23contiguous_output_rangeIhEENSt3__14spanIhLm18446744073709551615EEETkNS3_14spanable_rangeENS6_IKmLm18446744073709551615EEEQoosr3stdE7same_asINS0_10AutoDetectET0_Esr3stdE7same_asISB_NS5_11conditionalIXsr21__is_primary_templateINS5_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS5_6ranges5__cpo5beginEEclsr3stdE7declvalIRT2_EEEEEEEEE5valueENS5_26indirectly_readable_traitsISJ_EESK_E4type10value_typeEEEEvOT1_OSG_ENKUlvE_clEv:
  572|   118k|   auto store_elementwise = [&] {
  573|   118k|      using element_type = std::ranges::range_value_t<InR>;
  574|   118k|      constexpr size_t bytes_per_element = sizeof(element_type);
  575|   118k|      std::span<uint8_t> out_s(out);
  576|   949k|      for(auto in_elem : in) {
  ------------------
  |  Branch (576:24): [True: 949k, False: 118k]
  ------------------
  577|   949k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  578|   949k|         out_s = out_s.subspan(bytes_per_element);
  579|   949k|      }
  580|   118k|   };
_ZN5Botan6detail9store_anyILNS0_10EndiannessE0EmTkNS_6ranges23contiguous_output_rangeIhEENSt3__14spanIhLm8EEETpTkNS0_20unsigned_integralishEJmEQaagtsZT2_Li0Eooaasr3stdE7same_asINS0_10AutoDetectET0_E10all_same_vIDpT2_Eaa20unsigned_integralishIS9_E10all_same_vIS9_SB_EEEvOT1_SB_:
  548|   949k|inline constexpr void store_any(OutR&& out, Ts... ins) {
  549|   949k|   ranges::assert_exact_byte_length<(sizeof(Ts) + ...)>(out);
  550|   949k|   auto store_one = [off = 0]<typename T>(auto o, T i) mutable {
  551|   949k|      store_any<endianness, T>(i, o.subspan(off).template first<sizeof(T)>());
  552|   949k|      off += sizeof(T);
  553|   949k|   };
  554|       |
  555|   949k|   (store_one(std::span{out}, ins), ...);
  556|   949k|}
_ZZN5Botan6detail9store_anyILNS0_10EndiannessE0EmTkNS_6ranges23contiguous_output_rangeIhEENSt3__14spanIhLm8EEETpTkNS0_20unsigned_integralishEJmEQaagtsZT2_Li0Eooaasr3stdE7same_asINS0_10AutoDetectET0_E10all_same_vIDpT2_Eaa20unsigned_integralishIS9_E10all_same_vIS9_SB_EEEvOT1_SB_ENUlTyS9_T_E_clImS7_EEDaS9_SE_:
  550|   949k|   auto store_one = [off = 0]<typename T>(auto o, T i) mutable {
  551|   949k|      store_any<endianness, T>(i, o.subspan(off).template first<sizeof(T)>());
  552|   949k|      off += sizeof(T);
  553|   949k|   };

_ZN5Botan18MerkleDamgard_HashINS_7SHA_512EEC2Ev:
   42|  8.48k|      MerkleDamgard_Hash() { clear(); }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_512EE5clearEv:
   70|   161k|      void clear() {
   71|   161k|         MD::init(m_digest);
   72|   161k|         m_buffer.clear();
   73|   161k|         m_count = 0;
   74|   161k|      }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_512EE6updateENSt3__14spanIKhLm18446744073709551615EEE:
   44|   322k|      void update(std::span<const uint8_t> input) {
   45|   322k|         BufferSlicer in(input);
   46|       |
   47|   636k|         while(!in.empty()) {
  ------------------
  |  Branch (47:16): [True: 313k, False: 322k]
  ------------------
   48|   313k|            if(const auto one_block = m_buffer.handle_unaligned_data(in)) {
  ------------------
  |  Branch (48:27): [True: 0, False: 313k]
  ------------------
   49|      0|               MD::compress_n(m_digest, one_block.value(), 1);
   50|      0|            }
   51|       |
   52|   313k|            if(m_buffer.in_alignment()) {
  ------------------
  |  Branch (52:16): [True: 152k, False: 161k]
  ------------------
   53|   152k|               const auto [aligned_data, full_blocks] = m_buffer.aligned_data_to_process(in);
   54|   152k|               if(full_blocks > 0) {
  ------------------
  |  Branch (54:19): [True: 152k, False: 0]
  ------------------
   55|   152k|                  MD::compress_n(m_digest, aligned_data, full_blocks);
   56|   152k|               }
   57|   152k|            }
   58|   313k|         }
   59|       |
   60|   322k|         m_count += input.size();
   61|   322k|      }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_512EE5finalENSt3__14spanIhLm18446744073709551615EEE:
   63|   118k|      void final(std::span<uint8_t> output) {
   64|   118k|         append_padding_bit();
   65|   118k|         append_counter_and_finalize();
   66|   118k|         copy_output(output);
   67|   118k|         clear();
   68|   118k|      }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_512EE18append_padding_bitEv:
   77|   118k|      void append_padding_bit() {
   78|   118k|         BOTAN_ASSERT_NOMSG(!m_buffer.ready_to_consume());
  ------------------
  |  |   60|   118k|   do {                                                                     \
  |  |   61|   118k|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 118k]
  |  |  ------------------
  |  |   62|   118k|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|   118k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded, False: 118k]
  |  |  ------------------
  ------------------
   79|   118k|         if constexpr(MD::bit_endianness == MD_Endian::Big) {
   80|   118k|            const uint8_t final_byte = 0x80;
   81|   118k|            m_buffer.append({&final_byte, 1});
   82|       |         } else {
   83|       |            const uint8_t final_byte = 0x01;
   84|       |            m_buffer.append({&final_byte, 1});
   85|       |         }
   86|   118k|      }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_512EE27append_counter_and_finalizeEv:
   88|   118k|      void append_counter_and_finalize() {
   89|       |         // Compress the remaining data if the final data block does not provide
   90|       |         // enough space for the counter bytes.
   91|   118k|         if(m_buffer.elements_until_alignment() < MD::ctr_bytes) {
  ------------------
  |  Branch (91:13): [True: 0, False: 118k]
  ------------------
   92|      0|            m_buffer.fill_up_with_zeros();
   93|      0|            MD::compress_n(m_digest, m_buffer.consume(), 1);
   94|      0|         }
   95|       |
   96|       |         // Make sure that any remaining bytes in the very last block are zero.
   97|   118k|         BOTAN_ASSERT_NOMSG(m_buffer.elements_until_alignment() >= MD::ctr_bytes);
  ------------------
  |  |   60|   118k|   do {                                                                     \
  |  |   61|   118k|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 118k]
  |  |  ------------------
  |  |   62|   118k|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|   118k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded, False: 118k]
  |  |  ------------------
  ------------------
   98|   118k|         m_buffer.fill_up_with_zeros();
   99|       |
  100|       |         // Replace a bunch of the right-most zero-padding with the counter bytes.
  101|   118k|         const uint64_t bit_count = m_count * 8;
  102|   118k|         auto last_bytes = m_buffer.directly_modify_last(sizeof(bit_count));
  103|   118k|         if constexpr(MD::byte_endianness == MD_Endian::Big) {
  104|   118k|            store_be(bit_count, last_bytes.data());
  105|       |         } else {
  106|       |            store_le(bit_count, last_bytes.data());
  107|       |         }
  108|       |
  109|       |         // Compress the very last block.
  110|   118k|         MD::compress_n(m_digest, m_buffer.consume(), 1);
  111|   118k|      }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_512EE11copy_outputENSt3__14spanIhLm18446744073709551615EEE:
  113|   118k|      void copy_output(std::span<uint8_t> output) {
  114|   118k|         BOTAN_ASSERT_NOMSG(output.size() >= MD::output_bytes);
  ------------------
  |  |   60|   118k|   do {                                                                     \
  |  |   61|   118k|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 118k]
  |  |  ------------------
  |  |   62|   118k|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|   118k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded, False: 118k]
  |  |  ------------------
  ------------------
  115|       |
  116|   118k|         if constexpr(MD::byte_endianness == MD_Endian::Big) {
  117|   118k|            copy_out_be(output.first(MD::output_bytes), m_digest);
  118|       |         } else {
  119|       |            copy_out_le(output.first(MD::output_bytes), m_digest);
  120|       |         }
  121|   118k|      }

_ZN5Botan3rhoILm14ELm18ELm41EmEET2_S1_:
   51|  21.7M|inline constexpr T rho(T x) {
   52|  21.7M|   return rotr<R1>(x) ^ rotr<R2>(x) ^ rotr<R3>(x);
   53|  21.7M|}
_ZN5Botan4rotrILm14EmEET0_S1_QaagtT_Li0EltT_mlLi8EstS1_:
   35|  21.7M|{
   36|  21.7M|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   37|  21.7M|}
_ZN5Botan4rotrILm18EmEET0_S1_QaagtT_Li0EltT_mlLi8EstS1_:
   35|  21.7M|{
   36|  21.7M|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   37|  21.7M|}
_ZN5Botan4rotrILm41EmEET0_S1_QaagtT_Li0EltT_mlLi8EstS1_:
   35|  21.7M|{
   36|  21.7M|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   37|  21.7M|}
_ZN5Botan3rhoILm28ELm34ELm39EmEET2_S1_:
   51|  21.7M|inline constexpr T rho(T x) {
   52|  21.7M|   return rotr<R1>(x) ^ rotr<R2>(x) ^ rotr<R3>(x);
   53|  21.7M|}
_ZN5Botan4rotrILm28EmEET0_S1_QaagtT_Li0EltT_mlLi8EstS1_:
   35|  21.7M|{
   36|  21.7M|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   37|  21.7M|}
_ZN5Botan4rotrILm34EmEET0_S1_QaagtT_Li0EltT_mlLi8EstS1_:
   35|  21.7M|{
   36|  21.7M|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   37|  21.7M|}
_ZN5Botan4rotrILm39EmEET0_S1_QaagtT_Li0EltT_mlLi8EstS1_:
   35|  21.7M|{
   36|  21.7M|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   37|  21.7M|}
_ZN5Botan5sigmaILm19ELm61ELm6EmEET2_S1_:
   43|  21.7M|inline constexpr T sigma(T x) {
   44|  21.7M|   return rotr<R1>(x) ^ rotr<R2>(x) ^ (x >> S);
   45|  21.7M|}
_ZN5Botan4rotrILm19EmEET0_S1_QaagtT_Li0EltT_mlLi8EstS1_:
   35|  21.7M|{
   36|  21.7M|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   37|  21.7M|}
_ZN5Botan4rotrILm61EmEET0_S1_QaagtT_Li0EltT_mlLi8EstS1_:
   35|  21.7M|{
   36|  21.7M|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   37|  21.7M|}
_ZN5Botan5sigmaILm1ELm8ELm7EmEET2_S1_:
   43|  21.7M|inline constexpr T sigma(T x) {
   44|  21.7M|   return rotr<R1>(x) ^ rotr<R2>(x) ^ (x >> S);
   45|  21.7M|}
_ZN5Botan4rotrILm1EmEET0_S1_QaagtT_Li0EltT_mlLi8EstS1_:
   35|  21.7M|{
   36|  21.7M|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   37|  21.7M|}
_ZN5Botan4rotrILm8EmEET0_S1_QaagtT_Li0EltT_mlLi8EstS1_:
   35|  21.7M|{
   36|  21.7M|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   37|  21.7M|}

_ZN5Botan11checked_mulEmm:
   47|  59.3k|inline std::optional<size_t> checked_mul(size_t x, size_t y) {
   48|  59.3k|#if BOTAN_COMPILER_HAS_BUILTIN(__builtin_add_overflow)
   49|  59.3k|   size_t z;
   50|  59.3k|   if(__builtin_mul_overflow(x, y, &z)) [[unlikely]]
  ------------------
  |  Branch (50:7): [True: 0, False: 59.3k]
  ------------------
   51|       |#elif defined(_MSC_VER)
   52|       |   size_t z;
   53|       |   if(SizeTMult(x, y, &z) != S_OK) [[unlikely]]
   54|       |#else
   55|       |   size_t z = x * y;
   56|       |   if(y && z / y != x) [[unlikely]]
   57|       |#endif
   58|      0|   {
   59|      0|      return std::nullopt;
   60|      0|   }
   61|  59.3k|   return z;
   62|  59.3k|}

_ZNK5Botan9SCAN_Name9algo_nameEv:
   44|  8.48k|      const std::string& algo_name() const { return m_alg_name; }
_ZNK5Botan9SCAN_Name9arg_countEv:
   49|  16.9k|      size_t arg_count() const { return m_args.size(); }

_ZNK5Botan7SHA_51213output_lengthEv:
   74|   127k|      size_t output_length() const override { return output_bytes; }
_ZNK5Botan7SHA_51215hash_block_sizeEv:
   76|  8.48k|      size_t hash_block_size() const override { return block_bytes; }
_ZN5Botan7SHA_5125clearEv:
   84|  33.9k|      void clear() override { m_md.clear(); }

_ZN5Botan9SHA2_64_FEmmmRmmmmS0_S0_mmmm:
   31|  21.7M|                                  uint64_t magic) {
   32|  21.7M|   const uint64_t E_rho = rho<14, 18, 41>(E);
   33|  21.7M|   const uint64_t A_rho = rho<28, 34, 39>(A);
   34|  21.7M|   const uint64_t M2_sigma = sigma<19, 61, 6>(M2);
   35|  21.7M|   const uint64_t M4_sigma = sigma<1, 8, 7>(M4);
   36|  21.7M|   H += magic + E_rho + choose(E, F, G) + M1;
   37|  21.7M|   D += H;
   38|  21.7M|   H += A_rho + majority(A, B, C);
   39|  21.7M|   M1 += M2_sigma + M3 + M4_sigma;
   40|  21.7M|}

_ZN5Botan12BufferSlicerC2ENSt3__14spanIKhLm18446744073709551615EEE:
  144|   593k|      BufferSlicer(std::span<const uint8_t> buffer) : m_remaining(buffer) {}
_ZN5Botan12BufferSlicer4takeEm:
  156|   585k|      std::span<const uint8_t> take(const size_t count) {
  157|   585k|         BOTAN_STATE_CHECK(remaining() >= count);
  ------------------
  |  |   42|   585k|   do {                                                         \
  |  |   43|   585k|      if(!(expr))                                               \
  |  |  ------------------
  |  |  |  Branch (43:10): [True: 0, False: 585k]
  |  |  ------------------
  |  |   44|   585k|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   45|   585k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (45:12): [Folded, False: 585k]
  |  |  ------------------
  ------------------
  158|   585k|         auto result = m_remaining.first(count);
  159|   585k|         m_remaining = m_remaining.subspan(count);
  160|   585k|         return result;
  161|   585k|      }
_ZNK5Botan12BufferSlicer9remainingEv:
  185|  1.17M|      size_t remaining() const { return m_remaining.size(); }
_ZNK5Botan12BufferSlicer5emptyEv:
  187|   636k|      bool empty() const { return m_remaining.empty(); }

_ZN5Botan20Buffered_Computation6updateENSt3__14spanIKhLm18446744073709551615EEE:
   41|   407k|      void update(std::span<const uint8_t> in) { add_data(in); }
_ZN5Botan20Buffered_Computation6updateEh:
   62|  25.4k|      void update(uint8_t in) { add_data({&in, 1}); }
_ZN5Botan20Buffered_Computation5finalENSt3__14spanIhLm18446744073709551615EEE:
   86|   118k|      void final(std::span<uint8_t> out) {
   87|   118k|         BOTAN_ARG_CHECK(out.size() >= output_length(), "provided output buffer has insufficient capacity");
  ------------------
  |  |   30|   118k|   do {                                                          \
  |  |   31|   118k|      if(!(expr))                                                \
  |  |  ------------------
  |  |  |  Branch (31:10): [True: 0, False: 118k]
  |  |  ------------------
  |  |   32|   118k|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   33|   118k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (33:12): [Folded, False: 118k]
  |  |  ------------------
  ------------------
   88|   118k|         final_result(out);
   89|   118k|      }
_ZN5Botan20Buffered_ComputationD2Ev:
  134|  32.2k|      virtual ~Buffered_Computation() = default;
_ZN5Botan20Buffered_Computation5finalITkNS_8concepts21resizable_byte_bufferENSt3__16vectorIhNS_16secure_allocatorIhEEEEEEvRT_:
   92|  59.3k|      void final(T& out) {
   93|  59.3k|         out.resize(output_length());
   94|  59.3k|         final_result(out);
   95|  59.3k|      }

_ZN5Botan6ranges24assert_exact_byte_lengthILm8ETkNS0_14spanable_rangeERNSt3__14spanIhLm8EEEEEvOT0_:
   97|  2.01M|inline constexpr void assert_exact_byte_length(R&& r) {
   98|  2.01M|   const std::span s{r};
   99|  2.01M|   if constexpr(statically_spanable_range<R>) {
  100|  2.01M|      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
  101|       |   } else {
  102|       |      BOTAN_ASSERT(s.size_bytes() == expected, "memory region does not have expected byte lengths");
  103|       |   }
  104|  2.01M|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeERNSt3__14spanIhLm8EEETpTkNS0_14spanable_rangeEJRNS3_IKmLm1EEEEEEvOT_DpOT0_QgtsZT0_Li0E:
  118|  1.06M|{
  119|  1.06M|   const std::span s0{r0};
  120|       |
  121|  1.06M|   if constexpr(statically_spanable_range<R0>) {
  122|  1.06M|      constexpr size_t expected_size = s0.size_bytes();
  123|  1.06M|      (assert_exact_byte_length<expected_size>(rs), ...);
  124|       |   } else {
  125|       |      const size_t expected_size = s0.size_bytes();
  126|       |      BOTAN_ARG_CHECK(((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...),
  127|       |                      "memory regions don't have equal lengths");
  128|       |   }
  129|  1.06M|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm8ETkNS0_14spanable_rangeERNSt3__14spanIKmLm1EEEEEvOT0_:
   97|  1.06M|inline constexpr void assert_exact_byte_length(R&& r) {
   98|  1.06M|   const std::span s{r};
   99|  1.06M|   if constexpr(statically_spanable_range<R>) {
  100|  1.06M|      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
  101|       |   } else {
  102|       |      BOTAN_ASSERT(s.size_bytes() == expected, "memory region does not have expected byte lengths");
  103|       |   }
  104|  1.06M|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeERNSt3__14spanIhLm8EEEEEmOT_:
   84|  1.06M|inline constexpr size_t size_bytes(spanable_range auto&& r) {
   85|  1.06M|   return std::span{r}.size_bytes();
   86|  1.06M|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeERNSt3__14spanIjLm18446744073709551615EEETpTkNS0_14spanable_rangeEJRNS3_IKhLm18446744073709551615EEEEEEvOT_DpOT0_QgtsZT0_Li0E:
  118|   957k|{
  119|   957k|   const std::span s0{r0};
  120|       |
  121|       |   if constexpr(statically_spanable_range<R0>) {
  122|       |      constexpr size_t expected_size = s0.size_bytes();
  123|       |      (assert_exact_byte_length<expected_size>(rs), ...);
  124|   957k|   } else {
  125|   957k|      const size_t expected_size = s0.size_bytes();
  126|   957k|      BOTAN_ARG_CHECK(((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...),
  ------------------
  |  |   30|   957k|   do {                                                          \
  |  |   31|   957k|      if(!(expr))                                                \
  |  |  ------------------
  |  |  |  Branch (31:10): [True: 0, False: 957k]
  |  |  ------------------
  |  |   32|   957k|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   33|   957k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (33:12): [Folded, False: 957k]
  |  |  ------------------
  ------------------
  127|   957k|                      "memory regions don't have equal lengths");
  128|   957k|   }
  129|   957k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm8ETkNS0_14spanable_rangeERNSt3__14spanIKhLm8EEEEEvOT0_:
   97|  8.68M|inline constexpr void assert_exact_byte_length(R&& r) {
   98|  8.68M|   const std::span s{r};
   99|  8.68M|   if constexpr(statically_spanable_range<R>) {
  100|  8.68M|      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
  101|       |   } else {
  102|       |      BOTAN_ASSERT(s.size_bytes() == expected, "memory region does not have expected byte lengths");
  103|       |   }
  104|  8.68M|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeERNSt3__14spanImLm1EEETpTkNS0_14spanable_rangeEJRNS3_IKhLm8EEEEEEvOT_DpOT0_QgtsZT0_Li0E:
  118|  4.34M|{
  119|  4.34M|   const std::span s0{r0};
  120|       |
  121|  4.34M|   if constexpr(statically_spanable_range<R0>) {
  122|  4.34M|      constexpr size_t expected_size = s0.size_bytes();
  123|  4.34M|      (assert_exact_byte_length<expected_size>(rs), ...);
  124|       |   } else {
  125|       |      const size_t expected_size = s0.size_bytes();
  126|       |      BOTAN_ARG_CHECK(((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...),
  127|       |                      "memory regions don't have equal lengths");
  128|       |   }
  129|  4.34M|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeERNSt3__14spanImLm1EEEEEmOT_:
   84|  4.34M|inline constexpr size_t size_bytes(spanable_range auto&& r) {
   85|  4.34M|   return std::span{r}.size_bytes();
   86|  4.34M|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeERNSt3__14spanIjLm18446744073709551615EEEEEmOT_:
   84|   478k|inline constexpr size_t size_bytes(spanable_range auto&& r) {
   85|   478k|   return std::span{r}.size_bytes();
   86|   478k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeERNSt3__14spanIhLm18446744073709551615EEETpTkNS0_14spanable_rangeEJRNS3_IKmLm18446744073709551615EEEEEEvOT_DpOT0_QgtsZT0_Li0E:
  118|   118k|{
  119|   118k|   const std::span s0{r0};
  120|       |
  121|       |   if constexpr(statically_spanable_range<R0>) {
  122|       |      constexpr size_t expected_size = s0.size_bytes();
  123|       |      (assert_exact_byte_length<expected_size>(rs), ...);
  124|   118k|   } else {
  125|   118k|      const size_t expected_size = s0.size_bytes();
  126|   118k|      BOTAN_ARG_CHECK(((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...),
  ------------------
  |  |   30|   118k|   do {                                                          \
  |  |   31|   118k|      if(!(expr))                                                \
  |  |  ------------------
  |  |  |  Branch (31:10): [True: 0, False: 118k]
  |  |  ------------------
  |  |   32|   118k|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   33|   118k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (33:12): [Folded, False: 118k]
  |  |  ------------------
  ------------------
  127|   118k|                      "memory regions don't have equal lengths");
  128|   118k|   }
  129|   118k|}

_ZNK5Botan9HMAC_DRBG31max_number_of_bytes_per_requestEv:
  130|  8.48k|      size_t max_number_of_bytes_per_request() const override { return m_max_number_of_bytes_per_request; }

_ZN5Botan25MessageAuthenticationCodeD2Ev:
   50|  8.48k|      ~MessageAuthenticationCode() override = default;

_ZN5Botan11clear_bytesEPvm:
  103|   347k|inline constexpr void clear_bytes(void* ptr, size_t bytes) {
  104|   347k|   if(bytes > 0) {
  ------------------
  |  Branch (104:7): [True: 347k, False: 0]
  ------------------
  105|   347k|      std::memset(ptr, 0, bytes);
  106|   347k|   }
  107|   347k|}
_ZN5Botan8copy_memIhQsr3std10is_trivialINSt3__15decayIT_E4typeEEE5valueEEvPS3_PKS3_m:
  146|  8.48k|inline constexpr void copy_mem(T* out, const T* in, size_t n) {
  147|  8.48k|   BOTAN_ASSERT_IMPLICATION(n > 0, in != nullptr && out != nullptr, "If n > 0 then args are not null");
  ------------------
  |  |   78|  8.48k|   do {                                                                                          \
  |  |   79|  16.9k|      if((expr1) && !(expr2))                                                                    \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 8.48k, False: 0]
  |  |  |  Branch (79:23): [True: 8.48k, False: 0]
  |  |  |  Branch (79:23): [True: 8.48k, False: 0]
  |  |  ------------------
  |  |   80|  8.48k|         Botan::assertion_failure(#expr1 " implies " #expr2, msg, __func__, __FILE__, __LINE__); \
  |  |   81|  8.48k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (81:12): [Folded, False: 8.48k]
  |  |  ------------------
  ------------------
  148|       |
  149|  8.48k|   if(in != nullptr && out != nullptr && n > 0) {
  ------------------
  |  Branch (149:7): [True: 8.48k, False: 0]
  |  Branch (149:24): [True: 8.48k, False: 0]
  |  Branch (149:42): [True: 8.48k, False: 0]
  ------------------
  150|  8.48k|      std::memmove(out, in, sizeof(T) * n);
  151|  8.48k|   }
  152|  8.48k|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeERNSt3__14spanIhLm8EEEmQaaaasr3stdE23is_trivially_copyable_vIT0_Entsr3std6rangesE5rangeIS6_Esr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISE_EESF_E4type10value_typeEEEEvOSB_RKS6_:
  201|  1.06M|inline constexpr void typecast_copy(ToR&& out, const FromT& in) {
  202|  1.06M|   typecast_copy(out, std::span<const FromT, 1>(&in, 1));
  203|  1.06M|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeERNSt3__14spanIhLm8EEETkNS1_16contiguous_rangeENS3_IKmLm1EEEQaasr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISF_EESG_E4type10value_typeEEsr3stdE23is_trivially_copyable_vINS8_IXsr21__is_primary_templateINS9_Iu14__remove_cvrefIDTclL_ZNSB_5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENSH_ISP_EESQ_E4type10value_typeEEEEvOSM_OSC_:
  178|  1.06M|inline constexpr void typecast_copy(ToR&& out, FromR&& in) {
  179|  1.06M|   ranges::assert_equal_byte_lengths(out, in);
  180|  1.06M|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  181|  1.06M|}
_ZN5Botan13typecast_copyImTkNS_6ranges16contiguous_rangeERNSt3__14spanIKhLm8EEEQaaaasr3stdE26is_default_constructible_vIT_Esr3stdE23is_trivially_copyable_vIS7_Esr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISF_EESG_E4type10value_typeEEEES7_OSC_:
  212|  4.34M|inline constexpr ToT typecast_copy(FromR&& src) noexcept {
  213|  4.34M|   ToT dst;
  214|  4.34M|   typecast_copy(dst, src);
  215|  4.34M|   return dst;
  216|  4.34M|}
_ZN5Botan13typecast_copyImTkNS_6ranges16contiguous_rangeERNSt3__14spanIKhLm8EEEQaaaasr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISE_EESF_E4type10value_typeEEsr3stdE23is_trivially_copyable_vIT_Entsr3std6rangesE5rangeISL_EEEvRSL_OSB_:
  190|  4.34M|inline constexpr void typecast_copy(ToT& out, FromR&& in) noexcept {
  191|  4.34M|   typecast_copy(std::span<ToT, 1>(&out, 1), in);
  192|  4.34M|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeENSt3__14spanImLm1EEETkNS1_16contiguous_rangeERNS3_IKhLm8EEEQaasr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISF_EESG_E4type10value_typeEEsr3stdE23is_trivially_copyable_vINS8_IXsr21__is_primary_templateINS9_Iu14__remove_cvrefIDTclL_ZNSB_5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENSH_ISP_EESQ_E4type10value_typeEEEEvOSM_OSC_:
  178|  4.34M|inline constexpr void typecast_copy(ToR&& out, FromR&& in) {
  179|  4.34M|   ranges::assert_equal_byte_lengths(out, in);
  180|  4.34M|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  181|  4.34M|}
_ZN5Botan9clear_memIhEEvPT_m:
  120|   347k|inline constexpr void clear_mem(T* ptr, size_t n) {
  121|   347k|   clear_bytes(ptr, sizeof(T) * n);
  122|   347k|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeERNSt3__14spanIjLm18446744073709551615EEETkNS1_16contiguous_rangeERNS3_IKhLm18446744073709551615EEEQaasr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISG_EESH_E4type10value_typeEEsr3stdE23is_trivially_copyable_vINS9_IXsr21__is_primary_templateINSA_Iu14__remove_cvrefIDTclL_ZNSC_5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENSI_ISQ_EESR_E4type10value_typeEEEEvOSN_OSD_:
  178|   478k|inline constexpr void typecast_copy(ToR&& out, FromR&& in) {
  179|   478k|   ranges::assert_equal_byte_lengths(out, in);
  180|   478k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  181|   478k|}
_ZN5Botan8copy_memIiQsr3std10is_trivialINSt3__15decayIT_E4typeEEE5valueEEvPS3_PKS3_m:
  146|  1.53k|inline constexpr void copy_mem(T* out, const T* in, size_t n) {
  147|  1.53k|   BOTAN_ASSERT_IMPLICATION(n > 0, in != nullptr && out != nullptr, "If n > 0 then args are not null");
  ------------------
  |  |   78|  1.53k|   do {                                                                                          \
  |  |   79|  3.07k|      if((expr1) && !(expr2))                                                                    \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 1.53k, False: 0]
  |  |  |  Branch (79:23): [True: 1.53k, False: 0]
  |  |  |  Branch (79:23): [True: 1.53k, False: 0]
  |  |  ------------------
  |  |   80|  1.53k|         Botan::assertion_failure(#expr1 " implies " #expr2, msg, __func__, __FILE__, __LINE__); \
  |  |   81|  1.53k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (81:12): [Folded, False: 1.53k]
  |  |  ------------------
  ------------------
  148|       |
  149|  1.53k|   if(in != nullptr && out != nullptr && n > 0) {
  ------------------
  |  Branch (149:7): [True: 1.53k, False: 0]
  |  Branch (149:24): [True: 1.53k, False: 0]
  |  Branch (149:42): [True: 1.53k, False: 0]
  ------------------
  150|  1.53k|      std::memmove(out, in, sizeof(T) * n);
  151|  1.53k|   }
  152|  1.53k|}

_ZN5Botan21RandomNumberGenerator10random_vecITkNS_8concepts21resizable_byte_bufferENSt3__16vectorIhNS_16secure_allocatorIhEEEEEEvRT_m:
  190|  8.48k|      void random_vec(T& v, size_t bytes) {
  191|  8.48k|         v.resize(bytes);
  192|  8.48k|         random_vec(v);
  193|  8.48k|      }
_ZN5Botan21RandomNumberGenerator10random_vecENSt3__14spanIhLm18446744073709551615EEE:
  179|  8.48k|      void random_vec(std::span<uint8_t> v) { this->randomize(v); }
_ZN5Botan21RandomNumberGenerator9randomizeENSt3__14spanIhLm18446744073709551615EEE:
   52|  8.48k|      void randomize(std::span<uint8_t> output) { this->fill_bytes_with_input(output, {}); }
_ZN5Botan21RandomNumberGenerator11add_entropyENSt3__14spanIKhLm18446744073709551615EEE:
   75|  8.48k|      void add_entropy(std::span<const uint8_t> input) { this->fill_bytes_with_input({}, input); }
_ZN5Botan21RandomNumberGenerator9next_byteEv:
  217|  8.48k|      uint8_t next_byte() {
  218|  8.48k|         uint8_t b;
  219|  8.48k|         this->fill_bytes_with_input(std::span(&b, 1), {});
  220|  8.48k|         return b;
  221|  8.48k|      }
_ZN5Botan21RandomNumberGeneratorC2Ev:
   34|  16.9k|      RandomNumberGenerator() = default;
_ZN5Botan21RandomNumberGeneratorD2Ev:
   32|  16.9k|      virtual ~RandomNumberGenerator() = default;
_ZN5Botan21RandomNumberGenerator10random_vecITkNS_8concepts21resizable_byte_bufferENSt3__16vectorIhNS_16secure_allocatorIhEEEEQsr3stdE21default_initializableIT_EEES8_m:
  205|  8.48k|      T random_vec(size_t bytes) {
  206|  8.48k|         T result;
  207|  8.48k|         random_vec(result, bytes);
  208|  8.48k|         return result;
  209|  8.48k|      }

_ZN5Botan16secure_allocatorIhE10deallocateEPhm:
   47|  50.8k|      void deallocate(T* p, std::size_t n) { deallocate_memory(p, n, sizeof(T)); }
_ZN5Botan16secure_allocatorIhE8allocateEm:
   45|  50.8k|      T* allocate(std::size_t n) { return static_cast<T*>(allocate_memory(n, sizeof(T))); }
_ZN5Botan16secure_allocatorImE10deallocateEPmm:
   47|  8.48k|      void deallocate(T* p, std::size_t n) { deallocate_memory(p, n, sizeof(T)); }
_ZN5Botan16secure_allocatorImE8allocateEm:
   45|  8.48k|      T* allocate(std::size_t n) { return static_cast<T*>(allocate_memory(n, sizeof(T))); }

_ZN5Botan12Stateful_RNGC2ERNS_21RandomNumberGeneratorEm:
   45|  8.48k|            m_underlying_rng(&rng), m_reseed_interval(reseed_interval) {}
_ZNK5Botan12Stateful_RNG13accepts_inputEv:
   71|  8.48k|      bool accepts_input() const final { return true; }

_ZNK5Botan18SymmetricAlgorithm15valid_keylengthEm:
  107|  33.9k|      bool valid_keylength(size_t length) const { return key_spec().valid_keylength(length); }
_ZNK5Botan24Key_Length_Specification15valid_keylengthEm:
   42|  33.9k|      bool valid_keylength(size_t length) const {
   43|  33.9k|         return ((length >= m_min_keylen) && (length <= m_max_keylen) && (length % m_keylen_mod == 0));
  ------------------
  |  Branch (43:18): [True: 33.9k, False: 0]
  |  Branch (43:46): [True: 33.9k, False: 0]
  |  Branch (43:74): [True: 33.9k, False: 0]
  ------------------
   44|  33.9k|      }
_ZN5Botan24Key_Length_SpecificationC2Emmm:
   36|  33.9k|            m_min_keylen(min_k), m_max_keylen(max_k ? max_k : min_k), m_keylen_mod(k_mod) {}
  ------------------
  |  Branch (36:47): [True: 33.9k, False: 0]
  ------------------
_ZNK5Botan18SymmetricAlgorithm23assert_key_material_setEv:
  139|   169k|      void assert_key_material_set() const { assert_key_material_set(has_keying_material()); }
_ZNK5Botan18SymmetricAlgorithm23assert_key_material_setEb:
  141|   169k|      void assert_key_material_set(bool predicate) const {
  142|   169k|         if(!predicate) {
  ------------------
  |  Branch (142:13): [True: 0, False: 169k]
  ------------------
  143|      0|            throw_key_not_set_error();
  144|      0|         }
  145|   169k|      }
_ZN5Botan18SymmetricAlgorithmD2Ev:
   79|  8.48k|      virtual ~SymmetricAlgorithm() = default;

_ZN5Botan18SymmetricAlgorithm7set_keyENSt3__14spanIKhLm18446744073709551615EEE:
   17|  33.9k|void SymmetricAlgorithm::set_key(std::span<const uint8_t> key) {
   18|  33.9k|   if(!valid_keylength(key.size())) {
  ------------------
  |  Branch (18:7): [True: 0, False: 33.9k]
  ------------------
   19|      0|      throw Invalid_Key_Length(name(), key.size());
   20|      0|   }
   21|  33.9k|   key_schedule(key);
   22|  33.9k|}

_ZN9Botan_FFI15ffi_guard_thunkEPKcRKNSt3__18functionIFivEEE:
  116|  8.48k|int ffi_guard_thunk(const char* func_name, const std::function<int()>& thunk) {
  117|  8.48k|   g_last_exception_what.clear();
  118|       |
  119|  8.48k|   try {
  120|  8.48k|      return thunk();
  121|  8.48k|   } catch(std::bad_alloc&) {
  122|      0|      return ffi_error_exception_thrown(func_name, "bad_alloc", BOTAN_FFI_ERROR_OUT_OF_MEMORY);
  123|      0|   } catch(Botan_FFI::FFI_Error& e) {
  124|      0|      return ffi_error_exception_thrown(func_name, e.what(), e.error_code());
  125|      0|   } catch(Botan::Exception& e) {
  126|      0|      return ffi_error_exception_thrown(func_name, e.what(), ffi_map_error_type(e.error_type()));
  127|      0|   } catch(std::exception& e) {
  128|      0|      return ffi_error_exception_thrown(func_name, e.what());
  129|      0|   } catch(...) {
  130|      0|      return ffi_error_exception_thrown(func_name, "unknown exception");
  131|      0|   }
  132|       |
  133|      0|   return BOTAN_FFI_ERROR_UNKNOWN_ERROR;
  134|  8.48k|}

botan_rng_init:
   26|  4.24k|int botan_rng_init(botan_rng_t* rng_out, const char* rng_type) {
   27|  4.24k|   return ffi_guard_thunk(__func__, [=]() -> int {
   28|  4.24k|      if(rng_out == nullptr) {
   29|  4.24k|         return BOTAN_FFI_ERROR_NULL_POINTER;
   30|  4.24k|      }
   31|       |
   32|  4.24k|      const std::string rng_type_s(rng_type ? rng_type : "system");
   33|       |
   34|  4.24k|      std::unique_ptr<Botan::RandomNumberGenerator> rng;
   35|       |
   36|  4.24k|      if(rng_type_s == "system") {
   37|  4.24k|         rng = std::make_unique<Botan::System_RNG>();
   38|  4.24k|      } else if(rng_type_s == "user" || rng_type_s == "user-threadsafe") {
   39|  4.24k|         rng = std::make_unique<Botan::AutoSeeded_RNG>();
   40|  4.24k|      } else if(rng_type_s == "null") {
   41|  4.24k|         rng = std::make_unique<Botan::Null_RNG>();
   42|  4.24k|      }
   43|       |#if defined(BOTAN_HAS_PROCESSOR_RNG)
   44|       |      else if((rng_type_s == "rdrand" || rng_type_s == "hwrng") && Botan::Processor_RNG::available()) {
   45|       |         rng = std::make_unique<Botan::Processor_RNG>();
   46|       |      }
   47|       |#endif
   48|       |
   49|  4.24k|      if(!rng) {
   50|  4.24k|         return BOTAN_FFI_ERROR_NOT_IMPLEMENTED;
   51|  4.24k|      }
   52|       |
   53|  4.24k|      *rng_out = new botan_rng_struct(std::move(rng));
   54|  4.24k|      return BOTAN_FFI_SUCCESS;
   55|  4.24k|   });
   56|  4.24k|}
botan_rng_destroy:
  143|  4.24k|int botan_rng_destroy(botan_rng_t rng) {
  144|  4.24k|   return BOTAN_FFI_CHECKED_DELETE(rng);
  ------------------
  |  |  143|  4.24k|#define BOTAN_FFI_CHECKED_DELETE(o) ffi_delete_object(o, __func__)
  ------------------
  145|  4.24k|}
ffi_rng.cpp:_ZZ14botan_rng_initENK3$_0clEv:
   27|  4.24k|   return ffi_guard_thunk(__func__, [=]() -> int {
   28|  4.24k|      if(rng_out == nullptr) {
  ------------------
  |  Branch (28:10): [True: 0, False: 4.24k]
  ------------------
   29|      0|         return BOTAN_FFI_ERROR_NULL_POINTER;
   30|      0|      }
   31|       |
   32|  4.24k|      const std::string rng_type_s(rng_type ? rng_type : "system");
  ------------------
  |  Branch (32:36): [True: 4.24k, False: 0]
  ------------------
   33|       |
   34|  4.24k|      std::unique_ptr<Botan::RandomNumberGenerator> rng;
   35|       |
   36|  4.24k|      if(rng_type_s == "system") {
  ------------------
  |  Branch (36:10): [True: 0, False: 4.24k]
  ------------------
   37|      0|         rng = std::make_unique<Botan::System_RNG>();
   38|  4.24k|      } else if(rng_type_s == "user" || rng_type_s == "user-threadsafe") {
  ------------------
  |  Branch (38:17): [True: 4.24k, False: 0]
  |  Branch (38:41): [True: 0, False: 0]
  ------------------
   39|  4.24k|         rng = std::make_unique<Botan::AutoSeeded_RNG>();
   40|  4.24k|      } else if(rng_type_s == "null") {
  ------------------
  |  Branch (40:17): [True: 0, False: 0]
  ------------------
   41|      0|         rng = std::make_unique<Botan::Null_RNG>();
   42|      0|      }
   43|       |#if defined(BOTAN_HAS_PROCESSOR_RNG)
   44|       |      else if((rng_type_s == "rdrand" || rng_type_s == "hwrng") && Botan::Processor_RNG::available()) {
   45|       |         rng = std::make_unique<Botan::Processor_RNG>();
   46|       |      }
   47|       |#endif
   48|       |
   49|  4.24k|      if(!rng) {
  ------------------
  |  Branch (49:10): [True: 0, False: 4.24k]
  ------------------
   50|      0|         return BOTAN_FFI_ERROR_NOT_IMPLEMENTED;
   51|      0|      }
   52|       |
   53|  4.24k|      *rng_out = new botan_rng_struct(std::move(rng));
   54|  4.24k|      return BOTAN_FFI_SUCCESS;
   55|  4.24k|   });

_ZN5Botan5CRC248add_dataENSt3__14spanIKhLm18446744073709551615EEE:
  175|  28.2k|void CRC24::add_data(std::span<const uint8_t> input) {
  176|  28.2k|   uint32_t tmp = m_crc;
  177|       |
  178|       |   // Input is word aligned if WA & input == 0
  179|  28.2k|   static const uint8_t WA = sizeof(size_t) - 1;
  180|       |
  181|       |   // Ensure input is word aligned before processing in parallel
  182|  28.5k|   for(; !input.empty() && (reinterpret_cast<uintptr_t>(input.data()) & WA); input = input.last(input.size() - 1)) {
  ------------------
  |  Branch (182:10): [True: 26.6k, False: 1.91k]
  |  Branch (182:28): [True: 296, False: 26.3k]
  ------------------
  183|    296|      tmp = process8(tmp, input.front());
  184|    296|   }
  185|       |
  186|   507k|   while(input.size() >= 16) {
  ------------------
  |  Branch (186:10): [True: 478k, False: 28.2k]
  ------------------
  187|   478k|      uint32_t d[4];
  188|   478k|      load_le(d, input.data(), 4);
  189|   478k|      tmp = process32(tmp, d[0]);
  190|   478k|      tmp = process32(tmp, d[1]);
  191|   478k|      tmp = process32(tmp, d[2]);
  192|   478k|      tmp = process32(tmp, d[3]);
  193|       |
  194|   478k|      input = input.last(input.size() - 16);
  195|   478k|   }
  196|       |
  197|   164k|   for(; !input.empty(); input = input.last(input.size() - 1)) {
  ------------------
  |  Branch (197:10): [True: 136k, False: 28.2k]
  ------------------
  198|   136k|      tmp = process8(tmp, input.front());
  199|   136k|   }
  200|       |
  201|  28.2k|   m_crc = tmp;
  202|  28.2k|}
_ZN5Botan5CRC2412final_resultENSt3__14spanIhLm18446744073709551615EEE:
  207|  14.0k|void CRC24::final_result(std::span<uint8_t> output) {
  208|  14.0k|   output[0] = get_byte<3>(m_crc);
  209|  14.0k|   output[1] = get_byte<2>(m_crc);
  210|  14.0k|   output[2] = get_byte<1>(m_crc);
  211|  14.0k|   clear();
  212|  14.0k|}
crc24.cpp:_ZN5Botan12_GLOBAL__N_18process8Ejh:
  142|   136k|inline uint32_t process8(uint32_t crc, uint8_t data) {
  143|   136k|   return (crc >> 8) ^ CRC24_T0[get_byte<3>(crc) ^ data];
  144|   136k|}
crc24.cpp:_ZN5Botan12_GLOBAL__N_19process32Ejj:
  146|  1.91M|inline uint32_t process32(uint32_t crc, uint32_t word) {
  147|  1.91M|   const uint32_t sum = crc ^ word;
  148|       |
  149|  1.91M|   return CRC24_T3[get_byte<3>(sum)] ^ CRC24_T2[get_byte<2>(sum)] ^ CRC24_T1[get_byte<1>(sum)] ^
  150|  1.91M|          CRC24_T0[get_byte<0>(sum)];
  151|  1.91M|}

_ZN5Botan12HashFunction6createENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEES5_:
  107|  23.7k|std::unique_ptr<HashFunction> HashFunction::create(std::string_view algo_spec, std::string_view provider) {
  108|       |#if defined(BOTAN_HAS_COMMONCRYPTO)
  109|       |   if(provider.empty() || provider == "commoncrypto") {
  110|       |      if(auto hash = make_commoncrypto_hash(algo_spec))
  111|       |         return hash;
  112|       |
  113|       |      if(!provider.empty())
  114|       |         return nullptr;
  115|       |   }
  116|       |#endif
  117|       |
  118|  23.7k|   if(provider.empty() == false && provider != "base") {
  ------------------
  |  Branch (118:7): [True: 0, False: 23.7k]
  |  Branch (118:36): [True: 0, False: 0]
  ------------------
  119|      0|      return nullptr;  // unknown provider
  120|      0|   }
  121|       |
  122|  23.7k|#if defined(BOTAN_HAS_SHA1)
  123|  23.7k|   if(algo_spec == "SHA-1") {
  ------------------
  |  Branch (123:7): [True: 0, False: 23.7k]
  ------------------
  124|      0|      return std::make_unique<SHA_1>();
  125|      0|   }
  126|  23.7k|#endif
  127|       |
  128|  23.7k|#if defined(BOTAN_HAS_SHA2_32)
  129|  23.7k|   if(algo_spec == "SHA-224") {
  ------------------
  |  Branch (129:7): [True: 0, False: 23.7k]
  ------------------
  130|      0|      return std::make_unique<SHA_224>();
  131|      0|   }
  132|       |
  133|  23.7k|   if(algo_spec == "SHA-256") {
  ------------------
  |  Branch (133:7): [True: 0, False: 23.7k]
  ------------------
  134|      0|      return std::make_unique<SHA_256>();
  135|      0|   }
  136|  23.7k|#endif
  137|       |
  138|  23.7k|#if defined(BOTAN_HAS_SHA2_64)
  139|  23.7k|   if(algo_spec == "SHA-384") {
  ------------------
  |  Branch (139:7): [True: 0, False: 23.7k]
  ------------------
  140|      0|      return std::make_unique<SHA_384>();
  141|      0|   }
  142|       |
  143|  23.7k|   if(algo_spec == "SHA-512") {
  ------------------
  |  Branch (143:7): [True: 8.48k, False: 15.3k]
  ------------------
  144|  8.48k|      return std::make_unique<SHA_512>();
  145|  8.48k|   }
  146|       |
  147|  15.3k|   if(algo_spec == "SHA-512-256") {
  ------------------
  |  Branch (147:7): [True: 0, False: 15.3k]
  ------------------
  148|      0|      return std::make_unique<SHA_512_256>();
  149|      0|   }
  150|  15.3k|#endif
  151|       |
  152|  15.3k|#if defined(BOTAN_HAS_RIPEMD_160)
  153|  15.3k|   if(algo_spec == "RIPEMD-160") {
  ------------------
  |  Branch (153:7): [True: 0, False: 15.3k]
  ------------------
  154|      0|      return std::make_unique<RIPEMD_160>();
  155|      0|   }
  156|  15.3k|#endif
  157|       |
  158|       |#if defined(BOTAN_HAS_WHIRLPOOL)
  159|       |   if(algo_spec == "Whirlpool") {
  160|       |      return std::make_unique<Whirlpool>();
  161|       |   }
  162|       |#endif
  163|       |
  164|  15.3k|#if defined(BOTAN_HAS_MD5)
  165|  15.3k|   if(algo_spec == "MD5") {
  ------------------
  |  Branch (165:7): [True: 0, False: 15.3k]
  ------------------
  166|      0|      return std::make_unique<MD5>();
  167|      0|   }
  168|  15.3k|#endif
  169|       |
  170|       |#if defined(BOTAN_HAS_MD4)
  171|       |   if(algo_spec == "MD4") {
  172|       |      return std::make_unique<MD4>();
  173|       |   }
  174|       |#endif
  175|       |
  176|       |#if defined(BOTAN_HAS_GOST_34_11)
  177|       |   if(algo_spec == "GOST-R-34.11-94" || algo_spec == "GOST-34.11") {
  178|       |      return std::make_unique<GOST_34_11>();
  179|       |   }
  180|       |#endif
  181|       |
  182|       |#if defined(BOTAN_HAS_ADLER32)
  183|       |   if(algo_spec == "Adler32") {
  184|       |      return std::make_unique<Adler32>();
  185|       |   }
  186|       |#endif
  187|       |
  188|  15.3k|#if defined(BOTAN_HAS_CRC24)
  189|  15.3k|   if(algo_spec == "CRC24") {
  ------------------
  |  Branch (189:7): [True: 15.3k, False: 0]
  ------------------
  190|  15.3k|      return std::make_unique<CRC24>();
  191|  15.3k|   }
  192|      0|#endif
  193|       |
  194|       |#if defined(BOTAN_HAS_CRC32)
  195|       |   if(algo_spec == "CRC32") {
  196|       |      return std::make_unique<CRC32>();
  197|       |   }
  198|       |#endif
  199|       |
  200|       |#if defined(BOTAN_HAS_STREEBOG)
  201|       |   if(algo_spec == "Streebog-256") {
  202|       |      return std::make_unique<Streebog>(256);
  203|       |   }
  204|       |   if(algo_spec == "Streebog-512") {
  205|       |      return std::make_unique<Streebog>(512);
  206|       |   }
  207|       |#endif
  208|       |
  209|      0|#if defined(BOTAN_HAS_SM3)
  210|      0|   if(algo_spec == "SM3") {
  ------------------
  |  Branch (210:7): [True: 0, False: 0]
  ------------------
  211|      0|      return std::make_unique<SM3>();
  212|      0|   }
  213|      0|#endif
  214|       |
  215|      0|   const SCAN_Name req(algo_spec);
  216|       |
  217|       |#if defined(BOTAN_HAS_SKEIN_512)
  218|       |   if(req.algo_name() == "Skein-512") {
  219|       |      return std::make_unique<Skein_512>(req.arg_as_integer(0, 512), req.arg(1, ""));
  220|       |   }
  221|       |#endif
  222|       |
  223|       |#if defined(BOTAN_HAS_BLAKE2B)
  224|       |   if(req.algo_name() == "Blake2b" || req.algo_name() == "BLAKE2b") {
  225|       |      return std::make_unique<BLAKE2b>(req.arg_as_integer(0, 512));
  226|       |   }
  227|       |#endif
  228|       |
  229|       |#if defined(BOTAN_HAS_BLAKE2S)
  230|       |   if(req.algo_name() == "Blake2s" || req.algo_name() == "BLAKE2s") {
  231|       |      return std::make_unique<BLAKE2s>(req.arg_as_integer(0, 256));
  232|       |   }
  233|       |#endif
  234|       |
  235|       |#if defined(BOTAN_HAS_KECCAK)
  236|       |   if(req.algo_name() == "Keccak-1600") {
  237|       |      return std::make_unique<Keccak_1600>(req.arg_as_integer(0, 512));
  238|       |   }
  239|       |#endif
  240|       |
  241|      0|#if defined(BOTAN_HAS_SHA3)
  242|      0|   if(req.algo_name() == "SHA-3") {
  ------------------
  |  Branch (242:7): [True: 0, False: 0]
  ------------------
  243|      0|      return std::make_unique<SHA_3>(req.arg_as_integer(0, 512));
  244|      0|   }
  245|      0|#endif
  246|       |
  247|      0|#if defined(BOTAN_HAS_SHAKE)
  248|      0|   if(req.algo_name() == "SHAKE-128" && req.arg_count() == 1) {
  ------------------
  |  Branch (248:7): [True: 0, False: 0]
  |  Branch (248:41): [True: 0, False: 0]
  ------------------
  249|      0|      return std::make_unique<SHAKE_128>(req.arg_as_integer(0));
  250|      0|   }
  251|      0|   if(req.algo_name() == "SHAKE-256" && req.arg_count() == 1) {
  ------------------
  |  Branch (251:7): [True: 0, False: 0]
  |  Branch (251:41): [True: 0, False: 0]
  ------------------
  252|      0|      return std::make_unique<SHAKE_256>(req.arg_as_integer(0));
  253|      0|   }
  254|      0|#endif
  255|       |
  256|       |#if defined(BOTAN_HAS_PARALLEL_HASH)
  257|       |   if(req.algo_name() == "Parallel") {
  258|       |      std::vector<std::unique_ptr<HashFunction>> hashes;
  259|       |
  260|       |      for(size_t i = 0; i != req.arg_count(); ++i) {
  261|       |         auto h = HashFunction::create(req.arg(i));
  262|       |         if(!h) {
  263|       |            return nullptr;
  264|       |         }
  265|       |         hashes.push_back(std::move(h));
  266|       |      }
  267|       |
  268|       |      return std::make_unique<Parallel>(hashes);
  269|       |   }
  270|       |#endif
  271|       |
  272|      0|#if defined(BOTAN_HAS_TRUNCATED_HASH)
  273|      0|   if(req.algo_name() == "Truncated" && req.arg_count() == 2) {
  ------------------
  |  Branch (273:7): [True: 0, False: 0]
  |  Branch (273:41): [True: 0, False: 0]
  ------------------
  274|      0|      auto hash = HashFunction::create(req.arg(0));
  275|      0|      if(!hash) {
  ------------------
  |  Branch (275:10): [True: 0, False: 0]
  ------------------
  276|      0|         return nullptr;
  277|      0|      }
  278|       |
  279|      0|      return std::make_unique<Truncated_Hash>(std::move(hash), req.arg_as_integer(1));
  280|      0|   }
  281|      0|#endif
  282|       |
  283|       |#if defined(BOTAN_HAS_COMB4P)
  284|       |   if(req.algo_name() == "Comb4P" && req.arg_count() == 2) {
  285|       |      auto h1 = HashFunction::create(req.arg(0));
  286|       |      auto h2 = HashFunction::create(req.arg(1));
  287|       |
  288|       |      if(h1 && h2) {
  289|       |         return std::make_unique<Comb4P>(std::move(h1), std::move(h2));
  290|       |      }
  291|       |   }
  292|       |#endif
  293|       |
  294|      0|   return nullptr;
  295|      0|}

_ZN5Botan7SHA_51215compress_digestERNSt3__16vectorImNS_16secure_allocatorImEEEENS1_4spanIKhLm18446744073709551615EEEm:
   43|   271k|void SHA_512::compress_digest(digest_type& digest, std::span<const uint8_t> input, size_t blocks) {
   44|       |#if defined(BOTAN_HAS_SHA2_64_BMI2)
   45|       |   if(CPUID::has_bmi2()) {
   46|       |      return compress_digest_bmi2(digest, input, blocks);
   47|       |   }
   48|       |#endif
   49|       |
   50|       |#if defined(BOTAN_HAS_SHA2_64_ARMV8)
   51|       |   if(CPUID::has_arm_sha2_512()) {
   52|       |      return compress_digest_armv8(digest, input, blocks);
   53|       |   }
   54|       |#endif
   55|       |
   56|   271k|   uint64_t A = digest[0], B = digest[1], C = digest[2], D = digest[3], E = digest[4], F = digest[5], G = digest[6],
   57|   271k|            H = digest[7];
   58|       |
   59|   271k|   BufferSlicer in(input);
   60|       |
   61|   542k|   for(size_t i = 0; i != blocks; ++i) {
  ------------------
  |  Branch (61:22): [True: 271k, False: 271k]
  ------------------
   62|   271k|      const auto block = in.take(block_bytes);
   63|       |
   64|   271k|      uint64_t W00 = load_be<uint64_t>(block.data(), 0);
   65|   271k|      uint64_t W01 = load_be<uint64_t>(block.data(), 1);
   66|   271k|      uint64_t W02 = load_be<uint64_t>(block.data(), 2);
   67|   271k|      uint64_t W03 = load_be<uint64_t>(block.data(), 3);
   68|   271k|      uint64_t W04 = load_be<uint64_t>(block.data(), 4);
   69|   271k|      uint64_t W05 = load_be<uint64_t>(block.data(), 5);
   70|   271k|      uint64_t W06 = load_be<uint64_t>(block.data(), 6);
   71|   271k|      uint64_t W07 = load_be<uint64_t>(block.data(), 7);
   72|   271k|      uint64_t W08 = load_be<uint64_t>(block.data(), 8);
   73|   271k|      uint64_t W09 = load_be<uint64_t>(block.data(), 9);
   74|   271k|      uint64_t W10 = load_be<uint64_t>(block.data(), 10);
   75|   271k|      uint64_t W11 = load_be<uint64_t>(block.data(), 11);
   76|   271k|      uint64_t W12 = load_be<uint64_t>(block.data(), 12);
   77|   271k|      uint64_t W13 = load_be<uint64_t>(block.data(), 13);
   78|   271k|      uint64_t W14 = load_be<uint64_t>(block.data(), 14);
   79|   271k|      uint64_t W15 = load_be<uint64_t>(block.data(), 15);
   80|       |
   81|   271k|      SHA2_64_F(A, B, C, D, E, F, G, H, W00, W14, W09, W01, 0x428A2F98D728AE22);
   82|   271k|      SHA2_64_F(H, A, B, C, D, E, F, G, W01, W15, W10, W02, 0x7137449123EF65CD);
   83|   271k|      SHA2_64_F(G, H, A, B, C, D, E, F, W02, W00, W11, W03, 0xB5C0FBCFEC4D3B2F);
   84|   271k|      SHA2_64_F(F, G, H, A, B, C, D, E, W03, W01, W12, W04, 0xE9B5DBA58189DBBC);
   85|   271k|      SHA2_64_F(E, F, G, H, A, B, C, D, W04, W02, W13, W05, 0x3956C25BF348B538);
   86|   271k|      SHA2_64_F(D, E, F, G, H, A, B, C, W05, W03, W14, W06, 0x59F111F1B605D019);
   87|   271k|      SHA2_64_F(C, D, E, F, G, H, A, B, W06, W04, W15, W07, 0x923F82A4AF194F9B);
   88|   271k|      SHA2_64_F(B, C, D, E, F, G, H, A, W07, W05, W00, W08, 0xAB1C5ED5DA6D8118);
   89|   271k|      SHA2_64_F(A, B, C, D, E, F, G, H, W08, W06, W01, W09, 0xD807AA98A3030242);
   90|   271k|      SHA2_64_F(H, A, B, C, D, E, F, G, W09, W07, W02, W10, 0x12835B0145706FBE);
   91|   271k|      SHA2_64_F(G, H, A, B, C, D, E, F, W10, W08, W03, W11, 0x243185BE4EE4B28C);
   92|   271k|      SHA2_64_F(F, G, H, A, B, C, D, E, W11, W09, W04, W12, 0x550C7DC3D5FFB4E2);
   93|   271k|      SHA2_64_F(E, F, G, H, A, B, C, D, W12, W10, W05, W13, 0x72BE5D74F27B896F);
   94|   271k|      SHA2_64_F(D, E, F, G, H, A, B, C, W13, W11, W06, W14, 0x80DEB1FE3B1696B1);
   95|   271k|      SHA2_64_F(C, D, E, F, G, H, A, B, W14, W12, W07, W15, 0x9BDC06A725C71235);
   96|   271k|      SHA2_64_F(B, C, D, E, F, G, H, A, W15, W13, W08, W00, 0xC19BF174CF692694);
   97|   271k|      SHA2_64_F(A, B, C, D, E, F, G, H, W00, W14, W09, W01, 0xE49B69C19EF14AD2);
   98|   271k|      SHA2_64_F(H, A, B, C, D, E, F, G, W01, W15, W10, W02, 0xEFBE4786384F25E3);
   99|   271k|      SHA2_64_F(G, H, A, B, C, D, E, F, W02, W00, W11, W03, 0x0FC19DC68B8CD5B5);
  100|   271k|      SHA2_64_F(F, G, H, A, B, C, D, E, W03, W01, W12, W04, 0x240CA1CC77AC9C65);
  101|   271k|      SHA2_64_F(E, F, G, H, A, B, C, D, W04, W02, W13, W05, 0x2DE92C6F592B0275);
  102|   271k|      SHA2_64_F(D, E, F, G, H, A, B, C, W05, W03, W14, W06, 0x4A7484AA6EA6E483);
  103|   271k|      SHA2_64_F(C, D, E, F, G, H, A, B, W06, W04, W15, W07, 0x5CB0A9DCBD41FBD4);
  104|   271k|      SHA2_64_F(B, C, D, E, F, G, H, A, W07, W05, W00, W08, 0x76F988DA831153B5);
  105|   271k|      SHA2_64_F(A, B, C, D, E, F, G, H, W08, W06, W01, W09, 0x983E5152EE66DFAB);
  106|   271k|      SHA2_64_F(H, A, B, C, D, E, F, G, W09, W07, W02, W10, 0xA831C66D2DB43210);
  107|   271k|      SHA2_64_F(G, H, A, B, C, D, E, F, W10, W08, W03, W11, 0xB00327C898FB213F);
  108|   271k|      SHA2_64_F(F, G, H, A, B, C, D, E, W11, W09, W04, W12, 0xBF597FC7BEEF0EE4);
  109|   271k|      SHA2_64_F(E, F, G, H, A, B, C, D, W12, W10, W05, W13, 0xC6E00BF33DA88FC2);
  110|   271k|      SHA2_64_F(D, E, F, G, H, A, B, C, W13, W11, W06, W14, 0xD5A79147930AA725);
  111|   271k|      SHA2_64_F(C, D, E, F, G, H, A, B, W14, W12, W07, W15, 0x06CA6351E003826F);
  112|   271k|      SHA2_64_F(B, C, D, E, F, G, H, A, W15, W13, W08, W00, 0x142929670A0E6E70);
  113|   271k|      SHA2_64_F(A, B, C, D, E, F, G, H, W00, W14, W09, W01, 0x27B70A8546D22FFC);
  114|   271k|      SHA2_64_F(H, A, B, C, D, E, F, G, W01, W15, W10, W02, 0x2E1B21385C26C926);
  115|   271k|      SHA2_64_F(G, H, A, B, C, D, E, F, W02, W00, W11, W03, 0x4D2C6DFC5AC42AED);
  116|   271k|      SHA2_64_F(F, G, H, A, B, C, D, E, W03, W01, W12, W04, 0x53380D139D95B3DF);
  117|   271k|      SHA2_64_F(E, F, G, H, A, B, C, D, W04, W02, W13, W05, 0x650A73548BAF63DE);
  118|   271k|      SHA2_64_F(D, E, F, G, H, A, B, C, W05, W03, W14, W06, 0x766A0ABB3C77B2A8);
  119|   271k|      SHA2_64_F(C, D, E, F, G, H, A, B, W06, W04, W15, W07, 0x81C2C92E47EDAEE6);
  120|   271k|      SHA2_64_F(B, C, D, E, F, G, H, A, W07, W05, W00, W08, 0x92722C851482353B);
  121|   271k|      SHA2_64_F(A, B, C, D, E, F, G, H, W08, W06, W01, W09, 0xA2BFE8A14CF10364);
  122|   271k|      SHA2_64_F(H, A, B, C, D, E, F, G, W09, W07, W02, W10, 0xA81A664BBC423001);
  123|   271k|      SHA2_64_F(G, H, A, B, C, D, E, F, W10, W08, W03, W11, 0xC24B8B70D0F89791);
  124|   271k|      SHA2_64_F(F, G, H, A, B, C, D, E, W11, W09, W04, W12, 0xC76C51A30654BE30);
  125|   271k|      SHA2_64_F(E, F, G, H, A, B, C, D, W12, W10, W05, W13, 0xD192E819D6EF5218);
  126|   271k|      SHA2_64_F(D, E, F, G, H, A, B, C, W13, W11, W06, W14, 0xD69906245565A910);
  127|   271k|      SHA2_64_F(C, D, E, F, G, H, A, B, W14, W12, W07, W15, 0xF40E35855771202A);
  128|   271k|      SHA2_64_F(B, C, D, E, F, G, H, A, W15, W13, W08, W00, 0x106AA07032BBD1B8);
  129|   271k|      SHA2_64_F(A, B, C, D, E, F, G, H, W00, W14, W09, W01, 0x19A4C116B8D2D0C8);
  130|   271k|      SHA2_64_F(H, A, B, C, D, E, F, G, W01, W15, W10, W02, 0x1E376C085141AB53);
  131|   271k|      SHA2_64_F(G, H, A, B, C, D, E, F, W02, W00, W11, W03, 0x2748774CDF8EEB99);
  132|   271k|      SHA2_64_F(F, G, H, A, B, C, D, E, W03, W01, W12, W04, 0x34B0BCB5E19B48A8);
  133|   271k|      SHA2_64_F(E, F, G, H, A, B, C, D, W04, W02, W13, W05, 0x391C0CB3C5C95A63);
  134|   271k|      SHA2_64_F(D, E, F, G, H, A, B, C, W05, W03, W14, W06, 0x4ED8AA4AE3418ACB);
  135|   271k|      SHA2_64_F(C, D, E, F, G, H, A, B, W06, W04, W15, W07, 0x5B9CCA4F7763E373);
  136|   271k|      SHA2_64_F(B, C, D, E, F, G, H, A, W07, W05, W00, W08, 0x682E6FF3D6B2B8A3);
  137|   271k|      SHA2_64_F(A, B, C, D, E, F, G, H, W08, W06, W01, W09, 0x748F82EE5DEFB2FC);
  138|   271k|      SHA2_64_F(H, A, B, C, D, E, F, G, W09, W07, W02, W10, 0x78A5636F43172F60);
  139|   271k|      SHA2_64_F(G, H, A, B, C, D, E, F, W10, W08, W03, W11, 0x84C87814A1F0AB72);
  140|   271k|      SHA2_64_F(F, G, H, A, B, C, D, E, W11, W09, W04, W12, 0x8CC702081A6439EC);
  141|   271k|      SHA2_64_F(E, F, G, H, A, B, C, D, W12, W10, W05, W13, 0x90BEFFFA23631E28);
  142|   271k|      SHA2_64_F(D, E, F, G, H, A, B, C, W13, W11, W06, W14, 0xA4506CEBDE82BDE9);
  143|   271k|      SHA2_64_F(C, D, E, F, G, H, A, B, W14, W12, W07, W15, 0xBEF9A3F7B2C67915);
  144|   271k|      SHA2_64_F(B, C, D, E, F, G, H, A, W15, W13, W08, W00, 0xC67178F2E372532B);
  145|   271k|      SHA2_64_F(A, B, C, D, E, F, G, H, W00, W14, W09, W01, 0xCA273ECEEA26619C);
  146|   271k|      SHA2_64_F(H, A, B, C, D, E, F, G, W01, W15, W10, W02, 0xD186B8C721C0C207);
  147|   271k|      SHA2_64_F(G, H, A, B, C, D, E, F, W02, W00, W11, W03, 0xEADA7DD6CDE0EB1E);
  148|   271k|      SHA2_64_F(F, G, H, A, B, C, D, E, W03, W01, W12, W04, 0xF57D4F7FEE6ED178);
  149|   271k|      SHA2_64_F(E, F, G, H, A, B, C, D, W04, W02, W13, W05, 0x06F067AA72176FBA);
  150|   271k|      SHA2_64_F(D, E, F, G, H, A, B, C, W05, W03, W14, W06, 0x0A637DC5A2C898A6);
  151|   271k|      SHA2_64_F(C, D, E, F, G, H, A, B, W06, W04, W15, W07, 0x113F9804BEF90DAE);
  152|   271k|      SHA2_64_F(B, C, D, E, F, G, H, A, W07, W05, W00, W08, 0x1B710B35131C471B);
  153|   271k|      SHA2_64_F(A, B, C, D, E, F, G, H, W08, W06, W01, W09, 0x28DB77F523047D84);
  154|   271k|      SHA2_64_F(H, A, B, C, D, E, F, G, W09, W07, W02, W10, 0x32CAAB7B40C72493);
  155|   271k|      SHA2_64_F(G, H, A, B, C, D, E, F, W10, W08, W03, W11, 0x3C9EBE0A15C9BEBC);
  156|   271k|      SHA2_64_F(F, G, H, A, B, C, D, E, W11, W09, W04, W12, 0x431D67C49C100D4C);
  157|   271k|      SHA2_64_F(E, F, G, H, A, B, C, D, W12, W10, W05, W13, 0x4CC5D4BECB3E42B6);
  158|   271k|      SHA2_64_F(D, E, F, G, H, A, B, C, W13, W11, W06, W14, 0x597F299CFC657E2A);
  159|   271k|      SHA2_64_F(C, D, E, F, G, H, A, B, W14, W12, W07, W15, 0x5FCB6FAB3AD6FAEC);
  160|   271k|      SHA2_64_F(B, C, D, E, F, G, H, A, W15, W13, W08, W00, 0x6C44198C4A475817);
  161|       |
  162|   271k|      A = (digest[0] += A);
  163|   271k|      B = (digest[1] += B);
  164|   271k|      C = (digest[2] += C);
  165|   271k|      D = (digest[3] += D);
  166|   271k|      E = (digest[4] += E);
  167|   271k|      F = (digest[5] += F);
  168|   271k|      G = (digest[6] += G);
  169|   271k|      H = (digest[7] += H);
  170|   271k|   }
  171|   271k|}
_ZN5Botan7SHA_51210compress_nERNSt3__16vectorImNS_16secure_allocatorImEEEENS1_4spanIKhLm18446744073709551615EEEm:
  193|   271k|void SHA_512::compress_n(digest_type& digest, std::span<const uint8_t> input, size_t blocks) {
  194|   271k|   SHA_512::compress_digest(digest, input, blocks);
  195|   271k|}
_ZN5Botan7SHA_5124initERNSt3__16vectorImNS_16secure_allocatorImEEEE:
  219|   161k|void SHA_512::init(digest_type& digest) {
  220|   161k|   digest.assign({0x6A09E667F3BCC908,
  221|   161k|                  0xBB67AE8584CAA73B,
  222|   161k|                  0x3C6EF372FE94F82B,
  223|   161k|                  0xA54FF53A5F1D36F1,
  224|   161k|                  0x510E527FADE682D1,
  225|   161k|                  0x9B05688C2B3E6C1F,
  226|   161k|                  0x1F83D9ABFB41BD6B,
  227|   161k|                  0x5BE0CD19137E2179});
  228|   161k|}
_ZN5Botan7SHA_5128add_dataENSt3__14spanIKhLm18446744073709551615EEE:
  258|   322k|void SHA_512::add_data(std::span<const uint8_t> input) {
  259|   322k|   m_md.update(input);
  260|   322k|}
_ZN5Botan7SHA_51212final_resultENSt3__14spanIhLm18446744073709551615EEE:
  270|   118k|void SHA_512::final_result(std::span<uint8_t> output) {
  271|   118k|   m_md.final(output);
  272|   118k|}

_ZN5Botan4HMAC8add_dataENSt3__14spanIKhLm18446744073709551615EEE:
   19|   110k|void HMAC::add_data(std::span<const uint8_t> input) {
   20|   110k|   assert_key_material_set();
   21|   110k|   m_hash->update(input);
   22|   110k|}
_ZN5Botan4HMAC12final_resultENSt3__14spanIhLm18446744073709551615EEE:
   27|  59.3k|void HMAC::final_result(std::span<uint8_t> mac) {
   28|  59.3k|   assert_key_material_set();
   29|  59.3k|   m_hash->final(mac);
   30|  59.3k|   m_hash->update(m_okey);
   31|  59.3k|   m_hash->update(mac.first(m_hash_output_length));
   32|  59.3k|   m_hash->final(mac);
   33|  59.3k|   m_hash->update(m_ikey);
   34|  59.3k|}
_ZNK5Botan4HMAC8key_specEv:
   36|  33.9k|Key_Length_Specification HMAC::key_spec() const {
   37|       |   // Support very long lengths for things like PBKDF2 and the TLS PRF
   38|  33.9k|   return Key_Length_Specification(0, 4096);
   39|  33.9k|}
_ZNK5Botan4HMAC13output_lengthEv:
   41|  76.3k|size_t HMAC::output_length() const {
   42|  76.3k|   return m_hash_output_length;
   43|  76.3k|}
_ZNK5Botan4HMAC19has_keying_materialEv:
   45|   169k|bool HMAC::has_keying_material() const {
   46|   169k|   return !m_okey.empty();
   47|   169k|}
_ZN5Botan4HMAC12key_scheduleENSt3__14spanIKhLm18446744073709551615EEE:
   52|  33.9k|void HMAC::key_schedule(std::span<const uint8_t> key) {
   53|  33.9k|   const uint8_t ipad = 0x36;
   54|  33.9k|   const uint8_t opad = 0x5C;
   55|       |
   56|  33.9k|   m_hash->clear();
   57|       |
   58|  33.9k|   m_ikey.resize(m_hash_block_size);
   59|  33.9k|   m_okey.resize(m_hash_block_size);
   60|       |
   61|  33.9k|   clear_mem(m_ikey.data(), m_ikey.size());
   62|  33.9k|   clear_mem(m_okey.data(), m_okey.size());
   63|       |
   64|       |   /*
   65|       |   * Sometimes the HMAC key length itself is sensitive, as with PBKDF2 where it
   66|       |   * reveals the length of the passphrase. Make some attempt to hide this to
   67|       |   * side channels. Clearly if the secret is longer than the block size then the
   68|       |   * branch to hash first reveals that. In addition, counting the number of
   69|       |   * compression functions executed reveals the size at the granularity of the
   70|       |   * hash function's block size.
   71|       |   *
   72|       |   * The greater concern is for smaller keys; being able to detect when a
   73|       |   * passphrase is say 4 bytes may assist choosing weaker targets. Even though
   74|       |   * the loop bounds are constant, we can only actually read key[0..length] so
   75|       |   * it doesn't seem possible to make this computation truly constant time.
   76|       |   *
   77|       |   * We don't mind leaking if the length is exactly zero since that's
   78|       |   * trivial to simply check.
   79|       |   */
   80|       |
   81|  33.9k|   if(key.size() > m_hash_block_size) {
  ------------------
  |  Branch (81:7): [True: 0, False: 33.9k]
  ------------------
   82|      0|      m_hash->update(key);
   83|      0|      m_hash->final(m_ikey.data());
   84|  33.9k|   } else if(!key.empty()) {
  ------------------
  |  Branch (84:14): [True: 33.9k, False: 0]
  ------------------
   85|  4.37M|      for(size_t i = 0, i_mod_length = 0; i != m_hash_block_size; ++i) {
  ------------------
  |  Branch (85:43): [True: 4.34M, False: 33.9k]
  ------------------
   86|       |         /*
   87|       |         access key[i % length] but avoiding division due to variable
   88|       |         time computation on some processors.
   89|       |         */
   90|  4.34M|         auto needs_reduction = CT::Mask<size_t>::is_lte(key.size(), i_mod_length);
   91|  4.34M|         i_mod_length = needs_reduction.select(0, i_mod_length);
   92|  4.34M|         const uint8_t kb = key[i_mod_length];
   93|       |
   94|  4.34M|         auto in_range = CT::Mask<size_t>::is_lt(i, key.size());
   95|  4.34M|         m_ikey[i] = static_cast<uint8_t>(in_range.if_set_return(kb));
   96|  4.34M|         i_mod_length += 1;
   97|  4.34M|      }
   98|  33.9k|   }
   99|       |
  100|  4.37M|   for(size_t i = 0; i != m_hash_block_size; ++i) {
  ------------------
  |  Branch (100:22): [True: 4.34M, False: 33.9k]
  ------------------
  101|  4.34M|      m_ikey[i] ^= ipad;
  102|  4.34M|      m_okey[i] = m_ikey[i] ^ ipad ^ opad;
  103|  4.34M|   }
  104|       |
  105|  33.9k|   m_hash->update(m_ikey);
  106|  33.9k|}
_ZN5Botan4HMACC2ENSt3__110unique_ptrINS_12HashFunctionENS1_14default_deleteIS3_EEEE:
  135|  8.48k|      m_hash(std::move(hash)),
  136|  8.48k|      m_hash_output_length(m_hash->output_length()),
  137|  8.48k|      m_hash_block_size(m_hash->hash_block_size()) {
  138|  8.48k|   BOTAN_ARG_CHECK(m_hash_block_size >= m_hash_output_length, "HMAC is not compatible with this hash function");
  ------------------
  |  |   30|  8.48k|   do {                                                          \
  |  |   31|  8.48k|      if(!(expr))                                                \
  |  |  ------------------
  |  |  |  Branch (31:10): [True: 0, False: 8.48k]
  |  |  ------------------
  |  |   32|  8.48k|         Botan::throw_invalid_argument(msg, __func__, __FILE__); \
  |  |   33|  8.48k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (33:12): [Folded, False: 8.48k]
  |  |  ------------------
  ------------------
  139|  8.48k|}

_ZN5Botan25MessageAuthenticationCode6createENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEES5_:
   52|  8.48k|                                                                             std::string_view provider) {
   53|  8.48k|   const SCAN_Name req(algo_spec);
   54|       |
   55|       |#if defined(BOTAN_HAS_BLAKE2BMAC)
   56|       |   if(req.algo_name() == "Blake2b" || req.algo_name() == "BLAKE2b") {
   57|       |      return std::make_unique<BLAKE2bMAC>(req.arg_as_integer(0, 512));
   58|       |   }
   59|       |#endif
   60|       |
   61|       |#if defined(BOTAN_HAS_GMAC)
   62|       |   if(req.algo_name() == "GMAC" && req.arg_count() == 1) {
   63|       |      if(provider.empty() || provider == "base") {
   64|       |         if(auto bc = BlockCipher::create(req.arg(0))) {
   65|       |            return std::make_unique<GMAC>(std::move(bc));
   66|       |         }
   67|       |      }
   68|       |   }
   69|       |#endif
   70|       |
   71|  8.48k|#if defined(BOTAN_HAS_HMAC)
   72|  8.48k|   if(req.algo_name() == "HMAC" && req.arg_count() == 1) {
  ------------------
  |  Branch (72:7): [True: 8.48k, False: 0]
  |  Branch (72:36): [True: 8.48k, False: 0]
  ------------------
   73|  8.48k|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (73:10): [True: 8.48k, False: 0]
  |  Branch (73:30): [True: 0, False: 0]
  ------------------
   74|  8.48k|         if(auto hash = HashFunction::create(req.arg(0))) {
  ------------------
  |  Branch (74:18): [True: 8.48k, False: 0]
  ------------------
   75|  8.48k|            return std::make_unique<HMAC>(std::move(hash));
   76|  8.48k|         }
   77|  8.48k|      }
   78|  8.48k|   }
   79|      0|#endif
   80|       |
   81|       |#if defined(BOTAN_HAS_POLY1305)
   82|       |   if(req.algo_name() == "Poly1305" && req.arg_count() == 0) {
   83|       |      if(provider.empty() || provider == "base") {
   84|       |         return std::make_unique<Poly1305>();
   85|       |      }
   86|       |   }
   87|       |#endif
   88|       |
   89|       |#if defined(BOTAN_HAS_SIPHASH)
   90|       |   if(req.algo_name() == "SipHash") {
   91|       |      if(provider.empty() || provider == "base") {
   92|       |         return std::make_unique<SipHash>(req.arg_as_integer(0, 2), req.arg_as_integer(1, 4));
   93|       |      }
   94|       |   }
   95|       |#endif
   96|       |
   97|      0|#if defined(BOTAN_HAS_CMAC)
   98|      0|   if((req.algo_name() == "CMAC" || req.algo_name() == "OMAC") && req.arg_count() == 1) {
  ------------------
  |  Branch (98:8): [True: 0, False: 0]
  |  Branch (98:37): [True: 0, False: 0]
  |  Branch (98:67): [True: 0, False: 0]
  ------------------
   99|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (99:10): [True: 0, False: 0]
  |  Branch (99:30): [True: 0, False: 0]
  ------------------
  100|      0|         if(auto bc = BlockCipher::create(req.arg(0))) {
  ------------------
  |  Branch (100:18): [True: 0, False: 0]
  ------------------
  101|      0|            return std::make_unique<CMAC>(std::move(bc));
  102|      0|         }
  103|      0|      }
  104|      0|   }
  105|      0|#endif
  106|       |
  107|       |#if defined(BOTAN_HAS_ANSI_X919_MAC)
  108|       |   if(req.algo_name() == "X9.19-MAC") {
  109|       |      if(provider.empty() || provider == "base") {
  110|       |         return std::make_unique<ANSI_X919_MAC>();
  111|       |      }
  112|       |   }
  113|       |#endif
  114|       |
  115|      0|#if defined(BOTAN_HAS_KMAC)
  116|      0|   if(req.algo_name() == "KMAC-128") {
  ------------------
  |  Branch (116:7): [True: 0, False: 0]
  ------------------
  117|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (117:10): [True: 0, False: 0]
  |  Branch (117:30): [True: 0, False: 0]
  ------------------
  118|      0|         if(req.arg_count() != 1) {
  ------------------
  |  Branch (118:13): [True: 0, False: 0]
  ------------------
  119|      0|            throw Invalid_Argument(
  120|      0|               "invalid algorithm specification for KMAC-128: need exactly one argument for output bit length");
  121|      0|         }
  122|      0|         return std::make_unique<KMAC128>(req.arg_as_integer(0));
  123|      0|      }
  124|      0|   }
  125|       |
  126|      0|   if(req.algo_name() == "KMAC-256") {
  ------------------
  |  Branch (126:7): [True: 0, False: 0]
  ------------------
  127|      0|      if(provider.empty() || provider == "base") {
  ------------------
  |  Branch (127:10): [True: 0, False: 0]
  |  Branch (127:30): [True: 0, False: 0]
  ------------------
  128|      0|         if(req.arg_count() != 1) {
  ------------------
  |  Branch (128:13): [True: 0, False: 0]
  ------------------
  129|      0|            throw Invalid_Argument(
  130|      0|               "invalid algorithm specification for KMAC-256: need exactly one argument for output bit length");
  131|      0|         }
  132|      0|         return std::make_unique<KMAC256>(req.arg_as_integer(0));
  133|      0|      }
  134|      0|   }
  135|      0|#endif
  136|       |
  137|      0|   BOTAN_UNUSED(req);
  ------------------
  |  |  118|      0|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
  138|      0|   BOTAN_UNUSED(provider);
  ------------------
  |  |  118|      0|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
  139|       |
  140|      0|   return nullptr;
  141|      0|}
_ZN5Botan25MessageAuthenticationCode15create_or_throwENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEES5_:
  149|  8.48k|                                                                                      std::string_view provider) {
  150|  8.48k|   if(auto mac = MessageAuthenticationCode::create(algo, provider)) {
  ------------------
  |  Branch (150:12): [True: 8.48k, False: 0]
  ------------------
  151|  8.48k|      return mac;
  152|  8.48k|   }
  153|      0|   throw Lookup_Error("MAC", algo, provider);
  154|  8.48k|}

_ZN5Botan14AutoSeeded_RNGD2Ev:
   42|  8.48k|AutoSeeded_RNG::~AutoSeeded_RNG() = default;
_ZN5Botan14AutoSeeded_RNGC2ERNS_21RandomNumberGeneratorEm:
   44|  8.48k|AutoSeeded_RNG::AutoSeeded_RNG(RandomNumberGenerator& underlying_rng, size_t reseed_interval) {
   45|  8.48k|   m_rng = std::make_unique<HMAC_DRBG>(auto_rng_hmac(), underlying_rng, reseed_interval);
   46|       |
   47|  8.48k|   force_reseed();
   48|  8.48k|}
_ZN5Botan14AutoSeeded_RNGC2Em:
   66|  8.48k|      AutoSeeded_RNG(system_rng(), reseed_interval)
   67|       |#else
   68|       |      AutoSeeded_RNG(Entropy_Sources::global_sources(), reseed_interval)
   69|       |#endif
   70|  8.48k|{
   71|  8.48k|}
_ZN5Botan14AutoSeeded_RNG12force_reseedEv:
   73|  8.48k|void AutoSeeded_RNG::force_reseed() {
   74|  8.48k|   m_rng->force_reseed();
   75|  8.48k|   m_rng->next_byte();
   76|       |
   77|  8.48k|   if(!m_rng->is_seeded()) {
  ------------------
  |  Branch (77:7): [True: 0, False: 8.48k]
  ------------------
   78|      0|      throw Internal_Error("AutoSeeded_RNG reseeding failed");
   79|      0|   }
   80|  8.48k|}
auto_rng.cpp:_ZN5Botan12_GLOBAL__N_113auto_rng_hmacEv:
   24|  8.48k|std::unique_ptr<MessageAuthenticationCode> auto_rng_hmac() {
   25|  8.48k|   const std::string possible_auto_rng_hmacs[] = {
   26|  8.48k|      "HMAC(SHA-512)",
   27|  8.48k|      "HMAC(SHA-256)",
   28|  8.48k|   };
   29|       |
   30|  8.48k|   for(const auto& hmac : possible_auto_rng_hmacs) {
  ------------------
  |  Branch (30:25): [True: 8.48k, False: 0]
  ------------------
   31|  8.48k|      if(auto mac = MessageAuthenticationCode::create_or_throw(hmac)) {
  ------------------
  |  Branch (31:15): [True: 8.48k, False: 0]
  ------------------
   32|  8.48k|         return mac;
   33|  8.48k|      }
   34|  8.48k|   }
   35|       |
   36|       |   // This shouldn't happen since this module has a dependency on sha2_32
   37|      0|   throw Internal_Error("AutoSeeded_RNG: No usable HMAC hash found");
   38|  8.48k|}

_ZN5Botan9HMAC_DRBGC2ENSt3__110unique_ptrINS_25MessageAuthenticationCodeENS1_14default_deleteIS3_EEEERNS_21RandomNumberGeneratorEmm:
   50|  8.48k|      Stateful_RNG(underlying_rng, reseed_interval),
   51|  8.48k|      m_mac(std::move(prf)),
   52|  8.48k|      m_max_number_of_bytes_per_request(max_number_of_bytes_per_request),
   53|  8.48k|      m_security_level(hmac_drbg_security_level(m_mac->output_length())) {
   54|  8.48k|   BOTAN_ASSERT_NONNULL(m_mac);
  ------------------
  |  |   87|  8.48k|   do {                                                                                   \
  |  |   88|  8.48k|      if((ptr) == nullptr)                                                                \
  |  |  ------------------
  |  |  |  Branch (88:10): [True: 0, False: 8.48k]
  |  |  ------------------
  |  |   89|  8.48k|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |   90|  8.48k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 8.48k]
  |  |  ------------------
  ------------------
   55|       |
   56|  8.48k|   check_limits(reseed_interval, max_number_of_bytes_per_request);
   57|       |
   58|  8.48k|   clear();
   59|  8.48k|}
_ZN5Botan9HMAC_DRBG11clear_stateEv:
  109|  8.48k|void HMAC_DRBG::clear_state() {
  110|  8.48k|   if(m_V.empty()) {
  ------------------
  |  Branch (110:7): [True: 8.48k, False: 0]
  ------------------
  111|  8.48k|      const size_t output_length = m_mac->output_length();
  112|  8.48k|      m_V.resize(output_length);
  113|  8.48k|   }
  114|       |
  115|   551k|   for(size_t i = 0; i != m_V.size(); ++i) {
  ------------------
  |  Branch (115:22): [True: 542k, False: 8.48k]
  ------------------
  116|   542k|      m_V[i] = 0x01;
  117|   542k|   }
  118|  8.48k|   m_mac->set_key(std::vector<uint8_t>(m_V.size(), 0x00));
  119|  8.48k|}
_ZN5Botan9HMAC_DRBG15generate_outputENSt3__14spanIhLm18446744073709551615EEENS2_IKhLm18446744073709551615EEE:
  129|  8.48k|void HMAC_DRBG::generate_output(std::span<uint8_t> output, std::span<const uint8_t> input) {
  130|  8.48k|   BOTAN_ASSERT_NOMSG(!output.empty());
  ------------------
  |  |   60|  8.48k|   do {                                                                     \
  |  |   61|  8.48k|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 8.48k]
  |  |  ------------------
  |  |   62|  8.48k|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|  8.48k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded, False: 8.48k]
  |  |  ------------------
  ------------------
  131|       |
  132|  8.48k|   if(!input.empty()) {
  ------------------
  |  Branch (132:7): [True: 0, False: 8.48k]
  ------------------
  133|      0|      update(input);
  134|      0|   }
  135|       |
  136|  16.9k|   while(!output.empty()) {
  ------------------
  |  Branch (136:10): [True: 8.48k, False: 8.48k]
  ------------------
  137|  8.48k|      const size_t to_copy = std::min(output.size(), m_V.size());
  138|  8.48k|      m_mac->update(m_V);
  139|  8.48k|      m_mac->final(m_V);
  140|  8.48k|      copy_mem(output.data(), m_V.data(), to_copy);
  141|       |
  142|  8.48k|      output = output.subspan(to_copy);
  143|  8.48k|   }
  144|       |
  145|  8.48k|   update(input);
  146|  8.48k|}
_ZN5Botan9HMAC_DRBG6updateENSt3__14spanIKhLm18446744073709551615EEE:
  152|  16.9k|void HMAC_DRBG::update(std::span<const uint8_t> input) {
  153|  16.9k|   secure_vector<uint8_t> T(m_V.size());
  154|  16.9k|   m_mac->update(m_V);
  155|  16.9k|   m_mac->update(0x00);
  156|  16.9k|   m_mac->update(input);
  157|  16.9k|   m_mac->final(T);
  158|  16.9k|   m_mac->set_key(T);
  159|       |
  160|  16.9k|   m_mac->update(m_V);
  161|  16.9k|   m_mac->final(m_V);
  162|       |
  163|  16.9k|   if(!input.empty()) {
  ------------------
  |  Branch (163:7): [True: 8.48k, False: 8.48k]
  ------------------
  164|  8.48k|      m_mac->update(m_V);
  165|  8.48k|      m_mac->update(0x01);
  166|  8.48k|      m_mac->update(input);
  167|  8.48k|      m_mac->final(T);
  168|  8.48k|      m_mac->set_key(T);
  169|       |
  170|  8.48k|      m_mac->update(m_V);
  171|  8.48k|      m_mac->final(m_V);
  172|  8.48k|   }
  173|  16.9k|}
_ZNK5Botan9HMAC_DRBG14security_levelEv:
  175|  25.4k|size_t HMAC_DRBG::security_level() const {
  176|  25.4k|   return m_security_level;
  177|  25.4k|}
hmac_drbg.cpp:_ZN5Botan12_GLOBAL__N_124hmac_drbg_security_levelEm:
   17|  8.48k|size_t hmac_drbg_security_level(size_t mac_output_length) {
   18|       |   // security strength of the hash function
   19|       |   // for pre-image resistance (see NIST SP 800-57)
   20|       |   // SHA-1: 128 bits
   21|       |   // SHA-224, SHA-512/224: 192 bits,
   22|       |   // SHA-256, SHA-512/256, SHA-384, SHA-512: >= 256 bits
   23|       |   // NIST SP 800-90A only supports up to 256 bits though
   24|       |
   25|  8.48k|   if(mac_output_length < 32) {
  ------------------
  |  Branch (25:7): [True: 0, False: 8.48k]
  ------------------
   26|      0|      return (mac_output_length - 4) * 8;
   27|  8.48k|   } else {
   28|  8.48k|      return 32 * 8;
   29|  8.48k|   }
   30|  8.48k|}
hmac_drbg.cpp:_ZN5Botan12_GLOBAL__N_112check_limitsEmm:
   32|  8.48k|void check_limits(size_t reseed_interval, size_t max_number_of_bytes_per_request) {
   33|       |   // SP800-90A permits up to 2^48, but it is not usable on 32 bit
   34|       |   // platforms, so we only allow up to 2^24, which is still reasonably high
   35|  8.48k|   if(reseed_interval == 0 || reseed_interval > static_cast<size_t>(1) << 24) {
  ------------------
  |  Branch (35:7): [True: 0, False: 8.48k]
  |  Branch (35:31): [True: 0, False: 8.48k]
  ------------------
   36|      0|      throw Invalid_Argument("Invalid value for reseed_interval");
   37|      0|   }
   38|       |
   39|  8.48k|   if(max_number_of_bytes_per_request == 0 || max_number_of_bytes_per_request > 64 * 1024) {
  ------------------
  |  Branch (39:7): [True: 0, False: 8.48k]
  |  Branch (39:47): [True: 0, False: 8.48k]
  ------------------
   40|      0|      throw Invalid_Argument("Invalid value for max_number_of_bytes_per_request");
   41|      0|   }
   42|  8.48k|}

_ZN5Botan21RandomNumberGenerator15reseed_from_rngERS0_m:
   57|  8.48k|void RandomNumberGenerator::reseed_from_rng(RandomNumberGenerator& rng, size_t poll_bits) {
   58|  8.48k|   if(this->accepts_input()) {
  ------------------
  |  Branch (58:7): [True: 8.48k, False: 0]
  ------------------
   59|  8.48k|      this->add_entropy(rng.random_vec(poll_bits / 8));
   60|  8.48k|   }
   61|  8.48k|}

_ZN5Botan12Stateful_RNG5clearEv:
   14|  8.48k|void Stateful_RNG::clear() {
   15|  8.48k|   lock_guard_type<recursive_mutex_type> lock(m_mutex);
   16|  8.48k|   m_reseed_counter = 0;
   17|  8.48k|   m_last_pid = 0;
   18|  8.48k|   clear_state();
   19|  8.48k|}
_ZN5Botan12Stateful_RNG12force_reseedEv:
   21|  8.48k|void Stateful_RNG::force_reseed() {
   22|  8.48k|   lock_guard_type<recursive_mutex_type> lock(m_mutex);
   23|  8.48k|   m_reseed_counter = 0;
   24|  8.48k|}
_ZNK5Botan12Stateful_RNG9is_seededEv:
   26|  25.4k|bool Stateful_RNG::is_seeded() const {
   27|  25.4k|   lock_guard_type<recursive_mutex_type> lock(m_mutex);
   28|  25.4k|   return m_reseed_counter > 0;
   29|  25.4k|}
_ZN5Botan12Stateful_RNG23generate_batched_outputENSt3__14spanIhLm18446744073709551615EEENS2_IKhLm18446744073709551615EEE:
   38|  8.48k|void Stateful_RNG::generate_batched_output(std::span<uint8_t> output, std::span<const uint8_t> input) {
   39|  8.48k|   BOTAN_ASSERT_NOMSG(!output.empty());
  ------------------
  |  |   60|  8.48k|   do {                                                                     \
  |  |   61|  8.48k|      if(!(expr))                                                           \
  |  |  ------------------
  |  |  |  Branch (61:10): [True: 0, False: 8.48k]
  |  |  ------------------
  |  |   62|  8.48k|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   63|  8.48k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (63:12): [Folded, False: 8.48k]
  |  |  ------------------
  ------------------
   40|       |
   41|  8.48k|   const size_t max_per_request = max_number_of_bytes_per_request();
   42|       |
   43|  8.48k|   if(max_per_request == 0)  // no limit
  ------------------
  |  Branch (43:7): [True: 0, False: 8.48k]
  ------------------
   44|      0|   {
   45|      0|      reseed_check();
   46|      0|      this->generate_output(output, input);
   47|  8.48k|   } else {
   48|  16.9k|      while(!output.empty()) {
  ------------------
  |  Branch (48:13): [True: 8.48k, False: 8.48k]
  ------------------
   49|  8.48k|         const size_t this_req = std::min(max_per_request, output.size());
   50|       |
   51|  8.48k|         reseed_check();
   52|  8.48k|         this->generate_output(output.subspan(0, this_req), input);
   53|       |
   54|       |         // only include the input for the first iteration
   55|  8.48k|         input = {};
   56|       |
   57|  8.48k|         output = output.subspan(this_req);
   58|  8.48k|      }
   59|  8.48k|   }
   60|  8.48k|}
_ZN5Botan12Stateful_RNG21fill_bytes_with_inputENSt3__14spanIhLm18446744073709551615EEENS2_IKhLm18446744073709551615EEE:
   62|  16.9k|void Stateful_RNG::fill_bytes_with_input(std::span<uint8_t> output, std::span<const uint8_t> input) {
   63|  16.9k|   lock_guard_type<recursive_mutex_type> lock(m_mutex);
   64|       |
   65|  16.9k|   if(output.empty()) {
  ------------------
  |  Branch (65:7): [True: 8.48k, False: 8.48k]
  ------------------
   66|       |      // Special case for exclusively adding entropy to the stateful RNG.
   67|  8.48k|      this->update(input);
   68|       |
   69|  8.48k|      if(8 * input.size() >= security_level()) {
  ------------------
  |  Branch (69:10): [True: 8.48k, False: 0]
  ------------------
   70|  8.48k|         reset_reseed_counter();
   71|  8.48k|      }
   72|  8.48k|   } else {
   73|  8.48k|      generate_batched_output(output, input);
   74|  8.48k|   }
   75|  16.9k|}
_ZN5Botan12Stateful_RNG15reseed_from_rngERNS_21RandomNumberGeneratorEm:
   89|  8.48k|void Stateful_RNG::reseed_from_rng(RandomNumberGenerator& rng, size_t poll_bits) {
   90|  8.48k|   lock_guard_type<recursive_mutex_type> lock(m_mutex);
   91|       |
   92|  8.48k|   RandomNumberGenerator::reseed_from_rng(rng, poll_bits);
   93|       |
   94|  8.48k|   if(poll_bits >= security_level()) {
  ------------------
  |  Branch (94:7): [True: 8.48k, False: 0]
  ------------------
   95|  8.48k|      reset_reseed_counter();
   96|  8.48k|   }
   97|  8.48k|}
_ZN5Botan12Stateful_RNG20reset_reseed_counterEv:
   99|  16.9k|void Stateful_RNG::reset_reseed_counter() {
  100|       |   // Lock is held whenever this function is called
  101|  16.9k|   m_reseed_counter = 1;
  102|  16.9k|}
_ZN5Botan12Stateful_RNG12reseed_checkEv:
  104|  8.48k|void Stateful_RNG::reseed_check() {
  105|       |   // Lock is held whenever this function is called
  106|       |
  107|  8.48k|   const uint32_t cur_pid = OS::get_process_id();
  108|       |
  109|  8.48k|   const bool fork_detected = (m_last_pid > 0) && (cur_pid != m_last_pid);
  ------------------
  |  Branch (109:31): [True: 0, False: 8.48k]
  |  Branch (109:51): [True: 0, False: 0]
  ------------------
  110|       |
  111|  8.48k|   if(is_seeded() == false || fork_detected || (m_reseed_interval > 0 && m_reseed_counter >= m_reseed_interval)) {
  ------------------
  |  Branch (111:7): [True: 8.48k, False: 0]
  |  Branch (111:31): [True: 0, False: 0]
  |  Branch (111:49): [True: 0, False: 0]
  |  Branch (111:74): [True: 0, False: 0]
  ------------------
  112|  8.48k|      m_reseed_counter = 0;
  113|  8.48k|      m_last_pid = cur_pid;
  114|       |
  115|  8.48k|      if(m_underlying_rng) {
  ------------------
  |  Branch (115:10): [True: 8.48k, False: 0]
  ------------------
  116|  8.48k|         reseed_from_rng(*m_underlying_rng, security_level());
  117|  8.48k|      }
  118|       |
  119|  8.48k|      if(m_entropy_sources) {
  ------------------
  |  Branch (119:10): [True: 0, False: 8.48k]
  ------------------
  120|      0|         reseed(*m_entropy_sources, security_level());
  121|      0|      }
  122|       |
  123|  8.48k|      if(!is_seeded()) {
  ------------------
  |  Branch (123:10): [True: 0, False: 8.48k]
  ------------------
  124|      0|         if(fork_detected) {
  ------------------
  |  Branch (124:13): [True: 0, False: 0]
  ------------------
  125|      0|            throw Invalid_State("Detected use of fork but cannot reseed DRBG");
  126|      0|         } else {
  127|      0|            throw PRNG_Unseeded(name());
  128|      0|         }
  129|      0|      }
  130|  8.48k|   } else {
  131|      0|      BOTAN_ASSERT(m_reseed_counter != 0, "RNG is seeded");
  ------------------
  |  |   51|      0|   do {                                                                                 \
  |  |   52|      0|      if(!(expr))                                                                       \
  |  |  ------------------
  |  |  |  Branch (52:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   53|      0|         Botan::assertion_failure(#expr, assertion_made, __func__, __FILE__, __LINE__); \
  |  |   54|      0|   } while(0)
  |  |  ------------------
  |  |  |  Branch (54:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  132|      0|      m_reseed_counter += 1;
  133|      0|   }
  134|  8.48k|}

_ZN5Botan10system_rngEv:
  368|  8.48k|RandomNumberGenerator& system_rng() {
  369|  8.48k|   static System_RNG_Impl g_system_rng;
  370|  8.48k|   return g_system_rng;
  371|  8.48k|}
system_rng.cpp:_ZN5Botan12_GLOBAL__N_115System_RNG_Impl21fill_bytes_with_inputENSt3__14spanIhLm18446744073709551615EEENS3_IKhLm18446744073709551615EEE:
  210|  8.48k|      void fill_bytes_with_input(std::span<uint8_t> output, std::span<const uint8_t> /* ignored */) override {
  211|  8.48k|         const unsigned int flags = 0;
  212|       |
  213|  8.48k|         uint8_t* buf = output.data();
  214|  8.48k|         size_t len = output.size();
  215|  16.9k|         while(len > 0) {
  ------------------
  |  Branch (215:16): [True: 8.48k, False: 8.48k]
  ------------------
  216|       |   #if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 25
  217|       |            const ssize_t got = ::syscall(SYS_getrandom, buf, len, flags);
  218|       |   #else
  219|  8.48k|            const ssize_t got = ::getrandom(buf, len, flags);
  220|  8.48k|   #endif
  221|       |
  222|  8.48k|            if(got < 0) {
  ------------------
  |  Branch (222:16): [True: 0, False: 8.48k]
  ------------------
  223|      0|               if(errno == EINTR) {
  ------------------
  |  Branch (223:19): [True: 0, False: 0]
  ------------------
  224|      0|                  continue;
  225|      0|               }
  226|      0|               throw System_Error("System_RNG getrandom failed", errno);
  227|      0|            }
  228|       |
  229|  8.48k|            buf += got;
  230|  8.48k|            len -= got;
  231|  8.48k|         }
  232|  8.48k|      }

_ZN5Botan15allocate_memoryEmm:
   20|  59.3k|BOTAN_MALLOC_FN void* allocate_memory(size_t elems, size_t elem_size) {
   21|  59.3k|   if(elems == 0 || elem_size == 0) {
  ------------------
  |  Branch (21:7): [True: 0, False: 59.3k]
  |  Branch (21:21): [True: 0, False: 59.3k]
  ------------------
   22|      0|      return nullptr;
   23|      0|   }
   24|       |
   25|       |   // Some calloc implementations do not check for overflow (?!?)
   26|       |
   27|  59.3k|   if(!BOTAN_CHECKED_MUL(elems, elem_size).has_value()) {
  ------------------
  |  |   74|  59.3k|#define BOTAN_CHECKED_MUL(x, y) checked_mul(x, y)
  ------------------
  |  Branch (27:7): [True: 0, False: 59.3k]
  ------------------
   28|      0|      throw std::bad_alloc();
   29|      0|   }
   30|       |
   31|       |#if defined(BOTAN_HAS_LOCKING_ALLOCATOR)
   32|       |   if(void* p = mlock_allocator::instance().allocate(elems, elem_size)) {
   33|       |      return p;
   34|       |   }
   35|       |#endif
   36|       |
   37|       |#if defined(BOTAN_TARGET_OS_HAS_ALLOC_CONCEAL)
   38|       |   void* ptr = ::calloc_conceal(elems, elem_size);
   39|       |#else
   40|  59.3k|   void* ptr = std::calloc(elems, elem_size);  // NOLINT(*-no-malloc)
   41|  59.3k|#endif
   42|  59.3k|   if(!ptr) {
  ------------------
  |  Branch (42:7): [True: 0, False: 59.3k]
  ------------------
   43|      0|      [[unlikely]] throw std::bad_alloc();
   44|      0|   }
   45|  59.3k|   return ptr;
   46|  59.3k|}
_ZN5Botan17deallocate_memoryEPvmm:
   48|  59.3k|void deallocate_memory(void* p, size_t elems, size_t elem_size) {
   49|  59.3k|   if(p == nullptr) {
  ------------------
  |  Branch (49:7): [True: 0, False: 59.3k]
  ------------------
   50|      0|      [[unlikely]] return;
   51|      0|   }
   52|       |
   53|  59.3k|   secure_scrub_memory(p, elems * elem_size);
   54|       |
   55|       |#if defined(BOTAN_HAS_LOCKING_ALLOCATOR)
   56|       |   if(mlock_allocator::instance().deallocate(p, elems, elem_size)) {
   57|       |      return;
   58|       |   }
   59|       |#endif
   60|       |
   61|  59.3k|   std::free(p);  // NOLINT(*-no-malloc)
   62|  59.3k|}

_ZN5Botan19secure_scrub_memoryEPvm:
   87|  67.8k|void secure_scrub_memory(void* ptr, size_t n) {
   88|       |#if defined(BOTAN_TARGET_OS_HAS_RTLSECUREZEROMEMORY)
   89|       |   ::RtlSecureZeroMemory(ptr, n);
   90|       |
   91|       |#elif defined(BOTAN_TARGET_OS_HAS_EXPLICIT_BZERO)
   92|       |   ::explicit_bzero(ptr, n);
   93|       |
   94|       |#elif defined(BOTAN_TARGET_OS_HAS_EXPLICIT_MEMSET)
   95|       |   (void)::explicit_memset(ptr, 0, n);
   96|       |
   97|       |#elif defined(BOTAN_USE_VOLATILE_MEMSET_FOR_ZERO) && (BOTAN_USE_VOLATILE_MEMSET_FOR_ZERO == 1)
   98|       |   /*
   99|       |   Call memset through a static volatile pointer, which the compiler
  100|       |   should not elide. This construct should be safe in conforming
  101|       |   compilers, but who knows. I did confirm that on x86-64 GCC 6.1 and
  102|       |   Clang 3.8 both create code that saves the memset address in the
  103|       |   data segment and unconditionally loads and jumps to that address.
  104|       |   */
  105|       |   static void* (*const volatile memset_ptr)(void*, int, size_t) = std::memset;
  106|       |   (memset_ptr)(ptr, 0, n);
  107|       |#else
  108|       |
  109|       |   volatile uint8_t* p = reinterpret_cast<volatile uint8_t*>(ptr);
  110|       |
  111|       |   for(size_t i = 0; i != n; ++i)
  112|       |      p[i] = 0;
  113|       |#endif
  114|  67.8k|}
_ZN5Botan2OS14get_process_idEv:
  116|  8.48k|uint32_t OS::get_process_id() {
  117|  8.48k|#if defined(BOTAN_TARGET_OS_HAS_POSIX1)
  118|  8.48k|   return ::getpid();
  119|       |#elif defined(BOTAN_TARGET_OS_HAS_WIN32)
  120|       |   return ::GetCurrentProcessId();
  121|       |#elif defined(BOTAN_TARGET_OS_IS_LLVM) || defined(BOTAN_TARGET_OS_IS_NONE)
  122|       |   return 0;  // truly no meaningful value
  123|       |#else
  124|       |   #error "Missing get_process_id"
  125|       |#endif
  126|  8.48k|}

_ZN5Botan9SCAN_NameC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   58|  8.48k|SCAN_Name::SCAN_Name(std::string_view algo_spec) : m_orig_algo_spec(algo_spec), m_alg_name(), m_args(), m_mode_info() {
   59|  8.48k|   if(algo_spec.empty()) {
  ------------------
  |  Branch (59:7): [True: 0, False: 8.48k]
  ------------------
   60|      0|      throw Invalid_Argument("Expected algorithm name, got empty string");
   61|      0|   }
   62|       |
   63|  8.48k|   std::vector<std::pair<size_t, std::string>> name;
   64|  8.48k|   size_t level = 0;
   65|  8.48k|   std::pair<size_t, std::string> accum = std::make_pair(level, "");
   66|       |
   67|  8.48k|   const std::string decoding_error = "Bad SCAN name '" + m_orig_algo_spec + "': ";
   68|       |
   69|   110k|   for(char c : algo_spec) {
  ------------------
  |  Branch (69:15): [True: 110k, False: 8.48k]
  ------------------
   70|   110k|      if(c == '/' || c == ',' || c == '(' || c == ')') {
  ------------------
  |  Branch (70:10): [True: 0, False: 110k]
  |  Branch (70:22): [True: 0, False: 110k]
  |  Branch (70:34): [True: 8.48k, False: 101k]
  |  Branch (70:46): [True: 8.48k, False: 93.3k]
  ------------------
   71|  16.9k|         if(c == '(') {
  ------------------
  |  Branch (71:13): [True: 8.48k, False: 8.48k]
  ------------------
   72|  8.48k|            ++level;
   73|  8.48k|         } else if(c == ')') {
  ------------------
  |  Branch (73:20): [True: 8.48k, False: 0]
  ------------------
   74|  8.48k|            if(level == 0) {
  ------------------
  |  Branch (74:16): [True: 0, False: 8.48k]
  ------------------
   75|      0|               throw Decoding_Error(decoding_error + "Mismatched parens");
   76|      0|            }
   77|  8.48k|            --level;
   78|  8.48k|         }
   79|       |
   80|  16.9k|         if(c == '/' && level > 0) {
  ------------------
  |  Branch (80:13): [True: 0, False: 16.9k]
  |  Branch (80:25): [True: 0, False: 0]
  ------------------
   81|      0|            accum.second.push_back(c);
   82|  16.9k|         } else {
   83|  16.9k|            if(!accum.second.empty()) {
  ------------------
  |  Branch (83:16): [True: 16.9k, False: 0]
  ------------------
   84|  16.9k|               name.push_back(accum);
   85|  16.9k|            }
   86|  16.9k|            accum = std::make_pair(level, "");
   87|  16.9k|         }
   88|  93.3k|      } else {
   89|  93.3k|         accum.second.push_back(c);
   90|  93.3k|      }
   91|   110k|   }
   92|       |
   93|  8.48k|   if(!accum.second.empty()) {
  ------------------
  |  Branch (93:7): [True: 0, False: 8.48k]
  ------------------
   94|      0|      name.push_back(accum);
   95|      0|   }
   96|       |
   97|  8.48k|   if(level != 0) {
  ------------------
  |  Branch (97:7): [True: 0, False: 8.48k]
  ------------------
   98|      0|      throw Decoding_Error(decoding_error + "Missing close paren");
   99|      0|   }
  100|       |
  101|  8.48k|   if(name.empty()) {
  ------------------
  |  Branch (101:7): [True: 0, False: 8.48k]
  ------------------
  102|      0|      throw Decoding_Error(decoding_error + "Empty name");
  103|      0|   }
  104|       |
  105|  8.48k|   m_alg_name = name[0].second;
  106|       |
  107|  8.48k|   bool in_modes = false;
  108|       |
  109|  16.9k|   for(size_t i = 1; i != name.size(); ++i) {
  ------------------
  |  Branch (109:22): [True: 8.48k, False: 8.48k]
  ------------------
  110|  8.48k|      if(name[i].first == 0) {
  ------------------
  |  Branch (110:10): [True: 0, False: 8.48k]
  ------------------
  111|      0|         m_mode_info.push_back(make_arg(name, i));
  112|      0|         in_modes = true;
  113|  8.48k|      } else if(name[i].first == 1 && !in_modes) {
  ------------------
  |  Branch (113:17): [True: 8.48k, False: 0]
  |  Branch (113:39): [True: 8.48k, False: 0]
  ------------------
  114|  8.48k|         m_args.push_back(make_arg(name, i));
  115|  8.48k|      }
  116|  8.48k|   }
  117|  8.48k|}
_ZNK5Botan9SCAN_Name3argEm:
  119|  8.48k|std::string SCAN_Name::arg(size_t i) const {
  120|  8.48k|   if(i >= arg_count()) {
  ------------------
  |  Branch (120:7): [True: 0, False: 8.48k]
  ------------------
  121|      0|      throw Invalid_Argument("SCAN_Name::arg " + std::to_string(i) + " out of range for '" + to_string() + "'");
  122|      0|   }
  123|  8.48k|   return m_args[i];
  124|  8.48k|}
scan_name.cpp:_ZN5Botan12_GLOBAL__N_18make_argERKNSt3__16vectorINS1_4pairImNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEENS7_ISA_EEEEm:
   17|  8.48k|std::string make_arg(const std::vector<std::pair<size_t, std::string>>& name, size_t start) {
   18|  8.48k|   std::string output = name[start].second;
   19|  8.48k|   size_t level = name[start].first;
   20|       |
   21|  8.48k|   size_t paren_depth = 0;
   22|       |
   23|  8.48k|   for(size_t i = start + 1; i != name.size(); ++i) {
  ------------------
  |  Branch (23:30): [True: 0, False: 8.48k]
  ------------------
   24|      0|      if(name[i].first <= name[start].first) {
  ------------------
  |  Branch (24:10): [True: 0, False: 0]
  ------------------
   25|      0|         break;
   26|      0|      }
   27|       |
   28|      0|      if(name[i].first > level) {
  ------------------
  |  Branch (28:10): [True: 0, False: 0]
  ------------------
   29|      0|         output += "(" + name[i].second;
   30|      0|         ++paren_depth;
   31|      0|      } else if(name[i].first < level) {
  ------------------
  |  Branch (31:17): [True: 0, False: 0]
  ------------------
   32|      0|         for(size_t j = name[i].first; j < level; j++) {
  ------------------
  |  Branch (32:40): [True: 0, False: 0]
  ------------------
   33|      0|            output += ")";
   34|      0|            --paren_depth;
   35|      0|         }
   36|      0|         output += "," + name[i].second;
   37|      0|      } else {
   38|      0|         if(output[output.size() - 1] != '(') {
  ------------------
  |  Branch (38:13): [True: 0, False: 0]
  ------------------
   39|      0|            output += ",";
   40|      0|         }
   41|      0|         output += name[i].second;
   42|      0|      }
   43|       |
   44|      0|      level = name[i].first;
   45|      0|   }
   46|       |
   47|  8.48k|   for(size_t i = 0; i != paren_depth; ++i) {
  ------------------
  |  Branch (47:22): [True: 0, False: 8.48k]
  ------------------
   48|      0|      output += ")";
   49|      0|   }
   50|       |
   51|  8.48k|   return output;
   52|  8.48k|}

_ZN3rnp13is_blank_lineEPKcm:
   72|  50.4k|{
   73|  54.0k|    for (size_t i = 0; i < len && line[i]; i++) {
  ------------------
  |  Branch (73:24): [True: 54.0k, False: 0]
  |  Branch (73:35): [True: 54.0k, False: 0]
  ------------------
   74|  54.0k|        if (line[i] != ' ' && line[i] != '\t' && line[i] != '\r') {
  ------------------
  |  Branch (74:13): [True: 51.4k, False: 2.59k]
  |  Branch (74:31): [True: 51.0k, False: 425]
  |  Branch (74:50): [True: 50.4k, False: 646]
  ------------------
   75|  50.4k|            return false;
   76|  50.4k|        }
   77|  54.0k|    }
   78|      0|    return true;
   79|  50.4k|}

LLVMFuzzerTestOneInput:
   37|  4.24k|{
   38|  4.24k|    rnp_input_t input = NULL;
   39|  4.24k|    rnp_ffi_t   ffi = NULL;
   40|       |
   41|  4.24k|    (void) rnp_input_from_memory(&input, data, size, false);
   42|  4.24k|    (void) rnp_ffi_create(&ffi, "GPG", "GPG");
   43|  4.24k|    char *results = NULL;
   44|  4.24k|    (void) rnp_import_signatures(ffi, input, 0, &results);
   45|  4.24k|    rnp_buffer_destroy(results);
   46|  4.24k|    rnp_input_destroy(input);
   47|  4.24k|    rnp_ffi_destroy(ffi);
   48|       |
   49|  4.24k|    return 0;
   50|  4.24k|}

_ZN3rnp12backend_initEPPv:
  179|  4.24k|{
  180|  4.24k|    return true;
  181|  4.24k|}
_ZN3rnp14backend_finishEPv:
  185|  4.24k|{
  186|       |    // Do nothing
  187|  4.24k|}

_Z24dilithium_signature_size21dilithium_parameter_e:
   90|  1.47k|{
   91|  1.47k|    switch (parameter) {
   92|    637|    case dilithium_L3:
  ------------------
  |  Branch (92:5): [True: 637, False: 833]
  ------------------
   93|    637|        return 3293;
   94|    833|    case dilithium_L5:
  ------------------
  |  Branch (94:5): [True: 833, False: 637]
  ------------------
   95|    833|        return 4595;
   96|      0|    default:
  ------------------
  |  Branch (96:5): [True: 0, False: 1.47k]
  ------------------
   97|      0|        RNP_LOG("invalid parameter given");
  ------------------
  |  |   76|      0|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|      0|    do {                                                                                 \
  |  |  |  |   69|      0|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|      0|            break;                                                                       \
  |  |  |  |   71|      0|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   98|      0|        throw rnp::rnp_exception(RNP_ERROR_BAD_PARAMETERS);
   99|  1.47k|    }
  100|  1.47k|}

_ZN35pgp_dilithium_exdsa_composite_key_t26exdsa_curve_signature_sizeE11pgp_curve_t:
  119|  1.47k|{
  120|  1.47k|    switch (curve) {
  121|    117|    case PGP_CURVE_ED25519:
  ------------------
  |  Branch (121:5): [True: 117, False: 1.35k]
  ------------------
  122|    117|        return 64;
  123|       |    /* TODO */
  124|       |    //  case PGP_CURVE_ED448:
  125|       |    //    return 114;
  126|     99|    case PGP_CURVE_NIST_P_256:
  ------------------
  |  Branch (126:5): [True: 99, False: 1.37k]
  ------------------
  127|     99|        return 64;
  128|    350|    case PGP_CURVE_NIST_P_384:
  ------------------
  |  Branch (128:5): [True: 350, False: 1.12k]
  ------------------
  129|    350|        return 96;
  130|    421|    case PGP_CURVE_BP256:
  ------------------
  |  Branch (130:5): [True: 421, False: 1.04k]
  ------------------
  131|    421|        return 64;
  132|    483|    case PGP_CURVE_BP384:
  ------------------
  |  Branch (132:5): [True: 483, False: 987]
  ------------------
  133|    483|        return 96;
  134|      0|    default:
  ------------------
  |  Branch (134:5): [True: 0, False: 1.47k]
  ------------------
  135|      0|        RNP_LOG("invalid curve given");
  ------------------
  |  |   76|      0|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|      0|    do {                                                                                 \
  |  |  |  |   69|      0|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|      0|            break;                                                                       \
  |  |  |  |   71|      0|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  136|      0|        throw rnp::rnp_exception(RNP_ERROR_BAD_PARAMETERS);
  137|  1.47k|    }
  138|  1.47k|}
_ZN35pgp_dilithium_exdsa_composite_key_t22pk_alg_to_dilithium_idE16pgp_pubkey_alg_t:
  142|  1.47k|{
  143|  1.47k|    switch (pk_alg) {
  144|    117|    case PGP_PKA_DILITHIUM3_ED25519:
  ------------------
  |  Branch (144:5): [True: 117, False: 1.35k]
  ------------------
  145|    117|        FALLTHROUGH_STATEMENT;
  ------------------
  |  |   81|    117|# define FALLTHROUGH_STATEMENT [[fallthrough]]
  ------------------
  146|    216|    case PGP_PKA_DILITHIUM3_P256:
  ------------------
  |  Branch (146:5): [True: 99, False: 1.37k]
  ------------------
  147|    216|        FALLTHROUGH_STATEMENT;
  ------------------
  |  |   81|    216|# define FALLTHROUGH_STATEMENT [[fallthrough]]
  ------------------
  148|    637|    case PGP_PKA_DILITHIUM3_BP256:
  ------------------
  |  Branch (148:5): [True: 421, False: 1.04k]
  ------------------
  149|    637|        return dilithium_L3;
  150|    483|    case PGP_PKA_DILITHIUM5_BP384:
  ------------------
  |  Branch (150:5): [True: 483, False: 987]
  ------------------
  151|    483|        FALLTHROUGH_STATEMENT;
  ------------------
  |  |   81|    483|# define FALLTHROUGH_STATEMENT [[fallthrough]]
  ------------------
  152|    833|    case PGP_PKA_DILITHIUM5_P384:
  ------------------
  |  Branch (152:5): [True: 350, False: 1.12k]
  ------------------
  153|    833|        return dilithium_L5;
  154|      0|    default:
  ------------------
  |  Branch (154:5): [True: 0, False: 1.47k]
  ------------------
  155|      0|        RNP_LOG("invalid PK alg given");
  ------------------
  |  |   76|      0|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|      0|    do {                                                                                 \
  |  |  |  |   69|      0|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|      0|            break;                                                                       \
  |  |  |  |   71|      0|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  156|      0|        throw rnp::rnp_exception(RNP_ERROR_BAD_PARAMETERS);
  157|  1.47k|    }
  158|  1.47k|}
_ZN35pgp_dilithium_exdsa_composite_key_t18pk_alg_to_curve_idE16pgp_pubkey_alg_t:
  162|  1.47k|{
  163|  1.47k|    switch (pk_alg) {
  164|    117|    case PGP_PKA_DILITHIUM3_ED25519:
  ------------------
  |  Branch (164:5): [True: 117, False: 1.35k]
  ------------------
  165|    117|        return PGP_CURVE_ED25519;
  166|     99|    case PGP_PKA_DILITHIUM3_P256:
  ------------------
  |  Branch (166:5): [True: 99, False: 1.37k]
  ------------------
  167|     99|        return PGP_CURVE_NIST_P_256;
  168|    421|    case PGP_PKA_DILITHIUM3_BP256:
  ------------------
  |  Branch (168:5): [True: 421, False: 1.04k]
  ------------------
  169|    421|        return PGP_CURVE_BP256;
  170|    483|    case PGP_PKA_DILITHIUM5_BP384:
  ------------------
  |  Branch (170:5): [True: 483, False: 987]
  ------------------
  171|    483|        return PGP_CURVE_BP384;
  172|    350|    case PGP_PKA_DILITHIUM5_P384:
  ------------------
  |  Branch (172:5): [True: 350, False: 1.12k]
  ------------------
  173|    350|        return PGP_CURVE_NIST_P_384;
  174|       |    /*case PGP_PKA_DILITHIUM5_ED448:
  175|       |      throw rnp::rnp_exception(RNP_ERROR_NOT_IMPLEMENTED);*/
  176|      0|    default:
  ------------------
  |  Branch (176:5): [True: 0, False: 1.47k]
  ------------------
  177|      0|        RNP_LOG("invalid PK alg given");
  ------------------
  |  |   76|      0|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|      0|    do {                                                                                 \
  |  |  |  |   69|      0|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|      0|            break;                                                                       \
  |  |  |  |   71|      0|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  178|      0|        throw rnp::rnp_exception(RNP_ERROR_BAD_PARAMETERS);
  179|  1.47k|    }
  180|  1.47k|}

_ZN31pgp_dilithium_exdsa_signature_t24composite_signature_sizeE16pgp_pubkey_alg_t:
   72|  1.47k|    {
   73|  1.47k|        return dilithium_signature_size(
   74|  1.47k|                 pgp_dilithium_exdsa_composite_key_t::pk_alg_to_dilithium_id(pk_alg)) +
   75|  1.47k|               pgp_dilithium_exdsa_composite_key_t::exdsa_curve_signature_size(
   76|  1.47k|                 pgp_dilithium_exdsa_composite_key_t::pk_alg_to_curve_id(pk_alg));
   77|  1.47k|    }

_ZNK3pgp2ec5Curve5bytesEv:
  102|  1.30k|    {
  103|       |        return BITS_TO_BYTES(bitlen);
  ------------------
  |  |   56|  1.30k|#define BITS_TO_BYTES(b) (((b) + (CHAR_BIT - 1)) / CHAR_BIT)
  ------------------
  104|  1.30k|    }

_ZN3pgp2ec5Curve3getE11pgp_curve_t:
  285|  1.30k|{
  286|  1.30k|    return (curve_id < PGP_CURVE_MAX && curve_id > 0) ? &ec_curves[curve_id] : NULL;
  ------------------
  |  Branch (286:13): [True: 1.30k, False: 0]
  |  Branch (286:41): [True: 1.30k, False: 0]
  ------------------
  287|  1.30k|}

_ZN3rnp11CRC24_BotanC2Ev:
  119|  15.3k|{
  120|  15.3k|    fn_ = Botan::HashFunction::create("CRC24");
  121|  15.3k|    if (!fn_) {
  ------------------
  |  Branch (121:9): [True: 0, False: 15.3k]
  ------------------
  122|      0|        RNP_LOG("Error creating CRC24 object");
  ------------------
  |  |   76|      0|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|      0|    do {                                                                                 \
  |  |  |  |   69|      0|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|      0|            break;                                                                       \
  |  |  |  |   71|      0|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  123|      0|        throw rnp_exception(RNP_ERROR_BAD_PARAMETERS);
  124|      0|    }
  125|  15.3k|    assert(3 == fn_->output_length());
  126|  15.3k|}
_ZN3rnp11CRC24_BotanD2Ev:
  129|  15.3k|{
  130|  15.3k|}
_ZN3rnp11CRC24_Botan6createEv:
  134|  15.3k|{
  135|  15.3k|    return std::unique_ptr<CRC24_Botan>(new CRC24_Botan());
  136|  15.3k|}
_ZN3rnp11CRC24_Botan3addEPKvm:
  140|  28.2k|{
  141|  28.2k|    if (!fn_) {
  ------------------
  |  Branch (141:9): [True: 0, False: 28.2k]
  ------------------
  142|      0|        throw rnp_exception(RNP_ERROR_NULL_POINTER);
  143|      0|    }
  144|  28.2k|    fn_->update(static_cast<const uint8_t *>(buf), len);
  145|  28.2k|}
_ZN3rnp11CRC24_Botan6finishEv:
  149|  14.0k|{
  150|  14.0k|    if (!fn_) {
  ------------------
  |  Branch (150:9): [True: 0, False: 14.0k]
  ------------------
  151|      0|        throw rnp_exception(RNP_ERROR_NULL_POINTER);
  152|      0|    }
  153|  14.0k|    std::array<uint8_t, 3> crc{};
  154|  14.0k|    fn_->final(crc.data());
  155|  14.0k|    fn_ = nullptr;
  156|  14.0k|    return crc;
  157|  14.0k|}

_ZN3rnp5CRC24C2Ev:
   81|  15.3k|    CRC24(){};
_ZN3rnp5CRC24D2Ev:
   89|  15.3k|    virtual ~CRC24(){};

_ZN3rnp5CRC246createEv:
   93|  15.3k|{
   94|       |#if defined(CRYPTO_BACKEND_OPENSSL)
   95|       |    return CRC24_RNP::create();
   96|       |#elif defined(CRYPTO_BACKEND_BOTAN)
   97|       |    return CRC24_Botan::create();
   98|       |#else
   99|       |#error "Crypto backend not specified"
  100|       |#endif
  101|  15.3k|}
_ZN3rnp4Hash4sizeE14pgp_hash_alg_t:
  183|  1.90k|{
  184|  1.90k|    size_t val = 0;
  185|  1.90k|    ARRAY_LOOKUP_BY_ID(hash_alg_map, type, len, alg, val);
  ------------------
  |  |   45|  1.90k|    do {                                                                  \
  |  |   46|  12.6k|        for (size_t i__ = 0; i__ < ARRAY_SIZE(array); i__++) {            \
  |  |  ------------------
  |  |  |  |   34|  12.6k|#define ARRAY_SIZE(a) (sizeof(a) / sizeof(*(a)))
  |  |  ------------------
  |  |  |  Branch (46:30): [True: 12.2k, False: 408]
  |  |  ------------------
  |  |   47|  12.2k|            if ((array)[i__].id_field == (lookup_value)) {                \
  |  |  ------------------
  |  |  |  Branch (47:17): [True: 1.49k, False: 10.7k]
  |  |  ------------------
  |  |   48|  1.49k|                (ret) = (array)[i__].ret_field;                           \
  |  |   49|  1.49k|                break;                                                    \
  |  |   50|  1.49k|            }                                                             \
  |  |   51|  12.2k|        }                                                                 \
  |  |   52|  1.90k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 1.90k]
  |  |  ------------------
  ------------------
  186|  1.90k|    return val;
  187|  1.90k|}

_ZNK3pgp3mpi4bitsEv:
   37|   533k|{
   38|   533k|    size_t  bits = 0;
   39|   533k|    size_t  idx = 0;
   40|   533k|    uint8_t bt;
   41|       |
   42|   541k|    for (idx = 0; (idx < size()) && !data_[idx]; idx++)
  ------------------
  |  Branch (42:19): [True: 535k, False: 5.96k]
  |  Branch (42:37): [True: 7.61k, False: 527k]
  ------------------
   43|  7.61k|        ;
   44|       |
   45|   533k|    if (idx < size()) {
  ------------------
  |  Branch (45:9): [True: 527k, False: 5.96k]
  ------------------
   46|  4.19M|        for (bits = (size() - idx - 1) << 3, bt = data_[idx]; bt; bits++, bt = bt >> 1)
  ------------------
  |  Branch (46:63): [True: 3.66M, False: 527k]
  ------------------
   47|  3.66M|            ;
   48|   527k|    }
   49|       |
   50|   533k|    return bits;
   51|   533k|}
_ZNK3pgp3mpi4sizeEv:
   55|  1.60M|{
   56|  1.60M|    return data_.size();
   57|  1.60M|}
_ZN3pgp3mpi4dataEv:
   61|   534k|{
   62|   534k|    return data_.data();
   63|   534k|}
_ZN3pgp3mpi6resizeEmh:
  119|   534k|{
  120|   534k|    data_.resize(size, fill);
  121|   534k|}

_ZN3rnp3RNGC2ENS0_4TypeE:
   34|  4.24k|{
   35|  4.24k|    if (botan_rng_init(&botan_rng, type == Type::DRBG ? "user" : NULL)) {
  ------------------
  |  Branch (35:9): [True: 0, False: 4.24k]
  |  Branch (35:36): [True: 4.24k, False: 0]
  ------------------
   36|      0|        throw rnp::rnp_exception(RNP_ERROR_RNG);
   37|      0|    }
   38|  4.24k|#if defined(ENABLE_CRYPTO_REFRESH) || defined(ENABLE_PQC)
   39|  4.24k|    if (type == Type::DRBG) {
  ------------------
  |  Branch (39:9): [True: 4.24k, False: 0]
  ------------------
   40|  4.24k|        botan_rng_obj.reset(new Botan::AutoSeeded_RNG);
   41|  4.24k|    } else {
   42|      0|        botan_rng_obj.reset(new Botan::System_RNG);
   43|      0|    }
   44|  4.24k|#endif
   45|  4.24k|}
_ZN3rnp3RNGD2Ev:
   48|  4.24k|{
   49|  4.24k|    (void) botan_rng_destroy(botan_rng);
   50|  4.24k|}

_Z26sphincsplus_signature_size23sphincsplus_parameter_t:
  311|    813|{
  312|    813|    switch (param) {
  313|     38|    case sphincsplus_simple_128s:
  ------------------
  |  Branch (313:5): [True: 38, False: 775]
  ------------------
  314|     38|        return 7856;
  315|     97|    case sphincsplus_simple_128f:
  ------------------
  |  Branch (315:5): [True: 97, False: 716]
  ------------------
  316|     97|        return 17088;
  317|     37|    case sphincsplus_simple_192s:
  ------------------
  |  Branch (317:5): [True: 37, False: 776]
  ------------------
  318|     37|        return 16224;
  319|    171|    case sphincsplus_simple_192f:
  ------------------
  |  Branch (319:5): [True: 171, False: 642]
  ------------------
  320|    171|        return 35664;
  321|    146|    case sphincsplus_simple_256s:
  ------------------
  |  Branch (321:5): [True: 146, False: 667]
  ------------------
  322|    146|        return 29792;
  323|     84|    case sphincsplus_simple_256f:
  ------------------
  |  Branch (323:5): [True: 84, False: 729]
  ------------------
  324|     84|        return 49856;
  325|    240|    default:
  ------------------
  |  Branch (325:5): [True: 240, False: 573]
  ------------------
  326|    240|        RNP_LOG("invalid SLH-DSA parameter identifier");
  ------------------
  |  |   76|    240|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    240|    do {                                                                                 \
  |  |  |  |   69|    240|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 240, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    240|            break;                                                                       \
  |  |  |  |   71|    240|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  327|    240|        return 0;
  328|    813|    }
  329|    813|}

_ZN3pgp11FingerprintC2Ev:
   38|  17.2k|Fingerprint::Fingerprint() : keyid_({})
   39|  17.2k|{
   40|  17.2k|}
_ZN3pgp11FingerprintC2EPKhm:
   42|  7.00k|Fingerprint::Fingerprint(const uint8_t *data, size_t size) : Fingerprint()
   43|  7.00k|{
   44|  7.00k|    fp_.assign(data, data + size);
   45|  7.00k|}
_ZNK3pgp11Fingerprint5keyidEv:
  115|  1.43k|{
  116|  1.43k|    return keyid_;
  117|  1.43k|}
_ZNK3pgp11Fingerprint4sizeEv:
  133|  2.52k|{
  134|  2.52k|    return fp_.size();
  135|  2.52k|}

_Z8json_addP11json_objectPKcS0_:
   35|  15.1k|{
   36|  15.1k|    if (!val) {
  ------------------
  |  Branch (36:9): [True: 0, False: 15.1k]
  ------------------
   37|      0|        return false;
   38|      0|    }
   39|       |    // TODO: in JSON-C 0.13 json_object_object_add returns bool instead of void
   40|  15.1k|    json_object_object_add(obj, name, val);
   41|  15.1k|    if (!json_object_object_get_ex(obj, name, NULL)) {
  ------------------
  |  Branch (41:9): [True: 0, False: 15.1k]
  ------------------
   42|      0|        json_object_put(val);
   43|      0|        return false;
   44|      0|    }
   45|       |
   46|  15.1k|    return true;
   47|  15.1k|}
_Z8json_addP11json_objectPKcS2_:
   51|  14.8k|{
   52|  14.8k|    return json_add(obj, name, json_object_new_string(value));
   53|  14.8k|}
_Z14json_array_addP11json_objectS0_:
  126|  7.42k|{
  127|  7.42k|    if (!val) {
  ------------------
  |  Branch (127:9): [True: 0, False: 7.42k]
  ------------------
  128|      0|        return false;
  129|      0|    }
  130|  7.42k|    if (json_object_array_add(obj, val)) {
  ------------------
  |  Branch (130:9): [True: 0, False: 7.42k]
  ------------------
  131|      0|        json_object_put(val);
  132|      0|        return false;
  133|      0|    }
  134|  7.42k|    return true;
  135|  7.42k|}

_ZN3rnp10JSONObjectC2EP11json_object:
  138|    338|    JSONObject(json_object *obj) : obj_(obj)
  139|    338|    {
  140|    338|    }
_ZN3rnp10JSONObjectD2Ev:
  143|    338|    {
  144|    338|        if (obj_) {
  ------------------
  |  Branch (144:13): [True: 338, False: 0]
  ------------------
  145|    338|            json_object_put(obj_);
  146|    338|        }
  147|    338|    }

_ZN3rnp9KeySearch6createERKNSt3__15arrayIhLm8EEE:
   56|  2.89k|{
   57|  2.89k|    return std::unique_ptr<KeySearch>(new KeyIDSearch(keyid));
   58|  2.89k|}
_ZN3rnp9KeySearch6createERKN3pgp11FingerprintE:
   62|    786|{
   63|    786|    return std::unique_ptr<KeySearch>(new KeyFingerprintSearch(fp));
   64|    786|}
_ZN3rnp11KeyIDSearchC2ERKNSt3__15arrayIhLm8EEE:
  148|  2.89k|{
  149|  2.89k|    type_ = Type::KeyID;
  150|  2.89k|    keyid_ = keyid;
  151|  2.89k|}
_ZN3rnp20KeyFingerprintSearchC2ERKN3pgp11FingerprintE:
  172|    786|{
  173|    786|    type_ = Type::Fingerprint;
  174|    786|    fp_ = fp;
  175|    786|}
_ZNK3rnp20KeyFingerprintSearch6get_fpEv:
  179|    786|{
  180|    786|    return fp_;
  181|    786|}

_ZNK3rnp9KeySearch4typeEv:
   49|  3.67k|    {
   50|  3.67k|        return type_;
   51|  3.67k|    }
_ZN3rnp11KeyProviderC2EPFPNS_3KeyEPK21pgp_key_request_ctx_tPvES6_:
  120|  4.24k|        : callback(cb), userdata(ud){};
_ZN3rnp9KeySearchD2Ev:
   55|  3.67k|    virtual ~KeySearch() = default;

_Z14rnp_log_switchv:
   53|   667k|{
   54|   667k|    if (_rnp_log_switch < 0) {
  ------------------
  |  Branch (54:9): [True: 1, False: 667k]
  ------------------
   55|      1|        const char *var = getenv(RNP_LOG_CONSOLE);
   56|      1|        _rnp_log_switch = (var && strcmp(var, "0")) ? 1 : 0;
  ------------------
  |  Branch (56:28): [True: 0, False: 1]
  |  Branch (56:35): [True: 0, False: 0]
  ------------------
   57|      1|    }
   58|   667k|    return !_rnp_log_disable && !!_rnp_log_switch;
  ------------------
  |  Branch (58:12): [True: 667k, False: 0]
  |  Branch (58:33): [True: 0, False: 667k]
  ------------------
   59|   667k|}

_ZN23pgp_password_provider_tC2EPFbPK18pgp_password_ctx_tPcmPvES4_:
   52|  4.24k|        : callback(cb), userdata(ud){};

_ZN10rnp_ffi_stC2EN3rnp9KeyFormatES1_:
  609|  4.24k|{
  610|  4.24k|    errs = stderr;
  611|  4.24k|    pubring = new rnp::KeyStore("", context, pub_fmt);
  612|  4.24k|    secring = new rnp::KeyStore("", context, sec_fmt);
  613|  4.24k|    getkeycb = NULL;
  614|  4.24k|    getkeycb_ctx = NULL;
  615|  4.24k|    getpasscb = NULL;
  616|       |    getpasscb_ctx = NULL;
  617|  4.24k|    key_provider.callback = ffi_key_provider;
  618|  4.24k|    key_provider.userdata = this;
  619|  4.24k|    pass_provider.callback = rnp_password_cb_bounce;
  620|  4.24k|    pass_provider.userdata = this;
  621|  4.24k|}
rnp_ffi_create:
  637|  4.24k|try {
  638|       |    // checks
  639|  4.24k|    if (!ffi || !pub_format || !sec_format) {
  ------------------
  |  Branch (639:9): [True: 0, False: 4.24k]
  |  Branch (639:17): [True: 0, False: 4.24k]
  |  Branch (639:32): [True: 0, False: 4.24k]
  ------------------
  640|      0|        return RNP_ERROR_NULL_POINTER;
  641|      0|    }
  642|       |
  643|  4.24k|    auto pub_ks_format = rnp::KeyFormat::Unknown;
  644|  4.24k|    auto sec_ks_format = rnp::KeyFormat::Unknown;
  645|  4.24k|    if (!parse_ks_format(&pub_ks_format, pub_format) ||
  ------------------
  |  Branch (645:9): [True: 0, False: 4.24k]
  ------------------
  646|  4.24k|        !parse_ks_format(&sec_ks_format, sec_format)) {
  ------------------
  |  Branch (646:9): [True: 0, False: 4.24k]
  ------------------
  647|      0|        return RNP_ERROR_BAD_PARAMETERS;
  648|      0|    }
  649|       |
  650|  4.24k|    struct rnp_ffi_st *ob = new rnp_ffi_st(pub_ks_format, sec_ks_format);
  651|  4.24k|    *ffi = ob;
  652|  4.24k|    return RNP_SUCCESS;
  653|  4.24k|}
  654|  4.24k|FFI_GUARD
  ------------------
  |  |  606|  4.24k|#define FFI_GUARD FFI_GUARD_FP((stderr))
  |  |  ------------------
  |  |  |  |  589|  4.24k|    catch (rnp::rnp_exception & e)                                                  \
  |  |  |  |  590|  4.24k|    {                                                                               \
  |  |  |  |  591|      0|        return ffi_exception((fp), __func__, e.what(), e.code());                   \
  |  |  |  |  592|      0|    }                                                                               \
  |  |  |  |  593|  4.24k|    catch (std::bad_alloc &)                                                        \
  |  |  |  |  594|  4.24k|    {                                                                               \
  |  |  |  |  595|      0|        return ffi_exception((fp), __func__, "bad_alloc", RNP_ERROR_OUT_OF_MEMORY); \
  |  |  |  |  596|      0|    }                                                                               \
  |  |  |  |  597|  4.24k|    catch (std::exception & e)                                                      \
  |  |  |  |  598|  4.24k|    {                                                                               \
  |  |  |  |  599|      0|        return ffi_exception((fp), __func__, e.what());                             \
  |  |  |  |  600|      0|    }                                                                               \
  |  |  |  |  601|  4.24k|    catch (...)                                                                     \
  |  |  |  |  602|  4.24k|    {                                                                               \
  |  |  |  |  603|      0|        return ffi_exception((fp), __func__, "unknown exception");                  \
  |  |  |  |  604|      0|    }
  |  |  ------------------
  ------------------
_ZN10rnp_ffi_stD2Ev:
  672|  4.24k|{
  673|  4.24k|    close_io_file(&errs);
  674|  4.24k|    delete pubring;
  675|  4.24k|    delete secring;
  676|  4.24k|}
rnp_ffi_destroy:
  680|  4.24k|try {
  681|  4.24k|    if (ffi) {
  ------------------
  |  Branch (681:9): [True: 4.24k, False: 0]
  ------------------
  682|  4.24k|        delete ffi;
  683|  4.24k|    }
  684|  4.24k|    return RNP_SUCCESS;
  685|  4.24k|}
  686|  4.24k|FFI_GUARD
  ------------------
  |  |  606|  4.24k|#define FFI_GUARD FFI_GUARD_FP((stderr))
  |  |  ------------------
  |  |  |  |  589|  4.24k|    catch (rnp::rnp_exception & e)                                                  \
  |  |  |  |  590|  4.24k|    {                                                                               \
  |  |  |  |  591|      0|        return ffi_exception((fp), __func__, e.what(), e.code());                   \
  |  |  |  |  592|      0|    }                                                                               \
  |  |  |  |  593|  4.24k|    catch (std::bad_alloc &)                                                        \
  |  |  |  |  594|  4.24k|    {                                                                               \
  |  |  |  |  595|      0|        return ffi_exception((fp), __func__, "bad_alloc", RNP_ERROR_OUT_OF_MEMORY); \
  |  |  |  |  596|      0|    }                                                                               \
  |  |  |  |  597|  4.24k|    catch (std::exception & e)                                                      \
  |  |  |  |  598|  4.24k|    {                                                                               \
  |  |  |  |  599|      0|        return ffi_exception((fp), __func__, e.what());                             \
  |  |  |  |  600|      0|    }                                                                               \
  |  |  |  |  601|  4.24k|    catch (...)                                                                     \
  |  |  |  |  602|  4.24k|    {                                                                               \
  |  |  |  |  603|      0|        return ffi_exception((fp), __func__, "unknown exception");                  \
  |  |  |  |  604|      0|    }
  |  |  ------------------
  ------------------
rnp_import_signatures:
 1835|  4.24k|try {
 1836|  4.24k|    if (!ffi || !input) {
  ------------------
  |  Branch (1836:9): [True: 0, False: 4.24k]
  |  Branch (1836:17): [True: 0, False: 4.24k]
  ------------------
 1837|      0|        return RNP_ERROR_NULL_POINTER;
 1838|      0|    }
 1839|  4.24k|    if (flags) {
  ------------------
  |  Branch (1839:9): [True: 0, False: 4.24k]
  ------------------
 1840|      0|        FFI_LOG(ffi, "wrong flags: %d", (int) flags);
  ------------------
  |  |   67|      0|    do {                             \
  |  |   68|      0|        FILE *fp = stderr;           \
  |  |   69|      0|        if (ffi && ffi->errs) {      \
  |  |  ------------------
  |  |  |  Branch (69:13): [True: 0, False: 0]
  |  |  |  Branch (69:20): [True: 0, False: 0]
  |  |  ------------------
  |  |   70|      0|            fp = ffi->errs;          \
  |  |   71|      0|        }                            \
  |  |   72|      0|        RNP_LOG_FD(fp, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  |   68|      0|    do {                                                                                 \
  |  |  |  |   69|      0|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|      0|            break;                                                                       \
  |  |  |  |   71|      0|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   73|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (73:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1841|      0|        return RNP_ERROR_BAD_PARAMETERS;
 1842|      0|    }
 1843|       |
 1844|  4.24k|    pgp::pkt::Signatures sigs;
 1845|  4.24k|    rnp_result_t         sigret = process_pgp_signatures(input->src, sigs);
 1846|  4.24k|    if (sigret) {
  ------------------
  |  Branch (1846:9): [True: 3.04k, False: 1.19k]
  ------------------
 1847|  3.04k|        FFI_LOG(ffi, "failed to parse signature(s)");
  ------------------
  |  |   67|  3.04k|    do {                             \
  |  |   68|  3.04k|        FILE *fp = stderr;           \
  |  |   69|  3.04k|        if (ffi && ffi->errs) {      \
  |  |  ------------------
  |  |  |  Branch (69:13): [True: 3.04k, False: 0]
  |  |  |  Branch (69:20): [True: 3.04k, False: 0]
  |  |  ------------------
  |  |   70|  3.04k|            fp = ffi->errs;          \
  |  |   71|  3.04k|        }                            \
  |  |   72|  3.04k|        RNP_LOG_FD(fp, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  |   68|  3.04k|    do {                                                                                 \
  |  |  |  |   69|  3.04k|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 3.04k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|  3.04k|            break;                                                                       \
  |  |  |  |   71|  3.04k|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   73|  3.04k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (73:14): [Folded, False: 3.04k]
  |  |  ------------------
  ------------------
 1848|  3.04k|        return sigret;
 1849|  3.04k|    }
 1850|       |
 1851|  1.19k|    json_object *jsores = json_object_new_object();
 1852|  1.19k|    if (!jsores) {
  ------------------
  |  Branch (1852:9): [True: 0, False: 1.19k]
  ------------------
 1853|      0|        return RNP_ERROR_OUT_OF_MEMORY; // LCOV_EXCL_LINE
 1854|      0|    }
 1855|  1.19k|    rnp::JSONObject jsowrap(jsores);
 1856|  1.19k|    json_object *   jsosigs = json_object_new_array();
 1857|  1.19k|    if (!json_add(jsores, "sigs", jsosigs)) {
  ------------------
  |  Branch (1857:9): [True: 0, False: 1.19k]
  ------------------
 1858|      0|        return RNP_ERROR_OUT_OF_MEMORY; // LCOV_EXCL_LINE
 1859|      0|    }
 1860|       |
 1861|  7.42k|    for (auto &sig : sigs) {
  ------------------
  |  Branch (1861:20): [True: 7.42k, False: 1.19k]
  ------------------
 1862|  7.42k|        pgp_sig_import_status_t pub_status = PGP_SIG_IMPORT_STATUS_UNKNOWN;
 1863|  7.42k|        pgp_sig_import_status_t sec_status = PGP_SIG_IMPORT_STATUS_UNKNOWN;
 1864|  7.42k|        auto *                  pkey = ffi->pubring->import_signature(sig, &pub_status);
 1865|  7.42k|        auto *                  skey = ffi->secring->import_signature(sig, &sec_status);
 1866|  7.42k|        sigret = add_sig_status(jsosigs, pkey ? pkey : skey, pub_status, sec_status);
  ------------------
  |  Branch (1866:42): [True: 0, False: 7.42k]
  ------------------
 1867|  7.42k|        if (sigret) {
  ------------------
  |  Branch (1867:13): [True: 0, False: 7.42k]
  ------------------
 1868|      0|            return sigret; // LCOV_EXCL_LINE
 1869|      0|        }
 1870|  7.42k|    }
 1871|  1.19k|    if (!results) {
  ------------------
  |  Branch (1871:9): [True: 0, False: 1.19k]
  ------------------
 1872|      0|        return RNP_SUCCESS;
 1873|      0|    }
 1874|  1.19k|    return ret_str_value(json_object_to_json_string_ext(jsores, JSON_C_TO_STRING_PRETTY),
 1875|  1.19k|                         results);
 1876|  1.19k|}
 1877|  4.24k|FFI_GUARD
  ------------------
  |  |  606|  4.24k|#define FFI_GUARD FFI_GUARD_FP((stderr))
  |  |  ------------------
  |  |  |  |  589|  4.24k|    catch (rnp::rnp_exception & e)                                                  \
  |  |  |  |  590|  4.24k|    {                                                                               \
  |  |  |  |  591|    861|        return ffi_exception((fp), __func__, e.what(), e.code());                   \
  |  |  |  |  592|    861|    }                                                                               \
  |  |  |  |  593|  4.24k|    catch (std::bad_alloc &)                                                        \
  |  |  |  |  594|  4.24k|    {                                                                               \
  |  |  |  |  595|      0|        return ffi_exception((fp), __func__, "bad_alloc", RNP_ERROR_OUT_OF_MEMORY); \
  |  |  |  |  596|      0|    }                                                                               \
  |  |  |  |  597|  4.24k|    catch (std::exception & e)                                                      \
  |  |  |  |  598|  4.24k|    {                                                                               \
  |  |  |  |  599|      0|        return ffi_exception((fp), __func__, e.what());                             \
  |  |  |  |  600|      0|    }                                                                               \
  |  |  |  |  601|  4.24k|    catch (...)                                                                     \
  |  |  |  |  602|  4.24k|    {                                                                               \
  |  |  |  |  603|      0|        return ffi_exception((fp), __func__, "unknown exception");                  \
  |  |  |  |  604|      0|    }
  |  |  ------------------
  ------------------
_ZN12rnp_input_stC2Ev:
 1994|  4.24k|rnp_input_st::rnp_input_st() : reader(NULL), closer(NULL), app_ctx(NULL)
 1995|  4.24k|{
 1996|  4.24k|    memset(&src, 0, sizeof(src));
 1997|  4.24k|}
_ZN12rnp_input_stD2Ev:
 2016|  4.24k|{
 2017|  4.24k|    bool armored = src.type == PGP_STREAM_ARMORED;
 2018|  4.24k|    src.close();
 2019|  4.24k|    if (armored) {
  ------------------
  |  Branch (2019:9): [True: 0, False: 4.24k]
  ------------------
 2020|      0|        rnp_input_t armored = (rnp_input_t) app_ctx;
 2021|      0|        delete armored;
 2022|       |        app_ctx = NULL;
 2023|      0|    }
 2024|  4.24k|}
rnp_input_from_memory:
 2073|  4.24k|try {
 2074|  4.24k|    if (!input) {
  ------------------
  |  Branch (2074:9): [True: 0, False: 4.24k]
  ------------------
 2075|      0|        return RNP_ERROR_NULL_POINTER;
 2076|      0|    }
 2077|  4.24k|    if (!buf && buf_len) {
  ------------------
  |  Branch (2077:9): [True: 0, False: 4.24k]
  |  Branch (2077:17): [True: 0, False: 0]
  ------------------
 2078|      0|        return RNP_ERROR_NULL_POINTER;
 2079|      0|    }
 2080|  4.24k|    if (!buf_len) {
  ------------------
  |  Branch (2080:9): [True: 0, False: 4.24k]
  ------------------
 2081|       |        // prevent malloc(0)
 2082|      0|        do_copy = false;
 2083|      0|    }
 2084|  4.24k|    *input = new rnp_input_st();
 2085|  4.24k|    uint8_t *data = (uint8_t *) buf;
 2086|  4.24k|    if (do_copy) {
  ------------------
  |  Branch (2086:9): [True: 0, False: 4.24k]
  ------------------
 2087|      0|        data = (uint8_t *) malloc(buf_len);
 2088|      0|        if (!data) {
  ------------------
  |  Branch (2088:13): [True: 0, False: 0]
  ------------------
 2089|       |            /* LCOV_EXCL_START */
 2090|      0|            delete *input;
 2091|      0|            *input = NULL;
 2092|      0|            return RNP_ERROR_OUT_OF_MEMORY;
 2093|       |            /* LCOV_EXCL_END */
 2094|      0|        }
 2095|      0|        memcpy(data, buf, buf_len);
 2096|      0|    }
 2097|  4.24k|    rnp_result_t ret = init_mem_src(&(*input)->src, data, buf_len, do_copy);
 2098|  4.24k|    if (ret) {
  ------------------
  |  Branch (2098:9): [True: 0, False: 4.24k]
  ------------------
 2099|       |        /* LCOV_EXCL_START */
 2100|      0|        if (do_copy) {
  ------------------
  |  Branch (2100:13): [True: 0, False: 0]
  ------------------
 2101|      0|            free(data);
 2102|      0|        }
 2103|      0|        delete *input;
 2104|      0|        *input = NULL;
 2105|       |        /* LCOV_EXCL_END */
 2106|      0|    }
 2107|  4.24k|    return ret;
 2108|  4.24k|}
 2109|  4.24k|FFI_GUARD
  ------------------
  |  |  606|  4.24k|#define FFI_GUARD FFI_GUARD_FP((stderr))
  |  |  ------------------
  |  |  |  |  589|  4.24k|    catch (rnp::rnp_exception & e)                                                  \
  |  |  |  |  590|  4.24k|    {                                                                               \
  |  |  |  |  591|      0|        return ffi_exception((fp), __func__, e.what(), e.code());                   \
  |  |  |  |  592|      0|    }                                                                               \
  |  |  |  |  593|  4.24k|    catch (std::bad_alloc &)                                                        \
  |  |  |  |  594|  4.24k|    {                                                                               \
  |  |  |  |  595|      0|        return ffi_exception((fp), __func__, "bad_alloc", RNP_ERROR_OUT_OF_MEMORY); \
  |  |  |  |  596|      0|    }                                                                               \
  |  |  |  |  597|  4.24k|    catch (std::exception & e)                                                      \
  |  |  |  |  598|  4.24k|    {                                                                               \
  |  |  |  |  599|      0|        return ffi_exception((fp), __func__, e.what());                             \
  |  |  |  |  600|      0|    }                                                                               \
  |  |  |  |  601|  4.24k|    catch (...)                                                                     \
  |  |  |  |  602|  4.24k|    {                                                                               \
  |  |  |  |  603|      0|        return ffi_exception((fp), __func__, "unknown exception");                  \
  |  |  |  |  604|      0|    }
  |  |  ------------------
  ------------------
rnp_input_destroy:
 2162|  4.24k|try {
 2163|  4.24k|    delete input;
 2164|  4.24k|    return RNP_SUCCESS;
 2165|  4.24k|}
 2166|  4.24k|FFI_GUARD
  ------------------
  |  |  606|  4.24k|#define FFI_GUARD FFI_GUARD_FP((stderr))
  |  |  ------------------
  |  |  |  |  589|  4.24k|    catch (rnp::rnp_exception & e)                                                  \
  |  |  |  |  590|  4.24k|    {                                                                               \
  |  |  |  |  591|      0|        return ffi_exception((fp), __func__, e.what(), e.code());                   \
  |  |  |  |  592|      0|    }                                                                               \
  |  |  |  |  593|  4.24k|    catch (std::bad_alloc &)                                                        \
  |  |  |  |  594|  4.24k|    {                                                                               \
  |  |  |  |  595|      0|        return ffi_exception((fp), __func__, "bad_alloc", RNP_ERROR_OUT_OF_MEMORY); \
  |  |  |  |  596|      0|    }                                                                               \
  |  |  |  |  597|  4.24k|    catch (std::exception & e)                                                      \
  |  |  |  |  598|  4.24k|    {                                                                               \
  |  |  |  |  599|      0|        return ffi_exception((fp), __func__, e.what());                             \
  |  |  |  |  600|      0|    }                                                                               \
  |  |  |  |  601|  4.24k|    catch (...)                                                                     \
  |  |  |  |  602|  4.24k|    {                                                                               \
  |  |  |  |  603|      0|        return ffi_exception((fp), __func__, "unknown exception");                  \
  |  |  |  |  604|      0|    }
  |  |  ------------------
  ------------------
rnp_buffer_destroy:
 5605|  4.24k|{
 5606|  4.24k|    free(ptr);
 5607|  4.24k|}
rnp.cpp:_ZL15parse_ks_formatPN3rnp9KeyFormatEPKc:
  496|  8.48k|{
  497|  8.48k|    if (!strcmp(format, RNP_KEYSTORE_GPG)) {
  ------------------
  |  | 4176|  8.48k|#define RNP_KEYSTORE_GPG ("GPG")
  ------------------
  |  Branch (497:9): [True: 8.48k, False: 0]
  ------------------
  498|  8.48k|        *key_store_format = rnp::KeyFormat::GPG;
  499|  8.48k|    } else if (!strcmp(format, RNP_KEYSTORE_KBX)) {
  ------------------
  |  | 4177|      0|#define RNP_KEYSTORE_KBX ("KBX")
  ------------------
  |  Branch (499:16): [True: 0, False: 0]
  ------------------
  500|      0|        *key_store_format = rnp::KeyFormat::KBX;
  501|      0|    } else if (!strcmp(format, RNP_KEYSTORE_G10)) {
  ------------------
  |  | 4178|      0|#define RNP_KEYSTORE_G10 ("G10")
  ------------------
  |  Branch (501:16): [True: 0, False: 0]
  ------------------
  502|      0|        *key_store_format = rnp::KeyFormat::G10;
  503|      0|    } else {
  504|      0|        return false;
  505|      0|    }
  506|  8.48k|    return true;
  507|  8.48k|}
rnp.cpp:_ZL13ffi_exceptionP8_IO_FILEPKcS2_j:
  580|    861|{
  581|    861|    if (rnp_log_switch()) {
  ------------------
  |  Branch (581:9): [True: 0, False: 861]
  ------------------
  582|      0|        fprintf(
  583|      0|          fp, "[%s()] Error 0x%08X (%s): %s\n", func, ret, rnp_result_to_string(ret), msg);
  584|      0|    }
  585|    861|    return ret;
  586|    861|}
rnp.cpp:_ZL13close_io_filePP8_IO_FILE:
  664|  4.24k|{
  665|  4.24k|    if (*fp && !is_std_file(*fp)) {
  ------------------
  |  Branch (665:9): [True: 4.24k, False: 0]
  |  Branch (665:16): [True: 0, False: 4.24k]
  ------------------
  666|      0|        fclose(*fp);
  667|      0|    }
  668|       |    *fp = NULL;
  669|  4.24k|}
rnp.cpp:_ZL11is_std_fileP8_IO_FILE:
  658|  4.24k|{
  659|  4.24k|    return fp == stdout || fp == stderr;
  ------------------
  |  Branch (659:12): [True: 0, False: 4.24k]
  |  Branch (659:28): [True: 4.24k, False: 0]
  ------------------
  660|  4.24k|}
rnp.cpp:_ZL13ret_str_valuePKcPPc:
  529|    338|{
  530|    338|    if (!str) {
  ------------------
  |  Branch (530:9): [True: 0, False: 338]
  ------------------
  531|      0|        return RNP_ERROR_BAD_PARAMETERS;
  532|      0|    }
  533|    338|    char *strcp = strdup(str);
  534|    338|    if (!strcp) {
  ------------------
  |  Branch (534:9): [True: 0, False: 338]
  ------------------
  535|      0|        *res = NULL;                    // LCOV_EXCL_LINE
  536|      0|        return RNP_ERROR_OUT_OF_MEMORY; // LCOV_EXCL_LINE
  537|      0|    }
  538|    338|    *res = strcp;
  539|    338|    return RNP_SUCCESS;
  540|    338|}
rnp.cpp:_ZL14add_sig_statusP11json_objectPKN3rnp3KeyE23pgp_sig_import_status_tS5_:
 1802|  7.42k|{
 1803|  7.42k|    json_object *jsosig = json_object_new_object();
 1804|  7.42k|    if (!jsosig) {
  ------------------
  |  Branch (1804:9): [True: 0, False: 7.42k]
  ------------------
 1805|      0|        return RNP_ERROR_OUT_OF_MEMORY; // LCOV_EXCL_LINE
 1806|      0|    }
 1807|       |
 1808|  7.42k|    if (!json_add(jsosig, "public", sig_status_to_str(pub)) ||
  ------------------
  |  Branch (1808:9): [True: 0, False: 7.42k]
  ------------------
 1809|  7.42k|        !json_add(jsosig, "secret", sig_status_to_str(sec))) {
  ------------------
  |  Branch (1809:9): [True: 0, False: 7.42k]
  ------------------
 1810|       |        /* LCOV_EXCL_START */
 1811|      0|        json_object_put(jsosig);
 1812|      0|        return RNP_ERROR_OUT_OF_MEMORY;
 1813|       |        /* LCOV_EXCL_END */
 1814|      0|    }
 1815|       |
 1816|  7.42k|    if (signer && !json_add(jsosig, "signer fingerprint", signer->fp())) {
  ------------------
  |  Branch (1816:9): [True: 0, False: 7.42k]
  |  Branch (1816:19): [True: 0, False: 0]
  ------------------
 1817|       |        /* LCOV_EXCL_START */
 1818|      0|        json_object_put(jsosig);
 1819|      0|        return RNP_ERROR_OUT_OF_MEMORY;
 1820|       |        /* LCOV_EXCL_END */
 1821|      0|    }
 1822|       |
 1823|  7.42k|    if (!json_array_add(sigs, jsosig)) {
  ------------------
  |  Branch (1823:9): [True: 0, False: 7.42k]
  ------------------
 1824|       |        /* LCOV_EXCL_START */
 1825|      0|        json_object_put(jsosig);
 1826|      0|        return RNP_ERROR_OUT_OF_MEMORY;
 1827|       |        /* LCOV_EXCL_END */
 1828|      0|    }
 1829|       |
 1830|  7.42k|    return RNP_SUCCESS;
 1831|  7.42k|}
rnp.cpp:_ZL17sig_status_to_str23pgp_sig_import_status_t:
 1790|  14.8k|{
 1791|  14.8k|    if (status == PGP_SIG_IMPORT_STATUS_UNKNOWN) {
  ------------------
  |  Branch (1791:9): [True: 6.16k, False: 8.67k]
  ------------------
 1792|  6.16k|        return "none";
 1793|  6.16k|    }
 1794|  8.67k|    return id_str_pair::lookup(sig_import_status_map, status, "none");
 1795|  14.8k|}

_ZN3rnp15SecurityProfile8add_ruleEONS_12SecurityRuleE:
   75|  29.6k|{
   76|  29.6k|    rules_.emplace_back(rule);
   77|  29.6k|    return rules_.back();
   78|  29.6k|}
_ZN3rnp15SecurityContextC2Ev:
  179|  4.24k|SecurityContext::SecurityContext() : time_(0), prov_state_(NULL), rng(RNG::Type::DRBG)
  180|  4.24k|{
  181|       |    /* Initialize crypto provider if needed (currently only for OpenSSL 3.0) */
  182|  4.24k|    if (!rnp::backend_init(&prov_state_)) {
  ------------------
  |  Branch (182:9): [True: 0, False: 4.24k]
  ------------------
  183|      0|        throw rnp::rnp_exception(RNP_ERROR_BAD_STATE);
  184|      0|    }
  185|       |    /* Mark SHA-1 data signature insecure since 2019-01-19, as GnuPG does */
  186|  4.24k|    profile.add_rule({FeatureType::Hash,
  187|  4.24k|                      PGP_HASH_SHA1,
  188|  4.24k|                      SecurityLevel::Insecure,
  189|  4.24k|                      1547856000,
  190|  4.24k|                      SecurityAction::VerifyData});
  191|       |    /* Mark SHA-1 key signature insecure since 2024-01-19 by default */
  192|  4.24k|    profile.add_rule({FeatureType::Hash,
  193|  4.24k|                      PGP_HASH_SHA1,
  194|  4.24k|                      SecurityLevel::Insecure,
  195|  4.24k|                      1705629600,
  196|  4.24k|                      SecurityAction::VerifyKey});
  197|       |    /* Mark MD5 insecure since 2012-01-01 */
  198|  4.24k|    profile.add_rule({FeatureType::Hash, PGP_HASH_MD5, SecurityLevel::Insecure, 1325376000});
  199|       |    /* Mark CAST5, 3DES, IDEA, BLOWFISH insecure since 2024-10-01*/
  200|  4.24k|    profile.add_rule({FeatureType::Cipher, PGP_SA_CAST5, SecurityLevel::Insecure, 1727730000});
  201|  4.24k|    profile.add_rule(
  202|  4.24k|      {FeatureType::Cipher, PGP_SA_TRIPLEDES, SecurityLevel::Insecure, 1727730000});
  203|  4.24k|    profile.add_rule({FeatureType::Cipher, PGP_SA_IDEA, SecurityLevel::Insecure, 1727730000});
  204|  4.24k|    profile.add_rule(
  205|  4.24k|      {FeatureType::Cipher, PGP_SA_BLOWFISH, SecurityLevel::Insecure, 1727730000});
  206|  4.24k|}
_ZN3rnp15SecurityContextD2Ev:
  209|  4.24k|{
  210|  4.24k|    rnp::backend_finish(prov_state_);
  211|  4.24k|}

_ZN3rnp12SecurityRuleC2ENS_11FeatureTypeEiNS_13SecurityLevelEmNS_14SecurityActionE:
   54|  29.6k|        : type(ftype), feature(fval), level(flevel), from(ffrom), override(false),
   55|  29.6k|          action(faction){};

_ZN3pgp11SigMaterial6createE16pgp_pubkey_alg_t14pgp_hash_alg_t:
   35|   523k|{
   36|   523k|    switch (palg) {
   37|  11.4k|    case PGP_PKA_RSA:
  ------------------
  |  Branch (37:5): [True: 11.4k, False: 511k]
  ------------------
   38|   500k|    case PGP_PKA_RSA_SIGN_ONLY:
  ------------------
  |  Branch (38:5): [True: 489k, False: 33.9k]
  ------------------
   39|   500k|        return std::unique_ptr<SigMaterial>(new RSASigMaterial(halg));
   40|  1.21k|    case PGP_PKA_DSA:
  ------------------
  |  Branch (40:5): [True: 1.21k, False: 521k]
  ------------------
   41|  1.21k|        return std::unique_ptr<SigMaterial>(new DSASigMaterial(halg));
   42|  11.2k|    case PGP_PKA_EDDSA:
  ------------------
  |  Branch (42:5): [True: 11.2k, False: 511k]
  ------------------
   43|  13.6k|    case PGP_PKA_ECDSA:
  ------------------
  |  Branch (43:5): [True: 2.42k, False: 520k]
  ------------------
   44|  14.3k|    case PGP_PKA_SM2:
  ------------------
  |  Branch (44:5): [True: 668, False: 522k]
  ------------------
   45|  15.1k|    case PGP_PKA_ECDH:
  ------------------
  |  Branch (45:5): [True: 843, False: 522k]
  ------------------
   46|  15.1k|        return std::unique_ptr<SigMaterial>(new ECSigMaterial(halg));
   47|    846|    case PGP_PKA_ELGAMAL: /* we support reading it but will not validate */
  ------------------
  |  Branch (47:5): [True: 846, False: 522k]
  ------------------
   48|  1.49k|    case PGP_PKA_ELGAMAL_ENCRYPT_OR_SIGN:
  ------------------
  |  Branch (48:5): [True: 647, False: 522k]
  ------------------
   49|  1.49k|        return std::unique_ptr<SigMaterial>(new EGSigMaterial(halg));
   50|      0|#if defined(ENABLE_CRYPTO_REFRESH)
   51|  1.30k|    case PGP_PKA_ED25519: {
  ------------------
  |  Branch (51:5): [True: 1.30k, False: 521k]
  ------------------
   52|  1.30k|        return std::unique_ptr<SigMaterial>(new Ed25519SigMaterial(halg));
   53|    846|    }
   54|      0|#endif
   55|      0|#if defined(ENABLE_PQC)
   56|    117|    case PGP_PKA_DILITHIUM3_ED25519:
  ------------------
  |  Branch (56:5): [True: 117, False: 523k]
  ------------------
   57|    117|        FALLTHROUGH_STATEMENT;
  ------------------
  |  |   81|    117|# define FALLTHROUGH_STATEMENT [[fallthrough]]
  ------------------
   58|       |    // TODO: Add case for PGP_PKA_DILITHIUM5_ED448 with FALLTHROUGH_STATEMENT;
   59|    216|    case PGP_PKA_DILITHIUM3_P256:
  ------------------
  |  Branch (59:5): [True: 99, False: 523k]
  ------------------
   60|    216|        FALLTHROUGH_STATEMENT;
  ------------------
  |  |   81|    216|# define FALLTHROUGH_STATEMENT [[fallthrough]]
  ------------------
   61|    566|    case PGP_PKA_DILITHIUM5_P384:
  ------------------
  |  Branch (61:5): [True: 350, False: 522k]
  ------------------
   62|    566|        FALLTHROUGH_STATEMENT;
  ------------------
  |  |   81|    566|# define FALLTHROUGH_STATEMENT [[fallthrough]]
  ------------------
   63|    987|    case PGP_PKA_DILITHIUM3_BP256:
  ------------------
  |  Branch (63:5): [True: 421, False: 522k]
  ------------------
   64|    987|        FALLTHROUGH_STATEMENT;
  ------------------
  |  |   81|    987|# define FALLTHROUGH_STATEMENT [[fallthrough]]
  ------------------
   65|  1.47k|    case PGP_PKA_DILITHIUM5_BP384:
  ------------------
  |  Branch (65:5): [True: 483, False: 522k]
  ------------------
   66|  1.47k|        return std::unique_ptr<SigMaterial>(new DilithiumSigMaterial(palg, halg));
   67|    377|    case PGP_PKA_SPHINCSPLUS_SHA2:
  ------------------
  |  Branch (67:5): [True: 377, False: 522k]
  ------------------
   68|    377|        FALLTHROUGH_STATEMENT;
  ------------------
  |  |   81|    377|# define FALLTHROUGH_STATEMENT [[fallthrough]]
  ------------------
   69|  1.30k|    case PGP_PKA_SPHINCSPLUS_SHAKE:
  ------------------
  |  Branch (69:5): [True: 923, False: 522k]
  ------------------
   70|  1.30k|        return std::unique_ptr<SigMaterial>(new SlhdsaSigMaterial(halg));
   71|      0|#endif
   72|    525|    default:
  ------------------
  |  Branch (72:5): [True: 525, False: 522k]
  ------------------
   73|    525|        RNP_LOG("Unknown pk algorithm : %d", (int) palg);
  ------------------
  |  |   76|    525|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    525|    do {                                                                                 \
  |  |  |  |   69|    525|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 525, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    525|            break;                                                                       \
  |  |  |  |   71|    525|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   74|    525|        return nullptr;
   75|   523k|    }
   76|   523k|}
_ZN3pgp14RSASigMaterial5parseER17pgp_packet_body_t:
   80|   500k|{
   81|   500k|    return pkt.get(sig.s);
   82|   500k|}
_ZN3pgp14DSASigMaterial5parseER17pgp_packet_body_t:
   92|  1.21k|{
   93|  1.21k|    return pkt.get(sig.r) && pkt.get(sig.s);
  ------------------
  |  Branch (93:12): [True: 1.10k, False: 109]
  |  Branch (93:30): [True: 1.09k, False: 11]
  ------------------
   94|  1.21k|}
_ZN3pgp13EGSigMaterial5parseER17pgp_packet_body_t:
  105|  1.49k|{
  106|  1.49k|    return pkt.get(sig.r) && pkt.get(sig.s);
  ------------------
  |  Branch (106:12): [True: 1.12k, False: 369]
  |  Branch (106:30): [True: 1.10k, False: 22]
  ------------------
  107|  1.49k|}
_ZN3pgp13ECSigMaterial5parseER17pgp_packet_body_t:
  119|  15.1k|{
  120|  15.1k|    return pkt.get(sig.r) && pkt.get(sig.s);
  ------------------
  |  Branch (120:12): [True: 14.4k, False: 661]
  |  Branch (120:30): [True: 14.4k, False: 69]
  ------------------
  121|  15.1k|}
_ZN3pgp18Ed25519SigMaterial5parseER17pgp_packet_body_t:
  133|  1.30k|{
  134|  1.30k|    auto ec_desc = pgp::ec::Curve::get(PGP_CURVE_25519);
  135|  1.30k|    if (!pkt.get(sig.sig, 2 * ec_desc->bytes())) {
  ------------------
  |  Branch (135:9): [True: 983, False: 317]
  ------------------
  136|    983|        RNP_LOG("failed to parse ED25519 signature data");
  ------------------
  |  |   76|    983|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    983|    do {                                                                                 \
  |  |  |  |   69|    983|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 983, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    983|            break;                                                                       \
  |  |  |  |   71|    983|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  137|    983|        return false;
  138|    983|    }
  139|    317|    return true;
  140|  1.30k|}
_ZN3pgp20DilithiumSigMaterial5parseER17pgp_packet_body_t:
  152|  1.47k|{
  153|  1.47k|    if (!pkt.get(sig.sig, pgp_dilithium_exdsa_signature_t::composite_signature_size(palg))) {
  ------------------
  |  Branch (153:9): [True: 1.45k, False: 18]
  ------------------
  154|  1.45k|        RNP_LOG("failed to get mldsa-ecdsa/eddsa signature");
  ------------------
  |  |   76|  1.45k|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|  1.45k|    do {                                                                                 \
  |  |  |  |   69|  1.45k|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 1.45k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|  1.45k|            break;                                                                       \
  |  |  |  |   71|  1.45k|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|  1.45k|        return false;
  156|  1.45k|    }
  157|     18|    return true;
  158|  1.47k|}
_ZN3pgp17SlhdsaSigMaterial5parseER17pgp_packet_body_t:
  168|  1.30k|{
  169|  1.30k|    uint8_t param = 0;
  170|  1.30k|    if (!pkt.get(param)) {
  ------------------
  |  Branch (170:9): [True: 487, False: 813]
  ------------------
  171|    487|        RNP_LOG("failed to parse SLH-DSA signature data");
  ------------------
  |  |   76|    487|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    487|    do {                                                                                 \
  |  |  |  |   69|    487|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 487, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    487|            break;                                                                       \
  |  |  |  |   71|    487|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  172|    487|        return false;
  173|    487|    }
  174|    813|    auto sig_size = sphincsplus_signature_size((sphincsplus_parameter_t) param);
  175|    813|    if (!sig_size) {
  ------------------
  |  Branch (175:9): [True: 240, False: 573]
  ------------------
  176|    240|        RNP_LOG("invalid SLH-DSA param value");
  ------------------
  |  |   76|    240|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    240|    do {                                                                                 \
  |  |  |  |   69|    240|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 240, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    240|            break;                                                                       \
  |  |  |  |   71|    240|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  177|    240|        return false;
  178|    240|    }
  179|    573|    sig.param = (sphincsplus_parameter_t) param;
  180|    573|    if (!pkt.get(sig.sig, sig_size)) {
  ------------------
  |  Branch (180:9): [True: 562, False: 11]
  ------------------
  181|    562|        RNP_LOG("failed to parse SLH-DSA signature data");
  ------------------
  |  |   76|    562|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    562|    do {                                                                                 \
  |  |  |  |   69|    562|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 562, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    562|            break;                                                                       \
  |  |  |  |   71|    562|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  182|    562|        return false;
  183|    562|    }
  184|     11|    return true;
  185|    573|}

_ZN3pgp11SigMaterialC2E14pgp_hash_alg_t:
   40|   522k|    SigMaterial(pgp_hash_alg_t ahalg) : halg(ahalg){};
_ZN3pgp11SigMaterialD2Ev:
   41|   522k|    virtual ~SigMaterial(){};
_ZN3pgp14RSASigMaterialC2E14pgp_hash_alg_t:
   52|   500k|    RSASigMaterial(pgp_hash_alg_t ahalg) : SigMaterial(ahalg){};
_ZN3pgp14DSASigMaterialC2E14pgp_hash_alg_t:
   61|  1.21k|    DSASigMaterial(pgp_hash_alg_t ahalg) : SigMaterial(ahalg){};
_ZN3pgp13EGSigMaterialC2E14pgp_hash_alg_t:
   70|  1.49k|    EGSigMaterial(pgp_hash_alg_t ahalg) : SigMaterial(ahalg){};
_ZN3pgp13ECSigMaterialC2E14pgp_hash_alg_t:
   79|  15.1k|    ECSigMaterial(pgp_hash_alg_t ahalg) : SigMaterial(ahalg){};
_ZN3pgp18Ed25519SigMaterialC2E14pgp_hash_alg_t:
   89|  1.30k|    Ed25519SigMaterial(pgp_hash_alg_t ahalg) : SigMaterial(ahalg){};
_ZN3pgp20DilithiumSigMaterialC2E16pgp_pubkey_alg_t14pgp_hash_alg_t:
  103|  1.47k|        : SigMaterial(ahalg), palg(apalg){};
_ZN3pgp17SlhdsaSigMaterialC2E14pgp_hash_alg_t:
  112|  1.30k|    SlhdsaSigMaterial(pgp_hash_alg_t ahalg) : SigMaterial(ahalg){};

_ZN3pgp3pkt6sigsub3RawC2Ehbb:
   43|  55.7k|    : hashed_(hashed), raw_type_(rawtype), critical_(critical), type_(Type::Unknown)
   44|  55.7k|{
   45|  55.7k|}
_ZN3pgp3pkt6sigsub3RawC2ENS1_4TypeEbb:
   48|   110k|    : hashed_(hashed), raw_type_(static_cast<uint8_t>(type)), critical_(critical), type_(type)
   49|   110k|{
   50|   110k|}
_ZN3pgp3pkt6sigsub3RawD2Ev:
   53|   315k|{
   54|   315k|}
_ZNK3pgp3pkt6sigsub3Raw10check_sizeEm:
   58|  57.1k|{
   59|  57.1k|    return true;
   60|  57.1k|};
_ZN3pgp3pkt6sigsub3Raw10parse_dataEPKhm:
   64|  47.9k|{
   65|  47.9k|    return true;
   66|  47.9k|};
_ZN3pgp3pkt6sigsub3Raw5parseEPKhm:
   70|   158k|{
   71|   158k|    if (!check_size(size)) {
  ------------------
  |  Branch (71:9): [True: 23.3k, False: 135k]
  ------------------
   72|  23.3k|        RNP_LOG("wrong len %zu of subpacket type %" PRIu8, size, raw_type_);
  ------------------
  |  |   76|  23.3k|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|  23.3k|    do {                                                                                 \
  |  |  |  |   69|  23.3k|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 23.3k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|  23.3k|            break;                                                                       \
  |  |  |  |   71|  23.3k|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   73|  23.3k|        return false;
   74|  23.3k|    }
   75|   135k|    if (!parse_data(data, size)) {
  ------------------
  |  Branch (75:9): [True: 16.7k, False: 118k]
  ------------------
   76|  16.7k|        return false;
   77|  16.7k|    }
   78|   118k|    data_.assign(data, data + size);
   79|   118k|    return true;
   80|   135k|}
_ZN3pgp3pkt6sigsub3Raw6createEhbb:
  128|   166k|{
  129|   166k|    switch (type) {
  130|  21.6k|    case (uint8_t) Type::CreationTime:
  ------------------
  |  Branch (130:5): [True: 21.6k, False: 144k]
  ------------------
  131|  21.6k|        return RawPtr(new CreationTime(hashed, critical));
  132|  4.30k|    case (uint8_t) Type::ExpirationTime:
  ------------------
  |  Branch (132:5): [True: 4.30k, False: 162k]
  ------------------
  133|  4.30k|        return RawPtr(new ExpirationTime(hashed, critical));
  134|  2.02k|    case (uint8_t) Type::ExportableCert:
  ------------------
  |  Branch (134:5): [True: 2.02k, False: 164k]
  ------------------
  135|  2.02k|        return RawPtr(new ExportableCert(hashed, critical));
  136|  3.77k|    case (uint8_t) Type::Trust:
  ------------------
  |  Branch (136:5): [True: 3.77k, False: 162k]
  ------------------
  137|  3.77k|        return RawPtr(new Trust(hashed, critical));
  138|  2.46k|    case (uint8_t) Type::RegExp:
  ------------------
  |  Branch (138:5): [True: 2.46k, False: 164k]
  ------------------
  139|  2.46k|        return RawPtr(new RegExp(hashed, critical));
  140|  1.21k|    case (uint8_t) Type::Revocable:
  ------------------
  |  Branch (140:5): [True: 1.21k, False: 165k]
  ------------------
  141|  1.21k|        return RawPtr(new Revocable(hashed, critical));
  142|  1.88k|    case (uint8_t) Type::KeyExpirationTime:
  ------------------
  |  Branch (142:5): [True: 1.88k, False: 164k]
  ------------------
  143|  1.88k|        return RawPtr(new KeyExpirationTime(hashed, critical));
  144|  2.39k|    case (uint8_t) Type::PreferredSymmetric:
  ------------------
  |  Branch (144:5): [True: 2.39k, False: 164k]
  ------------------
  145|  2.39k|        return RawPtr(new PreferredSymmetric(hashed, critical));
  146|  1.74k|    case (uint8_t) Type::RevocationKey:
  ------------------
  |  Branch (146:5): [True: 1.74k, False: 164k]
  ------------------
  147|  1.74k|        return RawPtr(new RevocationKey(hashed, critical));
  148|  14.3k|    case (uint8_t) Type::IssuerKeyID:
  ------------------
  |  Branch (148:5): [True: 14.3k, False: 152k]
  ------------------
  149|  14.3k|        return RawPtr(new IssuerKeyID(hashed, critical));
  150|  1.95k|    case (uint8_t) Type::NotationData:
  ------------------
  |  Branch (150:5): [True: 1.95k, False: 164k]
  ------------------
  151|  1.95k|        return RawPtr(new NotationData(hashed, critical));
  152|  1.27k|    case (uint8_t) Type::PreferredHash:
  ------------------
  |  Branch (152:5): [True: 1.27k, False: 165k]
  ------------------
  153|  1.27k|        return RawPtr(new PreferredHash(hashed, critical));
  154|  1.50k|    case (uint8_t) Type::PreferredCompress:
  ------------------
  |  Branch (154:5): [True: 1.50k, False: 165k]
  ------------------
  155|  1.50k|        return RawPtr(new PreferredCompress(hashed, critical));
  156|  1.35k|    case (uint8_t) Type::KeyserverPrefs:
  ------------------
  |  Branch (156:5): [True: 1.35k, False: 165k]
  ------------------
  157|  1.35k|        return RawPtr(new KeyserverPrefs(hashed, critical));
  158|  2.17k|    case (uint8_t) Type::PreferredKeyserver:
  ------------------
  |  Branch (158:5): [True: 2.17k, False: 164k]
  ------------------
  159|  2.17k|        return RawPtr(new PreferredKeyserver(hashed, critical));
  160|  1.40k|    case (uint8_t) Type::PrimaryUserID:
  ------------------
  |  Branch (160:5): [True: 1.40k, False: 165k]
  ------------------
  161|  1.40k|        return RawPtr(new PrimaryUserID(hashed, critical));
  162|  1.96k|    case (uint8_t) Type::PolicyURI:
  ------------------
  |  Branch (162:5): [True: 1.96k, False: 164k]
  ------------------
  163|  1.96k|        return RawPtr(new PolicyURI(hashed, critical));
  164|  1.62k|    case (uint8_t) Type::KeyFlags:
  ------------------
  |  Branch (164:5): [True: 1.62k, False: 164k]
  ------------------
  165|  1.62k|        return RawPtr(new KeyFlags(hashed, critical));
  166|  2.63k|    case (uint8_t) Type::SignersUserID:
  ------------------
  |  Branch (166:5): [True: 2.63k, False: 163k]
  ------------------
  167|  2.63k|        return RawPtr(new SignersUserID(hashed, critical));
  168|  10.1k|    case (uint8_t) Type::RevocationReason:
  ------------------
  |  Branch (168:5): [True: 10.1k, False: 156k]
  ------------------
  169|  10.1k|        return RawPtr(new RevocationReason(hashed, critical));
  170|    861|    case (uint8_t) Type::Features:
  ------------------
  |  Branch (170:5): [True: 861, False: 165k]
  ------------------
  171|    861|        return RawPtr(new Features(hashed, critical));
  172|  17.2k|    case (uint8_t) Type::EmbeddedSignature:
  ------------------
  |  Branch (172:5): [True: 17.2k, False: 149k]
  ------------------
  173|  17.2k|        return RawPtr(new EmbeddedSignature(hashed, critical));
  174|  6.64k|    case (uint8_t) Type::IssuerFingerprint:
  ------------------
  |  Branch (174:5): [True: 6.64k, False: 159k]
  ------------------
  175|  6.64k|        return RawPtr(new IssuerFingerprint(hashed, critical));
  176|  1.58k|    case (uint8_t) Type::PreferredAEAD:
  ------------------
  |  Branch (176:5): [True: 1.58k, False: 164k]
  ------------------
  177|  1.58k|        return RawPtr(new PreferredAEAD(hashed, critical));
  178|      0|#if defined(ENABLE_CRYPTO_REFRESH)
  179|  2.74k|    case (uint8_t) Type::PreferredAEADv6:
  ------------------
  |  Branch (179:5): [True: 2.74k, False: 163k]
  ------------------
  180|  2.74k|        return RawPtr(new PreferredAEADv6(hashed, critical));
  181|      0|#endif
  182|  55.7k|    default:
  ------------------
  |  Branch (182:5): [True: 55.7k, False: 110k]
  ------------------
  183|  55.7k|        report_unknown(type, critical);
  184|  55.7k|        return RawPtr(new Raw(type, hashed, critical));
  185|   166k|    }
  186|   166k|}
_ZN3pgp3pkt6sigsub3Raw6createEPKhmb:
  196|   166k|{
  197|   166k|    if (!size) {
  ------------------
  |  Branch (197:9): [True: 0, False: 166k]
  ------------------
  198|      0|        RNP_LOG("got subpacket with 0 length");
  ------------------
  |  |   76|      0|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|      0|    do {                                                                                 \
  |  |  |  |   69|      0|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|      0|            break;                                                                       \
  |  |  |  |   71|      0|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  199|      0|        return nullptr;
  200|      0|    }
  201|   166k|    bool    critical = data[0] & 0x80;
  202|   166k|    uint8_t type = data[0] & 0x7f;
  203|   166k|    auto    sub = create(type, hashed, critical);
  204|   166k|    if (!sub || ((sub->type() == Type::Unknown) && critical) ||
  ------------------
  |  Branch (204:9): [True: 0, False: 166k]
  |  Branch (204:18): [True: 55.7k, False: 110k]
  |  Branch (204:52): [True: 7.82k, False: 47.9k]
  ------------------
  205|   158k|        !sub->parse(data + 1, size - 1)) {
  ------------------
  |  Branch (205:9): [True: 40.0k, False: 118k]
  ------------------
  206|  47.9k|        return nullptr;
  207|  47.9k|    }
  208|   118k|    return sub;
  209|   166k|}
_ZNK3pgp3pkt6sigsub3Raw5cloneEv:
  213|  49.4k|{
  214|  49.4k|    return RawPtr(new Raw(*this));
  215|  49.4k|}
_ZNK3pgp3pkt6sigsub4Time10check_sizeEm:
  227|  27.8k|{
  228|  27.8k|    return size == 4;
  229|  27.8k|}
_ZN3pgp3pkt6sigsub4Time10parse_dataEPKhm:
  233|  14.4k|{
  234|  14.4k|    time_ = read_uint32(data);
  235|  14.4k|    return true;
  236|  14.4k|}
_ZNK3pgp3pkt6sigsub12CreationTime5cloneEv:
  241|  12.8k|{
  242|  12.8k|    return RawPtr(new CreationTime(*this));
  243|  12.8k|}
_ZNK3pgp3pkt6sigsub14ExpirationTime5cloneEv:
  248|  5.78k|{
  249|  5.78k|    return RawPtr(new ExpirationTime(*this));
  250|  5.78k|}
_ZNK3pgp3pkt6sigsub17KeyExpirationTime5cloneEv:
  255|  2.22k|{
  256|  2.22k|    return RawPtr(new KeyExpirationTime(*this));
  257|  2.22k|}
_ZNK3pgp3pkt6sigsub4Bool10check_sizeEm:
  269|  4.64k|{
  270|  4.64k|    return size == 1;
  271|  4.64k|}
_ZN3pgp3pkt6sigsub4Bool10parse_dataEPKhm:
  275|  2.64k|{
  276|  2.64k|    value_ = data[0];
  277|  2.64k|    return true;
  278|  2.64k|}
_ZNK3pgp3pkt6sigsub14ExportableCert5cloneEv:
  283|  1.11k|{
  284|  1.11k|    return RawPtr(new ExportableCert(*this));
  285|  1.11k|}
_ZNK3pgp3pkt6sigsub5Trust10check_sizeEm:
  298|  3.77k|{
  299|  3.77k|    return size == 2;
  300|  3.77k|}
_ZN3pgp3pkt6sigsub5Trust10parse_dataEPKhm:
  304|    649|{
  305|    649|    level_ = data[0];
  306|    649|    amount_ = data[1];
  307|    649|    return true;
  308|    649|}
_ZNK3pgp3pkt6sigsub5Trust5cloneEv:
  312|  1.05k|{
  313|  1.05k|    return RawPtr(new Trust(*this));
  314|  1.05k|}
_ZN3pgp3pkt6sigsub6String10parse_dataEPKhm:
  325|  9.23k|{
  326|  9.23k|    value_.assign(data, data + size);
  327|  9.23k|    return true;
  328|  9.23k|}
_ZNK3pgp3pkt6sigsub6RegExp5cloneEv:
  333|  2.89k|{
  334|  2.89k|    return RawPtr(new RegExp(*this));
  335|  2.89k|}
_ZNK3pgp3pkt6sigsub9Revocable5cloneEv:
  340|  1.36k|{
  341|  1.36k|    return RawPtr(new Revocable(*this));
  342|  1.36k|}
_ZNK3pgp3pkt6sigsub9Preferred10check_sizeEm:
  353|  9.11k|{
  354|       |    /* No reason to have more then 256 bytes */
  355|  9.11k|    return size < 256;
  356|  9.11k|}
_ZN3pgp3pkt6sigsub9Preferred10parse_dataEPKhm:
  360|  9.08k|{
  361|  9.08k|    algs_.assign(data, data + size);
  362|  9.08k|    return true;
  363|  9.08k|}
_ZNK3pgp3pkt6sigsub18PreferredSymmetric5cloneEv:
  368|  3.19k|{
  369|  3.19k|    return RawPtr(new PreferredSymmetric(*this));
  370|  3.19k|}
_ZNK3pgp3pkt6sigsub13PreferredHash5cloneEv:
  375|  1.97k|{
  376|  1.97k|    return RawPtr(new PreferredHash(*this));
  377|  1.97k|}
_ZNK3pgp3pkt6sigsub17PreferredCompress5cloneEv:
  382|  2.65k|{
  383|  2.65k|    return RawPtr(new PreferredCompress(*this));
  384|  2.65k|}
_ZNK3pgp3pkt6sigsub13PreferredAEAD5cloneEv:
  389|  1.91k|{
  390|  1.91k|    return RawPtr(new PreferredAEAD(*this));
  391|  1.91k|}
_ZNK3pgp3pkt6sigsub15PreferredAEADv610check_sizeEm:
  397|  2.74k|{
  398|  2.74k|    if (size % 2) {
  ------------------
  |  Branch (398:9): [True: 395, False: 2.34k]
  ------------------
  399|    395|        RNP_LOG("v6 AEAD Ciphersuite Preferences must contain an even number of bytes");
  ------------------
  |  |   76|    395|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    395|    do {                                                                                 \
  |  |  |  |   69|    395|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 395, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    395|            break;                                                                       \
  |  |  |  |   71|    395|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  400|    395|        return false;
  401|    395|    }
  402|  2.34k|    return Preferred::check_size(size);
  403|  2.74k|}
_ZNK3pgp3pkt6sigsub15PreferredAEADv65cloneEv:
  407|  3.56k|{
  408|  3.56k|    return RawPtr(new PreferredAEADv6(*this));
  409|  3.56k|}
_ZNK3pgp3pkt6sigsub13RevocationKey10check_sizeEm:
  424|  1.74k|{
  425|  1.74k|    return (size == 2 + PGP_FINGERPRINT_V4_SIZE) || (size == 2 + PGP_FINGERPRINT_V5_SIZE);
  ------------------
  |  |   43|  1.74k|#define PGP_FINGERPRINT_V4_SIZE 20
  ------------------
                  return (size == 2 + PGP_FINGERPRINT_V4_SIZE) || (size == 2 + PGP_FINGERPRINT_V5_SIZE);
  ------------------
  |  |   44|  1.01k|#define PGP_FINGERPRINT_V5_SIZE 32
  ------------------
  |  Branch (425:12): [True: 730, False: 1.01k]
  |  Branch (425:53): [True: 30, False: 980]
  ------------------
  426|  1.74k|}
_ZN3pgp3pkt6sigsub13RevocationKey10parse_dataEPKhm:
  430|    760|{
  431|    760|    rev_class_ = data[0];
  432|    760|    alg_ = static_cast<pgp_pubkey_alg_t>(data[1]);
  433|    760|    fp_ = pgp::Fingerprint(data + 2, size - 2);
  434|    760|    return true;
  435|    760|}
_ZNK3pgp3pkt6sigsub13RevocationKey5cloneEv:
  439|    955|{
  440|    955|    return RawPtr(new RevocationKey(*this));
  441|    955|}
_ZNK3pgp3pkt6sigsub11IssuerKeyID10check_sizeEm:
  452|  14.3k|{
  453|  14.3k|    return size == PGP_KEY_ID_SIZE;
  ------------------
  |  |   39|  14.3k|#define PGP_KEY_ID_SIZE 8
  ------------------
  454|  14.3k|}
_ZN3pgp3pkt6sigsub11IssuerKeyID10parse_dataEPKhm:
  458|  13.4k|{
  459|  13.4k|    memcpy(keyid_.data(), data, keyid_.size());
  460|  13.4k|    return true;
  461|  13.4k|}
_ZNK3pgp3pkt6sigsub11IssuerKeyID5cloneEv:
  465|  17.2k|{
  466|  17.2k|    return RawPtr(new IssuerKeyID(*this));
  467|  17.2k|}
_ZNK3pgp3pkt6sigsub12NotationData10check_sizeEm:
  487|  1.95k|{
  488|  1.95k|    return size >= 8;
  489|  1.95k|}
_ZN3pgp3pkt6sigsub12NotationData10parse_dataEPKhm:
  493|  1.35k|{
  494|  1.35k|    size_t nlen = read_uint16(data + 4);
  495|  1.35k|    size_t vlen = read_uint16(data + 6);
  496|  1.35k|    if (size != nlen + vlen + 8) {
  ------------------
  |  Branch (496:9): [True: 682, False: 674]
  ------------------
  497|    682|        return false;
  498|    682|    }
  499|    674|    memcpy(flags_.data(), data, 4);
  500|    674|    name_.assign(data + 8, data + 8 + nlen);
  501|    674|    value_.assign(data + 8 + nlen, data + 8 + nlen + vlen);
  502|    674|    return true;
  503|  1.35k|}
_ZNK3pgp3pkt6sigsub12NotationData5cloneEv:
  537|  1.18k|{
  538|  1.18k|    return RawPtr(new NotationData(*this));
  539|  1.18k|}
_ZNK3pgp3pkt6sigsub5Flags10check_sizeEm:
  551|  3.83k|{
  552|  3.83k|    return size >= 1;
  553|  3.83k|}
_ZN3pgp3pkt6sigsub5Flags10parse_dataEPKhm:
  557|  2.99k|{
  558|  2.99k|    flags_ = data[0];
  559|  2.99k|    return true;
  560|  2.99k|}
_ZNK3pgp3pkt6sigsub14KeyserverPrefs5cloneEv:
  565|  1.70k|{
  566|  1.70k|    return RawPtr(new KeyserverPrefs(*this));
  567|  1.70k|}
_ZNK3pgp3pkt6sigsub18PreferredKeyserver5cloneEv:
  572|  3.77k|{
  573|  3.77k|    return RawPtr(new PreferredKeyserver(*this));
  574|  3.77k|}
_ZNK3pgp3pkt6sigsub13PrimaryUserID5cloneEv:
  579|  1.81k|{
  580|  1.81k|    return RawPtr(new PrimaryUserID(*this));
  581|  1.81k|}
_ZNK3pgp3pkt6sigsub9PolicyURI5cloneEv:
  586|  3.08k|{
  587|  3.08k|    return RawPtr(new PolicyURI(*this));
  588|  3.08k|}
_ZNK3pgp3pkt6sigsub8KeyFlags5cloneEv:
  593|  1.94k|{
  594|  1.94k|    return RawPtr(new KeyFlags(*this));
  595|  1.94k|}
_ZNK3pgp3pkt6sigsub13SignersUserID5cloneEv:
  600|  3.76k|{
  601|  3.76k|    return RawPtr(new SignersUserID(*this));
  602|  3.76k|}
_ZNK3pgp3pkt6sigsub16RevocationReason10check_sizeEm:
  615|  10.1k|{
  616|  10.1k|    return size >= 1;
  617|  10.1k|}
_ZN3pgp3pkt6sigsub16RevocationReason10parse_dataEPKhm:
  621|  9.94k|{
  622|  9.94k|    code_ = static_cast<pgp_revocation_type_t>(data[0]);
  623|  9.94k|    reason_.assign(data + 1, data + size);
  624|  9.94k|    return true;
  625|  9.94k|}
_ZNK3pgp3pkt6sigsub16RevocationReason5cloneEv:
  629|  12.7k|{
  630|  12.7k|    return RawPtr(new RevocationReason(*this));
  631|  12.7k|}
_ZNK3pgp3pkt6sigsub8Features5cloneEv:
  636|  1.06k|{
  637|  1.06k|    return RawPtr(new Features(*this));
  638|  1.06k|}
_ZN3pgp3pkt6sigsub17EmbeddedSignatureC2ERKS2_:
  641|  1.15k|EmbeddedSignature::EmbeddedSignature(const EmbeddedSignature &src) : Raw(src)
  642|  1.15k|{
  643|  1.15k|    signature_ = std::unique_ptr<Signature>(new Signature(*src.signature_));
  644|  1.15k|}
_ZN3pgp3pkt6sigsub17EmbeddedSignatureC2Ebb:
  647|  17.2k|    : Raw(Type::EmbeddedSignature, hashed, critical)
  648|  17.2k|{
  649|  17.2k|}
_ZNK3pgp3pkt6sigsub17EmbeddedSignature10check_sizeEm:
  666|  17.2k|{
  667|  17.2k|    return size > 6;
  668|  17.2k|}
_ZN3pgp3pkt6sigsub17EmbeddedSignature10parse_dataEPKhm:
  672|  16.7k|{
  673|  16.7k|    pgp_packet_body_t pkt(data, size);
  674|  16.7k|    Signature         sig;
  675|  16.7k|    if (sig.parse(pkt)) {
  ------------------
  |  Branch (675:9): [True: 16.0k, False: 689]
  ------------------
  676|  16.0k|        return false;
  677|  16.0k|    }
  678|    689|    signature_ = std::unique_ptr<Signature>(new Signature(std::move(sig)));
  679|    689|    return true;
  680|  16.7k|}
_ZNK3pgp3pkt6sigsub17EmbeddedSignature5cloneEv:
  703|  1.15k|{
  704|  1.15k|    return RawPtr(new EmbeddedSignature(*this));
  705|  1.15k|}
_ZNK3pgp3pkt6sigsub17IssuerFingerprint10check_sizeEm:
  718|  6.64k|{
  719|  6.64k|    return (size >= 21) && (size <= PGP_MAX_FINGERPRINT_SIZE + 1);
  ------------------
  |  |   45|  6.27k|#define PGP_MAX_FINGERPRINT_SIZE 32
  ------------------
  |  Branch (719:12): [True: 6.27k, False: 361]
  |  Branch (719:28): [True: 6.24k, False: 30]
  ------------------
  720|  6.64k|}
_ZN3pgp3pkt6sigsub17IssuerFingerprint10parse_dataEPKhm:
  724|  6.24k|{
  725|  6.24k|    version_ = data[0];
  726|  6.24k|    fp_ = pgp::Fingerprint(data + 1, size - 1);
  727|  6.24k|    return true;
  728|  6.24k|}
_ZNK3pgp3pkt6sigsub17IssuerFingerprint5cloneEv:
  732|  8.18k|{
  733|  8.18k|    return RawPtr(new IssuerFingerprint(*this));
  734|  8.18k|}
_ZN3pgp3pkt6sigsub4ListC2ERKS2_:
  737|   946k|{
  738|   946k|    items.reserve(src.items.size());
  739|   946k|    for (auto &item : src.items) {
  ------------------
  |  Branch (739:21): [True: 148k, False: 946k]
  ------------------
  740|   148k|        items.push_back(item->clone());
  741|   148k|    }
  742|   946k|}
sig_subpacket.cpp:_ZN3pgp3pkt6sigsubL14report_unknownEhb:
   93|  55.7k|{
   94|  55.7k|    switch (type) {
   95|    710|    case (uint8_t) Type::Private_100:
  ------------------
  |  Branch (95:5): [True: 710, False: 55.0k]
  ------------------
   96|  1.73k|    case (uint8_t) Type::Private_101:
  ------------------
  |  Branch (96:5): [True: 1.02k, False: 54.7k]
  ------------------
   97|  3.00k|    case (uint8_t) Type::Private_102:
  ------------------
  |  Branch (97:5): [True: 1.27k, False: 54.4k]
  ------------------
   98|  4.47k|    case (uint8_t) Type::Private_103:
  ------------------
  |  Branch (98:5): [True: 1.47k, False: 54.2k]
  ------------------
   99|  5.26k|    case (uint8_t) Type::Private_104:
  ------------------
  |  Branch (99:5): [True: 786, False: 54.9k]
  ------------------
  100|  6.25k|    case (uint8_t) Type::Private_105:
  ------------------
  |  Branch (100:5): [True: 994, False: 54.7k]
  ------------------
  101|  6.83k|    case (uint8_t) Type::Private_106:
  ------------------
  |  Branch (101:5): [True: 577, False: 55.1k]
  ------------------
  102|  8.27k|    case (uint8_t) Type::Private_107:
  ------------------
  |  Branch (102:5): [True: 1.43k, False: 54.2k]
  ------------------
  103|  9.08k|    case (uint8_t) Type::Private_108:
  ------------------
  |  Branch (103:5): [True: 809, False: 54.9k]
  ------------------
  104|  10.2k|    case (uint8_t) Type::Private_109:
  ------------------
  |  Branch (104:5): [True: 1.21k, False: 54.5k]
  ------------------
  105|  11.0k|    case (uint8_t) Type::Private_110:
  ------------------
  |  Branch (105:5): [True: 752, False: 54.9k]
  ------------------
  106|  11.0k|        if (critical) {
  ------------------
  |  Branch (106:13): [True: 5.63k, False: 5.41k]
  ------------------
  107|  5.63k|            RNP_LOG("unknown critical private subpacket %" PRIu8, type);
  ------------------
  |  |   76|  5.63k|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|  5.63k|    do {                                                                                 \
  |  |  |  |   69|  5.63k|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 5.63k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|  5.63k|            break;                                                                       \
  |  |  |  |   71|  5.63k|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  108|  5.63k|        }
  109|  11.0k|        return;
  110|  15.2k|    case (uint8_t) Type::Reserved_1:
  ------------------
  |  Branch (110:5): [True: 15.2k, False: 40.4k]
  ------------------
  111|  15.9k|    case (uint8_t) Type::Reserved_8:
  ------------------
  |  Branch (111:5): [True: 721, False: 55.0k]
  ------------------
  112|  16.5k|    case (uint8_t) Type::Placeholder:
  ------------------
  |  Branch (112:5): [True: 521, False: 55.2k]
  ------------------
  113|  17.3k|    case (uint8_t) Type::Reserved_13:
  ------------------
  |  Branch (113:5): [True: 840, False: 54.8k]
  ------------------
  114|  17.8k|    case (uint8_t) Type::Reserved_14:
  ------------------
  |  Branch (114:5): [True: 495, False: 55.2k]
  ------------------
  115|  18.1k|    case (uint8_t) Type::Reserved_15:
  ------------------
  |  Branch (115:5): [True: 277, False: 55.4k]
  ------------------
  116|  20.2k|    case (uint8_t) Type::Reserved_17:
  ------------------
  |  Branch (116:5): [True: 2.15k, False: 53.5k]
  ------------------
  117|  20.7k|    case (uint8_t) Type::Reserved_18:
  ------------------
  |  Branch (117:5): [True: 507, False: 55.2k]
  ------------------
  118|  21.4k|    case (uint8_t) Type::Reserved_19:
  ------------------
  |  Branch (118:5): [True: 704, False: 55.0k]
  ------------------
  119|       |        /* do not report reserved/placeholder subpacket */
  120|  21.4k|        return;
  121|  23.1k|    default:
  ------------------
  |  Branch (121:5): [True: 23.1k, False: 32.5k]
  ------------------
  122|  23.1k|        RNP_LOG("unknown subpacket : %" PRIu8, type);
  ------------------
  |  |   76|  23.1k|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|  23.1k|    do {                                                                                 \
  |  |  |  |   69|  23.1k|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 23.1k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|  23.1k|            break;                                                                       \
  |  |  |  |   71|  23.1k|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  123|  55.7k|    }
  124|  55.7k|}

_ZNK3pgp3pkt6sigsub3Raw8raw_typeEv:
  125|  52.8k|    {
  126|  52.8k|        return raw_type_;
  127|  52.8k|    }
_ZNK3pgp3pkt6sigsub3Raw4typeEv:
  137|   166k|    {
  138|   166k|        return type_;
  139|   166k|    }
_ZNK3pgp3pkt6sigsub3Raw6hashedEv:
  155|  4.34k|    {
  156|  4.34k|        return hashed_;
  157|  4.34k|    }
_ZN3pgp3pkt6sigsub4TimeC2ENS1_4TypeEbb:
  183|  27.8k|    Time(Type type, bool hashed, bool critical) : Raw(type, hashed, critical), time_(0)
  184|  27.8k|    {
  185|  27.8k|    }
_ZN3pgp3pkt6sigsub12CreationTimeC2Ebb:
  207|  21.6k|        : Time(Type::CreationTime, hashed, critical)
  208|  21.6k|    {
  209|  21.6k|    }
_ZN3pgp3pkt6sigsub14ExpirationTimeC2Ebb:
  218|  4.30k|        : Time(Type::ExpirationTime, hashed, critical)
  219|  4.30k|    {
  220|  4.30k|    }
_ZN3pgp3pkt6sigsub17KeyExpirationTimeC2Ebb:
  229|  1.88k|        : Time(Type::KeyExpirationTime, hashed, critical)
  230|  1.88k|    {
  231|  1.88k|    }
_ZN3pgp3pkt6sigsub4BoolC2ENS1_4TypeEbb:
  246|  4.64k|    Bool(Type type, bool hashed, bool critical) : Raw(type, hashed, critical), value_(false)
  247|  4.64k|    {
  248|  4.64k|    }
_ZN3pgp3pkt6sigsub14ExportableCertC2Ebb:
  257|  2.02k|        : Bool(Type::ExportableCert, hashed, critical)
  258|  2.02k|    {
  259|  2.02k|        value_ = true;
  260|  2.02k|    }
_ZN3pgp3pkt6sigsub5TrustC2Ebb:
  291|  3.77k|        : Raw(Type::Trust, hashed, critical), level_(0), amount_(0)
  292|  3.77k|    {
  293|  3.77k|    }
_ZN3pgp3pkt6sigsub6StringC2ENS1_4TypeEbb:
  334|  9.23k|    String(Type type, bool hashed, bool critical) : Raw(type, hashed, critical)
  335|  9.23k|    {
  336|  9.23k|    }
_ZN3pgp3pkt6sigsub6RegExpC2Ebb:
  344|  2.46k|    RegExp(bool hashed = true, bool critical = false) : String(Type::RegExp, hashed, critical)
  345|  2.46k|    {
  346|  2.46k|    }
_ZN3pgp3pkt6sigsub9RevocableC2Ebb:
  361|  1.21k|        : Bool(Type::Revocable, hashed, critical)
  362|  1.21k|    {
  363|  1.21k|        value_ = true;
  364|  1.21k|    }
_ZN3pgp3pkt6sigsub9PreferredC2ENS1_4TypeEbb:
  393|  9.50k|    Preferred(Type type, bool hashed, bool critical) : Raw(type, hashed, critical){};
_ZN3pgp3pkt6sigsub18PreferredSymmetricC2Ebb:
  415|  2.39k|        : Preferred(Type::PreferredSymmetric, hashed, critical){};
_ZN3pgp3pkt6sigsub13PreferredHashC2Ebb:
  424|  1.27k|        : Preferred(Type::PreferredHash, hashed, critical){};
_ZN3pgp3pkt6sigsub17PreferredCompressC2Ebb:
  433|  1.50k|        : Preferred(Type::PreferredCompress, hashed, critical){};
_ZN3pgp3pkt6sigsub13PreferredAEADC2Ebb:
  442|  1.58k|        : Preferred(Type::PreferredAEAD, hashed, critical){};
_ZN3pgp3pkt6sigsub15PreferredAEADv6C2Ebb:
  455|  2.74k|        : Preferred(Type::PreferredAEADv6, hashed, critical){};
_ZN3pgp3pkt6sigsub13RevocationKeyC2Ebb:
  475|  1.74k|        : Raw(Type::RevocationKey, hashed, critical), rev_class_(0),
  476|  1.74k|          alg_(PGP_PKA_NOTHING), fp_{} {};
_ZN3pgp3pkt6sigsub11IssuerKeyIDC2Ebb:
  532|  14.3k|        : Raw(Type::IssuerKeyID, hashed, critical)
  533|  14.3k|    {
  534|  14.3k|    }
_ZNK3pgp3pkt6sigsub11IssuerKeyID5keyidEv:
  538|    878|    {
  539|    878|        return keyid_;
  540|    878|    }
_ZN3pgp3pkt6sigsub12NotationDataC2Ebb:
  566|  1.95k|        : Raw(Type::NotationData, hashed, critical)
  567|  1.95k|    {
  568|  1.95k|    }
_ZN3pgp3pkt6sigsub5FlagsC2ENS1_4TypeEbb:
  608|  3.83k|        : Raw(type, hashed, critical), flags_(0)
  609|  3.83k|    {
  610|  3.83k|    }
_ZN3pgp3pkt6sigsub14KeyserverPrefsC2Ebb:
  619|  1.35k|        : Flags(Type::KeyserverPrefs, hashed, critical)
  620|  1.35k|    {
  621|  1.35k|    }
_ZN3pgp3pkt6sigsub18PreferredKeyserverC2Ebb:
  656|  2.17k|        : String(Type::PreferredKeyserver, hashed, critical)
  657|  2.17k|    {
  658|  2.17k|    }
_ZN3pgp3pkt6sigsub13PrimaryUserIDC2Ebb:
  680|  1.40k|        : Bool(Type::PrimaryUserID, hashed, critical)
  681|  1.40k|    {
  682|  1.40k|    }
_ZN3pgp3pkt6sigsub9PolicyURIC2Ebb:
  704|  1.96k|        : String(Type::PolicyURI, hashed, critical)
  705|  1.96k|    {
  706|  1.96k|    }
_ZN3pgp3pkt6sigsub8KeyFlagsC2Ebb:
  721|  1.62k|        : Flags(Type::KeyFlags, hashed, critical)
  722|  1.62k|    {
  723|  1.62k|    }
_ZN3pgp3pkt6sigsub13SignersUserIDC2Ebb:
  745|  2.63k|        : String(Type::SignersUserID, hashed, critical)
  746|  2.63k|    {
  747|  2.63k|    }
_ZN3pgp3pkt6sigsub16RevocationReasonC2Ebb:
  778|  10.1k|        : Raw(Type::RevocationReason, hashed, critical), code_(PGP_REVOCATION_NO_REASON)
  779|  10.1k|    {
  780|  10.1k|    }
_ZN3pgp3pkt6sigsub8FeaturesC2Ebb:
  815|    861|        : Flags(Type::Features, hashed, critical)
  816|    861|    {
  817|    861|    }
_ZN3pgp3pkt6sigsub17IssuerFingerprintC2Ebb:
  871|  6.64k|        : Raw(Type::IssuerFingerprint, hashed, critical), version_(0), fp_{}
  872|  6.64k|    {
  873|  6.64k|    }
_ZNK3pgp3pkt6sigsub17IssuerFingerprint2fpEv:
  890|  3.67k|    {
  891|  3.67k|        return fp_;
  892|  3.67k|    }
_ZN3pgp3pkt6sigsub4ListC2Ev:
  909|   535k|    {
  910|   535k|    }
_ZNK3pgp3pkt6sigsub4List4sizeEv:
  940|   240k|    {
  941|   240k|        return items.size();
  942|   240k|    }
_ZNK3pgp3pkt6sigsub4ListixEm:
  952|  61.7k|    {
  953|  61.7k|        return items[idx];
  954|  61.7k|    }

_ZN3rnp13rnp_exceptionC2Ej:
  101|    861|    rnp_exception(rnp_result_t code = RNP_ERROR_GENERIC) : code_(code){};
_ZNK3rnp13rnp_exception4whatEv:
  104|    861|    {
  105|    861|        return "rnp_exception";
  106|    861|    };
_ZNK3rnp13rnp_exception4codeEv:
  109|    861|    {
  110|    861|        return code_;
  111|    861|    };

_ZN11id_str_pair6lookupEPKS_iPKc:
   32|  8.67k|{
   33|  17.3k|    while (pair && pair->str) {
  ------------------
  |  Branch (33:12): [True: 17.3k, False: 0]
  |  Branch (33:20): [True: 17.3k, False: 0]
  ------------------
   34|  17.3k|        if (pair->id == id) {
  ------------------
  |  Branch (34:13): [True: 8.67k, False: 8.67k]
  ------------------
   35|  8.67k|            return pair->str;
   36|  8.67k|        }
   37|  8.67k|        pair++;
   38|  8.67k|    }
   39|      0|    return notfound;
   40|  8.67k|}

_Z11read_uint16PKh:
   61|  1.58M|{
   62|  1.58M|    return ((uint16_t) buf[0] << 8) | buf[1];
   63|  1.58M|}
_Z11read_uint32PKh:
   68|  26.5k|{
   69|  26.5k|    return ((uint32_t) buf[0] << 24) | ((uint32_t) buf[1] << 16) | ((uint32_t) buf[2] << 8) |
   70|  26.5k|           (uint32_t) buf[3];
   71|  26.5k|}

_ZN3rnp8KeyStore5clearEv:
  209|  8.48k|{
  210|  8.48k|    keybyfp.clear();
  211|  8.48k|    keys.clear();
  212|  8.48k|    blobs.clear();
  213|  8.48k|}
_ZN3rnp8KeyStore16import_signatureERKN3pgp3pkt9SignatureEP23pgp_sig_import_status_t:
  547|  14.8k|{
  548|  14.8k|    pgp_sig_import_status_t tmp_status = PGP_SIG_IMPORT_STATUS_UNKNOWN;
  549|  14.8k|    if (!status) {
  ------------------
  |  Branch (549:9): [True: 0, False: 14.8k]
  ------------------
  550|      0|        status = &tmp_status;
  551|      0|    }
  552|  14.8k|    *status = PGP_SIG_IMPORT_STATUS_UNKNOWN;
  553|       |
  554|       |    /* we support only direct-key and key revocation signatures here */
  555|  14.8k|    if ((sig.type() != PGP_SIG_DIRECT) && (sig.type() != PGP_SIG_REV_KEY)) {
  ------------------
  |  Branch (555:9): [True: 11.4k, False: 3.43k]
  |  Branch (555:43): [True: 6.16k, False: 5.24k]
  ------------------
  556|  6.16k|        return nullptr;
  557|  6.16k|    }
  558|       |
  559|  8.67k|    auto *res_key = get_signer(sig);
  560|  8.67k|    if (!res_key || !res_key->is_primary()) {
  ------------------
  |  Branch (560:9): [True: 8.67k, False: 0]
  |  Branch (560:21): [True: 0, False: 0]
  ------------------
  561|  8.67k|        *status = PGP_SIG_IMPORT_STATUS_UNKNOWN_KEY;
  562|  8.67k|        return nullptr;
  563|  8.67k|    }
  564|      0|    *status = import_signature(*res_key, sig);
  565|      0|    return res_key;
  566|  8.67k|}
_ZN3rnp8KeyStore7get_keyERKN3pgp11FingerprintE:
  616|    786|{
  617|    786|    auto it = keybyfp.find(fpr);
  618|    786|    if (it == keybyfp.end()) {
  ------------------
  |  Branch (618:9): [True: 786, False: 0]
  ------------------
  619|    786|        return nullptr;
  620|    786|    }
  621|      0|    return &*it->second;
  622|    786|}
_ZN3rnp8KeyStore6searchERKNS_9KeySearchEPNS_3KeyE:
  661|  3.67k|{
  662|       |    // since keys are distinguished by fingerprint then just do map lookup
  663|  3.67k|    if (search.type() == KeySearch::Type::Fingerprint) {
  ------------------
  |  Branch (663:9): [True: 786, False: 2.89k]
  ------------------
  664|    786|        auto fpsearch = dynamic_cast<const KeyFingerprintSearch *>(&search);
  665|    786|        assert(fpsearch != nullptr);
  666|    786|        auto key = get_key(fpsearch->get_fp());
  667|    786|        if (after && (after != key)) {
  ------------------
  |  Branch (667:13): [True: 0, False: 786]
  |  Branch (667:22): [True: 0, False: 0]
  ------------------
  668|      0|            RNP_LOG("searching with invalid after param");
  ------------------
  |  |   76|      0|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|      0|    do {                                                                                 \
  |  |  |  |   69|      0|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|      0|            break;                                                                       \
  |  |  |  |   71|      0|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  669|      0|            return nullptr;
  670|      0|        }
  671|       |        // return NULL if after is specified
  672|    786|        return after ? nullptr : key;
  ------------------
  |  Branch (672:16): [True: 0, False: 786]
  ------------------
  673|    786|    }
  674|       |
  675|       |    // if after is provided, make sure it is a member of the appropriate list
  676|  2.89k|    auto it = std::find_if(
  677|  2.89k|      keys.begin(), keys.end(), [after](const Key &key) { return !after || (after == &key); });
  678|  2.89k|    if (after && (it == keys.end())) {
  ------------------
  |  Branch (678:9): [True: 0, False: 2.89k]
  |  Branch (678:9): [True: 0, False: 2.89k]
  |  Branch (678:18): [True: 0, False: 0]
  ------------------
  679|      0|        RNP_LOG("searching with non-keyrings after param");
  ------------------
  |  |   76|      0|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|      0|    do {                                                                                 \
  |  |  |  |   69|      0|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|      0|            break;                                                                       \
  |  |  |  |   71|      0|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  680|      0|        return nullptr;
  681|      0|    }
  682|  2.89k|    if (after) {
  ------------------
  |  Branch (682:9): [True: 0, False: 2.89k]
  ------------------
  683|      0|        it = std::next(it);
  684|      0|    }
  685|  2.89k|    it =
  686|  2.89k|      std::find_if(it, keys.end(), [&search](const Key &key) { return search.matches(key); });
  687|  2.89k|    return (it == keys.end()) ? nullptr : &(*it);
  ------------------
  |  Branch (687:12): [True: 2.89k, False: 0]
  ------------------
  688|  2.89k|}
_ZN3rnp8KeyStore10get_signerERKN3pgp3pkt9SignatureEPKNS_11KeyProviderE:
  692|  8.67k|{
  693|       |    /* if we have fingerprint let's check it */
  694|  8.67k|    std::unique_ptr<KeySearch> ks;
  695|  8.67k|    if (sig.has_keyfp()) {
  ------------------
  |  Branch (695:9): [True: 786, False: 7.89k]
  ------------------
  696|    786|        ks = KeySearch::create(sig.keyfp());
  697|  7.89k|    } else if (sig.has_keyid()) {
  ------------------
  |  Branch (697:16): [True: 2.89k, False: 5.00k]
  ------------------
  698|  2.89k|        ks = KeySearch::create(sig.keyid());
  699|  5.00k|    } else {
  700|  5.00k|        RNP_LOG("No way to search for the signer.");
  ------------------
  |  |   76|  5.00k|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|  5.00k|    do {                                                                                 \
  |  |  |  |   69|  5.00k|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 5.00k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|  5.00k|            break;                                                                       \
  |  |  |  |   71|  5.00k|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  701|  5.00k|        return nullptr;
  702|  5.00k|    }
  703|       |
  704|  3.67k|    auto key = search(*ks);
  705|  3.67k|    if (key || !prov) {
  ------------------
  |  Branch (705:9): [True: 0, False: 3.67k]
  |  Branch (705:16): [True: 3.67k, False: 0]
  ------------------
  706|  3.67k|        return key;
  707|  3.67k|    }
  708|      0|    return prov->request_key(*ks, PGP_OP_VERIFY);
  709|  3.67k|}
_ZN3rnp8KeyStoreC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERNS_15SecurityContextENS_9KeyFormatE:
  712|  8.48k|    : secctx(ctx)
  713|  8.48k|{
  714|  8.48k|    if (_format == KeyFormat::Unknown) {
  ------------------
  |  Branch (714:9): [True: 0, False: 8.48k]
  ------------------
  715|      0|        RNP_LOG("Invalid key store format");
  ------------------
  |  |   76|      0|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|      0|    do {                                                                                 \
  |  |  |  |   69|      0|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|      0|            break;                                                                       \
  |  |  |  |   71|      0|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  716|      0|        throw std::invalid_argument("format");
  717|      0|    }
  718|  8.48k|    format = _format;
  719|  8.48k|    path = _path;
  720|  8.48k|}
_ZN3rnp8KeyStoreD2Ev:
  723|  8.48k|{
  724|  8.48k|    clear();
  725|  8.48k|}

_Z16init_armored_srcP12pgp_source_tS0_b:
  705|  15.3k|{
  706|  15.3k|    if (!init_src_common(src, 0)) {
  ------------------
  |  Branch (706:9): [True: 0, False: 15.3k]
  ------------------
  707|      0|        return RNP_ERROR_OUT_OF_MEMORY;
  708|      0|    }
  709|  15.3k|    pgp_source_armored_param_t *param = new (std::nothrow) pgp_source_armored_param_t();
  710|  15.3k|    if (!param) {
  ------------------
  |  Branch (710:9): [True: 0, False: 15.3k]
  ------------------
  711|      0|        RNP_LOG("allocation failed");
  ------------------
  |  |   76|      0|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|      0|    do {                                                                                 \
  |  |  |  |   69|      0|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|      0|            break;                                                                       \
  |  |  |  |   71|      0|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  712|      0|        return RNP_ERROR_OUT_OF_MEMORY;
  713|      0|    }
  714|       |
  715|  15.3k|    param->readsrc = readsrc;
  716|  15.3k|    param->noheaders = noheaders;
  717|  15.3k|    src->param = param;
  718|  15.3k|    src->raw_read = armored_src_read;
  719|  15.3k|    src->raw_close = armored_src_close;
  720|  15.3k|    src->type = PGP_STREAM_ARMORED;
  721|       |
  722|       |    /* base64 data only */
  723|  15.3k|    if (noheaders) {
  ------------------
  |  Branch (723:9): [True: 0, False: 15.3k]
  ------------------
  724|      0|        return RNP_SUCCESS;
  725|      0|    }
  726|       |
  727|       |    /* initialize crc context */
  728|  15.3k|    param->crc_ctx = rnp::CRC24::create();
  729|       |    /* parsing armored header */
  730|  15.3k|    rnp_result_t errcode = RNP_ERROR_GENERIC;
  731|  15.3k|    if (!armor_parse_header(param)) {
  ------------------
  |  Branch (731:9): [True: 403, False: 14.9k]
  ------------------
  732|    403|        errcode = RNP_ERROR_BAD_FORMAT;
  733|    403|        goto finish;
  734|    403|    }
  735|       |    /* eol */
  736|  14.9k|    if (!param->readsrc->skip_eol()) {
  ------------------
  |  Branch (736:9): [True: 80, False: 14.8k]
  ------------------
  737|     80|        RNP_LOG("no eol after the armor header");
  ------------------
  |  |   76|     80|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|     80|    do {                                                                                 \
  |  |  |  |   69|     80|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 80, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|     80|            break;                                                                       \
  |  |  |  |   71|     80|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  738|     80|        errcode = RNP_ERROR_BAD_FORMAT;
  739|     80|        goto finish;
  740|     80|    }
  741|       |    /* parsing headers */
  742|  14.8k|    if (!armor_parse_headers(param)) {
  ------------------
  |  Branch (742:9): [True: 378, False: 14.4k]
  ------------------
  743|    378|        RNP_LOG("failed to parse headers");
  ------------------
  |  |   76|    378|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    378|    do {                                                                                 \
  |  |  |  |   69|    378|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 378, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    378|            break;                                                                       \
  |  |  |  |   71|    378|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  744|    378|        errcode = RNP_ERROR_BAD_FORMAT;
  745|    378|        goto finish;
  746|    378|    }
  747|       |
  748|       |    /* now we are good to go with base64-encoded data */
  749|  14.4k|    errcode = RNP_SUCCESS;
  750|  15.3k|finish:
  751|  15.3k|    if (errcode) {
  ------------------
  |  Branch (751:9): [True: 861, False: 14.4k]
  ------------------
  752|    861|        src->close();
  753|    861|    }
  754|  15.3k|    return errcode;
  755|  14.4k|}
_ZN12pgp_source_t10is_armoredEv:
 1050|  4.24k|{
 1051|  4.24k|    char   buf[ARMORED_PEEK_BUF_SIZE] = {0};
 1052|  4.24k|    size_t read = 0;
 1053|       |
 1054|  4.24k|    if (!peek(buf, sizeof(buf) - 1, &read) || (read < strlen(ST_ARMOR_BEGIN) + 1)) {
  ------------------
  |  |   46|  4.24k|#define ST_ARMOR_BEGIN ("-----BEGIN PGP ")
  ------------------
  |  Branch (1054:9): [True: 0, False: 4.24k]
  |  Branch (1054:47): [True: 437, False: 3.80k]
  ------------------
 1055|    437|        return false;
 1056|    437|    }
 1057|  3.80k|    buf[read] = 0;
 1058|  3.80k|    if (!!strstr(buf, ST_CLEAR_BEGIN)) {
  ------------------
  |  |   48|  3.80k|#define ST_CLEAR_BEGIN ("-----BEGIN PGP SIGNED MESSAGE-----")
  ------------------
  |  Branch (1058:9): [True: 1, False: 3.80k]
  ------------------
 1059|      1|        return false;
 1060|      1|    }
 1061|  3.80k|    return !!strstr(buf, ST_ARMOR_BEGIN);
  ------------------
  |  |   46|  3.80k|#define ST_ARMOR_BEGIN ("-----BEGIN PGP ")
  ------------------
 1062|  3.80k|}
_ZN3rnp13ArmoredSourceC2ER12pgp_source_tj:
 1135|  4.24k|    : Source(), readsrc_(readsrc), multiple_(false)
 1136|  4.24k|{
 1137|       |    /* Do not dearmor already armored stream */
 1138|  4.24k|    bool already = readsrc_.type == PGP_STREAM_ARMORED;
 1139|       |    /* Check for base64 source: no multiple streams allowed */
 1140|  4.24k|    if (!already && (flags & AllowBase64) && (readsrc.is_base64())) {
  ------------------
  |  Branch (1140:9): [True: 4.24k, False: 0]
  |  Branch (1140:21): [True: 0, False: 4.24k]
  |  Branch (1140:46): [True: 0, False: 0]
  ------------------
 1141|      0|        auto res = init_armored_src(&src_, &readsrc_, true);
 1142|      0|        if (res) {
  ------------------
  |  Branch (1142:13): [True: 0, False: 0]
  ------------------
 1143|      0|            RNP_LOG("Failed to parse base64 data.");
  ------------------
  |  |   76|      0|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|      0|    do {                                                                                 \
  |  |  |  |   69|      0|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|      0|            break;                                                                       \
  |  |  |  |   71|      0|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1144|      0|            throw rnp::rnp_exception(res);
 1145|      0|        }
 1146|      0|        armored_ = true;
 1147|      0|        return;
 1148|      0|    }
 1149|       |    /* Check for armored source */
 1150|  4.24k|    if (!already && readsrc.is_armored()) {
  ------------------
  |  Branch (1150:9): [True: 4.24k, False: 0]
  |  Branch (1150:21): [True: 1.56k, False: 2.67k]
  ------------------
 1151|  1.56k|        auto res = init_armored_src(&src_, &readsrc_);
 1152|  1.56k|        if (res) {
  ------------------
  |  Branch (1152:13): [True: 699, False: 869]
  ------------------
 1153|    699|            RNP_LOG("Failed to parse armored data.");
  ------------------
  |  |   76|    699|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    699|    do {                                                                                 \
  |  |  |  |   69|    699|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 699, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    699|            break;                                                                       \
  |  |  |  |   71|    699|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1154|    699|            throw rnp::rnp_exception(res);
 1155|    699|        }
 1156|    869|        armored_ = true;
 1157|    869|        multiple_ = flags & AllowMultiple;
 1158|    869|        return;
 1159|  1.56k|    }
 1160|       |    /* Use binary source if allowed */
 1161|  2.67k|    if (!(flags & AllowBinary)) {
  ------------------
  |  Branch (1161:9): [True: 0, False: 2.67k]
  ------------------
 1162|      0|        RNP_LOG("Non-armored data is not allowed here.");
  ------------------
  |  |   76|      0|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|      0|    do {                                                                                 \
  |  |  |  |   69|      0|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|      0|            break;                                                                       \
  |  |  |  |   71|      0|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1163|      0|        throw rnp::rnp_exception(RNP_ERROR_BAD_PARAMETERS);
 1164|      0|    }
 1165|  2.67k|    armored_ = false;
 1166|  2.67k|}
_ZN3rnp13ArmoredSource7restartEv:
 1170|  13.7k|{
 1171|  13.7k|    if (!armored_ || readsrc_.eof() || readsrc_.error()) {
  ------------------
  |  Branch (1171:9): [True: 0, False: 13.7k]
  |  Branch (1171:22): [True: 53, False: 13.7k]
  |  Branch (1171:40): [True: 0, False: 13.7k]
  ------------------
 1172|     53|        return;
 1173|     53|    }
 1174|  13.7k|    src_.close();
 1175|  13.7k|    auto res = init_armored_src(&src_, &readsrc_);
 1176|  13.7k|    if (res) {
  ------------------
  |  Branch (1176:9): [True: 162, False: 13.5k]
  ------------------
 1177|    162|        throw rnp::rnp_exception(res);
 1178|    162|    }
 1179|  13.7k|}
_ZN3rnp13ArmoredSource3srcEv:
 1183|  2.59M|{
 1184|  2.59M|    return armored_ ? src_ : readsrc_;
  ------------------
  |  Branch (1184:12): [True: 76.0k, False: 2.52M]
  ------------------
 1185|  2.59M|}
stream-armor.cpp:_ZL22armor_str_to_data_typeRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE:
  481|  15.1k|{
  482|  15.1k|    if ((str == "MESSAGE") || (str == "ARMORED FILE")) {
  ------------------
  |  Branch (482:9): [True: 4.43k, False: 10.7k]
  |  Branch (482:31): [True: 201, False: 10.5k]
  ------------------
  483|  4.63k|        return PGP_ARMORED_MESSAGE;
  484|  4.63k|    }
  485|  10.5k|    if ((str == "PUBLIC KEY BLOCK") || (str == "PUBLIC KEY")) {
  ------------------
  |  Branch (485:9): [True: 418, False: 10.1k]
  |  Branch (485:40): [True: 249, False: 9.85k]
  ------------------
  486|    667|        return PGP_ARMORED_PUBLIC_KEY;
  487|    667|    }
  488|  9.85k|    if ((str == "SECRET KEY BLOCK") || (str == "SECRET KEY") || (str == "PRIVATE KEY BLOCK") ||
  ------------------
  |  Branch (488:9): [True: 255, False: 9.60k]
  |  Branch (488:40): [True: 296, False: 9.30k]
  |  Branch (488:65): [True: 978, False: 8.32k]
  ------------------
  489|  8.32k|        (str == "PRIVATE KEY")) {
  ------------------
  |  Branch (489:9): [True: 360, False: 7.96k]
  ------------------
  490|  1.88k|        return PGP_ARMORED_SECRET_KEY;
  491|  1.88k|    }
  492|  7.96k|    if (str == "SIGNATURE") {
  ------------------
  |  Branch (492:9): [True: 7.71k, False: 250]
  ------------------
  493|  7.71k|        return PGP_ARMORED_SIGNATURE;
  494|  7.71k|    }
  495|    250|    return PGP_ARMORED_UNKNOWN;
  496|  7.96k|}
stream-armor.cpp:_ZL17peek_armor_headerR12pgp_source_tPmb:
  563|  15.3k|{
  564|  15.3k|    std::string hdr(ARMORED_PEEK_BUF_SIZE, '\0');
  ------------------
  |  |   46|  15.3k|#define ARMORED_PEEK_BUF_SIZE 1024
  ------------------
  565|  15.3k|    size_t      read = 0;
  566|  15.3k|    if (skip) {
  ------------------
  |  Branch (566:9): [True: 15.3k, False: 0]
  ------------------
  567|  15.3k|        *skip = 0;
  568|  15.3k|    }
  569|  15.3k|    if (!src.peek(&hdr.front(), hdr.size(), &read) || (read < 20)) {
  ------------------
  |  Branch (569:9): [True: 0, False: 15.3k]
  |  Branch (569:55): [True: 32, False: 15.2k]
  ------------------
  570|     32|        return "";
  571|     32|    }
  572|  15.2k|    hdr.resize(read);
  573|       |
  574|  15.2k|    std::string type;
  575|  15.2k|    size_t      armhdrlen = 0;
  576|  15.2k|    size_t      pos = find_armor_header(hdr, armhdrlen, type);
  577|  15.2k|    if (pos == std::string::npos) {
  ------------------
  |  Branch (577:9): [True: 98, False: 15.1k]
  ------------------
  578|     98|        return "";
  579|     98|    }
  580|       |
  581|       |    /* if there are non-whitespaces before the armor header then issue warning */
  582|  17.3k|    for (size_t idx = 0; check && (idx < pos); idx++) {
  ------------------
  |  Branch (582:26): [True: 17.3k, False: 0]
  |  Branch (582:35): [True: 6.30k, False: 11.0k]
  ------------------
  583|  6.30k|        if (B64DEC[(uint8_t) hdr[idx]] != 0xfd) {
  ------------------
  |  Branch (583:13): [True: 4.14k, False: 2.16k]
  ------------------
  584|  4.14k|            RNP_LOG("extra data before the header line");
  ------------------
  |  |   76|  4.14k|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|  4.14k|    do {                                                                                 \
  |  |  |  |   69|  4.14k|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 4.14k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|  4.14k|            break;                                                                       \
  |  |  |  |   71|  4.14k|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  585|  4.14k|            break;
  586|  4.14k|        }
  587|  6.30k|    }
  588|       |
  589|  15.1k|    if (skip) {
  ------------------
  |  Branch (589:9): [True: 15.1k, False: 0]
  ------------------
  590|  15.1k|        *skip = armhdrlen;
  591|  15.1k|    }
  592|  15.1k|    return type;
  593|  15.2k|}
stream-armor.cpp:_ZL17find_armor_headerRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERmRS5_:
  464|  15.2k|{
  465|  15.2k|    size_t bg_len = strlen(ST_ARMOR_BEGIN);
  ------------------
  |  |   46|  15.2k|#define ST_ARMOR_BEGIN ("-----BEGIN PGP ")
  ------------------
  466|  15.2k|    size_t pos = str.find(ST_ARMOR_BEGIN);
  ------------------
  |  |   46|  15.2k|#define ST_ARMOR_BEGIN ("-----BEGIN PGP ")
  ------------------
  467|  15.2k|    if (pos == std::string::npos) {
  ------------------
  |  Branch (467:9): [True: 12, False: 15.2k]
  ------------------
  468|     12|        return pos;
  469|     12|    }
  470|  15.2k|    size_t end = str.find(ST_DASHES, pos + bg_len);
  ------------------
  |  |   45|  15.2k|#define ST_DASHES ("-----")
  ------------------
  471|  15.2k|    if (end == std::string::npos) {
  ------------------
  |  Branch (471:9): [True: 86, False: 15.1k]
  ------------------
  472|     86|        return end;
  473|     86|    }
  474|  15.1k|    hdrlen = end + 5;
  475|  15.1k|    type.assign(str.begin() + pos + bg_len, str.begin() + end);
  476|  15.1k|    return pos;
  477|  15.2k|}
stream-armor.cpp:_ZL16armored_src_readP12pgp_source_tPvmPm:
  242|  28.2k|{
  243|  28.2k|    pgp_source_armored_param_t *param = (pgp_source_armored_param_t *) src->param;
  244|  28.2k|    uint8_t  b64buf[ARMORED_BLOCK_SIZE];     /* input base64 data with spaces and so on */
  245|  28.2k|    uint8_t  decbuf[ARMORED_BLOCK_SIZE + 4]; /* decoded 6-bit values */
  246|  28.2k|    uint8_t *bufptr = (uint8_t *) buf;       /* for better readability below */
  247|  28.2k|    uint8_t *bptr, *bend;                    /* pointer to input data in b64buf */
  248|  28.2k|    uint8_t *dptr, *dend, *pend; /* pointers to decoded data in decbuf: working pointer, last
  249|       |                                    available byte, last byte to process */
  250|  28.2k|    uint8_t  bval;
  251|  28.2k|    uint32_t b24;
  252|  28.2k|    size_t   read = 0;
  253|  28.2k|    size_t   left = len;
  254|  28.2k|    size_t   eqcount = 0; /* number of '=' at the end of base64 stream */
  255|       |
  256|  28.2k|    if (!param) {
  ------------------
  |  Branch (256:9): [True: 0, False: 28.2k]
  ------------------
  257|      0|        return false;
  258|      0|    }
  259|       |
  260|       |    /* checking whether there are some decoded bytes */
  261|  28.2k|    if (param->restpos < param->restlen) {
  ------------------
  |  Branch (261:9): [True: 84, False: 28.1k]
  ------------------
  262|     84|        if (param->restlen - param->restpos >= len) {
  ------------------
  |  Branch (262:13): [True: 0, False: 84]
  ------------------
  263|      0|            memcpy(bufptr, &param->rest[param->restpos], len);
  264|      0|            param->restpos += len;
  265|      0|            try {
  266|      0|                param->crc_ctx->add(bufptr, len);
  267|      0|            } catch (const std::exception &e) {
  268|      0|                RNP_LOG("%s", e.what());
  ------------------
  |  |   76|      0|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|      0|    do {                                                                                 \
  |  |  |  |   69|      0|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|      0|            break;                                                                       \
  |  |  |  |   71|      0|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  269|      0|                return false;
  270|      0|            }
  271|      0|            *readres = len;
  272|      0|            return true;
  273|     84|        } else {
  274|     84|            left = len - (param->restlen - param->restpos);
  275|     84|            memcpy(bufptr, &param->rest[param->restpos], len - left);
  276|     84|            param->restpos = param->restlen = 0;
  277|     84|            bufptr += len - left;
  278|     84|        }
  279|     84|    }
  280|       |
  281|  28.2k|    if (param->eofb64) {
  ------------------
  |  Branch (281:9): [True: 13.7k, False: 14.5k]
  ------------------
  282|  13.7k|        *readres = len - left;
  283|  13.7k|        return true;
  284|  13.7k|    }
  285|       |
  286|  14.5k|    memcpy(decbuf, param->brest, param->brestlen);
  287|  14.5k|    dend = decbuf + param->brestlen;
  288|       |
  289|  16.7k|    do {
  290|  16.7k|        if (!param->readsrc->peek(b64buf, sizeof(b64buf), &read)) {
  ------------------
  |  Branch (290:13): [True: 0, False: 16.7k]
  ------------------
  291|      0|            return false;
  292|      0|        }
  293|  16.7k|        if (!read) {
  ------------------
  |  Branch (293:13): [True: 119, False: 16.6k]
  ------------------
  294|    119|            RNP_LOG("premature end of armored input");
  ------------------
  |  |   76|    119|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    119|    do {                                                                                 \
  |  |  |  |   69|    119|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 119, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    119|            break;                                                                       \
  |  |  |  |   71|    119|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  295|    119|            return false;
  296|    119|        }
  297|       |
  298|  16.6k|        dptr = dend;
  299|  16.6k|        bptr = b64buf;
  300|  16.6k|        bend = b64buf + read;
  301|       |        /* checking input data, stripping away whitespaces, checking for end of the b64 data */
  302|  12.0M|        while (bptr < bend) {
  ------------------
  |  Branch (302:16): [True: 12.0M, False: 2.33k]
  ------------------
  303|  12.0M|            if ((bval = B64DEC[*(bptr++)]) < 64) {
  ------------------
  |  Branch (303:17): [True: 10.5M, False: 1.52M]
  ------------------
  304|  10.5M|                *(dptr++) = bval;
  305|  10.5M|            } else if (bval == 0xfe) {
  ------------------
  |  Branch (305:24): [True: 13.6k, False: 1.51M]
  ------------------
  306|       |                /* '=' means the base64 padding or the beginning of checksum */
  307|  13.6k|                param->eofb64 = true;
  308|  13.6k|                break;
  309|  1.51M|            } else if (bval == 0xff) {
  ------------------
  |  Branch (309:24): [True: 635, False: 1.50M]
  ------------------
  310|    635|                auto ch = *(bptr - 1);
  311|       |                /* OpenPGP message headers without the crc and without trailing = */
  312|    635|                if ((ch == CH_DASH) && !param->noheaders) {
  ------------------
  |  |   34|    635|#define CH_DASH ('-')
  ------------------
  |  Branch (312:21): [True: 598, False: 37]
  |  Branch (312:40): [True: 598, False: 0]
  ------------------
  313|    598|                    param->eofb64 = true;
  314|    598|                    break;
  315|    598|                }
  316|     37|                RNP_LOG("wrong base64 character 0x%02hhX", ch);
  ------------------
  |  |   76|     37|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|     37|    do {                                                                                 \
  |  |  |  |   69|     37|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 37, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|     37|            break;                                                                       \
  |  |  |  |   71|     37|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  317|     37|                return false;
  318|    635|            }
  319|  12.0M|        }
  320|       |
  321|  16.6k|        dend = dptr;
  322|  16.6k|        dptr = decbuf;
  323|       |        /* Processing full 4s which will go directly to the buf.
  324|       |           After this left < 3 or decbuf has < 4 bytes */
  325|  16.6k|        if ((size_t)(dend - dptr) / 4 * 3 < left) {
  ------------------
  |  Branch (325:13): [True: 16.5k, False: 86]
  ------------------
  326|  16.5k|            pend = decbuf + (dend - dptr) / 4 * 4;
  327|  16.5k|            left -= (dend - dptr) / 4 * 3;
  328|  16.5k|        } else {
  329|     86|            pend = decbuf + (left / 3) * 4;
  330|     86|            left -= left / 3 * 3;
  331|     86|        }
  332|       |
  333|       |        /* this one would the most performance-consuming part for large chunks */
  334|  2.63M|        while (dptr < pend) {
  ------------------
  |  Branch (334:16): [True: 2.61M, False: 16.6k]
  ------------------
  335|  2.61M|            b24 = *dptr++ << 18;
  336|  2.61M|            b24 |= *dptr++ << 12;
  337|  2.61M|            b24 |= *dptr++ << 6;
  338|  2.61M|            b24 |= *dptr++;
  339|  2.61M|            *bufptr++ = b24 >> 16;
  340|  2.61M|            *bufptr++ = b24 >> 8;
  341|  2.61M|            *bufptr++ = b24 & 0xff;
  342|  2.61M|        }
  343|       |
  344|       |        /* moving rest to the beginning of decbuf */
  345|  16.6k|        memmove(decbuf, dptr, dend - dptr);
  346|  16.6k|        dend = decbuf + (dend - dptr);
  347|       |
  348|       |        /* skip already processed data */
  349|  16.6k|        if (!param->eofb64) {
  ------------------
  |  Branch (349:13): [True: 2.33k, False: 14.2k]
  ------------------
  350|       |            /* all input is base64 data or eol/spaces, so skipping it */
  351|  2.33k|            param->readsrc->skip(read);
  352|       |            /* check for eof for base64-encoded data without headers */
  353|  2.33k|            if (param->noheaders && param->readsrc->eof()) {
  ------------------
  |  Branch (353:17): [True: 0, False: 2.33k]
  |  Branch (353:37): [True: 0, False: 0]
  ------------------
  354|      0|                param->readsrc->skip(read);
  355|      0|                param->eofb64 = true;
  356|  2.33k|            } else {
  357|  2.33k|                continue;
  358|  2.33k|            }
  359|  14.2k|        } else {
  360|       |            /* '=' reached, bptr points on it */
  361|  14.2k|            param->readsrc->skip(bptr - b64buf - 1);
  362|  14.2k|        }
  363|       |
  364|       |        /* end of base64 data */
  365|  14.2k|        if (param->noheaders) {
  ------------------
  |  Branch (365:13): [True: 0, False: 14.2k]
  ------------------
  366|      0|            if (!base64_read_padding(*param->readsrc, &eqcount)) {
  ------------------
  |  Branch (366:17): [True: 0, False: 0]
  ------------------
  367|      0|                return false;
  368|      0|            }
  369|      0|            break;
  370|      0|        }
  371|       |        /* reading b64 padding if any */
  372|  14.2k|        if (!armor_read_padding(*param->readsrc, &eqcount)) {
  ------------------
  |  Branch (372:13): [True: 43, False: 14.2k]
  ------------------
  373|     43|            RNP_LOG("wrong padding");
  ------------------
  |  |   76|     43|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|     43|    do {                                                                                 \
  |  |  |  |   69|     43|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 43, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|     43|            break;                                                                       \
  |  |  |  |   71|     43|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  374|     43|            return false;
  375|     43|        }
  376|       |        /* reading crc */
  377|  14.2k|        if (!armor_read_crc(param)) {
  ------------------
  |  Branch (377:13): [True: 11.4k, False: 2.80k]
  ------------------
  378|  11.4k|            RNP_LOG("Warning: missing or malformed CRC line");
  ------------------
  |  |   76|  11.4k|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|  11.4k|    do {                                                                                 \
  |  |  |  |   69|  11.4k|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 11.4k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|  11.4k|            break;                                                                       \
  |  |  |  |   71|  11.4k|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  379|  11.4k|        }
  380|       |        /* reading armor trailing line */
  381|  14.2k|        if (!armor_read_trailer(param)) {
  ------------------
  |  Branch (381:13): [True: 177, False: 14.0k]
  ------------------
  382|    177|            RNP_LOG("wrong armor trailer");
  ------------------
  |  |   76|    177|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    177|    do {                                                                                 \
  |  |  |  |   69|    177|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 177, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    177|            break;                                                                       \
  |  |  |  |   71|    177|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  383|    177|            return false;
  384|    177|        }
  385|  14.0k|        break;
  386|  14.2k|    } while (left >= 3);
  ------------------
  |  Branch (386:14): [True: 2.25k, False: 81]
  ------------------
  387|       |
  388|       |    /* process bytes left in decbuf */
  389|       |
  390|  14.1k|    dptr = decbuf;
  391|  14.1k|    pend = decbuf + (dend - decbuf) / 4 * 4;
  392|  14.1k|    bptr = param->rest;
  393|  28.6k|    while (dptr < pend) {
  ------------------
  |  Branch (393:12): [True: 14.4k, False: 14.1k]
  ------------------
  394|  14.4k|        b24 = *dptr++ << 18;
  395|  14.4k|        b24 |= *dptr++ << 12;
  396|  14.4k|        b24 |= *dptr++ << 6;
  397|  14.4k|        b24 |= *dptr++;
  398|  14.4k|        *bptr++ = b24 >> 16;
  399|  14.4k|        *bptr++ = b24 >> 8;
  400|  14.4k|        *bptr++ = b24 & 0xff;
  401|  14.4k|    }
  402|       |
  403|  14.1k|    if (!armored_update_crc(param, buf, bufptr - (uint8_t *) buf)) {
  ------------------
  |  Branch (403:9): [True: 0, False: 14.1k]
  ------------------
  404|      0|        return false;
  405|      0|    }
  406|       |
  407|  14.1k|    if (param->eofb64) {
  ------------------
  |  Branch (407:9): [True: 14.0k, False: 81]
  ------------------
  408|  14.0k|        if ((dend - dptr + eqcount) % 4 != 0) {
  ------------------
  |  Branch (408:13): [True: 42, False: 14.0k]
  ------------------
  409|     42|            RNP_LOG("wrong b64 padding");
  ------------------
  |  |   76|     42|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|     42|    do {                                                                                 \
  |  |  |  |   69|     42|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 42, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|     42|            break;                                                                       \
  |  |  |  |   71|     42|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  410|     42|            return false;
  411|     42|        }
  412|       |
  413|  14.0k|        if (eqcount == 1) {
  ------------------
  |  Branch (413:13): [True: 11.2k, False: 2.75k]
  ------------------
  414|  11.2k|            b24 = (*dptr << 10) | (*(dptr + 1) << 4) | (*(dptr + 2) >> 2);
  415|  11.2k|            *bptr++ = b24 >> 8;
  416|  11.2k|            *bptr++ = b24 & 0xff;
  417|  11.2k|        } else if (eqcount == 2) {
  ------------------
  |  Branch (417:20): [True: 1.23k, False: 1.52k]
  ------------------
  418|  1.23k|            *bptr++ = (*dptr << 2) | (*(dptr + 1) >> 4);
  419|  1.23k|        }
  420|       |
  421|       |        /* Calculate CRC after reading whole input stream */
  422|  14.0k|        if (!armored_update_crc(param, param->rest, bptr - param->rest, true)) {
  ------------------
  |  Branch (422:13): [True: 0, False: 14.0k]
  ------------------
  423|      0|            return false;
  424|      0|        }
  425|  14.0k|    } else {
  426|       |        /* few bytes which do not fit to 4 boundary */
  427|    186|        for (int i = 0; i < dend - dptr; i++) {
  ------------------
  |  Branch (427:25): [True: 105, False: 81]
  ------------------
  428|    105|            param->brest[i] = *(dptr + i);
  429|    105|        }
  430|     81|        param->brestlen = dend - dptr;
  431|     81|    }
  432|       |
  433|  14.1k|    param->restlen = bptr - param->rest;
  434|       |
  435|       |    /* check whether we have some bytes to add */
  436|  14.1k|    if ((left > 0) && (param->restlen > 0)) {
  ------------------
  |  Branch (436:9): [True: 14.1k, False: 1]
  |  Branch (436:23): [True: 12.5k, False: 1.53k]
  ------------------
  437|  12.5k|        read = left > param->restlen ? param->restlen : left;
  ------------------
  |  Branch (437:16): [True: 12.4k, False: 85]
  ------------------
  438|  12.5k|        memcpy(bufptr, param->rest, read);
  439|  12.5k|        if (!param->eofb64 && !armored_update_crc(param, bufptr, read)) {
  ------------------
  |  Branch (439:13): [True: 66, False: 12.5k]
  |  Branch (439:31): [True: 0, False: 66]
  ------------------
  440|      0|            return false;
  441|      0|        }
  442|  12.5k|        left -= read;
  443|  12.5k|        param->restpos += read;
  444|  12.5k|    }
  445|       |
  446|  14.1k|    *readres = len - left;
  447|  14.1k|    return true;
  448|  14.1k|}
stream-armor.cpp:_ZL18armor_read_paddingR12pgp_source_tPm:
  106|  14.2k|{
  107|  14.2k|    char   st[64];
  108|  14.2k|    size_t stlen = 0;
  109|       |
  110|  14.2k|    if (!src.peek_line(st, 64, &stlen)) {
  ------------------
  |  Branch (110:9): [True: 8, False: 14.2k]
  ------------------
  111|      8|        return false;
  112|      8|    }
  113|       |
  114|  14.2k|    if ((stlen == 1) || (stlen == 2)) {
  ------------------
  |  Branch (114:9): [True: 11.3k, False: 2.87k]
  |  Branch (114:25): [True: 1.25k, False: 1.62k]
  ------------------
  115|  12.6k|        if ((st[0] != CH_EQ) || ((stlen == 2) && (st[1] != CH_EQ))) {
  ------------------
  |  |   33|  12.6k|#define CH_EQ ('=')
  ------------------
                      if ((st[0] != CH_EQ) || ((stlen == 2) && (st[1] != CH_EQ))) {
  ------------------
  |  |   33|  1.25k|#define CH_EQ ('=')
  ------------------
  |  Branch (115:13): [True: 2, False: 12.6k]
  |  Branch (115:34): [True: 1.25k, False: 11.3k]
  |  Branch (115:50): [True: 10, False: 1.24k]
  ------------------
  116|     12|            return false;
  117|     12|        }
  118|       |
  119|  12.6k|        *read = stlen;
  120|  12.6k|        src.skip(stlen);
  121|  12.6k|        return src.skip_eol();
  122|  12.6k|    } else if (stlen == 5) {
  ------------------
  |  Branch (122:16): [True: 1.02k, False: 593]
  ------------------
  123|  1.02k|        *read = 0;
  124|  1.02k|        return true;
  125|  1.02k|    } else if ((stlen > 5) && !memcmp(st, ST_DASHES, 5)) {
  ------------------
  |  |   45|    588|#define ST_DASHES ("-----")
  ------------------
  |  Branch (125:16): [True: 588, False: 5]
  |  Branch (125:31): [True: 570, False: 18]
  ------------------
  126|       |        /* case with absent crc and 3-byte last chunk */
  127|    570|        *read = 0;
  128|    570|        return true;
  129|    570|    }
  130|     23|    return false;
  131|  14.2k|}
stream-armor.cpp:_ZL14armor_read_crcP26pgp_source_armored_param_t:
  167|  14.2k|{
  168|  14.2k|    uint8_t dec[4] = {0};
  169|  14.2k|    char    crc[8] = {0};
  170|  14.2k|    size_t  clen = 0;
  171|       |
  172|  14.2k|    if (!param->readsrc->peek_line(crc, sizeof(crc), &clen)) {
  ------------------
  |  Branch (172:9): [True: 10.1k, False: 4.12k]
  ------------------
  173|  10.1k|        return false;
  174|  10.1k|    }
  175|       |
  176|  4.12k|    if ((clen != 5) || (crc[0] != CH_EQ)) {
  ------------------
  |  |   33|  3.28k|#define CH_EQ ('=')
  ------------------
  |  Branch (176:9): [True: 845, False: 3.28k]
  |  Branch (176:24): [True: 465, False: 2.81k]
  ------------------
  177|  1.31k|        return false;
  178|  1.31k|    }
  179|       |
  180|  14.0k|    for (int i = 0; i < 4; i++) {
  ------------------
  |  Branch (180:21): [True: 11.2k, False: 2.80k]
  ------------------
  181|  11.2k|        if ((dec[i] = B64DEC[(uint8_t) crc[i + 1]]) >= 64) {
  ------------------
  |  Branch (181:13): [True: 12, False: 11.2k]
  ------------------
  182|     12|            return false;
  183|     12|        }
  184|  11.2k|    }
  185|       |
  186|  2.80k|    param->readcrc[0] = (dec[0] << 2) | ((dec[1] >> 4) & 0x0F);
  187|  2.80k|    param->readcrc[1] = (dec[1] << 4) | ((dec[2] >> 2) & 0x0F);
  188|  2.80k|    param->readcrc[2] = (dec[2] << 6) | dec[3];
  189|       |
  190|  2.80k|    param->has_crc = true;
  191|       |
  192|  2.80k|    param->readsrc->skip(5);
  193|  2.80k|    return param->readsrc->skip_eol();
  194|  2.81k|}
stream-armor.cpp:_ZL18armor_read_trailerP26pgp_source_armored_param_t:
  198|  14.2k|{
  199|       |    /* Space or tab could get between armor and trailer, see issue #2199 */
  200|  14.2k|    if (!param->readsrc->skip_chars("\r\n \t")) {
  ------------------
  |  Branch (200:9): [True: 0, False: 14.2k]
  ------------------
  201|      0|        return false;
  202|      0|    }
  203|       |
  204|  14.2k|    std::string st = ST_ARMOR_END + param->armorhdr + ST_DASHES;
  ------------------
  |  |   47|  42.7k|#define ST_ARMOR_END ("-----END PGP ")
  ------------------
                  std::string st = ST_ARMOR_END + param->armorhdr + ST_DASHES;
  ------------------
  |  |   45|  14.2k|#define ST_DASHES ("-----")
  ------------------
  205|  14.2k|    std::string str(st.size(), 0);
  206|  14.2k|    if (!param->readsrc->peek_eq(&str.front(), str.size()) || (st != str)) {
  ------------------
  |  Branch (206:9): [True: 132, False: 14.1k]
  |  Branch (206:63): [True: 45, False: 14.0k]
  ------------------
  207|    177|        return false;
  208|    177|    }
  209|  14.0k|    param->readsrc->skip(st.size());
  210|  14.0k|    (void) param->readsrc->skip_chars("\t ");
  211|  14.0k|    (void) param->readsrc->skip_eol();
  212|  14.0k|    return true;
  213|  14.2k|}
stream-armor.cpp:_ZL18armored_update_crcP26pgp_source_armored_param_tPKvmb:
  220|  28.2k|{
  221|  28.2k|    if (param->noheaders) {
  ------------------
  |  Branch (221:9): [True: 0, False: 28.2k]
  ------------------
  222|      0|        return true;
  223|      0|    }
  224|  28.2k|    try {
  225|  28.2k|        param->crc_ctx->add(buf, len);
  226|  28.2k|        if (!finish) {
  ------------------
  |  Branch (226:13): [True: 14.2k, False: 14.0k]
  ------------------
  227|  14.2k|            return true;
  228|  14.2k|        }
  229|  14.0k|        auto crc = param->crc_ctx->finish();
  230|  14.0k|        if (param->has_crc && memcmp(param->readcrc, crc.data(), 3)) {
  ------------------
  |  Branch (230:13): [True: 2.78k, False: 11.2k]
  |  Branch (230:31): [True: 2.30k, False: 471]
  ------------------
  231|  2.30k|            RNP_LOG("Warning: CRC mismatch");
  ------------------
  |  |   76|  2.30k|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|  2.30k|    do {                                                                                 \
  |  |  |  |   69|  2.30k|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 2.30k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|  2.30k|            break;                                                                       \
  |  |  |  |   71|  2.30k|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  232|  2.30k|        }
  233|  14.0k|        return true;
  234|  28.2k|    } catch (const std::exception &e) {
  235|      0|        RNP_LOG("%s", e.what());
  ------------------
  |  |   76|      0|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|      0|    do {                                                                                 \
  |  |  |  |   69|      0|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|      0|            break;                                                                       \
  |  |  |  |   71|      0|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  236|      0|        return false;
  237|      0|    }
  238|  28.2k|}
stream-armor.cpp:_ZL17armored_src_closeP12pgp_source_t:
  452|  16.1k|{
  453|  16.1k|    auto param = (pgp_source_armored_param_t *) src->param;
  454|  16.1k|    delete param;
  455|       |    src->param = NULL;
  456|  16.1k|}
stream-armor.cpp:_ZL18armor_parse_headerP26pgp_source_armored_param_t:
  607|  15.3k|{
  608|  15.3k|    size_t      skip = 0;
  609|  15.3k|    std::string hdr = peek_armor_header(*param->readsrc, &skip, true);
  610|  15.3k|    if (hdr.empty()) {
  ------------------
  |  Branch (610:9): [True: 153, False: 15.1k]
  ------------------
  611|    153|        RNP_LOG("no armor header");
  ------------------
  |  |   76|    153|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    153|    do {                                                                                 \
  |  |  |  |   69|    153|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 153, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    153|            break;                                                                       \
  |  |  |  |   71|    153|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  612|    153|        return false;
  613|    153|    }
  614|       |
  615|  15.1k|    param->type = armor_str_to_data_type(hdr);
  616|  15.1k|    if (param->type == PGP_ARMORED_UNKNOWN) {
  ------------------
  |  Branch (616:9): [True: 250, False: 14.9k]
  ------------------
  617|    250|        RNP_LOG("unknown armor header");
  ------------------
  |  |   76|    250|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    250|    do {                                                                                 \
  |  |  |  |   69|    250|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 250, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    250|            break;                                                                       \
  |  |  |  |   71|    250|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  618|    250|        return false;
  619|    250|    }
  620|       |
  621|  14.9k|    param->armorhdr = std::move(hdr);
  622|  14.9k|    param->readsrc->skip(skip);
  623|  14.9k|    param->readsrc->skip_chars("\t ");
  624|  14.9k|    return true;
  625|  15.1k|}
stream-armor.cpp:_ZL19armor_parse_headersP26pgp_source_armored_param_t:
  662|  14.8k|{
  663|  14.8k|    std::vector<char> header(ARMORED_PEEK_BUF_SIZE, '\0');
  ------------------
  |  |   46|  14.8k|#define ARMORED_PEEK_BUF_SIZE 1024
  ------------------
  664|       |
  665|  66.7k|    do {
  666|  66.7k|        size_t hdrlen = 0;
  667|  66.7k|        if (!param->readsrc->peek_line(header.data(), header.size(), &hdrlen)) {
  ------------------
  |  Branch (667:13): [True: 1.88k, False: 64.8k]
  ------------------
  668|       |            /* if line is too long let's cut it to the reasonable size */
  669|  1.88k|            param->readsrc->skip(hdrlen);
  670|  1.88k|            if ((hdrlen != header.size() - 1) || !armor_skip_line(*param->readsrc)) {
  ------------------
  |  Branch (670:17): [True: 340, False: 1.54k]
  |  Branch (670:50): [True: 38, False: 1.51k]
  ------------------
  671|    378|                RNP_LOG("failed to peek line: unexpected end of data");
  ------------------
  |  |   76|    378|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    378|    do {                                                                                 \
  |  |  |  |   69|    378|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 378, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    378|            break;                                                                       \
  |  |  |  |   71|    378|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  672|    378|                return false;
  673|    378|            }
  674|  1.51k|            RNP_LOG("Too long armor header - truncated.");
  ------------------
  |  |   76|  1.51k|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|  1.51k|    do {                                                                                 \
  |  |  |  |   69|  1.51k|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 1.51k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|  1.51k|            break;                                                                       \
  |  |  |  |   71|  1.51k|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  675|  64.8k|        } else if (hdrlen) {
  ------------------
  |  Branch (675:20): [True: 57.5k, False: 7.34k]
  ------------------
  676|  57.5k|            if (is_base64_line(header.data(), hdrlen)) {
  ------------------
  |  Branch (676:17): [True: 7.10k, False: 50.4k]
  ------------------
  677|  7.10k|                RNP_LOG("Warning: no empty line after the base64 headers");
  ------------------
  |  |   76|  7.10k|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|  7.10k|    do {                                                                                 \
  |  |  |  |   69|  7.10k|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 7.10k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|  7.10k|            break;                                                                       \
  |  |  |  |   71|  7.10k|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  678|  7.10k|                return true;
  679|  7.10k|            }
  680|  50.4k|            param->readsrc->skip(hdrlen);
  681|  50.4k|            if (rnp::is_blank_line(header.data(), hdrlen)) {
  ------------------
  |  Branch (681:17): [True: 0, False: 50.4k]
  ------------------
  682|      0|                return param->readsrc->skip_eol();
  683|      0|            }
  684|  50.4k|        } else {
  685|       |            /* empty line - end of the headers */
  686|  7.34k|            return param->readsrc->skip_eol();
  687|  7.34k|        }
  688|       |
  689|  51.9k|        std::string hdrst(header.begin(), header.begin() + hdrlen);
  690|  51.9k|        size_t      pos = hdrst.find(": ");
  691|  51.9k|        if ((pos != std::string::npos) && armor_header_known(hdrst.substr(0, pos + 2))) {
  ------------------
  |  Branch (691:13): [True: 13.3k, False: 38.5k]
  |  Branch (691:13): [True: 5.14k, False: 46.7k]
  |  Branch (691:43): [True: 5.14k, False: 8.17k]
  ------------------
  692|       |            // do nothing at the moment, just check whether header is known
  693|  46.7k|        } else {
  694|  46.7k|            RNP_LOG("unknown header '%s'", hdrst.c_str());
  ------------------
  |  |   76|  46.7k|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|  46.7k|    do {                                                                                 \
  |  |  |  |   69|  46.7k|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 46.7k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|  46.7k|            break;                                                                       \
  |  |  |  |   71|  46.7k|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  695|  46.7k|        }
  696|       |
  697|  51.9k|        if (!param->readsrc->skip_eol()) {
  ------------------
  |  Branch (697:13): [True: 0, False: 51.9k]
  ------------------
  698|      0|            return false;
  699|      0|        }
  700|  51.9k|    } while (1);
  ------------------
  |  Branch (700:14): [True: 51.9k, Folded]
  ------------------
  701|  14.8k|}
stream-armor.cpp:_ZL15armor_skip_lineR12pgp_source_t:
  629|  1.54k|{
  630|  1.54k|    char header[ARMORED_PEEK_BUF_SIZE] = {0};
  631|  2.89k|    do {
  632|  2.89k|        size_t hdrlen = 0;
  633|  2.89k|        bool   res = src.peek_line(header, sizeof(header), &hdrlen);
  634|  2.89k|        if (hdrlen) {
  ------------------
  |  Branch (634:13): [True: 2.23k, False: 660]
  ------------------
  635|  2.23k|            src.skip(hdrlen);
  636|  2.23k|        }
  637|  2.89k|        if (res || (hdrlen < sizeof(header) - 1)) {
  ------------------
  |  Branch (637:13): [True: 1.51k, False: 1.38k]
  |  Branch (637:20): [True: 38, False: 1.34k]
  ------------------
  638|  1.54k|            return res;
  639|  1.54k|        }
  640|  2.89k|    } while (1);
  ------------------
  |  Branch (640:14): [True: 1.34k, Folded]
  ------------------
  641|  1.54k|}
stream-armor.cpp:_ZL18armor_header_knownRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE:
  655|  13.3k|{
  656|  13.3k|    return (name == ST_HEADER_VERSION) || (name == ST_HEADER_COMMENT) ||
  ------------------
  |  |   50|  13.3k|#define ST_HEADER_VERSION ("Version: ")
  ------------------
                  return (name == ST_HEADER_VERSION) || (name == ST_HEADER_COMMENT) ||
  ------------------
  |  |   51|  12.5k|#define ST_HEADER_COMMENT ("Comment: ")
  ------------------
  |  Branch (656:12): [True: 762, False: 12.5k]
  |  Branch (656:43): [True: 320, False: 12.2k]
  ------------------
  657|  12.2k|           (name == ST_HEADER_CHARSET) || (name == ST_HEADER_HASH);
  ------------------
  |  |   53|  12.2k|#define ST_HEADER_CHARSET ("Charset: ")
  ------------------
                         (name == ST_HEADER_CHARSET) || (name == ST_HEADER_HASH);
  ------------------
  |  |   52|  11.4k|#define ST_HEADER_HASH ("Hash: ")
  ------------------
  |  Branch (657:12): [True: 793, False: 11.4k]
  |  Branch (657:43): [True: 3.26k, False: 8.17k]
  ------------------
  658|  13.3k|}
stream-armor.cpp:_ZL14is_base64_linePKcm:
  645|  57.5k|{
  646|  1.38M|    for (size_t i = 0; i < len && line[i]; i++) {
  ------------------
  |  Branch (646:24): [True: 1.37M, False: 7.09k]
  |  Branch (646:35): [True: 1.37M, False: 16]
  ------------------
  647|  1.37M|        if (B64DEC[(uint8_t) line[i]] == 0xff)
  ------------------
  |  Branch (647:13): [True: 50.4k, False: 1.32M]
  ------------------
  648|  50.4k|            return false;
  649|  1.37M|    }
  650|  7.10k|    return true;
  651|  57.5k|}

_ZN3rnp13ArmoredSource8multipleEv:
  123|  14.0k|    {
  124|  14.0k|        return multiple_;
  125|  14.0k|    }

_ZN12pgp_source_t4readEPvmPm:
   57|  1.03M|{
   58|  1.03M|    size_t left = len;
   59|  1.03M|    size_t read;
   60|  1.03M|    bool   readahead = cache ? cache->readahead : false;
  ------------------
  |  Branch (60:24): [True: 1.03M, False: 0]
  ------------------
   61|       |
   62|  1.03M|    if (error_) {
  ------------------
  |  Branch (62:9): [True: 0, False: 1.03M]
  ------------------
   63|      0|        return false;
   64|      0|    }
   65|       |
   66|  1.03M|    if (eof_ || (len == 0)) {
  ------------------
  |  Branch (66:9): [True: 331, False: 1.03M]
  |  Branch (66:17): [True: 0, False: 1.03M]
  ------------------
   67|    331|        *readres = 0;
   68|    331|        return true;
   69|    331|    }
   70|       |
   71|       |    // Do not read more then available if source size is known
   72|  1.03M|    if (knownsize && (readb + len > size)) {
  ------------------
  |  Branch (72:9): [True: 1.00M, False: 29.5k]
  |  Branch (72:22): [True: 164, False: 1.00M]
  ------------------
   73|    164|        len = size - readb;
   74|    164|        left = len;
   75|    164|        readahead = false;
   76|    164|    }
   77|       |
   78|       |    // Check whether we have cache and there is data inside
   79|  1.03M|    if (cache && (cache->len > cache->pos)) {
  ------------------
  |  Branch (79:9): [True: 1.03M, False: 0]
  |  Branch (79:18): [True: 1.03M, False: 54]
  ------------------
   80|  1.03M|        read = cache->len - cache->pos;
   81|  1.03M|        if (read >= len) {
  ------------------
  |  Branch (81:13): [True: 1.03M, False: 485]
  ------------------
   82|  1.03M|            memcpy(buf, &cache->buf[cache->pos], len);
   83|  1.03M|            cache->pos += len;
   84|  1.03M|            goto finish;
   85|  1.03M|        } else {
   86|    485|            memcpy(buf, &cache->buf[cache->pos], read);
   87|    485|            cache->pos += read;
   88|    485|            buf = (uint8_t *) buf + read;
   89|    485|            left = len - read;
   90|    485|        }
   91|  1.03M|    }
   92|       |
   93|       |    // If we got here then we have empty cache or no cache at all
   94|    626|    while (left > 0) {
  ------------------
  |  Branch (94:12): [True: 584, False: 42]
  ------------------
   95|    584|        if (left > sizeof(cache->buf) || !readahead || !cache) {
  ------------------
  |  Branch (95:13): [True: 189, False: 395]
  |  Branch (95:42): [True: 16, False: 379]
  |  Branch (95:56): [True: 0, False: 379]
  ------------------
   96|       |            // If there is no cache or chunk is larger then read directly
   97|    205|            if (!raw_read(this, buf, left, &read)) {
  ------------------
  |  Branch (97:17): [True: 31, False: 174]
  ------------------
   98|     31|                error_ = 1;
   99|     31|                return false;
  100|     31|            }
  101|    174|            if (!read) {
  ------------------
  |  Branch (101:17): [True: 91, False: 83]
  ------------------
  102|     91|                eof_ = true;
  103|     91|                len = len - left;
  104|     91|                goto finish;
  105|     91|            }
  106|     83|            left -= read;
  107|     83|            buf = (uint8_t *) buf + read;
  108|    379|        } else {
  109|       |            // Try to fill the cache to avoid small reads
  110|    379|            if (!raw_read(this, &cache->buf[0], sizeof(cache->buf), &read)) {
  ------------------
  |  Branch (110:17): [True: 8, False: 371]
  ------------------
  111|      8|                error_ = true;
  112|      8|                return false;
  113|      8|            }
  114|    371|            if (!read) {
  ------------------
  |  Branch (114:17): [True: 64, False: 307]
  ------------------
  115|     64|                eof_ = true;
  116|     64|                len = len - left;
  117|     64|                goto finish;
  118|    307|            } else if (read < left) {
  ------------------
  |  Branch (118:24): [True: 4, False: 303]
  ------------------
  119|      4|                memcpy(buf, &cache->buf[0], read);
  120|      4|                left -= read;
  121|      4|                buf = (uint8_t *) buf + read;
  122|    303|            } else {
  123|    303|                memcpy(buf, &cache->buf[0], left);
  124|    303|                cache->pos = left;
  125|    303|                cache->len = read;
  126|    303|                goto finish;
  127|    303|            }
  128|    371|        }
  129|    584|    }
  130|       |
  131|  1.03M|finish:
  132|  1.03M|    readb += len;
  133|  1.03M|    if (knownsize && (readb == size)) {
  ------------------
  |  Branch (133:9): [True: 1.00M, False: 29.4k]
  |  Branch (133:22): [True: 2.40k, False: 1.00M]
  ------------------
  134|  2.40k|        eof_ = true;
  135|  2.40k|    }
  136|  1.03M|    *readres = len;
  137|  1.03M|    return true;
  138|    539|}
_ZN12pgp_source_t7read_eqEPvm:
  142|   519k|{
  143|   519k|    size_t res = 0;
  144|   519k|    return read(buf, len, &res) && (res == len);
  ------------------
  |  Branch (144:12): [True: 519k, False: 0]
  |  Branch (144:36): [True: 519k, False: 0]
  ------------------
  145|   519k|}
_ZN12pgp_source_t4peekEPvmPm:
  149|  5.09M|{
  150|  5.09M|    if (error_) {
  ------------------
  |  Branch (150:9): [True: 978, False: 5.09M]
  ------------------
  151|    978|        return false;
  152|    978|    }
  153|  5.09M|    if (!cache || (len > sizeof(cache->buf))) {
  ------------------
  |  Branch (153:9): [True: 0, False: 5.09M]
  |  Branch (153:19): [True: 0, False: 5.09M]
  ------------------
  154|      0|        return false;
  155|      0|    }
  156|  5.09M|    if (eof_) {
  ------------------
  |  Branch (156:9): [True: 0, False: 5.09M]
  ------------------
  157|      0|        *peeked = 0;
  158|      0|        return true;
  159|      0|    }
  160|       |
  161|  5.09M|    size_t read = 0;
  162|  5.09M|    bool   readahead = cache->readahead;
  163|       |    // Do not read more then available if source size is known
  164|  5.09M|    if (knownsize && (readb + len > size)) {
  ------------------
  |  Branch (164:9): [True: 4.96M, False: 133k]
  |  Branch (164:22): [True: 12.6k, False: 4.94M]
  ------------------
  165|  12.6k|        len = size - readb;
  166|  12.6k|        readahead = false;
  167|  12.6k|    }
  168|       |
  169|  5.09M|    if (cache->len - cache->pos >= len) {
  ------------------
  |  Branch (169:9): [True: 5.06M, False: 32.8k]
  ------------------
  170|  5.06M|        if (buf) {
  ------------------
  |  Branch (170:13): [True: 5.06M, False: 0]
  ------------------
  171|  5.06M|            memcpy(buf, &cache->buf[cache->pos], len);
  172|  5.06M|        }
  173|  5.06M|        *peeked = len;
  174|  5.06M|        return true;
  175|  5.06M|    }
  176|       |
  177|  32.8k|    if (cache->pos > 0) {
  ------------------
  |  Branch (177:9): [True: 14.1k, False: 18.7k]
  ------------------
  178|  14.1k|        memmove(&cache->buf[0], &cache->buf[cache->pos], cache->len - cache->pos);
  179|  14.1k|        cache->len -= cache->pos;
  180|  14.1k|        cache->pos = 0;
  181|  14.1k|    }
  182|       |
  183|  32.8k|    while (cache->len < len) {
  ------------------
  |  Branch (183:12): [True: 32.8k, False: 0]
  ------------------
  184|  32.8k|        read = readahead ? sizeof(cache->buf) - cache->len : len - cache->len;
  ------------------
  |  Branch (184:16): [True: 29.6k, False: 3.26k]
  ------------------
  185|  32.8k|        if (knownsize && (readb + read > size)) {
  ------------------
  |  Branch (185:13): [True: 4.85k, False: 28.0k]
  |  Branch (185:26): [True: 803, False: 4.04k]
  ------------------
  186|    803|            read = size - readb;
  187|    803|        }
  188|  32.8k|        if (!raw_read(this, &cache->buf[cache->len], read, &read)) {
  ------------------
  |  Branch (188:13): [True: 379, False: 32.5k]
  ------------------
  189|    379|            error_ = true;
  190|    379|            return false;
  191|    379|        }
  192|  32.5k|        if (!read) {
  ------------------
  |  Branch (192:13): [True: 13.8k, False: 18.6k]
  ------------------
  193|  13.8k|            if (buf) {
  ------------------
  |  Branch (193:17): [True: 13.8k, False: 0]
  ------------------
  194|  13.8k|                memcpy(buf, &cache->buf[0], cache->len);
  195|  13.8k|            }
  196|  13.8k|            *peeked = cache->len;
  197|  13.8k|            return true;
  198|  13.8k|        }
  199|  18.6k|        cache->len += read;
  200|  18.6k|        if (cache->len >= len) {
  ------------------
  |  Branch (200:13): [True: 18.6k, False: 0]
  ------------------
  201|  18.6k|            if (buf) {
  ------------------
  |  Branch (201:17): [True: 18.6k, False: 0]
  ------------------
  202|  18.6k|                memcpy(buf, cache->buf, len);
  203|  18.6k|            }
  204|  18.6k|            *peeked = len;
  205|  18.6k|            return true;
  206|  18.6k|        }
  207|  18.6k|    }
  208|      0|    return false;
  209|  32.8k|}
_ZN12pgp_source_t7peek_eqEPvm:
  213|  3.12M|{
  214|  3.12M|    size_t res = 0;
  215|  3.12M|    return peek(buf, len, &res) && (res == len);
  ------------------
  |  Branch (215:12): [True: 3.12M, False: 379]
  |  Branch (215:36): [True: 3.12M, False: 173]
  ------------------
  216|  3.12M|}
_ZN12pgp_source_t4skipEm:
  220|   267k|{
  221|   267k|    if (cache && (cache->len - cache->pos >= len)) {
  ------------------
  |  Branch (221:9): [True: 267k, False: 0]
  |  Branch (221:18): [True: 267k, False: 0]
  ------------------
  222|   267k|        readb += len;
  223|   267k|        cache->pos += len;
  224|   267k|        return;
  225|   267k|    }
  226|       |
  227|      0|    size_t  res = 0;
  228|      0|    uint8_t sbuf[16];
  229|      0|    if (len < sizeof(sbuf)) {
  ------------------
  |  Branch (229:9): [True: 0, False: 0]
  ------------------
  230|      0|        (void) read(sbuf, len, &res);
  231|      0|        return;
  232|      0|    }
  233|      0|    if (eof()) {
  ------------------
  |  Branch (233:9): [True: 0, False: 0]
  ------------------
  234|      0|        return;
  235|      0|    }
  236|       |
  237|      0|    void *buf = calloc(1, std::min((size_t) PGP_INPUT_CACHE_SIZE, len));
  ------------------
  |  |   35|      0|#define PGP_INPUT_CACHE_SIZE 32768
  ------------------
  238|      0|    if (!buf) {
  ------------------
  |  Branch (238:9): [True: 0, False: 0]
  ------------------
  239|      0|        error_ = true;
  240|      0|        return;
  241|      0|    }
  242|       |
  243|      0|    while (len && !eof()) {
  ------------------
  |  Branch (243:12): [True: 0, False: 0]
  |  Branch (243:19): [True: 0, False: 0]
  ------------------
  244|      0|        if (!read(buf, std::min((size_t) PGP_INPUT_CACHE_SIZE, len), &res)) {
  ------------------
  |  |   35|      0|#define PGP_INPUT_CACHE_SIZE 32768
  ------------------
  |  Branch (244:13): [True: 0, False: 0]
  ------------------
  245|      0|            break;
  246|      0|        }
  247|      0|        len -= res;
  248|      0|    }
  249|      0|    free(buf);
  250|      0|}
_ZNK12pgp_source_t5errorEv:
  263|   534k|{
  264|   534k|    return error_;
  265|   534k|}
_ZN12pgp_source_t3eofEv:
  269|  1.57M|{
  270|  1.57M|    if (eof_) {
  ------------------
  |  Branch (270:9): [True: 504, False: 1.57M]
  ------------------
  271|    504|        return true;
  272|    504|    }
  273|       |    /* Error on stream read is NOT considered as eof. See error(). */
  274|  1.57M|    uint8_t check;
  275|  1.57M|    size_t  read = 0;
  276|  1.57M|    return peek(&check, 1, &read) && (read == 0);
  ------------------
  |  Branch (276:12): [True: 1.57M, False: 978]
  |  Branch (276:38): [True: 13.9k, False: 1.55M]
  ------------------
  277|  1.57M|}
_ZN12pgp_source_t5closeEv:
  281|  23.0k|{
  282|  23.0k|    if (raw_close) {
  ------------------
  |  Branch (282:9): [True: 20.4k, False: 2.67k]
  ------------------
  283|  20.4k|        raw_close(this);
  284|  20.4k|    }
  285|       |
  286|  23.0k|    if (cache) {
  ------------------
  |  Branch (286:9): [True: 19.5k, False: 3.53k]
  ------------------
  287|  19.5k|        free(cache);
  288|       |        cache = NULL;
  289|  19.5k|    }
  290|  23.0k|}
_ZN12pgp_source_t8skip_eolEv:
  294|   103k|{
  295|   103k|    uint8_t eol[2];
  296|   103k|    size_t  read;
  297|       |
  298|   103k|    if (!peek(eol, 2, &read) || !read) {
  ------------------
  |  Branch (298:9): [True: 0, False: 103k]
  |  Branch (298:33): [True: 178, False: 103k]
  ------------------
  299|    178|        return false;
  300|    178|    }
  301|   103k|    if (eol[0] == '\n') {
  ------------------
  |  Branch (301:9): [True: 80.3k, False: 23.1k]
  ------------------
  302|  80.3k|        skip(1);
  303|  80.3k|        return true;
  304|  80.3k|    }
  305|  23.1k|    if ((read == 2) && (eol[0] == '\r') && (eol[1] == '\n')) {
  ------------------
  |  Branch (305:9): [True: 23.1k, False: 32]
  |  Branch (305:24): [True: 11.4k, False: 11.6k]
  |  Branch (305:44): [True: 10.2k, False: 1.16k]
  ------------------
  306|  10.2k|        skip(2);
  307|  10.2k|        return true;
  308|  10.2k|    }
  309|  12.8k|    return false;
  310|  23.1k|}
_ZN12pgp_source_t10skip_charsERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  314|  43.2k|{
  315|   104k|    do {
  316|   104k|        char   ch = 0;
  317|   104k|        size_t read = 0;
  318|   104k|        if (!peek(&ch, 1, &read)) {
  ------------------
  |  Branch (318:13): [True: 0, False: 104k]
  ------------------
  319|      0|            return false;
  320|      0|        }
  321|   104k|        if (!read) {
  ------------------
  |  Branch (321:13): [True: 248, False: 104k]
  ------------------
  322|       |            /* return true only if there is no underlying read error */
  323|    248|            return true;
  324|    248|        }
  325|   104k|        if (chars.find(ch) == std::string::npos) {
  ------------------
  |  Branch (325:13): [True: 42.9k, False: 61.2k]
  ------------------
  326|  42.9k|            return true;
  327|  42.9k|        }
  328|  61.2k|        skip(1);
  329|  61.2k|    } while (1);
  ------------------
  |  Branch (329:14): [True: 61.2k, Folded]
  ------------------
  330|  43.2k|}
_ZN12pgp_source_t9peek_lineEPcmPm:
  334|  98.1k|{
  335|  98.1k|    size_t scan_pos = 0;
  336|  98.1k|    size_t inc = 64;
  337|  98.1k|    len = len - 1;
  338|       |
  339|   149k|    do {
  340|   149k|        size_t to_peek = scan_pos + inc;
  341|   149k|        to_peek = to_peek > len ? len : to_peek;
  ------------------
  |  Branch (341:19): [True: 31.5k, False: 118k]
  ------------------
  342|   149k|        inc = inc * 2;
  343|       |
  344|       |        /* inefficient, each time we again read from the beginning */
  345|   149k|        if (!peek(buf, to_peek, readres)) {
  ------------------
  |  Branch (345:13): [True: 0, False: 149k]
  ------------------
  346|      0|            return false;
  347|      0|        }
  348|       |
  349|       |        /* we continue scanning where we stopped previously */
  350|  10.5M|        for (; scan_pos < *readres; scan_pos++) {
  ------------------
  |  Branch (350:16): [True: 10.5M, False: 64.9k]
  ------------------
  351|  10.5M|            if (buf[scan_pos] == '\n') {
  ------------------
  |  Branch (351:17): [True: 84.7k, False: 10.4M]
  ------------------
  352|  84.7k|                if ((scan_pos > 0) && (buf[scan_pos - 1] == '\r')) {
  ------------------
  |  Branch (352:21): [True: 76.5k, False: 8.17k]
  |  Branch (352:39): [True: 7.74k, False: 68.8k]
  ------------------
  353|  7.74k|                    scan_pos--;
  354|  7.74k|                }
  355|  84.7k|                buf[scan_pos] = '\0';
  356|  84.7k|                *readres = scan_pos;
  357|  84.7k|                return true;
  358|  84.7k|            }
  359|  10.5M|        }
  360|  64.9k|        if (*readres < to_peek) {
  ------------------
  |  Branch (360:13): [True: 433, False: 64.5k]
  ------------------
  361|    433|            return false;
  362|    433|        }
  363|  64.9k|    } while (scan_pos < len);
  ------------------
  |  Branch (363:14): [True: 51.5k, False: 12.9k]
  ------------------
  364|  12.9k|    return false;
  365|  98.1k|}
_Z15init_src_commonP12pgp_source_tm:
  369|  19.5k|{
  370|  19.5k|    memset(src, 0, sizeof(*src));
  371|  19.5k|    src->cache = (pgp_source_cache_t *) calloc(1, sizeof(*src->cache));
  372|  19.5k|    if (!src->cache) {
  ------------------
  |  Branch (372:9): [True: 0, False: 19.5k]
  ------------------
  373|      0|        RNP_LOG("cache allocation failed");
  ------------------
  |  |   76|      0|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|      0|    do {                                                                                 \
  |  |  |  |   69|      0|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|      0|            break;                                                                       \
  |  |  |  |   71|      0|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  374|      0|        return false;
  375|      0|    }
  376|  19.5k|    src->cache->readahead = true;
  377|  19.5k|    if (!paramsize) {
  ------------------
  |  Branch (377:9): [True: 15.3k, False: 4.24k]
  ------------------
  378|  15.3k|        return true;
  379|  15.3k|    }
  380|  4.24k|    src->param = calloc(1, paramsize);
  381|  4.24k|    if (!src->param) {
  ------------------
  |  Branch (381:9): [True: 0, False: 4.24k]
  ------------------
  382|      0|        RNP_LOG("param allocation failed");
  ------------------
  |  |   76|      0|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|      0|    do {                                                                                 \
  |  |  |  |   69|      0|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|      0|            break;                                                                       \
  |  |  |  |   71|      0|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  383|      0|        free(src->cache);
  384|      0|        src->cache = NULL;
  385|      0|        return false;
  386|      0|    }
  387|  4.24k|    return true;
  388|  4.24k|}
_Z12init_mem_srcP12pgp_source_tPKvmb:
  546|  4.24k|{
  547|  4.24k|    if (!mem && len) {
  ------------------
  |  Branch (547:9): [True: 0, False: 4.24k]
  |  Branch (547:17): [True: 0, False: 0]
  ------------------
  548|      0|        return RNP_ERROR_NULL_POINTER;
  549|      0|    }
  550|       |    /* this is actually double buffering, but then src_peek will fail */
  551|  4.24k|    if (!init_src_common(src, sizeof(pgp_source_mem_param_t))) {
  ------------------
  |  Branch (551:9): [True: 0, False: 4.24k]
  ------------------
  552|      0|        return RNP_ERROR_OUT_OF_MEMORY;
  553|      0|    }
  554|       |
  555|  4.24k|    pgp_source_mem_param_t *param = (pgp_source_mem_param_t *) src->param;
  556|  4.24k|    param->memory = mem;
  557|  4.24k|    param->len = len;
  558|  4.24k|    param->pos = 0;
  559|  4.24k|    param->free = free;
  560|  4.24k|    src->raw_read = mem_src_read;
  561|  4.24k|    src->raw_close = mem_src_close;
  562|  4.24k|    src->raw_finish = NULL;
  563|  4.24k|    src->size = len;
  564|  4.24k|    src->knownsize = 1;
  565|  4.24k|    src->type = PGP_STREAM_MEMORY;
  566|       |
  567|  4.24k|    return RNP_SUCCESS;
  568|  4.24k|}
stream-common.cpp:_ZL12mem_src_readP12pgp_source_tPvmPm:
  516|  5.18k|{
  517|  5.18k|    pgp_source_mem_param_t *param = (pgp_source_mem_param_t *) src->param;
  518|  5.18k|    if (!param) {
  ------------------
  |  Branch (518:9): [True: 0, False: 5.18k]
  ------------------
  519|      0|        return false;
  520|      0|    }
  521|       |
  522|  5.18k|    if (len > param->len - param->pos) {
  ------------------
  |  Branch (522:9): [True: 258, False: 4.93k]
  ------------------
  523|    258|        len = param->len - param->pos;
  524|    258|    }
  525|  5.18k|    memcpy(buf, (uint8_t *) param->memory + param->pos, len);
  526|  5.18k|    param->pos += len;
  527|  5.18k|    *read = len;
  528|  5.18k|    return true;
  529|  5.18k|}
stream-common.cpp:_ZL13mem_src_closeP12pgp_source_t:
  533|  4.24k|{
  534|  4.24k|    pgp_source_mem_param_t *param = (pgp_source_mem_param_t *) src->param;
  535|  4.24k|    if (param) {
  ------------------
  |  Branch (535:9): [True: 4.24k, False: 0]
  ------------------
  536|  4.24k|        if (param->free) {
  ------------------
  |  Branch (536:13): [True: 0, False: 4.24k]
  ------------------
  537|      0|            free((void *) param->memory);
  538|      0|        }
  539|  4.24k|        free(src->param);
  540|       |        src->param = NULL;
  541|  4.24k|    }
  542|  4.24k|}

_ZN3rnp6SourceC2Ev:
  399|  4.24k|    Source() : src_({})
  400|  4.24k|    {
  401|  4.24k|    }
_ZN3rnp6SourceD2Ev:
  404|  4.24k|    {
  405|  4.24k|        src_.close();
  406|  4.24k|    }
_ZN3rnp6Source3eofEv:
  428|  1.03M|    {
  429|  1.03M|        return src().eof();
  430|  1.03M|    }
_ZN3rnp6Source5errorEv:
  434|   520k|    {
  435|   520k|        return src().error();
  436|   520k|    }

_Z15get_packet_typeh:
   67|  1.03M|{
   68|  1.03M|    if (!(ptag & PGP_PTAG_ALWAYS_SET)) {
  ------------------
  |  |   47|  1.03M|#define PGP_PTAG_ALWAYS_SET 0x80
  ------------------
  |  Branch (68:9): [True: 0, False: 1.03M]
  ------------------
   69|      0|        return -1;
   70|      0|    }
   71|       |
   72|  1.03M|    if (ptag & PGP_PTAG_NEW_FORMAT) {
  ------------------
  |  |   56|  1.03M|#define PGP_PTAG_NEW_FORMAT 0x40
  ------------------
  |  Branch (72:9): [True: 1.00M, False: 34.4k]
  ------------------
   73|  1.00M|        return (int) (ptag & PGP_PTAG_NF_CONTENT_TAG_MASK);
  ------------------
  |  |  137|  1.00M|#define PGP_PTAG_NF_CONTENT_TAG_MASK 0x3f
  ------------------
   74|  1.00M|    } else {
   75|  34.4k|        return (int) ((ptag & PGP_PTAG_OF_CONTENT_TAG_MASK) >> PGP_PTAG_OF_CONTENT_TAG_SHIFT);
  ------------------
  |  |   66|  34.4k|#define PGP_PTAG_OF_CONTENT_TAG_MASK 0x3c
  ------------------
                      return (int) ((ptag & PGP_PTAG_OF_CONTENT_TAG_MASK) >> PGP_PTAG_OF_CONTENT_TAG_SHIFT);
  ------------------
  |  |   74|  34.4k|#define PGP_PTAG_OF_CONTENT_TAG_SHIFT 2
  ------------------
   76|  34.4k|    }
   77|  1.03M|}
_Z15stream_pkt_typeR12pgp_source_t:
   81|   519k|{
   82|   519k|    if (src.eof()) {
  ------------------
  |  Branch (82:9): [True: 0, False: 519k]
  ------------------
   83|      0|        return 0;
   84|      0|    }
   85|   519k|    size_t hdrneed = 0;
   86|   519k|    if (!stream_pkt_hdr_len(src, hdrneed)) {
  ------------------
  |  Branch (86:9): [True: 415, False: 519k]
  ------------------
   87|    415|        return -1;
   88|    415|    }
   89|   519k|    uint8_t hdr[PGP_MAX_HEADER_SIZE];
   90|   519k|    if (!src.peek_eq(hdr, hdrneed)) {
  ------------------
  |  Branch (90:9): [True: 21, False: 519k]
  ------------------
   91|     21|        return -1;
   92|     21|    }
   93|   519k|    return get_packet_type(hdr[0]);
   94|   519k|}
_Z18stream_pkt_hdr_lenR12pgp_source_tRm:
   98|  1.55M|{
   99|  1.55M|    uint8_t buf[2];
  100|       |
  101|  1.55M|    if (!src.peek_eq(buf, 2) || !(buf[0] & PGP_PTAG_ALWAYS_SET)) {
  ------------------
  |  |   47|  1.55M|#define PGP_PTAG_ALWAYS_SET 0x80
  ------------------
  |  Branch (101:9): [True: 399, False: 1.55M]
  |  Branch (101:33): [True: 16, False: 1.55M]
  ------------------
  102|    415|        return false;
  103|    415|    }
  104|       |
  105|  1.55M|    if (buf[0] & PGP_PTAG_NEW_FORMAT) {
  ------------------
  |  |   56|  1.55M|#define PGP_PTAG_NEW_FORMAT 0x40
  ------------------
  |  Branch (105:9): [True: 1.50M, False: 51.6k]
  ------------------
  106|  1.50M|        if (buf[1] < 192) {
  ------------------
  |  Branch (106:13): [True: 1.50M, False: 2.31k]
  ------------------
  107|  1.50M|            hdrlen = 2;
  108|  1.50M|        } else if (buf[1] < 224) {
  ------------------
  |  Branch (108:20): [True: 1.05k, False: 1.26k]
  ------------------
  109|  1.05k|            hdrlen = 3;
  110|  1.26k|        } else if (buf[1] < 255) {
  ------------------
  |  Branch (110:20): [True: 53, False: 1.21k]
  ------------------
  111|     53|            hdrlen = 2;
  112|  1.21k|        } else {
  113|  1.21k|            hdrlen = 6;
  114|  1.21k|        }
  115|  1.50M|        return true;
  116|  1.50M|    }
  117|       |
  118|  51.6k|    switch (buf[0] & PGP_PTAG_OF_LENGTH_TYPE_MASK) {
  ------------------
  |  |   83|  51.6k|#define PGP_PTAG_OF_LENGTH_TYPE_MASK 0x03
  ------------------
  119|  40.8k|    case PGP_PTAG_OLD_LEN_1:
  ------------------
  |  Branch (119:5): [True: 40.8k, False: 10.7k]
  ------------------
  120|  40.8k|        hdrlen = 2;
  121|  40.8k|        return true;
  122|  8.77k|    case PGP_PTAG_OLD_LEN_2:
  ------------------
  |  Branch (122:5): [True: 8.77k, False: 42.9k]
  ------------------
  123|  8.77k|        hdrlen = 3;
  124|  8.77k|        return true;
  125|  1.99k|    case PGP_PTAG_OLD_LEN_4:
  ------------------
  |  Branch (125:5): [True: 1.99k, False: 49.6k]
  ------------------
  126|  1.99k|        hdrlen = 5;
  127|  1.99k|        return true;
  128|     15|    case PGP_PTAG_OLD_LEN_INDETERMINATE:
  ------------------
  |  Branch (128:5): [True: 15, False: 51.6k]
  ------------------
  129|     15|        hdrlen = 1;
  130|     15|        return true;
  131|      0|    default:
  ------------------
  |  Branch (131:5): [True: 0, False: 51.6k]
  ------------------
  132|      0|        return false;
  133|  51.6k|    }
  134|  51.6k|}
_Z19stream_read_pkt_lenR12pgp_source_tPm:
  176|   519k|{
  177|   519k|    uint8_t buf[6] = {};
  178|   519k|    size_t  read = 0;
  179|       |
  180|   519k|    if (!stream_pkt_hdr_len(src, read)) {
  ------------------
  |  Branch (180:9): [True: 0, False: 519k]
  ------------------
  181|      0|        return false;
  182|      0|    }
  183|       |
  184|   519k|    if (!src.read_eq(buf, read)) {
  ------------------
  |  Branch (184:9): [True: 0, False: 519k]
  ------------------
  185|      0|        return false;
  186|      0|    }
  187|       |
  188|   519k|    return get_pkt_len(buf, pktlen);
  189|   519k|}
_Z17is_secret_key_pkti:
  433|   519k|{
  434|   519k|    switch (tag) {
  435|      0|    case PGP_PKT_SECRET_KEY:
  ------------------
  |  Branch (435:5): [True: 0, False: 519k]
  ------------------
  436|      0|    case PGP_PKT_SECRET_SUBKEY:
  ------------------
  |  Branch (436:5): [True: 0, False: 519k]
  ------------------
  437|      0|        return true;
  438|   519k|    default:
  ------------------
  |  Branch (438:5): [True: 519k, False: 0]
  ------------------
  439|   519k|        return false;
  440|   519k|    }
  441|   519k|}
_ZN17pgp_packet_body_tC2E14pgp_pkt_type_t:
  457|   519k|{
  458|   519k|    data_.reserve(16);
  459|   519k|    tag_ = tag;
  460|   519k|    secure_ = is_secret_key_pkt(tag);
  461|   519k|}
_ZN17pgp_packet_body_tC2EPKhm:
  464|   539k|{
  465|   539k|    data_.assign(data, data + len);
  466|   539k|    tag_ = PGP_PKT_RESERVED;
  467|   539k|    secure_ = false;
  468|   539k|}
_ZN17pgp_packet_body_tC2ERKNSt3__16vectorIhNS0_9allocatorIhEEEE:
  471|   522k|    : pgp_packet_body_t(data.data(), data.size())
  472|   522k|{
  473|   522k|}
_ZN17pgp_packet_body_tD2Ev:
  476|  1.05M|{
  477|  1.05M|    if (secure_) {
  ------------------
  |  Branch (477:9): [True: 0, False: 1.05M]
  ------------------
  478|      0|        secure_clear(data_.data(), data_.size());
  479|      0|    }
  480|  1.05M|}
_ZN17pgp_packet_body_t3curEv:
  490|  1.58M|{
  491|  1.58M|    return data_.data() + pos_;
  492|  1.58M|}
_ZNK17pgp_packet_body_t4leftEv:
  502|  2.09M|{
  503|  2.09M|    return data_.size() - pos_;
  504|  2.09M|}
_ZN17pgp_packet_body_t4skipEm:
  508|   523k|{
  509|   523k|    pos_ += bt;
  510|   523k|}
_ZN17pgp_packet_body_t9skip_backEm:
  514|   528k|{
  515|   528k|    pos_ = bt > pos_ ? 0 : pos_ - bt;
  ------------------
  |  Branch (515:12): [True: 0, False: 528k]
  ------------------
  516|   528k|}
_ZN17pgp_packet_body_t3getERh:
  520|   539k|{
  521|   539k|    if (pos_ >= data_.size()) {
  ------------------
  |  Branch (521:9): [True: 1.20k, False: 537k]
  ------------------
  522|  1.20k|        return false;
  523|  1.20k|    }
  524|   537k|    val = data_[pos_++];
  525|   537k|    return true;
  526|   539k|}
_ZN17pgp_packet_body_t3getERt:
  530|  1.58M|{
  531|  1.58M|    if (pos_ + 2 > data_.size()) {
  ------------------
  |  Branch (531:9): [True: 190, False: 1.58M]
  ------------------
  532|    190|        return false;
  533|    190|    }
  534|  1.58M|    val = read_uint16(data_.data() + pos_);
  535|  1.58M|    pos_ += 2;
  536|  1.58M|    return true;
  537|  1.58M|}
_ZN17pgp_packet_body_t3getERj:
  541|  6.74k|{
  542|  6.74k|    if (pos_ + 4 > data_.size()) {
  ------------------
  |  Branch (542:9): [True: 576, False: 6.17k]
  ------------------
  543|    576|        return false;
  544|    576|    }
  545|  6.17k|    val = read_uint32(data_.data() + pos_);
  546|  6.17k|    pos_ += 4;
  547|  6.17k|    return true;
  548|  6.74k|}
_ZN17pgp_packet_body_t3getEPhm:
  552|  2.12M|{
  553|  2.12M|    if (pos_ + len > data_.size()) {
  ------------------
  |  Branch (553:9): [True: 1.65k, False: 2.11M]
  ------------------
  554|  1.65k|        return false;
  555|  1.65k|    }
  556|  2.11M|    memcpy(val, data_.data() + pos_, len);
  557|  2.11M|    pos_ += len;
  558|  2.11M|    return true;
  559|  2.12M|}
_ZN17pgp_packet_body_t3getERNSt3__16vectorIhNS0_9allocatorIhEEEEm:
  563|   527k|{
  564|   527k|    if (pos_ + len > data_.size()) {
  ------------------
  |  Branch (564:9): [True: 3.13k, False: 524k]
  ------------------
  565|  3.13k|        return false;
  566|  3.13k|    }
  567|   524k|    val.assign(data_.data() + pos_, data_.data() + pos_ + len);
  568|   524k|    pos_ += len;
  569|   524k|    return true;
  570|   527k|}
_ZN17pgp_packet_body_t3getERN3pgp3mpiE:
  582|   535k|{
  583|   535k|    uint16_t bits = 0;
  584|   535k|    if (!get(bits)) {
  ------------------
  |  Branch (584:9): [True: 186, False: 535k]
  ------------------
  585|    186|        return false;
  586|    186|    }
  587|   535k|    size_t len = (bits + 7) >> 3;
  588|   535k|    if (len > PGP_MPINT_SIZE) {
  ------------------
  |  |   36|   535k|#define PGP_MPINT_SIZE (PGP_MPINT_BITS >> 3)
  |  |  ------------------
  |  |  |  |   35|   535k|#define PGP_MPINT_BITS (16384)
  |  |  ------------------
  ------------------
  |  Branch (588:9): [True: 326, False: 534k]
  ------------------
  589|    326|        RNP_LOG("too large mpi");
  ------------------
  |  |   76|    326|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    326|    do {                                                                                 \
  |  |  |  |   69|    326|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 326, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    326|            break;                                                                       \
  |  |  |  |   71|    326|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  590|    326|        return false;
  591|    326|    }
  592|   534k|    if (!len) {
  ------------------
  |  Branch (592:9): [True: 165, False: 534k]
  ------------------
  593|    165|        RNP_LOG("0 mpi");
  ------------------
  |  |   76|    165|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    165|    do {                                                                                 \
  |  |  |  |   69|    165|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 165, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    165|            break;                                                                       \
  |  |  |  |   71|    165|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  594|    165|        return false;
  595|    165|    }
  596|   534k|    val.resize(len);
  597|   534k|    if (!get(val.data(), len)) {
  ------------------
  |  Branch (597:9): [True: 748, False: 533k]
  ------------------
  598|    748|        RNP_LOG("failed to read mpi body");
  ------------------
  |  |   76|    748|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    748|    do {                                                                                 \
  |  |  |  |   69|    748|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 748, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    748|            break;                                                                       \
  |  |  |  |   71|    748|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  599|    748|        return false;
  600|    748|    }
  601|       |    /* check the mpi bit count */
  602|   533k|    size_t mbits = val.bits();
  603|   533k|    if (mbits != bits) {
  ------------------
  |  Branch (603:9): [True: 507k, False: 26.4k]
  ------------------
  604|   507k|        RNP_LOG(
  ------------------
  |  |   76|   507k|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|   507k|    do {                                                                                 \
  |  |  |  |   69|   507k|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 507k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|   507k|            break;                                                                       \
  |  |  |  |   71|   507k|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  605|   507k|          "Warning! Wrong mpi bit count: got %" PRIu16 ", but actual is %zu", bits, mbits);
  606|   507k|    }
  607|   533k|    return true;
  608|   534k|}
_ZN17pgp_packet_body_t4readER12pgp_source_t:
  864|   519k|{
  865|       |    /* Make sure we have enough data for packet header */
  866|   519k|    if (!src.peek_eq(hdr_, 2)) {
  ------------------
  |  Branch (866:9): [True: 0, False: 519k]
  ------------------
  867|      0|        return RNP_ERROR_READ;
  868|      0|    }
  869|       |
  870|       |    /* Read the packet header and length */
  871|   519k|    size_t len = 0;
  872|   519k|    if (!stream_pkt_hdr_len(src, len)) {
  ------------------
  |  Branch (872:9): [True: 0, False: 519k]
  ------------------
  873|      0|        return RNP_ERROR_BAD_FORMAT;
  874|      0|    }
  875|   519k|    if (!src.peek_eq(hdr_, len)) {
  ------------------
  |  Branch (875:9): [True: 0, False: 519k]
  ------------------
  876|      0|        return RNP_ERROR_READ;
  877|      0|    }
  878|   519k|    hdr_len_ = len;
  879|       |
  880|   519k|    int ptag = get_packet_type(hdr_[0]);
  881|   519k|    if ((ptag < 0) || ((tag_ != PGP_PKT_RESERVED) && (tag_ != ptag))) {
  ------------------
  |  Branch (881:9): [True: 0, False: 519k]
  |  Branch (881:24): [True: 519k, False: 0]
  |  Branch (881:54): [True: 0, False: 519k]
  ------------------
  882|      0|        RNP_LOG("tag mismatch: %d vs %d", (int) tag_, ptag);
  ------------------
  |  |   76|      0|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|      0|    do {                                                                                 \
  |  |  |  |   69|      0|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|      0|            break;                                                                       \
  |  |  |  |   71|      0|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  883|      0|        return RNP_ERROR_BAD_FORMAT;
  884|      0|    }
  885|   519k|    tag_ = (pgp_pkt_type_t) ptag;
  886|       |
  887|   519k|    if (!stream_read_pkt_len(src, &len)) {
  ------------------
  |  Branch (887:9): [True: 20, False: 519k]
  ------------------
  888|     20|        return RNP_ERROR_READ;
  889|     20|    }
  890|       |
  891|       |    /* early exit for the empty packet */
  892|   519k|    if (!len) {
  ------------------
  |  Branch (892:9): [True: 69, False: 519k]
  ------------------
  893|     69|        return RNP_SUCCESS;
  894|     69|    }
  895|       |
  896|   519k|    if (len > PGP_MAX_PKT_SIZE) {
  ------------------
  |  |   39|   519k|#define PGP_MAX_PKT_SIZE 0x100000
  ------------------
  |  Branch (896:9): [True: 28, False: 518k]
  ------------------
  897|     28|        RNP_LOG("too large packet");
  ------------------
  |  |   76|     28|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|     28|    do {                                                                                 \
  |  |  |  |   69|     28|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 28, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|     28|            break;                                                                       \
  |  |  |  |   71|     28|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  898|     28|        return RNP_ERROR_BAD_FORMAT;
  899|     28|    }
  900|       |
  901|       |    /* Read the packet contents */
  902|   518k|    try {
  903|   518k|        data_.resize(len);
  904|   518k|    } catch (const std::exception &e) {
  905|      0|        RNP_LOG("malloc of %d bytes failed, %s", (int) len, e.what());
  ------------------
  |  |   76|      0|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|      0|    do {                                                                                 \
  |  |  |  |   69|      0|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|      0|            break;                                                                       \
  |  |  |  |   71|      0|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  906|      0|        return RNP_ERROR_OUT_OF_MEMORY;
  907|      0|    }
  908|       |
  909|   518k|    size_t read = 0;
  910|   518k|    if (!src.read(data_.data(), len, &read) || (read != len)) {
  ------------------
  |  Branch (910:9): [True: 39, False: 518k]
  |  Branch (910:48): [True: 650, False: 518k]
  ------------------
  911|    689|        RNP_LOG("read %d instead of %d", (int) read, (int) len);
  ------------------
  |  |   76|    689|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    689|    do {                                                                                 \
  |  |  |  |   69|    689|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 689, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    689|            break;                                                                       \
  |  |  |  |   71|    689|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  912|    689|        return RNP_ERROR_READ;
  913|    689|    }
  914|   518k|    pos_ = 0;
  915|   518k|    return RNP_SUCCESS;
  916|   518k|}
stream-packet.cpp:_ZL11get_pkt_lenPhPm:
  138|   519k|{
  139|   519k|    if (hdr[0] & PGP_PTAG_NEW_FORMAT) {
  ------------------
  |  |   56|   519k|#define PGP_PTAG_NEW_FORMAT 0x40
  ------------------
  |  Branch (139:9): [True: 501k, False: 17.2k]
  ------------------
  140|       |        // 1-byte length
  141|   501k|        if (hdr[1] < 192) {
  ------------------
  |  Branch (141:13): [True: 501k, False: 765]
  ------------------
  142|   501k|            *pktlen = hdr[1];
  143|   501k|            return true;
  144|   501k|        }
  145|       |        // 2-byte length
  146|    765|        if (hdr[1] < 224) {
  ------------------
  |  Branch (146:13): [True: 348, False: 417]
  ------------------
  147|    348|            *pktlen = ((size_t)(hdr[1] - 192) << 8) + (size_t) hdr[2] + 192;
  148|    348|            return true;
  149|    348|        }
  150|       |        // partial length - we do not allow it here
  151|    417|        if (hdr[1] < 255) {
  ------------------
  |  Branch (151:13): [True: 15, False: 402]
  ------------------
  152|     15|            return false;
  153|     15|        }
  154|       |        // 4-byte length
  155|    402|        *pktlen = read_uint32(&hdr[2]);
  156|    402|        return true;
  157|    417|    }
  158|       |
  159|  17.2k|    switch (hdr[0] & PGP_PTAG_OF_LENGTH_TYPE_MASK) {
  ------------------
  |  |   83|  17.2k|#define PGP_PTAG_OF_LENGTH_TYPE_MASK 0x03
  ------------------
  160|  13.6k|    case PGP_PTAG_OLD_LEN_1:
  ------------------
  |  Branch (160:5): [True: 13.6k, False: 3.59k]
  ------------------
  161|  13.6k|        *pktlen = hdr[1];
  162|  13.6k|        return true;
  163|  2.92k|    case PGP_PTAG_OLD_LEN_2:
  ------------------
  |  Branch (163:5): [True: 2.92k, False: 14.2k]
  ------------------
  164|  2.92k|        *pktlen = read_uint16(&hdr[1]);
  165|  2.92k|        return true;
  166|    663|    case PGP_PTAG_OLD_LEN_4:
  ------------------
  |  Branch (166:5): [True: 663, False: 16.5k]
  ------------------
  167|    663|        *pktlen = read_uint32(&hdr[1]);
  168|    663|        return true;
  169|      5|    default:
  ------------------
  |  Branch (169:5): [True: 5, False: 17.2k]
  ------------------
  170|      5|        return false;
  171|  17.2k|    }
  172|  17.2k|}

_Z22process_pgp_signaturesR12pgp_source_tRNSt3__16vectorIN3pgp3pkt9SignatureENS1_9allocatorIS5_EEEE:
  156|  4.24k|{
  157|  4.24k|    sigs.clear();
  158|       |    /* Allow binary or armored input, including multiple armored messages */
  159|  4.24k|    rnp::ArmoredSource armor(
  160|  4.24k|      src, rnp::ArmoredSource::AllowBinary | rnp::ArmoredSource::AllowMultiple);
  161|       |    /* read sequence of OpenPGP signatures */
  162|   520k|    while (!armor.error()) {
  ------------------
  |  Branch (162:12): [True: 520k, False: 861]
  ------------------
  163|   520k|        if (armor.eof() && armor.multiple()) {
  ------------------
  |  Branch (163:13): [True: 14.0k, False: 506k]
  |  Branch (163:28): [True: 13.7k, False: 252]
  ------------------
  164|  13.7k|            armor.restart();
  165|  13.7k|        }
  166|   520k|        if (armor.eof()) {
  ------------------
  |  Branch (166:13): [True: 338, False: 519k]
  ------------------
  167|    338|            break;
  168|    338|        }
  169|   519k|        int ptag = stream_pkt_type(armor.src());
  170|   519k|        if (ptag != PGP_PKT_SIGNATURE) {
  ------------------
  |  Branch (170:13): [True: 462, False: 519k]
  ------------------
  171|    462|            RNP_LOG("wrong signature tag: %d", ptag);
  ------------------
  |  |   76|    462|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    462|    do {                                                                                 \
  |  |  |  |   69|    462|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 462, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    462|            break;                                                                       \
  |  |  |  |   71|    462|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  172|    462|            sigs.clear();
  173|    462|            return RNP_ERROR_BAD_FORMAT;
  174|    462|        }
  175|       |
  176|   519k|        sigs.emplace_back();
  177|   519k|        rnp_result_t ret = sigs.back().parse(armor.src());
  178|   519k|        if (ret) {
  ------------------
  |  Branch (178:13): [True: 2.58k, False: 516k]
  ------------------
  179|  2.58k|            sigs.clear();
  180|  2.58k|            return ret;
  181|  2.58k|        }
  182|   519k|    }
  183|  1.19k|    if (armor.error()) {
  ------------------
  |  Branch (183:9): [True: 0, False: 1.19k]
  ------------------
  184|      0|        sigs.clear();
  185|      0|        return RNP_ERROR_READ;
  186|      0|    }
  187|  1.19k|    return RNP_SUCCESS;
  188|  1.19k|}
_ZNK3pgp3pkt9Signature10get_subpktEhb:
  229|  16.7k|{
  230|  16.7k|    size_t idx = find_subpkt(stype, hashed);
  231|  16.7k|    return idx == SIZE_MAX ? nullptr : subpkts[idx].get();
  ------------------
  |  Branch (231:12): [True: 12.2k, False: 4.54k]
  ------------------
  232|  16.7k|}
_ZNK3pgp3pkt9Signature10get_subpktENS0_6sigsub4TypeEb:
  242|  16.7k|{
  243|  16.7k|    return get_subpkt(static_cast<uint8_t>(type), hashed);
  244|  16.7k|}
_ZNK3pgp3pkt9Signature10has_subpktEhb:
  248|  7.31k|{
  249|       |    return find_subpkt(stype, hashed) != SIZE_MAX;
  250|  7.31k|}
_ZNK3pgp3pkt9Signature9has_keyidEv:
  254|  7.89k|{
  255|  7.89k|    return (version < PGP_V4) || has_subpkt(PGP_SIG_SUBPKT_ISSUER_KEY_ID, false) ||
  ------------------
  |  Branch (255:12): [True: 582, False: 7.31k]
  |  Branch (255:34): [True: 2.30k, False: 5.00k]
  ------------------
  256|  5.00k|           has_keyfp();
  ------------------
  |  Branch (256:12): [True: 0, False: 5.00k]
  ------------------
  257|  7.89k|}
_ZNK3pgp3pkt9Signature5keyidEv:
  261|  2.89k|{
  262|       |    /* version 3 uses signature field */
  263|  2.89k|    if (version < PGP_V4) {
  ------------------
  |  Branch (263:9): [True: 582, False: 2.30k]
  ------------------
  264|    582|        return signer;
  265|    582|    }
  266|       |
  267|       |    /* version 4 and up use subpackets */
  268|  2.30k|    if (version == PGP_V4) {
  ------------------
  |  Branch (268:9): [True: 878, False: 1.43k]
  ------------------
  269|    878|        auto sub = dynamic_cast<const sigsub::IssuerKeyID *>(
  270|    878|          get_subpkt(sigsub::Type::IssuerKeyID, false));
  271|    878|        if (sub) {
  ------------------
  |  Branch (271:13): [True: 878, False: 0]
  ------------------
  272|    878|            return sub->keyid();
  273|    878|        }
  274|    878|    }
  275|       |    /* v5 and up must have fingerprint, from which keyid would be extracted */
  276|  1.43k|    return keyfp().keyid();
  277|  2.30k|}
_ZNK3pgp3pkt9Signature9has_keyfpEv:
  294|  13.6k|{
  295|  13.6k|    auto sub = dynamic_cast<const sigsub::IssuerFingerprint *>(
  296|  13.6k|      get_subpkt(sigsub::Type::IssuerFingerprint));
  297|  13.6k|    if (!sub) {
  ------------------
  |  Branch (297:9): [True: 11.1k, False: 2.52k]
  ------------------
  298|  11.1k|        return false;
  299|  11.1k|    }
  300|  2.52k|    switch (version) {
  301|  1.70k|    case PGP_V4:
  ------------------
  |  Branch (301:5): [True: 1.70k, False: 822]
  ------------------
  302|  1.70k|        return sub->fp().size() == PGP_FINGERPRINT_V4_SIZE;
  ------------------
  |  |   43|  1.70k|#define PGP_FINGERPRINT_V4_SIZE 20
  ------------------
  303|    822|    case PGP_V5:
  ------------------
  |  Branch (303:5): [True: 822, False: 1.70k]
  ------------------
  304|    822|#if defined(ENABLE_CRYPTO_REFRESH)
  305|    822|    case PGP_V6:
  ------------------
  |  Branch (305:5): [True: 0, False: 2.52k]
  ------------------
  306|    822|#endif
  307|    822|        return sub->fp().size() == PGP_FINGERPRINT_V5_SIZE;
  ------------------
  |  |   44|    822|#define PGP_FINGERPRINT_V5_SIZE 32
  ------------------
  308|      0|    default:
  ------------------
  |  Branch (308:5): [True: 0, False: 2.52k]
  ------------------
  309|      0|        return false;
  310|  2.52k|    }
  311|  2.52k|}
_ZNK3pgp3pkt9Signature5keyfpEv:
  315|  2.21k|{
  316|  2.21k|    auto sub = dynamic_cast<const sigsub::IssuerFingerprint *>(
  317|  2.21k|      get_subpkt(sigsub::Type::IssuerFingerprint));
  318|  2.21k|    return sub ? sub->fp() : Fingerprint{};
  ------------------
  |  Branch (318:12): [True: 1.14k, False: 1.06k]
  ------------------
  319|  2.21k|}
_ZN3pgp3pkt9Signature10parse_v2v3ER17pgp_packet_body_t:
  756|  2.87k|{
  757|       |    /* parse v2/v3-specific fields, not the whole signature */
  758|  2.87k|    uint8_t buf[16] = {};
  759|  2.87k|    if (!pkt.get(buf, 16)) {
  ------------------
  |  Branch (759:9): [True: 457, False: 2.41k]
  ------------------
  760|    457|        RNP_LOG("cannot get enough bytes");
  ------------------
  |  |   76|    457|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    457|    do {                                                                                 \
  |  |  |  |   69|    457|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 457, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    457|            break;                                                                       \
  |  |  |  |   71|    457|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  761|    457|        return RNP_ERROR_BAD_FORMAT;
  762|    457|    }
  763|       |    /* length of hashed data, 5 */
  764|  2.41k|    if (buf[0] != 5) {
  ------------------
  |  Branch (764:9): [True: 296, False: 2.12k]
  ------------------
  765|    296|        RNP_LOG("wrong length of hashed data");
  ------------------
  |  |   76|    296|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    296|    do {                                                                                 \
  |  |  |  |   69|    296|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 296, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    296|            break;                                                                       \
  |  |  |  |   71|    296|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  766|    296|        return RNP_ERROR_BAD_FORMAT;
  767|    296|    }
  768|       |    /* hashed data */
  769|  2.12k|    hashed_data.assign(buf + 1, buf + 6);
  770|       |    /* signature type */
  771|  2.12k|    type_ = (pgp_sig_type_t) buf[1];
  772|       |    /* creation time */
  773|  2.12k|    creation_time = read_uint32(&buf[2]);
  774|       |    /* signer's key id */
  775|  2.12k|    static_assert(std::tuple_size<decltype(signer)>::value == PGP_KEY_ID_SIZE,
  776|  2.12k|                  "v3 signer field size mismatch");
  777|  2.12k|    memcpy(signer.data(), &buf[6], PGP_KEY_ID_SIZE);
  ------------------
  |  |   39|  2.12k|#define PGP_KEY_ID_SIZE 8
  ------------------
  778|       |    /* public key algorithm */
  779|  2.12k|    palg = (pgp_pubkey_alg_t) buf[14];
  780|       |    /* hash algorithm */
  781|  2.12k|    halg = (pgp_hash_alg_t) buf[15];
  782|  2.12k|    return RNP_SUCCESS;
  783|  2.41k|}
_ZN3pgp3pkt9Signature16parse_subpacketsEPhmb:
  789|  1.05M|{
  790|  1.05M|    bool res = true;
  791|       |
  792|  1.21M|    while (len) {
  ------------------
  |  Branch (792:12): [True: 170k, False: 1.04M]
  ------------------
  793|   170k|        if (subpkts.size() >= MAX_SUBPACKETS) {
  ------------------
  |  |  785|   170k|#define MAX_SUBPACKETS 64
  ------------------
  |  Branch (793:13): [True: 108, False: 170k]
  ------------------
  794|    108|            RNP_LOG("too many signature subpackets");
  ------------------
  |  |   76|    108|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    108|    do {                                                                                 \
  |  |  |  |   69|    108|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 108, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    108|            break;                                                                       \
  |  |  |  |   71|    108|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  795|    108|            return false;
  796|    108|        }
  797|   170k|        if (len < 2) {
  ------------------
  |  Branch (797:13): [True: 711, False: 169k]
  ------------------
  798|    711|            RNP_LOG("got single byte %" PRIu8, *buf);
  ------------------
  |  |   76|    711|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    711|    do {                                                                                 \
  |  |  |  |   69|    711|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 711, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    711|            break;                                                                       \
  |  |  |  |   71|    711|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  799|    711|            return false;
  800|    711|        }
  801|       |
  802|       |        /* subpacket length */
  803|   169k|        size_t splen = *buf++;
  804|   169k|        len--;
  805|   169k|        if ((splen >= 192) && (splen < 255)) {
  ------------------
  |  Branch (805:13): [True: 4.34k, False: 165k]
  |  Branch (805:31): [True: 1.10k, False: 3.23k]
  ------------------
  806|  1.10k|            splen = ((splen - 192) << 8) + *buf++ + 192;
  807|  1.10k|            len--;
  808|   168k|        } else if (splen == 255) {
  ------------------
  |  Branch (808:20): [True: 3.23k, False: 165k]
  ------------------
  809|  3.23k|            if (len < 4) {
  ------------------
  |  Branch (809:17): [True: 410, False: 2.82k]
  ------------------
  810|    410|                RNP_LOG("got 4-byte len but only %zu bytes in buffer", len);
  ------------------
  |  |   76|    410|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    410|    do {                                                                                 \
  |  |  |  |   69|    410|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 410, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    410|            break;                                                                       \
  |  |  |  |   71|    410|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  811|    410|                return false;
  812|    410|            }
  813|  2.82k|            splen = read_uint32(buf);
  814|  2.82k|            buf += 4;
  815|  2.82k|            len -= 4;
  816|  2.82k|        }
  817|       |
  818|   169k|        if (!splen) {
  ------------------
  |  Branch (818:13): [True: 513, False: 168k]
  ------------------
  819|    513|            RNP_LOG("got subpacket with 0 length");
  ------------------
  |  |   76|    513|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    513|    do {                                                                                 \
  |  |  |  |   69|    513|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 513, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    513|            break;                                                                       \
  |  |  |  |   71|    513|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  820|    513|            return false;
  821|    513|        }
  822|       |
  823|       |        /* subpacket data */
  824|   168k|        if (len < splen) {
  ------------------
  |  Branch (824:13): [True: 2.28k, False: 166k]
  ------------------
  825|  2.28k|            RNP_LOG("got subpacket len %zu, while only %zu bytes left", splen, len);
  ------------------
  |  |   76|  2.28k|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|  2.28k|    do {                                                                                 \
  |  |  |  |   69|  2.28k|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 2.28k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|  2.28k|            break;                                                                       \
  |  |  |  |   71|  2.28k|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  826|  2.28k|            return false;
  827|  2.28k|        }
  828|       |
  829|   166k|        auto subpkt = sigsub::Raw::create(buf, splen, hashed);
  830|   166k|        if (!subpkt) {
  ------------------
  |  Branch (830:13): [True: 47.9k, False: 118k]
  ------------------
  831|  47.9k|            res = false;
  832|   118k|        } else {
  833|   118k|            subpkts.items.push_back(std::move(subpkt));
  834|   118k|        }
  835|   166k|        len -= splen;
  836|   166k|        buf += splen;
  837|   166k|    }
  838|  1.04M|    return res;
  839|  1.05M|}
_ZN3pgp3pkt9Signature14get_subpkt_lenER17pgp_packet_body_tRm:
  843|  1.05M|{
  844|  1.05M|    switch (version) {
  845|  1.02M|    case PGP_V4:
  ------------------
  |  Branch (845:5): [True: 1.02M, False: 25.5k]
  ------------------
  846|  1.04M|    case PGP_V5: {
  ------------------
  |  Branch (846:5): [True: 18.7k, False: 1.03M]
  ------------------
  847|  1.04M|        uint16_t len = 0;
  848|  1.04M|        if (!pkt.get(len)) {
  ------------------
  |  Branch (848:13): [True: 4, False: 1.04M]
  ------------------
  849|      4|            return false;
  850|      4|        }
  851|  1.04M|        splen = len;
  852|  1.04M|        return true;
  853|  1.04M|    }
  854|      0|#if defined(ENABLE_CRYPTO_REFRESH)
  855|  6.74k|    case PGP_V6: {
  ------------------
  |  Branch (855:5): [True: 6.74k, False: 1.04M]
  ------------------
  856|  6.74k|        uint32_t len = 0;
  857|  6.74k|        if (!pkt.get(len)) {
  ------------------
  |  Branch (857:13): [True: 576, False: 6.17k]
  ------------------
  858|    576|            return false;
  859|    576|        }
  860|  6.17k|        splen = len;
  861|  6.17k|        return true;
  862|  6.74k|    }
  863|      0|#endif
  864|      0|    default:
  ------------------
  |  Branch (864:5): [True: 0, False: 1.05M]
  ------------------
  865|      0|        RNP_LOG("unsupported signature version: %d", (int) version);
  ------------------
  |  |   76|      0|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|      0|    do {                                                                                 \
  |  |  |  |   69|      0|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|      0|            break;                                                                       \
  |  |  |  |   71|      0|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  866|      0|        return false;
  867|  1.05M|    }
  868|  1.05M|}
_ZNK3pgp3pkt9Signature11find_subpktEhbm:
  872|  24.0k|{
  873|  24.0k|    if (version < PGP_V4) {
  ------------------
  |  Branch (873:9): [True: 582, False: 23.5k]
  ------------------
  874|    582|        return SIZE_MAX;
  875|    582|    }
  876|  69.5k|    for (size_t idx = 0; idx < subpkts.size(); idx++) {
  ------------------
  |  Branch (876:26): [True: 52.8k, False: 16.6k]
  ------------------
  877|  52.8k|        if ((subpkts[idx]->raw_type() != stype) || (hashed && !subpkts[idx]->hashed())) {
  ------------------
  |  Branch (877:13): [True: 45.3k, False: 7.53k]
  |  Branch (877:53): [True: 4.34k, False: 3.18k]
  |  Branch (877:63): [True: 676, False: 3.67k]
  ------------------
  878|  46.0k|            continue;
  879|  46.0k|        }
  880|  6.85k|        if (!skip) {
  ------------------
  |  Branch (880:13): [True: 6.85k, False: 0]
  ------------------
  881|  6.85k|            return idx;
  882|  6.85k|        }
  883|      0|        skip--;
  884|      0|    }
  885|  16.6k|    return SIZE_MAX;
  886|  23.5k|}
_ZN3pgp3pkt9Signature10parse_v4upER17pgp_packet_body_t:
  896|   529k|{
  897|       |    /* parse v4 (and up) specific fields, not the whole signature */
  898|   529k|    uint8_t buf[3];
  899|   529k|    if (!pkt.get(buf, 3)) {
  ------------------
  |  Branch (899:9): [True: 8, False: 529k]
  ------------------
  900|      8|        RNP_LOG("cannot get first 3 bytes");
  ------------------
  |  |   76|      8|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|      8|    do {                                                                                 \
  |  |  |  |   69|      8|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 8, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|      8|            break;                                                                       \
  |  |  |  |   71|      8|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  901|      8|        return RNP_ERROR_BAD_FORMAT;
  902|      8|    }
  903|       |
  904|       |    /* signature type */
  905|   529k|    type_ = (pgp_sig_type_t) buf[0];
  906|       |    /* public key algorithm */
  907|   529k|    palg = (pgp_pubkey_alg_t) buf[1];
  908|       |    /* hash algorithm */
  909|   529k|    halg = (pgp_hash_alg_t) buf[2];
  910|       |    /* hashed subpackets length */
  911|       |
  912|   529k|    size_t splen = 0;
  913|   529k|    auto   hash_begin = pkt.cur();
  914|   529k|    if (!get_subpkt_len(pkt, splen)) {
  ------------------
  |  Branch (914:9): [True: 580, False: 529k]
  ------------------
  915|    580|        RNP_LOG("cannot get hashed len");
  ------------------
  |  |   76|    580|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    580|    do {                                                                                 \
  |  |  |  |   69|    580|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 580, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    580|            break;                                                                       \
  |  |  |  |   71|    580|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  916|    580|        return RNP_ERROR_BAD_FORMAT;
  917|    580|    }
  918|   529k|    size_t splen_size = pkt.cur() - hash_begin;
  919|       |    /* hashed subpackets length + splen_size bytes of length of unhashed subpackets */
  920|   529k|    if (pkt.left() < splen + splen_size) {
  ------------------
  |  Branch (920:9): [True: 1.06k, False: 528k]
  ------------------
  921|  1.06k|        RNP_LOG("wrong packet or hashed subpackets length");
  ------------------
  |  |   76|  1.06k|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|  1.06k|    do {                                                                                 \
  |  |  |  |   69|  1.06k|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 1.06k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|  1.06k|            break;                                                                       \
  |  |  |  |   71|  1.06k|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  922|  1.06k|        return RNP_ERROR_BAD_FORMAT;
  923|  1.06k|    }
  924|       |    /* building hashed data */
  925|   528k|    size_t hlen = 4 + splen + splen_size;
  926|   528k|    hashed_data.resize(hlen);
  927|   528k|    hashed_data[0] = version;
  928|   528k|    static_assert(sizeof(buf) == 3, "Wrong signature header size.");
  929|   528k|    pkt.skip_back(3 + splen_size);
  930|       |
  931|   528k|    if (!pkt.get(hashed_data.data() + 1, hlen - 1)) {
  ------------------
  |  Branch (931:9): [True: 0, False: 528k]
  ------------------
  932|      0|        RNP_LOG("cannot get hashed subpackets data");
  ------------------
  |  |   76|      0|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|      0|    do {                                                                                 \
  |  |  |  |   69|      0|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|      0|            break;                                                                       \
  |  |  |  |   71|      0|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  933|      0|        return RNP_ERROR_BAD_FORMAT;
  934|      0|    }
  935|       |    /* parsing hashed subpackets */
  936|   528k|    if (!parse_subpackets(hashed_data.data() + 4 + splen_size, splen, true)) {
  ------------------
  |  Branch (936:9): [True: 3.03k, False: 525k]
  ------------------
  937|  3.03k|        RNP_LOG("failed to parse hashed subpackets");
  ------------------
  |  |   76|  3.03k|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|  3.03k|    do {                                                                                 \
  |  |  |  |   69|  3.03k|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 3.03k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|  3.03k|            break;                                                                       \
  |  |  |  |   71|  3.03k|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  938|  3.03k|        return RNP_ERROR_BAD_FORMAT;
  939|  3.03k|    }
  940|       |
  941|       |    /* reading unhashed subpackets */
  942|   525k|    if (!get_subpkt_len(pkt, splen)) {
  ------------------
  |  Branch (942:9): [True: 0, False: 525k]
  ------------------
  943|      0|        RNP_LOG("cannot get unhashed len");
  ------------------
  |  |   76|      0|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|      0|    do {                                                                                 \
  |  |  |  |   69|      0|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|      0|            break;                                                                       \
  |  |  |  |   71|      0|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  944|      0|        return RNP_ERROR_BAD_FORMAT;
  945|      0|    }
  946|   525k|    if (pkt.left() < splen) {
  ------------------
  |  Branch (946:9): [True: 708, False: 524k]
  ------------------
  947|    708|        RNP_LOG("not enough data for unhashed subpackets");
  ------------------
  |  |   76|    708|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    708|    do {                                                                                 \
  |  |  |  |   69|    708|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 708, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    708|            break;                                                                       \
  |  |  |  |   71|    708|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  948|    708|        return RNP_ERROR_BAD_FORMAT;
  949|    708|    }
  950|   524k|    if (!parse_subpackets(pkt.cur(), splen, false)) {
  ------------------
  |  Branch (950:9): [True: 1.21k, False: 523k]
  ------------------
  951|  1.21k|        RNP_LOG("failed to parse unhashed subpackets");
  ------------------
  |  |   76|  1.21k|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|  1.21k|    do {                                                                                 \
  |  |  |  |   69|  1.21k|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 1.21k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|  1.21k|            break;                                                                       \
  |  |  |  |   71|  1.21k|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  952|  1.21k|        return RNP_ERROR_BAD_FORMAT;
  953|  1.21k|    }
  954|   523k|    pkt.skip(splen);
  955|   523k|    return RNP_SUCCESS;
  956|   524k|}
_ZN3pgp3pkt9Signature5parseER17pgp_packet_body_t:
  960|   535k|{
  961|   535k|    uint8_t ver = 0;
  962|   535k|    if (!pkt.get(ver)) {
  ------------------
  |  Branch (962:9): [True: 69, False: 535k]
  ------------------
  963|     69|        return RNP_ERROR_BAD_FORMAT;
  964|     69|    }
  965|   535k|    version = (pgp_version_t) ver;
  966|       |
  967|       |    /* v3 or v4 or v6 signature body */
  968|   535k|    rnp_result_t res;
  969|   535k|    switch (ver) {
  970|  2.47k|    case PGP_V2:
  ------------------
  |  Branch (970:5): [True: 2.47k, False: 532k]
  ------------------
  971|  2.47k|        FALLTHROUGH_STATEMENT;
  ------------------
  |  |   81|  2.47k|# define FALLTHROUGH_STATEMENT [[fallthrough]]
  ------------------
  972|  2.87k|    case PGP_V3:
  ------------------
  |  Branch (972:5): [True: 401, False: 534k]
  ------------------
  973|  2.87k|        res = parse_v2v3(pkt);
  974|  2.87k|        break;
  975|   516k|    case PGP_V4:
  ------------------
  |  Branch (975:5): [True: 516k, False: 19.0k]
  ------------------
  976|   516k|        FALLTHROUGH_STATEMENT;
  ------------------
  |  |   81|   516k|# define FALLTHROUGH_STATEMENT [[fallthrough]]
  ------------------
  977|   526k|    case PGP_V5:
  ------------------
  |  Branch (977:5): [True: 9.97k, False: 525k]
  ------------------
  978|   526k|#if defined(ENABLE_CRYPTO_REFRESH)
  979|   526k|        FALLTHROUGH_STATEMENT;
  ------------------
  |  |   81|   526k|# define FALLTHROUGH_STATEMENT [[fallthrough]]
  ------------------
  980|   529k|    case PGP_V6:
  ------------------
  |  Branch (980:5): [True: 3.85k, False: 531k]
  ------------------
  981|   529k|#endif
  982|   529k|        res = parse_v4up(pkt);
  983|   529k|        break;
  984|  2.31k|    default:
  ------------------
  |  Branch (984:5): [True: 2.31k, False: 532k]
  ------------------
  985|  2.31k|        RNP_LOG("unknown signature version: %d", (int) ver);
  ------------------
  |  |   76|  2.31k|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|  2.31k|    do {                                                                                 \
  |  |  |  |   69|  2.31k|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 2.31k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|  2.31k|            break;                                                                       \
  |  |  |  |   71|  2.31k|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  986|  2.31k|        res = RNP_ERROR_BAD_FORMAT;
  987|   535k|    }
  988|       |
  989|   535k|    if (res) {
  ------------------
  |  Branch (989:9): [True: 9.67k, False: 525k]
  ------------------
  990|  9.67k|        return res;
  991|  9.67k|    }
  992|       |
  993|       |    /* left 16 bits of the hash */
  994|   525k|    if (!pkt.get(lbits.data(), 2)) {
  ------------------
  |  Branch (994:9): [True: 439, False: 524k]
  ------------------
  995|    439|        RNP_LOG("not enough data for hash left bits");
  ------------------
  |  |   76|    439|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    439|    do {                                                                                 \
  |  |  |  |   69|    439|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 439, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    439|            break;                                                                       \
  |  |  |  |   71|    439|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  996|    439|        return RNP_ERROR_BAD_FORMAT;
  997|    439|    }
  998|       |
  999|   524k|#if defined(ENABLE_CRYPTO_REFRESH)
 1000|   524k|    if (ver == PGP_V6) {
  ------------------
  |  Branch (1000:9): [True: 2.55k, False: 522k]
  ------------------
 1001|  2.55k|        uint8_t salt_size = 0;
 1002|  2.55k|        if (!pkt.get(salt_size)) {
  ------------------
  |  Branch (1002:13): [True: 653, False: 1.90k]
  ------------------
 1003|    653|            RNP_LOG("not enough data for v6 salt size octet");
  ------------------
  |  |   76|    653|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    653|    do {                                                                                 \
  |  |  |  |   69|    653|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 653, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    653|            break;                                                                       \
  |  |  |  |   71|    653|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1004|    653|            return RNP_ERROR_BAD_FORMAT;
 1005|    653|        }
 1006|  1.90k|        if (salt_size != rnp::Hash::size(halg) / 2) {
  ------------------
  |  Branch (1006:13): [True: 1.00k, False: 899]
  ------------------
 1007|  1.00k|            RNP_LOG("invalid salt size");
  ------------------
  |  |   76|  1.00k|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|  1.00k|    do {                                                                                 \
  |  |  |  |   69|  1.00k|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 1.00k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|  1.00k|            break;                                                                       \
  |  |  |  |   71|  1.00k|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1008|  1.00k|            return RNP_ERROR_BAD_FORMAT;
 1009|  1.00k|        }
 1010|    899|        if (!pkt.get(salt, salt_size)) {
  ------------------
  |  Branch (1010:13): [True: 141, False: 758]
  ------------------
 1011|    141|            RNP_LOG("not enough data for v6 signature salt");
  ------------------
  |  |   76|    141|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    141|    do {                                                                                 \
  |  |  |  |   69|    141|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 141, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    141|            break;                                                                       \
  |  |  |  |   71|    141|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1012|    141|            return RNP_ERROR_BAD_FORMAT;
 1013|    141|        }
 1014|    899|    }
 1015|   523k|#endif
 1016|       |
 1017|       |    /* raw signature material */
 1018|       |    /* we cannot fail here */
 1019|   523k|    pkt.get(material_buf, pkt.left());
 1020|       |    /* check whether it can be parsed */
 1021|   523k|    if (!parse_material()) {
  ------------------
  |  Branch (1021:9): [True: 5.94k, False: 517k]
  ------------------
 1022|  5.94k|        return RNP_ERROR_BAD_FORMAT;
 1023|  5.94k|    }
 1024|   517k|    return RNP_SUCCESS;
 1025|   523k|}
_ZN3pgp3pkt9Signature5parseER12pgp_source_t:
 1029|   519k|{
 1030|   519k|    pgp_packet_body_t pkt(PGP_PKT_SIGNATURE);
 1031|   519k|    rnp_result_t      res = pkt.read(src);
 1032|   519k|    if (res) {
  ------------------
  |  Branch (1032:9): [True: 737, False: 518k]
  ------------------
 1033|    737|        return res;
 1034|    737|    }
 1035|   518k|    return parse(pkt);
 1036|   519k|}
_ZNK3pgp3pkt9Signature14parse_materialEv:
 1040|   523k|{
 1041|   523k|    auto sig = SigMaterial::create(palg, halg);
 1042|   523k|    if (!sig) {
  ------------------
  |  Branch (1042:9): [True: 525, False: 522k]
  ------------------
 1043|    525|        return nullptr;
 1044|    525|    }
 1045|   522k|    pgp_packet_body_t pkt(material_buf);
 1046|   522k|    if (!sig->parse(pkt)) {
  ------------------
  |  Branch (1046:9): [True: 5.14k, False: 517k]
  ------------------
 1047|  5.14k|        return nullptr;
 1048|  5.14k|    }
 1049|   517k|    if (pkt.left()) {
  ------------------
  |  Branch (1049:9): [True: 273, False: 517k]
  ------------------
 1050|    273|        RNP_LOG("extra %zu bytes in pk packet", pkt.left());
  ------------------
  |  |   76|    273|#define RNP_LOG(...) RNP_LOG_FD(stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   68|    273|    do {                                                                                 \
  |  |  |  |   69|    273|        if (!rnp_log_switch())                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (69:13): [True: 273, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   70|    273|            break;                                                                       \
  |  |  |  |   71|    273|        (void) fprintf((fd), "[%s() %s:%d] ", __func__, __SOURCE_PATH_FILE__, __LINE__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define __SOURCE_PATH_FILE__ (&(__FILE__[SOURCE_PATH_SIZE + 3]))
  |  |  |  |  ------------------
  |  |  |  |   72|      0|        (void) fprintf((fd), __VA_ARGS__);                                               \
  |  |  |  |   73|      0|        (void) fprintf((fd), "\n");                                                      \
  |  |  |  |   74|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1051|    273|        return nullptr;
 1052|    273|    }
 1053|   517k|    return sig;
 1054|   517k|}

_ZN3pgp3pkt9SignatureC2Ev:
   77|   535k|        : type_(PGP_SIG_BINARY), version(PGP_VUNKNOWN), palg(PGP_PKA_NOTHING),
   78|   535k|          halg(PGP_HASH_UNKNOWN), creation_time(0){};
_ZNK3pgp3pkt9Signature4typeEv:
   85|  26.2k|    {
   86|  26.2k|        return type_;
   87|  26.2k|    };

