_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EED2Ev:
   64|    138|      ~AlignmentBuffer() { secure_zeroize_buffer(m_buffer.data(), sizeof(T) * m_buffer.size()); }
_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EEC2Ev:
   62|    138|      AlignmentBuffer() = default;
_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE5clearEv:
   71|    264|      void clear() {
   72|    264|         zeroize_buffer(m_buffer.data(), m_buffer.size());
   73|    264|         m_position = 0;
   74|    264|      }
_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE21handle_unaligned_dataERNS_12BufferSlicerE:
  166|    326|      [[nodiscard]] std::optional<std::span<const T>> handle_unaligned_data(BufferSlicer& slicer) {
  167|       |         // When the final block is to be deferred, we would need to store and
  168|       |         // hold a buffer that contains exactly one block until more data is
  169|       |         // passed or it is explicitly consumed.
  170|    326|         const size_t defer = (defers_final_block()) ? 1 : 0;
  ------------------
  |  Branch (170:31): [True: 0, False: 326]
  ------------------
  171|       |
  172|    326|         if(in_alignment() && slicer.remaining() >= m_buffer.size() + defer) {
  ------------------
  |  Branch (172:13): [True: 224, False: 102]
  |  Branch (172:31): [True: 37, False: 187]
  ------------------
  173|       |            // We are currently in alignment and the passed-in data source
  174|       |            // contains enough data to benefit from aligned processing.
  175|       |            // Therefore, we don't copy anything into the intermittent buffer.
  176|     37|            return std::nullopt;
  177|     37|         }
  178|       |
  179|       |         // Fill the buffer with as much input data as needed to reach alignment
  180|       |         // or until the input source is depleted.
  181|    289|         const auto elements_to_consume = std::min(m_buffer.size() - m_position, slicer.remaining());
  182|    289|         append(slicer.take(elements_to_consume));
  183|       |
  184|       |         // If we collected enough data, we push out one full block. When
  185|       |         // deferring the final block is enabled, we additionally check that
  186|       |         // more input data is available to continue processing a consecutive
  187|       |         // block.
  188|    289|         if(ready_to_consume() && (!defers_final_block() || !slicer.empty())) {
  ------------------
  |  Branch (188:13): [True: 69, False: 220]
  |  Branch (188:36): [True: 69, False: 0]
  |  Branch (188:61): [True: 0, False: 0]
  ------------------
  189|     69|            return consume();
  190|    220|         } else {
  191|    220|            return std::nullopt;
  192|    220|         }
  193|    289|      }
_ZNK5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE18defers_final_blockEv:
  233|    501|      constexpr bool defers_final_block() const {
  234|    501|         return FINAL_BLOCK_STRATEGY == AlignmentBufferFinalBlock::must_be_deferred;
  235|    501|      }
_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE6appendENSt3__14spanIKhLm18446744073709551615EEE:
   90|    415|      void append(std::span<const T> elements) {
   91|    415|         BOTAN_ASSERT_NOMSG(elements.size() <= elements_until_alignment());
  ------------------
  |  |   77|    415|   do {                                                                     \
  |  |   78|    415|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|    415|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 415]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|    415|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 415]
  |  |  ------------------
  ------------------
   92|    415|         std::copy(elements.begin(), elements.end(), m_buffer.begin() + m_position);
   93|    415|         m_position += elements.size();
   94|    415|      }
_ZNK5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE24elements_until_alignmentEv:
  221|    811|      size_t elements_until_alignment() const { return m_buffer.size() - m_position; }
_ZNK5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE16ready_to_consumeEv:
  231|    800|      bool ready_to_consume() const { return m_position == m_buffer.size(); }
_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE7consumeEv:
  200|    227|      [[nodiscard]] std::span<const T> consume() {
  201|    227|         BOTAN_ASSERT_NOMSG(ready_to_consume());
  ------------------
  |  |   77|    227|   do {                                                                     \
  |  |   78|    227|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|    227|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 227]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|    227|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 227]
  |  |  ------------------
  ------------------
  202|    227|         m_position = 0;
  203|    227|         return m_buffer;
  204|    227|      }
_ZNK5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE12in_alignmentEv:
  226|    758|      bool in_alignment() const { return m_position == 0; }
_ZNK5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE23aligned_data_to_processERNS_12BufferSlicerE:
  126|    106|      [[nodiscard]] std::tuple<std::span<const uint8_t>, size_t> aligned_data_to_process(BufferSlicer& slicer) const {
  127|    106|         BOTAN_ASSERT_NOMSG(in_alignment());
  ------------------
  |  |   77|    106|   do {                                                                     \
  |  |   78|    106|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|    106|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 106]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|    106|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 106]
  |  |  ------------------
  ------------------
  128|       |
  129|       |         // When the final block is to be deferred, the last block must not be
  130|       |         // selected for processing if there is no (unaligned) extra input data.
  131|    106|         const size_t defer = (defers_final_block()) ? 1 : 0;
  ------------------
  |  Branch (131:31): [True: 0, False: 106]
  ------------------
  132|    106|         const size_t full_blocks_to_process = (slicer.remaining() - defer) / m_buffer.size();
  133|    106|         return {slicer.take(full_blocks_to_process * m_buffer.size()), full_blocks_to_process};
  134|    106|      }
_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE18fill_up_with_zerosEv:
   79|    158|      void fill_up_with_zeros() {
   80|    158|         if(!ready_to_consume()) {
  ------------------
  |  Branch (80:13): [True: 144, False: 14]
  ------------------
   81|    144|            zeroize_buffer(&m_buffer[m_position], elements_until_alignment());
   82|    144|            m_position = m_buffer.size();
   83|    144|         }
   84|    158|      }
_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE20directly_modify_lastEm:
  113|    126|      std::span<T> directly_modify_last(size_t elements) {
  114|    126|         BOTAN_ASSERT_NOMSG(size() >= elements);
  ------------------
  |  |   77|    126|   do {                                                                     \
  |  |   78|    126|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|    126|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 126]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|    126|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 126]
  |  |  ------------------
  ------------------
  115|    126|         return std::span(m_buffer).last(elements);
  116|    126|      }
_ZNK5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE4sizeEv:
  217|    126|      constexpr size_t size() const { return m_buffer.size(); }

_ZN5Botan13reverse_bytesITkNSt3__117unsigned_integralEjQooooooeqstT_Li1EeqstS2_Li2EeqstS2_Li4EeqstS2_Li8EEES2_S2_:
   27|  1.24k|inline constexpr T reverse_bytes(T x) {
   28|       |   if constexpr(sizeof(T) == 1) {
   29|       |      return x;
   30|       |   } else if constexpr(sizeof(T) == 2) {
   31|       |#if BOTAN_COMPILER_HAS_BUILTIN(__builtin_bswap16)
   32|       |      return static_cast<T>(__builtin_bswap16(x));
   33|       |#else
   34|       |      return static_cast<T>((x << 8) | (x >> 8));
   35|       |#endif
   36|  1.24k|   } else if constexpr(sizeof(T) == 4) {
   37|  1.24k|#if BOTAN_COMPILER_HAS_BUILTIN(__builtin_bswap32)
   38|  1.24k|      return static_cast<T>(__builtin_bswap32(x));
   39|       |#else
   40|       |      // MSVC at least recognizes this as a bswap
   41|       |      return static_cast<T>(((x & 0x000000FF) << 24) | ((x & 0x0000FF00) << 8) | ((x & 0x00FF0000) >> 8) |
   42|       |                            ((x & 0xFF000000) >> 24));
   43|       |#endif
   44|       |   } else if constexpr(sizeof(T) == 8) {
   45|       |#if BOTAN_COMPILER_HAS_BUILTIN(__builtin_bswap64)
   46|       |      return static_cast<T>(__builtin_bswap64(x));
   47|       |#else
   48|       |      uint32_t hi = static_cast<uint32_t>(x >> 32);
   49|       |      uint32_t lo = static_cast<uint32_t>(x);
   50|       |
   51|       |      hi = reverse_bytes(hi);
   52|       |      lo = reverse_bytes(lo);
   53|       |
   54|       |      return (static_cast<T>(lo) << 32) | hi;
   55|       |#endif
   56|       |   }
   57|  1.24k|}
_ZN5Botan13reverse_bytesITkNSt3__117unsigned_integralEtQooooooeqstT_Li1EeqstS2_Li2EeqstS2_Li4EeqstS2_Li8EEES2_S2_:
   27|  31.6k|inline constexpr T reverse_bytes(T x) {
   28|       |   if constexpr(sizeof(T) == 1) {
   29|       |      return x;
   30|  31.6k|   } else if constexpr(sizeof(T) == 2) {
   31|  31.6k|#if BOTAN_COMPILER_HAS_BUILTIN(__builtin_bswap16)
   32|  31.6k|      return static_cast<T>(__builtin_bswap16(x));
   33|       |#else
   34|       |      return static_cast<T>((x << 8) | (x >> 8));
   35|       |#endif
   36|       |   } else if constexpr(sizeof(T) == 4) {
   37|       |#if BOTAN_COMPILER_HAS_BUILTIN(__builtin_bswap32)
   38|       |      return static_cast<T>(__builtin_bswap32(x));
   39|       |#else
   40|       |      // MSVC at least recognizes this as a bswap
   41|       |      return static_cast<T>(((x & 0x000000FF) << 24) | ((x & 0x0000FF00) << 8) | ((x & 0x00FF0000) >> 8) |
   42|       |                            ((x & 0xFF000000) >> 24));
   43|       |#endif
   44|       |   } else if constexpr(sizeof(T) == 8) {
   45|       |#if BOTAN_COMPILER_HAS_BUILTIN(__builtin_bswap64)
   46|       |      return static_cast<T>(__builtin_bswap64(x));
   47|       |#else
   48|       |      uint32_t hi = static_cast<uint32_t>(x >> 32);
   49|       |      uint32_t lo = static_cast<uint32_t>(x);
   50|       |
   51|       |      hi = reverse_bytes(hi);
   52|       |      lo = reverse_bytes(lo);
   53|       |
   54|       |      return (static_cast<T>(lo) << 32) | hi;
   55|       |#endif
   56|       |   }
   57|  31.6k|}
_ZN5Botan13reverse_bytesITkNSt3__117unsigned_integralEmQooooooeqstT_Li1EeqstS2_Li2EeqstS2_Li4EeqstS2_Li8EEES2_S2_:
   27|    126|inline constexpr T reverse_bytes(T x) {
   28|       |   if constexpr(sizeof(T) == 1) {
   29|       |      return x;
   30|       |   } else if constexpr(sizeof(T) == 2) {
   31|       |#if BOTAN_COMPILER_HAS_BUILTIN(__builtin_bswap16)
   32|       |      return static_cast<T>(__builtin_bswap16(x));
   33|       |#else
   34|       |      return static_cast<T>((x << 8) | (x >> 8));
   35|       |#endif
   36|       |   } else if constexpr(sizeof(T) == 4) {
   37|       |#if BOTAN_COMPILER_HAS_BUILTIN(__builtin_bswap32)
   38|       |      return static_cast<T>(__builtin_bswap32(x));
   39|       |#else
   40|       |      // MSVC at least recognizes this as a bswap
   41|       |      return static_cast<T>(((x & 0x000000FF) << 24) | ((x & 0x0000FF00) << 8) | ((x & 0x00FF0000) >> 8) |
   42|       |                            ((x & 0xFF000000) >> 24));
   43|       |#endif
   44|    126|   } else if constexpr(sizeof(T) == 8) {
   45|    126|#if BOTAN_COMPILER_HAS_BUILTIN(__builtin_bswap64)
   46|    126|      return static_cast<T>(__builtin_bswap64(x));
   47|       |#else
   48|       |      uint32_t hi = static_cast<uint32_t>(x >> 32);
   49|       |      uint32_t lo = static_cast<uint32_t>(x);
   50|       |
   51|       |      hi = reverse_bytes(hi);
   52|       |      lo = reverse_bytes(lo);
   53|       |
   54|       |      return (static_cast<T>(lo) << 32) | hi;
   55|       |#endif
   56|    126|   }
   57|    126|}

_ZN5Botan12BufferSlicerC2ENSt3__14spanIKhLm18446744073709551615EEE:
   25|    951|      explicit BufferSlicer(std::span<const uint8_t> buffer) : m_remaining(buffer) {}
_ZN5Botan12BufferSlicer4takeEm:
   37|  4.72k|      std::span<const uint8_t> take(const size_t count) {
   38|  4.72k|         BOTAN_STATE_CHECK(remaining() >= count);
  ------------------
  |  |   51|  4.72k|   do {                                                         \
  |  |   52|  4.72k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */             \
  |  |   53|  4.72k|      if(!(expr)) {                                             \
  |  |  ------------------
  |  |  |  Branch (53:10): [True: 0, False: 4.72k]
  |  |  ------------------
  |  |   54|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */    \
  |  |   55|      0|         Botan::throw_invalid_state(#expr, __func__, __FILE__); \
  |  |   56|      0|      }                                                         \
  |  |   57|  4.72k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (57:12): [Folded, False: 4.72k]
  |  |  ------------------
  ------------------
   39|  4.72k|         auto result = m_remaining.first(count);
   40|  4.72k|         m_remaining = m_remaining.subspan(count);
   41|  4.72k|         return result;
   42|  4.72k|      }
_ZNK5Botan12BufferSlicer9remainingEv:
   66|  5.34k|      size_t remaining() const { return m_remaining.size(); }
_ZN5Botan12BufferSlicer9take_byteEv:
   57|  4.32k|      uint8_t take_byte() { return take(1)[0]; }
_ZNK5Botan12BufferSlicer5emptyEv:
   68|  8.80k|      bool empty() const { return m_remaining.empty(); }

_ZN5Botan5CPUID3hasENS_10CPUFeatureE:
   94|    314|      static bool has(CPUID::Feature feat) { return state().has_bit(feat.as_u32()); }
_ZN5Botan5CPUID5stateEv:
  156|    314|      static CPUID_Data& state() {
  157|    314|         static CPUID::CPUID_Data g_cpuid;
  158|    314|         return g_cpuid;
  159|    314|      }
_ZNK5Botan5CPUID10CPUID_Data7has_bitEj:
  144|    314|            bool has_bit(uint32_t bit) const { return (m_processor_features & bit) == bit; }
_ZN5Botan5CPUID6is_setEjNS_10CPUFeatureE:
  127|      4|      static inline bool is_set(uint32_t allowed, CPUID::Feature bit) {
  128|      4|         const uint32_t feat_bit = bit.as_u32();
  129|      4|         return ((allowed & feat_bit) == feat_bit);
  130|      4|      }
cpuid_x86.cpp:_ZN5Botan5CPUID6if_setIZNS0_10CPUID_Data19detect_cpu_featuresEjE16x86_CPUID_1_bitsEEjmT_NS_10CPUFeatureEj:
  117|      6|      static inline uint32_t if_set(uint64_t cpuid, T flag, CPUID::Feature bit, uint32_t allowed) {
  118|      6|         const uint64_t flag64 = static_cast<uint64_t>(flag);
  119|      6|         if((cpuid & flag64) == flag64) {
  ------------------
  |  Branch (119:13): [True: 6, False: 0]
  ------------------
  120|      6|            return (bit.as_u32() & allowed);
  121|      6|         } else {
  122|      0|            return 0;
  123|      0|         }
  124|      6|      }
cpuid_x86.cpp:_ZN5Botan5CPUID6if_setIZNS0_10CPUID_Data19detect_cpu_featuresEjE16x86_CPUID_7_bitsEEjmT_NS_10CPUFeatureEj:
  117|      8|      static inline uint32_t if_set(uint64_t cpuid, T flag, CPUID::Feature bit, uint32_t allowed) {
  118|      8|         const uint64_t flag64 = static_cast<uint64_t>(flag);
  119|      8|         if((cpuid & flag64) == flag64) {
  ------------------
  |  Branch (119:13): [True: 5, False: 3]
  ------------------
  120|      5|            return (bit.as_u32() & allowed);
  121|      5|         } else {
  122|      3|            return 0;
  123|      3|         }
  124|      8|      }
cpuid_x86.cpp:_ZN5Botan5CPUID6if_setIZNS0_10CPUID_Data19detect_cpu_featuresEjE18x86_CPUID_7_1_bitsEEjmT_NS_10CPUFeatureEj:
  117|      3|      static inline uint32_t if_set(uint64_t cpuid, T flag, CPUID::Feature bit, uint32_t allowed) {
  118|      3|         const uint64_t flag64 = static_cast<uint64_t>(flag);
  119|      3|         if((cpuid & flag64) == flag64) {
  ------------------
  |  Branch (119:13): [True: 0, False: 3]
  ------------------
  120|      0|            return (bit.as_u32() & allowed);
  121|      3|         } else {
  122|      3|            return 0;
  123|      3|         }
  124|      3|      }

_ZNK5Botan10CPUFeature6as_u32Ev:
   53|    329|      uint32_t as_u32() const { return static_cast<uint32_t>(m_bit); }
_ZN5Botan10CPUFeatureC2ENS0_3BitE:
   51|    335|      CPUFeature(Bit b) : m_bit(b) {}  // NOLINT(*-explicit-conversions)

_ZN5Botan3fmtIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEES7_NS1_17basic_string_viewIcS4_EEDpRKT_:
   53|     86|std::string fmt(std::string_view format, const T&... args) {
   54|     86|   std::ostringstream oss;
   55|     86|   oss.imbue(std::locale::classic());
   56|     86|   fmt_detail::do_fmt(oss, format, args...);
   57|     86|   return oss.str();
   58|     86|}
_ZN5Botan10fmt_detail6do_fmtINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEJEEEvRNS2_19basic_ostringstreamIcS5_S7_EENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|     86|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|     86|   size_t i = 0;
   27|       |
   28|  1.89k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 1.89k, False: 0]
  ------------------
   29|  1.89k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 86, False: 1.80k]
  |  Branch (29:30): [True: 86, False: 0]
  |  Branch (29:59): [True: 86, False: 0]
  ------------------
   30|     86|         oss << val;
   31|     86|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  1.80k|      } else {
   33|  1.80k|         oss << format[i];
   34|  1.80k|      }
   35|       |
   36|  1.80k|      i += 1;
   37|  1.80k|   }
   38|     86|}
_ZN5Botan10fmt_detail6do_fmtERNSt3__119basic_ostringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_17basic_string_viewIcS4_EE:
   20|  1.75k|inline void do_fmt(std::ostringstream& oss, std::string_view format) {
   21|  1.75k|   oss << format;
   22|  1.75k|}
_ZN5Botan3fmtIJmmEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_17basic_string_viewIcS4_EEDpRKT_:
   53|    434|std::string fmt(std::string_view format, const T&... args) {
   54|    434|   std::ostringstream oss;
   55|    434|   oss.imbue(std::locale::classic());
   56|    434|   fmt_detail::do_fmt(oss, format, args...);
   57|    434|   return oss.str();
   58|    434|}
_ZN5Botan10fmt_detail6do_fmtImJmEEEvRNSt3__119basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|    434|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|    434|   size_t i = 0;
   27|       |
   28|  4.34k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 4.34k, False: 0]
  ------------------
   29|  4.34k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 434, False: 3.90k]
  |  Branch (29:30): [True: 434, False: 0]
  |  Branch (29:59): [True: 434, False: 0]
  ------------------
   30|    434|         oss << val;
   31|    434|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  3.90k|      } else {
   33|  3.90k|         oss << format[i];
   34|  3.90k|      }
   35|       |
   36|  3.90k|      i += 1;
   37|  3.90k|   }
   38|    434|}
_ZN5Botan10fmt_detail6do_fmtImJEEEvRNSt3__119basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|    434|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|    434|   size_t i = 0;
   27|       |
   28|  10.4k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 10.4k, False: 0]
  ------------------
   29|  10.4k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 434, False: 9.98k]
  |  Branch (29:30): [True: 434, False: 0]
  |  Branch (29:59): [True: 434, False: 0]
  ------------------
   30|    434|         oss << val;
   31|    434|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  9.98k|      } else {
   33|  9.98k|         oss << format[i];
   34|  9.98k|      }
   35|       |
   36|  9.98k|      i += 1;
   37|  9.98k|   }
   38|    434|}
_ZN5Botan3fmtIJPKcNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEEEENS3_12basic_stringIcS6_NS3_9allocatorIcEEEES7_DpRKT_:
   53|    568|std::string fmt(std::string_view format, const T&... args) {
   54|    568|   std::ostringstream oss;
   55|    568|   oss.imbue(std::locale::classic());
   56|    568|   fmt_detail::do_fmt(oss, format, args...);
   57|    568|   return oss.str();
   58|    568|}
_ZN5Botan10fmt_detail6do_fmtIPKcJNSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEEEEvRNS4_19basic_ostringstreamIcS7_NS4_9allocatorIcEEEES8_RKT_DpRKT0_:
   25|    568|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|    568|   size_t i = 0;
   27|       |
   28|  5.11k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 5.11k, False: 0]
  ------------------
   29|  5.11k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 568, False: 4.54k]
  |  Branch (29:30): [True: 568, False: 0]
  |  Branch (29:59): [True: 568, False: 0]
  ------------------
   30|    568|         oss << val;
   31|    568|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  4.54k|      } else {
   33|  4.54k|         oss << format[i];
   34|  4.54k|      }
   35|       |
   36|  4.54k|      i += 1;
   37|  4.54k|   }
   38|    568|}
_ZN5Botan10fmt_detail6do_fmtINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEJEEEvRNS2_19basic_ostringstreamIcS5_NS2_9allocatorIcEEEES6_RKT_DpRKT0_:
   25|  1.12k|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|  1.12k|   size_t i = 0;
   27|       |
   28|  5.01k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 5.01k, False: 0]
  ------------------
   29|  5.01k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 1.12k, False: 3.89k]
  |  Branch (29:30): [True: 1.12k, False: 0]
  |  Branch (29:59): [True: 1.12k, False: 0]
  ------------------
   30|  1.12k|         oss << val;
   31|  1.12k|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  3.89k|      } else {
   33|  3.89k|         oss << format[i];
   34|  3.89k|      }
   35|       |
   36|  3.89k|      i += 1;
   37|  3.89k|   }
   38|  1.12k|}
_ZN5Botan3fmtIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEEENS1_12basic_stringIcS4_NS1_9allocatorIcEEEES5_DpRKT_:
   53|    552|std::string fmt(std::string_view format, const T&... args) {
   54|    552|   std::ostringstream oss;
   55|    552|   oss.imbue(std::locale::classic());
   56|    552|   fmt_detail::do_fmt(oss, format, args...);
   57|    552|   return oss.str();
   58|    552|}
_ZN5Botan3fmtIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEjEEENS1_12basic_stringIcS4_NS1_9allocatorIcEEEES5_DpRKT_:
   53|     34|std::string fmt(std::string_view format, const T&... args) {
   54|     34|   std::ostringstream oss;
   55|     34|   oss.imbue(std::locale::classic());
   56|     34|   fmt_detail::do_fmt(oss, format, args...);
   57|     34|   return oss.str();
   58|     34|}
_ZN5Botan10fmt_detail6do_fmtINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEJjEEEvRNS2_19basic_ostringstreamIcS5_NS2_9allocatorIcEEEES6_RKT_DpRKT0_:
   25|     34|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|     34|   size_t i = 0;
   27|       |
   28|     34|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 34, False: 0]
  ------------------
   29|     34|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 34, False: 0]
  |  Branch (29:30): [True: 34, False: 0]
  |  Branch (29:59): [True: 34, False: 0]
  ------------------
   30|     34|         oss << val;
   31|     34|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|     34|      } else {
   33|      0|         oss << format[i];
   34|      0|      }
   35|       |
   36|      0|      i += 1;
   37|      0|   }
   38|     34|}
_ZN5Botan10fmt_detail6do_fmtIjJEEEvRNSt3__119basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|    112|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|    112|   size_t i = 0;
   27|       |
   28|    258|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 258, False: 0]
  ------------------
   29|    258|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 112, False: 146]
  |  Branch (29:30): [True: 112, False: 0]
  |  Branch (29:59): [True: 112, False: 0]
  ------------------
   30|    112|         oss << val;
   31|    112|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|    146|      } else {
   33|    146|         oss << format[i];
   34|    146|      }
   35|       |
   36|    146|      i += 1;
   37|    146|   }
   38|    112|}
_ZN5Botan3fmtIJjjEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_17basic_string_viewIcS4_EEDpRKT_:
   53|     78|std::string fmt(std::string_view format, const T&... args) {
   54|     78|   std::ostringstream oss;
   55|     78|   oss.imbue(std::locale::classic());
   56|     78|   fmt_detail::do_fmt(oss, format, args...);
   57|     78|   return oss.str();
   58|     78|}
_ZN5Botan10fmt_detail6do_fmtIjJjEEEvRNSt3__119basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|     78|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|     78|   size_t i = 0;
   27|       |
   28|  2.65k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 2.65k, False: 0]
  ------------------
   29|  2.65k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 78, False: 2.57k]
  |  Branch (29:30): [True: 78, False: 0]
  |  Branch (29:59): [True: 78, False: 0]
  ------------------
   30|     78|         oss << val;
   31|     78|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  2.57k|      } else {
   33|  2.57k|         oss << format[i];
   34|  2.57k|      }
   35|       |
   36|  2.57k|      i += 1;
   37|  2.57k|   }
   38|     78|}

_ZN5Botan11checked_mulITkNSt3__117unsigned_integralEmEENS1_8optionalIT_EES3_S3_:
   46|  1.76k|constexpr inline std::optional<T> checked_mul(T a, T b) {
   47|       |   // Multiplication by 1U is a hack to work around C's insane
   48|       |   // integer promotion rules.
   49|       |   // https://stackoverflow.com/questions/24795651
   50|  1.76k|   const T r = (1U * a) * b;
   51|       |   // If a == 0 then the multiply certainly did not overflow
   52|       |   // Otherwise r / a == b unless overflow occurred
   53|  1.76k|   if(a != 0 && r / a != b) {
  ------------------
  |  Branch (53:7): [True: 1.76k, False: 0]
  |  Branch (53:17): [True: 0, False: 1.76k]
  ------------------
   54|      0|      return {};
   55|      0|   }
   56|  1.76k|   return r;
   57|  1.76k|}

_ZN5Botan6detail9store_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEjTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm4EEEQnt15custom_storableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEEvS9_OT1_:
  525|  1.00k|inline constexpr void store_any(WrappedInT wrapped_in, OutR&& out_range) {
  526|  1.00k|   const auto in = detail::unwrap_strong_type_or_enum(wrapped_in);
  527|  1.00k|   using InT = decltype(in);
  528|  1.00k|   ranges::assert_exact_byte_length<sizeof(in)>(out_range);
  529|  1.00k|   const std::span out{out_range};
  530|       |
  531|       |   // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  532|       |   // internally to copy ranges on a byte-by-byte basis, which is not allowed
  533|       |   // in a `constexpr` context.
  534|  1.00k|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (534:7): [Folded, False: 1.00k]
  ------------------
  535|      0|      return fallback_store_any<endianness, InT>(in, std::forward<OutR>(out_range));
  536|  1.00k|   } else {
  537|       |      if constexpr(sizeof(InT) == 1) {
  538|       |         out[0] = static_cast<uint8_t>(in);
  539|       |      } else if constexpr(endianness == std::endian::native) {
  540|       |         typecast_copy(out, in);
  541|  1.00k|      } else {
  542|  1.00k|         static_assert(opposite(endianness) == std::endian::native);
  543|  1.00k|         typecast_copy(out, reverse_bytes(in));
  544|  1.00k|      }
  545|  1.00k|   }
  546|  1.00k|}
_ZN5Botan6detail26unwrap_strong_type_or_enumITkNS0_20unsigned_integralishEjEEDaT_:
  190|  1.00k|constexpr auto unwrap_strong_type_or_enum(InT t) {
  191|       |   if constexpr(std::is_enum_v<InT>) {
  192|       |      // TODO: C++23: use std::to_underlying(in) instead
  193|       |      return static_cast<std::underlying_type_t<InT>>(t);
  194|  1.00k|   } else {
  195|  1.00k|      return Botan::unwrap_strong_type(t);
  196|  1.00k|   }
  197|  1.00k|}
_ZN5Botan7load_beIhJPKhRmEEEDaDpOT0_:
  504|   788k|inline constexpr auto load_be(ParamTs&&... params) {
  505|   788k|   return detail::load_any<std::endian::big, OutT>(std::forward<ParamTs>(params)...);
  506|   788k|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEhEET0_PKhm:
  454|   788k|inline constexpr OutT load_any(const uint8_t in[], size_t off) {
  455|       |   // asserts that *in points to enough bytes to read at offset off
  456|   788k|   constexpr size_t out_size = sizeof(OutT);
  457|   788k|   return load_any<endianness, OutT>(std::span<const uint8_t, out_size>(in + off * out_size, out_size));
  458|   788k|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEhTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm1EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_:
  278|   788k|inline constexpr WrappedOutT load_any(InR&& in_range) {
  279|   788k|   using OutT = detail::wrapped_type<WrappedOutT>;
  280|   788k|   ranges::assert_exact_byte_length<sizeof(OutT)>(in_range);
  281|       |
  282|   788k|   return detail::wrap_strong_type_or_enum<WrappedOutT>([&]() -> OutT {
  283|       |      // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  284|       |      // internally to copy ranges on a byte-by-byte basis, which is not allowed
  285|       |      // in a `constexpr` context.
  286|   788k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  287|   788k|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|   788k|      } else {
  289|   788k|         const std::span in{in_range};
  290|   788k|         if constexpr(sizeof(OutT) == 1) {
  291|   788k|            return static_cast<OutT>(in[0]);
  292|   788k|         } else if constexpr(endianness == std::endian::native) {
  293|   788k|            return typecast_copy<OutT>(in);
  294|   788k|         } else {
  295|   788k|            static_assert(opposite(endianness) == std::endian::native);
  296|   788k|            return reverse_bytes(typecast_copy<OutT>(in));
  297|   788k|         }
  298|   788k|      }
  299|   788k|   }());
  300|   788k|}
_ZN5Botan6detail24wrap_strong_type_or_enumITkNS0_20unsigned_integralishEhTkNSt3__117unsigned_integralEhEEDaT0_:
  200|   788k|constexpr auto wrap_strong_type_or_enum(T t) {
  201|       |   if constexpr(std::is_enum_v<OutT>) {
  202|       |      return static_cast<OutT>(t);
  203|   788k|   } else {
  204|   788k|      return Botan::wrap_strong_type<OutT>(t);
  205|   788k|   }
  206|   788k|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEhTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm1EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_ENKUlvE_clEv:
  282|   788k|   return detail::wrap_strong_type_or_enum<WrappedOutT>([&]() -> OutT {
  283|       |      // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  284|       |      // internally to copy ranges on a byte-by-byte basis, which is not allowed
  285|       |      // in a `constexpr` context.
  286|   788k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (286:10): [Folded, False: 788k]
  ------------------
  287|      0|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|   788k|      } else {
  289|   788k|         const std::span in{in_range};
  290|   788k|         if constexpr(sizeof(OutT) == 1) {
  291|   788k|            return static_cast<OutT>(in[0]);
  292|       |         } else if constexpr(endianness == std::endian::native) {
  293|       |            return typecast_copy<OutT>(in);
  294|       |         } else {
  295|       |            static_assert(opposite(endianness) == std::endian::native);
  296|       |            return reverse_bytes(typecast_copy<OutT>(in));
  297|       |         }
  298|   788k|      }
  299|   788k|   }());
_ZN5Botan11make_uint16Ehh:
   92|  50.5k|inline constexpr uint16_t make_uint16(uint8_t i0, uint8_t i1) {
   93|  50.5k|   return static_cast<uint16_t>((static_cast<uint16_t>(i0) << 8) | i1);
   94|  50.5k|}
_ZN5Botan11make_uint32Ehhhh:
  104|  3.84k|inline constexpr uint32_t make_uint32(uint8_t i0, uint8_t i1, uint8_t i2, uint8_t i3) {
  105|  3.84k|   return ((static_cast<uint32_t>(i0) << 24) | (static_cast<uint32_t>(i1) << 16) | (static_cast<uint32_t>(i2) << 8) |
  106|  3.84k|           (static_cast<uint32_t>(i3)));
  107|  3.84k|}
_ZN5Botan7load_beItJPKhRmEEEDaDpOT0_:
  504|  31.0k|inline constexpr auto load_be(ParamTs&&... params) {
  505|  31.0k|   return detail::load_any<std::endian::big, OutT>(std::forward<ParamTs>(params)...);
  506|  31.0k|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEtEET0_PKhm:
  454|  31.6k|inline constexpr OutT load_any(const uint8_t in[], size_t off) {
  455|       |   // asserts that *in points to enough bytes to read at offset off
  456|  31.6k|   constexpr size_t out_size = sizeof(OutT);
  457|  31.6k|   return load_any<endianness, OutT>(std::span<const uint8_t, out_size>(in + off * out_size, out_size));
  458|  31.6k|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEtTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm2EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_:
  278|  31.6k|inline constexpr WrappedOutT load_any(InR&& in_range) {
  279|  31.6k|   using OutT = detail::wrapped_type<WrappedOutT>;
  280|  31.6k|   ranges::assert_exact_byte_length<sizeof(OutT)>(in_range);
  281|       |
  282|  31.6k|   return detail::wrap_strong_type_or_enum<WrappedOutT>([&]() -> OutT {
  283|       |      // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  284|       |      // internally to copy ranges on a byte-by-byte basis, which is not allowed
  285|       |      // in a `constexpr` context.
  286|  31.6k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  287|  31.6k|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|  31.6k|      } else {
  289|  31.6k|         const std::span in{in_range};
  290|  31.6k|         if constexpr(sizeof(OutT) == 1) {
  291|  31.6k|            return static_cast<OutT>(in[0]);
  292|  31.6k|         } else if constexpr(endianness == std::endian::native) {
  293|  31.6k|            return typecast_copy<OutT>(in);
  294|  31.6k|         } else {
  295|  31.6k|            static_assert(opposite(endianness) == std::endian::native);
  296|  31.6k|            return reverse_bytes(typecast_copy<OutT>(in));
  297|  31.6k|         }
  298|  31.6k|      }
  299|  31.6k|   }());
  300|  31.6k|}
_ZN5Botan6detail24wrap_strong_type_or_enumITkNS0_20unsigned_integralishEtTkNSt3__117unsigned_integralEtEEDaT0_:
  200|  31.6k|constexpr auto wrap_strong_type_or_enum(T t) {
  201|       |   if constexpr(std::is_enum_v<OutT>) {
  202|       |      return static_cast<OutT>(t);
  203|  31.6k|   } else {
  204|  31.6k|      return Botan::wrap_strong_type<OutT>(t);
  205|  31.6k|   }
  206|  31.6k|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEtTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm2EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_ENKUlvE_clEv:
  282|  31.6k|   return detail::wrap_strong_type_or_enum<WrappedOutT>([&]() -> OutT {
  283|       |      // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  284|       |      // internally to copy ranges on a byte-by-byte basis, which is not allowed
  285|       |      // in a `constexpr` context.
  286|  31.6k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (286:10): [Folded, False: 31.6k]
  ------------------
  287|      0|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|  31.6k|      } else {
  289|  31.6k|         const std::span in{in_range};
  290|       |         if constexpr(sizeof(OutT) == 1) {
  291|       |            return static_cast<OutT>(in[0]);
  292|       |         } else if constexpr(endianness == std::endian::native) {
  293|       |            return typecast_copy<OutT>(in);
  294|  31.6k|         } else {
  295|  31.6k|            static_assert(opposite(endianness) == std::endian::native);
  296|  31.6k|            return reverse_bytes(typecast_copy<OutT>(in));
  297|  31.6k|         }
  298|  31.6k|      }
  299|  31.6k|   }());
_ZN5Botan8store_beINS_6detail10AutoDetectEJRKmPhEEEDaDpOT0_:
  745|    126|inline constexpr auto store_be(ParamTs&&... params) {
  746|    126|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|    126|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS0_20unsigned_integralishEmQoosr3stdE7same_asIS4_T0_Esr3stdE7same_asIT1_S5_EEEvS6_Ph:
  711|    126|inline constexpr void store_any(T in, uint8_t out[]) {
  712|       |   // asserts that *out points to enough bytes to write into
  713|    126|   store_any<endianness, InT>(in, std::span<uint8_t, sizeof(T)>(out, sizeof(T)));
  714|    126|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS0_20unsigned_integralishEmTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm8EEEQsr3stdE7same_asIS4_T0_EEEvT1_OT2_:
  646|    126|inline constexpr void store_any(T in, OutR&& out_range) {
  647|    126|   store_any<endianness, T>(in, std::forward<OutR>(out_range));
  648|    126|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEmTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm8EEEQnt15custom_storableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEEvS9_OT1_:
  525|    126|inline constexpr void store_any(WrappedInT wrapped_in, OutR&& out_range) {
  526|    126|   const auto in = detail::unwrap_strong_type_or_enum(wrapped_in);
  527|    126|   using InT = decltype(in);
  528|    126|   ranges::assert_exact_byte_length<sizeof(in)>(out_range);
  529|    126|   const std::span out{out_range};
  530|       |
  531|       |   // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  532|       |   // internally to copy ranges on a byte-by-byte basis, which is not allowed
  533|       |   // in a `constexpr` context.
  534|    126|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (534:7): [Folded, False: 126]
  ------------------
  535|      0|      return fallback_store_any<endianness, InT>(in, std::forward<OutR>(out_range));
  536|    126|   } else {
  537|       |      if constexpr(sizeof(InT) == 1) {
  538|       |         out[0] = static_cast<uint8_t>(in);
  539|       |      } else if constexpr(endianness == std::endian::native) {
  540|       |         typecast_copy(out, in);
  541|    126|      } else {
  542|    126|         static_assert(opposite(endianness) == std::endian::native);
  543|    126|         typecast_copy(out, reverse_bytes(in));
  544|    126|      }
  545|    126|   }
  546|    126|}
_ZN5Botan6detail26unwrap_strong_type_or_enumITkNS0_20unsigned_integralishEmEEDaT_:
  190|    126|constexpr auto unwrap_strong_type_or_enum(InT t) {
  191|       |   if constexpr(std::is_enum_v<InT>) {
  192|       |      // TODO: C++23: use std::to_underlying(in) instead
  193|       |      return static_cast<std::underlying_type_t<InT>>(t);
  194|    126|   } else {
  195|    126|      return Botan::unwrap_strong_type(t);
  196|    126|   }
  197|    126|}
_ZN5Botan6detail24wrap_strong_type_or_enumITkNS0_20unsigned_integralishEjTkNSt3__117unsigned_integralEjEEDaT0_:
  200|    236|constexpr auto wrap_strong_type_or_enum(T t) {
  201|       |   if constexpr(std::is_enum_v<OutT>) {
  202|       |      return static_cast<OutT>(t);
  203|    236|   } else {
  204|    236|      return Botan::wrap_strong_type<OutT>(t);
  205|    236|   }
  206|    236|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEjTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm4EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_:
  278|    236|inline constexpr WrappedOutT load_any(InR&& in_range) {
  279|    236|   using OutT = detail::wrapped_type<WrappedOutT>;
  280|    236|   ranges::assert_exact_byte_length<sizeof(OutT)>(in_range);
  281|       |
  282|    236|   return detail::wrap_strong_type_or_enum<WrappedOutT>([&]() -> OutT {
  283|       |      // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  284|       |      // internally to copy ranges on a byte-by-byte basis, which is not allowed
  285|       |      // in a `constexpr` context.
  286|    236|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  287|    236|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|    236|      } else {
  289|    236|         const std::span in{in_range};
  290|    236|         if constexpr(sizeof(OutT) == 1) {
  291|    236|            return static_cast<OutT>(in[0]);
  292|    236|         } else if constexpr(endianness == std::endian::native) {
  293|    236|            return typecast_copy<OutT>(in);
  294|    236|         } else {
  295|    236|            static_assert(opposite(endianness) == std::endian::native);
  296|    236|            return reverse_bytes(typecast_copy<OutT>(in));
  297|    236|         }
  298|    236|      }
  299|    236|   }());
  300|    236|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEjTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm4EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_ENKUlvE_clEv:
  282|    236|   return detail::wrap_strong_type_or_enum<WrappedOutT>([&]() -> OutT {
  283|       |      // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  284|       |      // internally to copy ranges on a byte-by-byte basis, which is not allowed
  285|       |      // in a `constexpr` context.
  286|    236|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (286:10): [Folded, False: 236]
  ------------------
  287|      0|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|    236|      } else {
  289|    236|         const std::span in{in_range};
  290|       |         if constexpr(sizeof(OutT) == 1) {
  291|       |            return static_cast<OutT>(in[0]);
  292|       |         } else if constexpr(endianness == std::endian::native) {
  293|       |            return typecast_copy<OutT>(in);
  294|    236|         } else {
  295|    236|            static_assert(opposite(endianness) == std::endian::native);
  296|    236|            return reverse_bytes(typecast_copy<OutT>(in));
  297|    236|         }
  298|    236|      }
  299|    236|   }());
_ZN5Botan11copy_out_beITkNS_6ranges14spanable_rangeENSt3__16vectorIjNS_16secure_allocatorIjEEEEEEvNS2_4spanIhLm18446744073709551615EEERKT_:
  773|    126|inline void copy_out_be(std::span<uint8_t> out, const InR& in) {
  774|    126|   using T = std::ranges::range_value_t<InR>;
  775|    126|   std::span<const T> in_s{in};
  776|    126|   const auto remaining_bytes = detail::copy_out_any_word_aligned_portion<std::endian::big>(out, in_s);
  777|       |
  778|       |   // copy remaining bytes as a partial word
  779|    126|   for(size_t i = 0; i < remaining_bytes; ++i) {
  ------------------
  |  Branch (779:22): [True: 0, False: 126]
  ------------------
  780|      0|      out[i] = get_byte_var(i, in_s.front());
  781|      0|   }
  782|    126|}
_ZN5Botan6detail33copy_out_any_word_aligned_portionILNSt3__16endianE64206ETkNS0_20unsigned_integralishEjEEmRNS2_4spanIhLm18446744073709551615EEERNS4_IKT0_Lm18446744073709551615EEE:
  752|    126|inline size_t copy_out_any_word_aligned_portion(std::span<uint8_t>& out, std::span<const T>& in) {
  753|    126|   const size_t full_words = out.size() / sizeof(T);
  754|    126|   const size_t full_word_bytes = full_words * sizeof(T);
  755|    126|   const size_t remaining_bytes = out.size() - full_word_bytes;
  756|    126|   BOTAN_ASSERT_NOMSG(in.size_bytes() >= full_word_bytes + remaining_bytes);
  ------------------
  |  |   77|    126|   do {                                                                     \
  |  |   78|    126|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|    126|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 126]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|    126|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 126]
  |  |  ------------------
  ------------------
  757|       |
  758|       |   // copy full words
  759|    126|   store_any<endianness, T>(out.first(full_word_bytes), in.first(full_words));
  760|    126|   out = out.subspan(full_word_bytes);
  761|    126|   in = in.subspan(full_words);
  762|       |
  763|    126|   return remaining_bytes;
  764|    126|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206EjTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm18446744073709551615EEETkNS4_14spanable_rangeENS6_IKjLm18446744073709551615EEEQoosr3stdE7same_asINS0_10AutoDetectET0_Esr3stdE7same_asISB_NS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT2_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISJ_EESK_E4type10value_typeEEEEvOT1_RKSG_:
  603|    126|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  604|    126|   ranges::assert_equal_byte_lengths(out, in);
  605|    126|   using element_type = std::ranges::range_value_t<InR>;
  606|       |
  607|    126|   auto store_elementwise = [&] {
  608|    126|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|    126|      std::span<uint8_t> out_s(out);
  610|    126|      for(auto in_elem : in) {
  611|    126|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|    126|         out_s = out_s.subspan(bytes_per_element);
  613|    126|      }
  614|    126|   };
  615|       |
  616|       |   // At compile time we cannot use `typecast_copy` as it uses `std::memcpy`
  617|       |   // internally to copy ranges on a byte-by-byte basis, which is not allowed
  618|       |   // in a `constexpr` context.
  619|    126|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (619:7): [Folded, False: 126]
  ------------------
  620|      0|      store_elementwise();
  621|    126|   } else {
  622|       |      if constexpr(endianness == std::endian::native && !custom_storable<element_type>) {
  623|       |         typecast_copy(out, in);
  624|    126|      } else {
  625|    126|         store_elementwise();
  626|    126|      }
  627|    126|   }
  628|    126|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206EjTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm18446744073709551615EEETkNS4_14spanable_rangeENS6_IKjLm18446744073709551615EEEQoosr3stdE7same_asINS0_10AutoDetectET0_Esr3stdE7same_asISB_NS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT2_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISJ_EESK_E4type10value_typeEEEEvOT1_RKSG_ENKUlvE_clEv:
  607|    126|   auto store_elementwise = [&] {
  608|    126|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|    126|      std::span<uint8_t> out_s(out);
  610|  1.00k|      for(auto in_elem : in) {
  ------------------
  |  Branch (610:24): [True: 1.00k, False: 126]
  ------------------
  611|  1.00k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  1.00k|         out_s = out_s.subspan(bytes_per_element);
  613|  1.00k|      }
  614|    126|   };
_ZN5Botan6detail9store_anyILNSt3__16endianE64206EjTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm4EEETpTkNS0_20unsigned_integralishEJjEQaagtsZT2_Li0Eooaasr3stdE7same_asINS0_10AutoDetectET0_E10all_same_vIDpT2_Eaa20unsigned_integralishIS9_E10all_same_vIS9_SB_EEEvOT1_SB_:
  582|  1.00k|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, Ts... ins) {
  583|  1.00k|   ranges::assert_exact_byte_length<(sizeof(Ts) + ...)>(out);
  584|  1.00k|   auto store_one = [off = 0]<typename T>(auto o, T i) mutable {
  585|  1.00k|      store_any<endianness, T>(i, o.subspan(off).template first<sizeof(T)>());
  586|  1.00k|      off += sizeof(T);
  587|  1.00k|   };
  588|       |
  589|  1.00k|   (store_one(std::span{out}, ins), ...);
  590|  1.00k|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE64206EjTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm4EEETpTkNS0_20unsigned_integralishEJjEQaagtsZT2_Li0Eooaasr3stdE7same_asINS0_10AutoDetectET0_E10all_same_vIDpT2_Eaa20unsigned_integralishIS9_E10all_same_vIS9_SB_EEEvOT1_SB_ENUlTyS9_T_E_clIjS7_EEDaS9_SE_:
  584|  1.00k|   auto store_one = [off = 0]<typename T>(auto o, T i) mutable {
  585|  1.00k|      store_any<endianness, T>(i, o.subspan(off).template first<sizeof(T)>());
  586|  1.00k|      off += sizeof(T);
  587|  1.00k|   };
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEjEET0_PKhm:
  454|    236|inline constexpr OutT load_any(const uint8_t in[], size_t off) {
  455|       |   // asserts that *in points to enough bytes to read at offset off
  456|    236|   constexpr size_t out_size = sizeof(OutT);
  457|    236|   return load_any<endianness, OutT>(std::span<const uint8_t, out_size>(in + off * out_size, out_size));
  458|    236|}
_ZN5Botan7load_beItJRPKhRmEEEDaDpOT0_:
  504|    576|inline constexpr auto load_be(ParamTs&&... params) {
  505|    576|   return detail::load_any<std::endian::big, OutT>(std::forward<ParamTs>(params)...);
  506|    576|}
_ZN5Botan7load_beIjJRPKhRmEEEDaDpOT0_:
  504|    236|inline constexpr auto load_be(ParamTs&&... params) {
  505|    236|   return detail::load_any<std::endian::big, OutT>(std::forward<ParamTs>(params)...);
  506|    236|}

_ZN5Botan18MerkleDamgard_HashINS_7SHA_256EEC2Ev:
   42|    138|      MerkleDamgard_Hash() { clear(); }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_256EE5clearEv:
   70|    264|      void clear() {
   71|    264|         MD::init(m_digest);
   72|    264|         m_buffer.clear();
   73|    264|         m_count = 0;
   74|    264|      }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_256EE6updateENSt3__14spanIKhLm18446744073709551615EEE:
   44|    264|      void update(std::span<const uint8_t> input) {
   45|    264|         BufferSlicer in(input);
   46|       |
   47|    590|         while(!in.empty()) {
  ------------------
  |  Branch (47:16): [True: 326, False: 264]
  ------------------
   48|    326|            if(const auto one_block = m_buffer.handle_unaligned_data(in)) {
  ------------------
  |  Branch (48:27): [True: 69, False: 257]
  ------------------
   49|     69|               MD::compress_n(m_digest, one_block.value(), 1);
   50|     69|            }
   51|       |
   52|    326|            if(m_buffer.in_alignment()) {
  ------------------
  |  Branch (52:16): [True: 106, False: 220]
  ------------------
   53|    106|               const auto [aligned_data, full_blocks] = m_buffer.aligned_data_to_process(in);
   54|    106|               if(full_blocks > 0) {
  ------------------
  |  Branch (54:19): [True: 87, False: 19]
  ------------------
   55|     87|                  MD::compress_n(m_digest, aligned_data, full_blocks);
   56|     87|               }
   57|    106|            }
   58|    326|         }
   59|       |
   60|    264|         m_count += input.size();
   61|    264|      }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_256EE5finalENSt3__14spanIhLm18446744073709551615EEE:
   63|    126|      void final(std::span<uint8_t> output) {
   64|    126|         append_padding_bit();
   65|    126|         append_counter_and_finalize();
   66|    126|         copy_output(output);
   67|    126|         clear();
   68|    126|      }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_256EE18append_padding_bitEv:
   77|    126|      void append_padding_bit() {
   78|    126|         BOTAN_ASSERT_NOMSG(!m_buffer.ready_to_consume());
  ------------------
  |  |   77|    126|   do {                                                                     \
  |  |   78|    126|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|    126|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 126]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|    126|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 126]
  |  |  ------------------
  ------------------
   79|    126|         if constexpr(MD::bit_endianness == MD_Endian::Big) {
   80|    126|            const uint8_t final_byte = 0x80;
   81|    126|            m_buffer.append({&final_byte, 1});
   82|       |         } else {
   83|       |            const uint8_t final_byte = 0x01;
   84|       |            m_buffer.append({&final_byte, 1});
   85|       |         }
   86|    126|      }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_256EE27append_counter_and_finalizeEv:
   88|    126|      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|    126|         if(m_buffer.elements_until_alignment() < MD::ctr_bytes) {
  ------------------
  |  Branch (91:13): [True: 32, False: 94]
  ------------------
   92|     32|            m_buffer.fill_up_with_zeros();
   93|     32|            MD::compress_n(m_digest, m_buffer.consume(), 1);
   94|     32|         }
   95|       |
   96|       |         // Make sure that any remaining bytes in the very last block are zero.
   97|    126|         BOTAN_ASSERT_NOMSG(m_buffer.elements_until_alignment() >= MD::ctr_bytes);
  ------------------
  |  |   77|    126|   do {                                                                     \
  |  |   78|    126|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|    126|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 126]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|    126|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 126]
  |  |  ------------------
  ------------------
   98|    126|         m_buffer.fill_up_with_zeros();
   99|       |
  100|       |         // Replace a bunch of the right-most zero-padding with the counter bytes.
  101|    126|         const uint64_t bit_count = m_count * 8;
  102|    126|         auto last_bytes = m_buffer.directly_modify_last(sizeof(bit_count));
  103|    126|         if constexpr(MD::byte_endianness == MD_Endian::Big) {
  104|    126|            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|    126|         MD::compress_n(m_digest, m_buffer.consume(), 1);
  111|    126|      }
_ZN5Botan18MerkleDamgard_HashINS_7SHA_256EE11copy_outputENSt3__14spanIhLm18446744073709551615EEE:
  113|    126|      void copy_output(std::span<uint8_t> output) {
  114|    126|         BOTAN_ASSERT_NOMSG(output.size() >= MD::output_bytes);
  ------------------
  |  |   77|    126|   do {                                                                     \
  |  |   78|    126|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|    126|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 126]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|    126|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 126]
  |  |  ------------------
  ------------------
  115|       |
  116|    126|         if constexpr(MD::byte_endianness == MD_Endian::Big) {
  117|    126|            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|    126|      }

_ZN5Botan15bytes_to_stringENSt3__14spanIKhLm18446744073709551615EEE:
   76|  4.91k|inline std::string bytes_to_string(std::span<const uint8_t> bytes) {
   77|  4.91k|   return std::string(reinterpret_cast<const char*>(bytes.data()), bytes.size());
   78|  4.91k|}
_ZN5Botan14zeroize_bufferITkNSt3__117unsigned_integralEhEEvPT_m:
   37|    408|inline void zeroize_buffer(T buf[], size_t n) {
   38|    408|   if(n > 0) {
  ------------------
  |  Branch (38:7): [True: 408, False: 0]
  ------------------
   39|    408|      std::memset(buf, 0, sizeof(T) * n);
   40|    408|   }
   41|    408|}

_ZNK5Botan7SHA_25613output_lengthEv:
   75|    126|      size_t output_length() const override { return output_bytes; }

_ZN5Botan9SIMD_4x32C2EDv2_x:
  944|   326k|      explicit BOTAN_FN_ISA_SIMD_4X32 SIMD_4x32(native_simd_type x) noexcept : m_simd(x) {}
_ZN5Botan9SIMD_4x327load_beEPKv:
  189|  11.7k|      static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 load_be(const void* in) noexcept {
  190|  11.7k|#if defined(BOTAN_SIMD_USE_SSSE3) || defined(BOTAN_SIMD_USE_LSX) || defined(BOTAN_SIMD_USE_SIMD128)
  191|  11.7k|         return load_le(in).bswap();
  192|       |
  193|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  194|       |         uint32_t R0 = Botan::load_be<uint32_t>(reinterpret_cast<const uint8_t*>(in), 0);
  195|       |         uint32_t R1 = Botan::load_be<uint32_t>(reinterpret_cast<const uint8_t*>(in), 1);
  196|       |         uint32_t R2 = Botan::load_be<uint32_t>(reinterpret_cast<const uint8_t*>(in), 2);
  197|       |         uint32_t R3 = Botan::load_be<uint32_t>(reinterpret_cast<const uint8_t*>(in), 3);
  198|       |         __vector unsigned int val = {R0, R1, R2, R3};
  199|       |         return SIMD_4x32(val);
  200|       |
  201|       |#elif defined(BOTAN_SIMD_USE_NEON)
  202|       |         SIMD_4x32 l(vld1q_u32(static_cast<const uint32_t*>(in)));
  203|       |         if constexpr(std::endian::native == std::endian::little) {
  204|       |            return l.bswap();
  205|       |         } else {
  206|       |            return l;
  207|       |         }
  208|       |#endif
  209|  11.7k|      }
_ZN5Botan9SIMD_4x327load_leEPKv:
  162|  59.4k|      static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 load_le(const void* in) noexcept {
  163|  59.4k|#if defined(BOTAN_SIMD_USE_SSSE3)
  164|  59.4k|         return SIMD_4x32(_mm_loadu_si128(reinterpret_cast<const __m128i*>(in)));
  165|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  166|       |         uint32_t R0 = Botan::load_le<uint32_t>(reinterpret_cast<const uint8_t*>(in), 0);
  167|       |         uint32_t R1 = Botan::load_le<uint32_t>(reinterpret_cast<const uint8_t*>(in), 1);
  168|       |         uint32_t R2 = Botan::load_le<uint32_t>(reinterpret_cast<const uint8_t*>(in), 2);
  169|       |         uint32_t R3 = Botan::load_le<uint32_t>(reinterpret_cast<const uint8_t*>(in), 3);
  170|       |         __vector unsigned int val = {R0, R1, R2, R3};
  171|       |         return SIMD_4x32(val);
  172|       |#elif defined(BOTAN_SIMD_USE_NEON)
  173|       |         SIMD_4x32 l(vld1q_u32(static_cast<const uint32_t*>(in)));
  174|       |         if constexpr(std::endian::native == std::endian::big) {
  175|       |            return l.bswap();
  176|       |         } else {
  177|       |            return l;
  178|       |         }
  179|       |#elif defined(BOTAN_SIMD_USE_LSX)
  180|       |         return SIMD_4x32(__lsx_vld(in, 0));
  181|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  182|       |         return SIMD_4x32(wasm_v128_load(in));
  183|       |#endif
  184|  59.4k|      }
_ZNK5Botan9SIMD_4x325bswapEv:
  576|  11.7k|      BOTAN_FN_ISA_SIMD_4X32 SIMD_4x32 bswap() const noexcept {
  577|  11.7k|#if defined(BOTAN_SIMD_USE_SSSE3)
  578|  11.7k|         const auto idx = _mm_set_epi8(12, 13, 14, 15, 8, 9, 10, 11, 4, 5, 6, 7, 0, 1, 2, 3);
  579|       |
  580|  11.7k|         return SIMD_4x32(_mm_shuffle_epi8(raw(), idx));
  581|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  582|       |   #ifdef BOTAN_SIMD_USE_VSX
  583|       |         return SIMD_4x32(vec_revb(m_simd));
  584|       |   #else
  585|       |         const __vector unsigned char rev[1] = {
  586|       |            {3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12},
  587|       |         };
  588|       |
  589|       |         return SIMD_4x32(vec_perm(m_simd, m_simd, rev[0]));
  590|       |   #endif
  591|       |
  592|       |#elif defined(BOTAN_SIMD_USE_NEON)
  593|       |         return SIMD_4x32(vreinterpretq_u32_u8(vrev32q_u8(vreinterpretq_u8_u32(m_simd))));
  594|       |#elif defined(BOTAN_SIMD_USE_LSX)
  595|       |         return SIMD_4x32(__lsx_vshuf4i_b(m_simd, 0b00011011));
  596|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  597|       |         return SIMD_4x32(wasm_i8x16_shuffle(m_simd, m_simd, 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12));
  598|       |#endif
  599|  11.7k|      }
_ZNK5Botan9SIMD_4x323rawEv:
  942|   568k|      native_simd_type BOTAN_FN_ISA_SIMD_4X32 raw() const noexcept { return m_simd; }
_ZNK5Botan9SIMD_4x32plERKS0_:
  385|  47.0k|      SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 operator+(const SIMD_4x32& other) const noexcept {
  386|  47.0k|         SIMD_4x32 retval(*this);
  387|  47.0k|         retval += other;
  388|  47.0k|         return retval;
  389|  47.0k|      }
_ZN5Botan9SIMD_4x32pLERKS0_:
  427|  88.2k|      void BOTAN_FN_ISA_SIMD_4X32 operator+=(const SIMD_4x32& other) noexcept {
  428|  88.2k|#if defined(BOTAN_SIMD_USE_SSSE3)
  429|  88.2k|         m_simd = _mm_add_epi32(m_simd, other.m_simd);
  430|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  431|       |         m_simd = vec_add(m_simd, other.m_simd);
  432|       |#elif defined(BOTAN_SIMD_USE_NEON)
  433|       |         m_simd = vaddq_u32(m_simd, other.m_simd);
  434|       |#elif defined(BOTAN_SIMD_USE_LSX)
  435|       |         m_simd = __lsx_vadd_w(m_simd, other.m_simd);
  436|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  437|       |         m_simd = wasm_i32x4_add(m_simd, other.m_simd);
  438|       |#endif
  439|  88.2k|      }
_ZNK5Botan9SIMD_4x328store_leEPj:
  219|    628|      void BOTAN_FN_ISA_SIMD_4X32 store_le(uint32_t out[4]) const noexcept {
  220|    628|         this->store_le(reinterpret_cast<uint8_t*>(out));
  221|    628|      }
_ZNK5Botan9SIMD_4x328store_leEPh:
  234|    628|      void BOTAN_FN_ISA_SIMD_4X32 store_le(uint8_t out[]) const noexcept {
  235|    628|#if defined(BOTAN_SIMD_USE_SSSE3)
  236|       |
  237|    628|         _mm_storeu_si128(reinterpret_cast<__m128i*>(out), raw());
  238|       |
  239|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  240|       |
  241|       |         union {
  242|       |               __vector unsigned int V;
  243|       |               uint32_t R[4];
  244|       |         } vec{};
  245|       |
  246|       |         // NOLINTNEXTLINE(*-union-access)
  247|       |         vec.V = raw();
  248|       |         // NOLINTNEXTLINE(*-union-access)
  249|       |         Botan::store_le(out, vec.R[0], vec.R[1], vec.R[2], vec.R[3]);
  250|       |
  251|       |#elif defined(BOTAN_SIMD_USE_NEON)
  252|       |         if constexpr(std::endian::native == std::endian::little) {
  253|       |            vst1q_u8(out, vreinterpretq_u8_u32(m_simd));
  254|       |         } else {
  255|       |            vst1q_u8(out, vreinterpretq_u8_u32(bswap().m_simd));
  256|       |         }
  257|       |#elif defined(BOTAN_SIMD_USE_LSX)
  258|       |         __lsx_vst(raw(), out, 0);
  259|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  260|       |         wasm_v128_store(out, m_simd);
  261|       |#endif
  262|    628|      }
_ZN5Botan9SIMD_4x327alignr8ERKS0_S2_:
  886|    628|      static inline SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 alignr8(const SIMD_4x32& a, const SIMD_4x32& b) {
  887|    628|#if defined(BOTAN_SIMD_USE_SSSE3)
  888|    628|         return SIMD_4x32(_mm_alignr_epi8(a.raw(), b.raw(), 8));
  889|       |#elif defined(BOTAN_SIMD_USE_NEON)
  890|       |         return SIMD_4x32(vextq_u32(b.raw(), a.raw(), 2));
  891|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  892|       |         const __vector unsigned char mask = {8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23};
  893|       |         return SIMD_4x32(vec_perm(b.raw(), a.raw(), mask));
  894|       |#elif defined(BOTAN_SIMD_USE_LSX)
  895|       |         return SIMD_4x32(__lsx_vshuf4i_d(a.raw(), b.raw(), 0b0011));
  896|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  897|       |         return SIMD_4x32(
  898|       |            wasm_i8x16_shuffle(b.raw(), a.raw(), 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23));
  899|       |#endif
  900|    628|      }
_ZN5Botan9SIMD_4x327alignr4ERKS0_S2_:
  869|  35.2k|      static inline SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 alignr4(const SIMD_4x32& a, const SIMD_4x32& b) {
  870|  35.2k|#if defined(BOTAN_SIMD_USE_SSSE3)
  871|  35.2k|         return SIMD_4x32(_mm_alignr_epi8(a.raw(), b.raw(), 4));
  872|       |#elif defined(BOTAN_SIMD_USE_NEON)
  873|       |         return SIMD_4x32(vextq_u32(b.raw(), a.raw(), 1));
  874|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  875|       |         const __vector unsigned char mask = {4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19};
  876|       |         return SIMD_4x32(vec_perm(b.raw(), a.raw(), mask));
  877|       |#elif defined(BOTAN_SIMD_USE_LSX)
  878|       |         const auto mask = SIMD_4x32(0x07060504, 0x0B0A0908, 0x0F0E0D0C, 0x13121110);
  879|       |         return SIMD_4x32(__lsx_vshuf_b(a.raw(), b.raw(), mask.raw()));
  880|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  881|       |         return SIMD_4x32(
  882|       |            wasm_i8x16_shuffle(b.raw(), a.raw(), 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19));
  883|       |#endif
  884|  35.2k|      }
_ZNK5Botan9SIMD_4x3217shift_elems_rightILm2EEES0_vQleT_Li3E:
  641|  47.0k|      {
  642|  47.0k|#if defined(BOTAN_SIMD_USE_SSSE3)
  643|  47.0k|         return SIMD_4x32(_mm_srli_si128(raw(), 4 * I));
  644|       |#elif defined(BOTAN_SIMD_USE_NEON)
  645|       |         return SIMD_4x32(vextq_u32(raw(), vdupq_n_u32(0), I));
  646|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  647|       |         const __vector unsigned int zero = vec_splat_u32(0);
  648|       |
  649|       |         const __vector unsigned char shuf[3] = {
  650|       |            {4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19},
  651|       |            {8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23},
  652|       |            {12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27},
  653|       |         };
  654|       |
  655|       |         return SIMD_4x32(vec_perm(raw(), zero, shuf[I - 1]));
  656|       |#elif defined(BOTAN_SIMD_USE_LSX)
  657|       |         return SIMD_4x32(__lsx_vbsrl_v(raw(), 4 * I));
  658|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  659|       |         if constexpr(I == 0) {
  660|       |            return SIMD_4x32(m_simd);
  661|       |         }
  662|       |
  663|       |         const auto zero = wasm_u32x4_const_splat(0);
  664|       |         if constexpr(I == 1) {
  665|       |            return SIMD_4x32(
  666|       |               wasm_i8x16_shuffle(m_simd, zero, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 16, 16));
  667|       |         }
  668|       |         if constexpr(I == 2) {
  669|       |            return SIMD_4x32(
  670|       |               wasm_i8x16_shuffle(m_simd, zero, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 16, 16, 16, 16, 16, 16));
  671|       |         }
  672|       |
  673|       |         return SIMD_4x32(
  674|       |            wasm_i8x16_shuffle(m_simd, zero, 12, 13, 14, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16));
  675|       |#endif
  676|  47.0k|      }

_ZNK5Botan3TLS21Client_Hello_Internal12ciphersuitesEv:
   80|  2.09k|      const std::vector<uint16_t>& ciphersuites() const { return m_suites; }
_ZN5Botan3TLS21Client_Hello_Internal10extensionsEv:
   90|    385|      Extensions& extensions() { return m_extensions; }

_ZN5Botan3TLS15TLS_Data_ReaderC2EPKcNSt3__14spanIKhLm18446744073709551615EEE:
   27|  8.55k|            m_typename(type), m_buf(buf_in), m_offset(0) {}
_ZN5Botan3TLS15TLS_Data_Reader8get_byteEv:
   83|  21.6k|      uint8_t get_byte() {
   84|  21.6k|         assert_at_least(1);
   85|  21.6k|         const uint8_t result = m_buf[m_offset];
   86|  21.6k|         m_offset += 1;
   87|  21.6k|         return result;
   88|  21.6k|      }
_ZN5Botan3TLS15TLS_Data_Reader20get_data_read_so_farEv:
   46|    138|      std::vector<uint8_t> get_data_read_so_far() {
   47|    138|         const std::span first = m_buf.first(m_offset);
   48|    138|         return std::vector<uint8_t>(first.begin(), first.end());
   49|    138|      }
_ZN5Botan3TLS15TLS_Data_Reader13get_remainingEv:
   41|    126|      std::vector<uint8_t> get_remaining() {
   42|    126|         const std::span rest = m_buf.subspan(m_offset);
   43|    126|         return std::vector<uint8_t>(rest.begin(), rest.end());
   44|    126|      }
_ZN5Botan3TLS15TLS_Data_Reader9get_fixedIhEENSt3__16vectorIT_NS3_9allocatorIS5_EEEEm:
  129|  17.6k|      std::vector<T> get_fixed(size_t size) {
  130|  17.6k|         return get_elem<T, std::vector<T>>(size);
  131|  17.6k|      }
_ZN5Botan3TLS15TLS_Data_Reader8get_elemIhNSt3__16vectorIhNS3_9allocatorIhEEEEEET0_m:
   91|  29.5k|      Container get_elem(size_t num_elems) {
   92|  29.5k|         assert_at_least(num_elems * sizeof(T));
   93|       |
   94|  29.5k|         Container result(num_elems);
   95|       |
   96|   818k|         for(size_t i = 0; i != num_elems; ++i) {
  ------------------
  |  Branch (96:28): [True: 788k, False: 29.5k]
  ------------------
   97|   788k|            result[i] = load_be<T>(&m_buf[m_offset], i);
   98|   788k|         }
   99|       |
  100|  29.5k|         m_offset += num_elems * sizeof(T);
  101|       |
  102|  29.5k|         return result;
  103|  29.5k|      }
_ZN5Botan3TLS15TLS_Data_Reader16get_range_vectorIhEENSt3__16vectorIT_NS3_9allocatorIS5_EEEEmmm:
  117|  7.41k|      std::vector<T> get_range_vector(size_t len_bytes, size_t min_elems, size_t max_elems) {
  118|  7.41k|         const size_t num_elems = get_num_elems(len_bytes, sizeof(T), min_elems, max_elems);
  119|       |
  120|  7.41k|         return get_elem<T, std::vector<T>>(num_elems);
  121|  7.41k|      }
_ZN5Botan3TLS15TLS_Data_Reader13get_num_elemsEmmmm:
  148|  14.7k|      size_t get_num_elems(size_t len_bytes, size_t T_size, size_t min_elems, size_t max_elems) {
  149|  14.7k|         const size_t byte_length = get_length_field(len_bytes);
  150|       |
  151|  14.7k|         if(byte_length % T_size != 0) {
  ------------------
  |  Branch (151:13): [True: 27, False: 14.7k]
  ------------------
  152|     27|            throw_decode_error("Size isn't multiple of T");
  153|     27|         }
  154|       |
  155|  14.7k|         const size_t num_elems = byte_length / T_size;
  156|       |
  157|  14.7k|         if(num_elems < min_elems || num_elems > max_elems) {
  ------------------
  |  Branch (157:13): [True: 131, False: 14.6k]
  |  Branch (157:38): [True: 31, False: 14.6k]
  ------------------
  158|     86|            throw_decode_error("Length field outside parameters");
  159|     86|         }
  160|       |
  161|  14.7k|         return num_elems;
  162|  14.7k|      }
_ZN5Botan3TLS15TLS_Data_Reader16get_length_fieldEm:
  134|  20.5k|      size_t get_length_field(size_t len_bytes) {
  135|  20.5k|         assert_at_least(len_bytes);
  136|       |
  137|  20.5k|         if(len_bytes == 1) {
  ------------------
  |  Branch (137:13): [True: 12.3k, False: 8.23k]
  ------------------
  138|  12.3k|            return get_byte();
  139|  12.3k|         } else if(len_bytes == 2) {
  ------------------
  |  Branch (139:20): [True: 8.18k, False: 56]
  ------------------
  140|  8.18k|            return get_uint16_t();
  141|  8.18k|         } else if(len_bytes == 3) {
  ------------------
  |  Branch (141:20): [True: 0, False: 56]
  ------------------
  142|      0|            return get_uint24_t();
  143|      0|         }
  144|       |
  145|     56|         throw_decode_error("Bad length size");
  146|     56|      }
_ZN5Botan3TLS15TLS_Data_Reader12get_uint16_tEv:
   71|  50.5k|      uint16_t get_uint16_t() {
   72|  50.5k|         assert_at_least(2);
   73|  50.5k|         const uint16_t result = make_uint16(m_buf[m_offset], m_buf[m_offset + 1]);
   74|  50.5k|         m_offset += 2;
   75|  50.5k|         return result;
   76|  50.5k|      }
_ZN5Botan3TLS15TLS_Data_Reader9get_rangeIhEENSt3__16vectorIT_NS3_9allocatorIS5_EEEEmmm:
  110|  4.43k|      std::vector<T> get_range(size_t len_bytes, size_t min_elems, size_t max_elems) {
  111|  4.43k|         const size_t num_elems = get_num_elems(len_bytes, sizeof(T), min_elems, max_elems);
  112|       |
  113|  4.43k|         return get_elem<T, std::vector<T>>(num_elems);
  114|  4.43k|      }
_ZN5Botan3TLS15TLS_Data_Reader16get_range_vectorItEENSt3__16vectorIT_NS3_9allocatorIS5_EEEEmmm:
  117|  2.84k|      std::vector<T> get_range_vector(size_t len_bytes, size_t min_elems, size_t max_elems) {
  118|  2.84k|         const size_t num_elems = get_num_elems(len_bytes, sizeof(T), min_elems, max_elems);
  119|       |
  120|  2.84k|         return get_elem<T, std::vector<T>>(num_elems);
  121|  2.84k|      }
_ZN5Botan3TLS15TLS_Data_Reader8get_elemItNSt3__16vectorItNS3_9allocatorItEEEEEET0_m:
   91|  2.83k|      Container get_elem(size_t num_elems) {
   92|  2.83k|         assert_at_least(num_elems * sizeof(T));
   93|       |
   94|  2.83k|         Container result(num_elems);
   95|       |
   96|  33.9k|         for(size_t i = 0; i != num_elems; ++i) {
  ------------------
  |  Branch (96:28): [True: 31.0k, False: 2.83k]
  ------------------
   97|  31.0k|            result[i] = load_be<T>(&m_buf[m_offset], i);
   98|  31.0k|         }
   99|       |
  100|  2.83k|         m_offset += num_elems * sizeof(T);
  101|       |
  102|  2.83k|         return result;
  103|  2.83k|      }
_ZNK5Botan3TLS15TLS_Data_Reader11assert_doneEv:
   29|  3.87k|      void assert_done() const {
   30|  3.87k|         if(has_remaining()) {
  ------------------
  |  Branch (30:13): [True: 21, False: 3.85k]
  ------------------
   31|     21|            throw_decode_error("Extra bytes at end of message");
   32|     21|         }
   33|  3.87k|      }
_ZNK5Botan3TLS15TLS_Data_Reader11read_so_farEv:
   35|  6.44k|      size_t read_so_far() const { return m_offset; }
_ZNK5Botan3TLS15TLS_Data_Reader15remaining_bytesEv:
   37|   159k|      size_t remaining_bytes() const { return m_buf.size() - m_offset; }
_ZNK5Botan3TLS15TLS_Data_Reader13has_remainingEv:
   39|  20.6k|      bool has_remaining() const { return (remaining_bytes() > 0); }
_ZN5Botan3TLS15TLS_Data_Reader12discard_nextEm:
   51|    312|      void discard_next(size_t bytes) {
   52|    312|         assert_at_least(bytes);
   53|    312|         m_offset += bytes;
   54|    312|      }
_ZN5Botan3TLS15TLS_Data_Reader12get_uint32_tEv:
   56|  3.86k|      uint32_t get_uint32_t() {
   57|  3.86k|         assert_at_least(4);
   58|  3.86k|         const uint32_t result =
   59|  3.86k|            make_uint32(m_buf[m_offset], m_buf[m_offset + 1], m_buf[m_offset + 2], m_buf[m_offset + 3]);
   60|  3.86k|         m_offset += 4;
   61|  3.86k|         return result;
   62|  3.86k|      }
_ZN5Botan3TLS15TLS_Data_Reader20get_tls_length_valueEm:
  105|  5.78k|      std::vector<uint8_t> get_tls_length_value(size_t len_bytes) {
  106|  5.78k|         return get_fixed<uint8_t>(get_length_field(len_bytes));
  107|  5.78k|      }
_ZN5Botan3TLS15TLS_Data_Reader10get_stringEmmm:
  123|  4.70k|      std::string get_string(size_t len_bytes, size_t min_bytes, size_t max_bytes) {
  124|  4.70k|         std::vector<uint8_t> v = get_range_vector<uint8_t>(len_bytes, min_bytes, max_bytes);
  125|  4.70k|         return bytes_to_string(v);
  126|  4.70k|      }
_ZN5Botan3TLS15TLS_Data_Reader9get_rangeItEENSt3__16vectorIT_NS3_9allocatorIS5_EEEEmmm:
  110|     92|      std::vector<T> get_range(size_t len_bytes, size_t min_elems, size_t max_elems) {
  111|     92|         const size_t num_elems = get_num_elems(len_bytes, sizeof(T), min_elems, max_elems);
  112|       |
  113|     92|         return get_elem<T, std::vector<T>>(num_elems);
  114|     92|      }

_ZNK5Botan10BER_Object6is_setEv:
  138|  9.27k|      bool is_set() const { return m_type_tag != ASN1_Type::NoObject; }
_ZNK5Botan10BER_Object7taggingEv:
  140|  4.31k|      uint32_t tagging() const { return type_tag() | class_tag(); }
_ZNK5Botan10BER_Object8type_tagEv:
  142|  4.31k|      ASN1_Type type_tag() const { return m_type_tag; }
_ZNK5Botan10BER_Object9class_tagEv:
  144|  4.31k|      ASN1_Class class_tag() const { return m_class_tag; }
_ZNK5Botan10BER_Object4typeEv:
  146|  1.20k|      ASN1_Type type() const { return m_type_tag; }
_ZNK5Botan10BER_Object9get_classEv:
  148|    686|      ASN1_Class get_class() const { return m_class_tag; }
_ZNK5Botan10BER_Object4bitsEv:
  150|  34.6k|      const uint8_t* bits() const { return m_value.data(); }
_ZNK5Botan10BER_Object6lengthEv:
  152|  74.7k|      size_t length() const { return m_value.size(); }
_ZNK5Botan10BER_Object4dataEv:
  154|    959|      std::span<const uint8_t> data() const { return std::span{m_value}; }
_ZN5Botan10BER_Object12mutable_bitsEm:
  171|  3.55k|      uint8_t* mutable_bits(size_t length) {
  172|  3.55k|         m_value.resize(length);
  173|  3.55k|         return m_value.data();
  174|  3.55k|      }
_ZNK5Botan11ASN1_String5emptyEv:
  369|    315|      bool empty() const { return m_utf8_str.empty(); }
_ZN5BotanorENS_10ASN1_ClassES0_:
   78|  2.21k|inline ASN1_Class operator|(ASN1_Class x, ASN1_Class y) {
   79|  2.21k|   return static_cast<ASN1_Class>(static_cast<uint32_t>(x) | static_cast<uint32_t>(y));
   80|  2.21k|}
_ZN5BotanorENS_9ASN1_TypeENS_10ASN1_ClassE:
   82|  4.31k|inline uint32_t operator|(ASN1_Type x, ASN1_Class y) {
   83|  4.31k|   return static_cast<uint32_t>(x) | static_cast<uint32_t>(y);
   84|  4.31k|}
_ZN5BotanorENS_10ASN1_ClassENS_9ASN1_TypeE:
   86|    722|inline uint32_t operator|(ASN1_Class x, ASN1_Type y) {
   87|    722|   return static_cast<uint32_t>(x) | static_cast<uint32_t>(y);
   88|    722|}
_ZN5Botan11ASN1_ObjectD2Ev:
  122|  3.34k|      virtual ~ASN1_Object() = default;
_ZN5Botan11ASN1_ObjectC2ERKS0_:
  118|    164|      ASN1_Object(const ASN1_Object&) = default;
_ZN5Botan11ASN1_ObjectC2Ev:
  117|  2.70k|      ASN1_Object() = default;
_ZN5Botan11ASN1_ObjectC2EOS0_:
  120|    473|      ASN1_Object(ASN1_Object&&) = default;
_ZN5Botan3OIDC2Ev:
  220|    815|      explicit OID() = default;
_ZN5Botan10BER_ObjectC2Ev:
  130|  7.74k|      BER_Object() = default;
_ZN5Botan10BER_ObjectC2EOS0_:
  133|  2.04k|      BER_Object(BER_Object&& other) = default;

_ZN5Botan13ignore_paramsIJjEEEvDpRKT_:
  142|  1.51k|constexpr void ignore_params([[maybe_unused]] const T&... args) {}

_ZN5Botan11BER_Decoder6Limits3DEREv:
   35|  1.07k|            static Limits DER() { return Limits(false, 0); }
_ZN5Botan11BER_Decoder6LimitsC2Ebm:
   54|  1.07k|                  m_allow_ber(allow_ber), m_max_nested_indef(max_nested_indef) {}
_ZN5Botan11BER_Decoder14start_sequenceEv:
  160|  1.89k|      BER_Decoder start_sequence() { return start_cons(ASN1_Type::Sequence, ASN1_Class::Universal); }
_ZNK5Botan11BER_Decoder6Limits18allow_ber_encodingEv:
   44|  7.71k|            bool allow_ber_encoding() const { return m_allow_ber; }
_ZNK5Botan11BER_Decoder6Limits20require_der_encodingEv:
   46|  3.87k|            bool require_der_encoding() const { return !allow_ber_encoding(); }
_ZNK5Botan11BER_Decoder6limitsEv:
   98|  2.78k|      Limits limits() const { return m_limits; }
_ZN5Botan11BER_Decoder9start_setEv:
  162|    585|      BER_Decoder start_set() { return start_cons(ASN1_Type::Set, ASN1_Class::Universal); }
_ZN5Botan11BER_Decoder9raw_bytesINSt3__19allocatorIhEEEERS0_RNS2_6vectorIhT_EE:
  203|    738|      BER_Decoder& raw_bytes(std::vector<uint8_t, Alloc>& out) {
  204|    738|         out.clear();
  205|  26.4k|         for(;;) {
  206|  26.4k|            if(auto next = this->read_next_byte()) {
  ------------------
  |  Branch (206:21): [True: 25.7k, False: 738]
  ------------------
  207|  25.7k|               out.push_back(*next);
  208|  25.7k|            } else {
  209|    738|               break;
  210|    738|            }
  211|  26.4k|         }
  212|    738|         return (*this);
  213|    738|      }

_ZN5Botan20Buffered_Computation6updateENSt3__14spanIKhLm18446744073709551615EEE:
   40|    264|      void update(std::span<const uint8_t> in) { add_data(in); }
_ZN5Botan20Buffered_Computation12final_stdvecEv:
   83|    126|      std::vector<uint8_t> final_stdvec() { return final<std::vector<uint8_t>>(); }
_ZN5Botan20Buffered_Computation5finalITkNS_8concepts21resizable_byte_bufferENSt3__16vectorIhNS3_9allocatorIhEEEEEET_v:
   77|    126|      T final() {
   78|    126|         T output(output_length());
   79|    126|         final_result(output);
   80|    126|         return output;
   81|    126|      }
_ZN5Botan20Buffered_ComputationD2Ev:
  130|    138|      virtual ~Buffered_Computation() = default;

_ZN5Botan10DataSourceC2Ev:
  100|  3.85k|      DataSource() = default;
_ZN5Botan10DataSourceD2Ev:
  101|  3.85k|      virtual ~DataSource() = default;
_ZN5Botan17DataSource_MemoryC2ENSt3__14spanIKhLm18446744073709551615EEE:
  141|  1.81k|      explicit DataSource_Memory(std::span<const uint8_t> in) : m_source(in.begin(), in.end()), m_offset(0) {}

_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeERKNSt3__14spanIhLm4EEEjQaaaasr3stdE23is_trivially_copyable_vIT0_Entsr3std6rangesE5rangeIS7_Esr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISF_EESG_E4type10value_typeEEEEvOSC_RKS7_:
  199|  1.00k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromT& in) {
  200|  1.00k|   typecast_copy(out, std::span<const FromT, 1>(&in, 1));
  201|  1.00k|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeERKNSt3__14spanIhLm4EEETkNS1_16contiguous_rangeENS3_IKjLm1EEEQaasr3stdE23is_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_RKSD_:
  176|  1.00k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|  1.00k|   ranges::assert_equal_byte_lengths(out, in);
  178|  1.00k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|  1.00k|}
_ZN5Botan13typecast_copyItTkNS_6ranges16contiguous_rangeENSt3__14spanIKhLm2EEEQaaaasr3stdE26is_default_constructible_vIT_Esr3stdE23is_trivially_copyable_vIS6_Esr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISE_EESF_E4type10value_typeEEEES6_RKSB_:
  210|  31.6k|inline constexpr ToT typecast_copy(const FromR& src) {
  211|  31.6k|   ToT dst;  // NOLINT(*-member-init)
  212|  31.6k|   typecast_copy(dst, src);
  213|  31.6k|   return dst;
  214|  31.6k|}
_ZN5Botan13typecast_copyItTkNS_6ranges16contiguous_rangeENSt3__14spanIKhLm2EEEQaaaasr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISD_EESE_E4type10value_typeEEsr3stdE23is_trivially_copyable_vIT_Entsr3std6rangesE5rangeISK_EEEvRSK_RKSA_:
  188|  31.6k|inline constexpr void typecast_copy(ToT& out, const FromR& in) {
  189|  31.6k|   typecast_copy(std::span<ToT, 1>(&out, 1), in);
  190|  31.6k|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeENSt3__14spanItLm1EEETkNS1_16contiguous_rangeENS3_IKhLm2EEEQaasr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISE_EESF_E4type10value_typeEEsr3stdE23is_trivially_copyable_vINS7_IXsr21__is_primary_templateINS8_Iu14__remove_cvrefIDTclL_ZNSA_5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENSG_ISO_EESP_E4type10value_typeEEEEvOSL_RKSB_:
  176|  31.6k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|  31.6k|   ranges::assert_equal_byte_lengths(out, in);
  178|  31.6k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|  31.6k|}
_ZN5Botan11clear_bytesEPvm:
  101|      6|inline constexpr void clear_bytes(void* ptr, size_t bytes) {
  102|      6|   if(bytes > 0) {
  ------------------
  |  Branch (102:7): [True: 6, False: 0]
  ------------------
  103|      6|      std::memset(ptr, 0, bytes);
  104|      6|   }
  105|      6|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeERKNSt3__14spanIhLm8EEEmQaaaasr3stdE23is_trivially_copyable_vIT0_Entsr3std6rangesE5rangeIS7_Esr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISF_EESG_E4type10value_typeEEEEvOSC_RKS7_:
  199|    126|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromT& in) {
  200|    126|   typecast_copy(out, std::span<const FromT, 1>(&in, 1));
  201|    126|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeERKNSt3__14spanIhLm8EEETkNS1_16contiguous_rangeENS3_IKmLm1EEEQaasr3stdE23is_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_RKSD_:
  176|    126|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|    126|   ranges::assert_equal_byte_lengths(out, in);
  178|    126|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|    126|}
_ZN5Botan8copy_memIhQsr3stdE12is_trivial_vIu7__decayIT_EEEEvPS1_PKS1_m:
  144|  39.2k|inline constexpr void copy_mem(T* out, const T* in, size_t n) {
  145|  39.2k|   BOTAN_ASSERT_IMPLICATION(n > 0, in != nullptr && out != nullptr, "If n > 0 then args are not null");
  ------------------
  |  |  103|  39.2k|   do {                                                                                          \
  |  |  104|  39.2k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                              \
  |  |  105|  75.4k|      if((expr1) && !(expr2)) {                                                                  \
  |  |  ------------------
  |  |  |  Branch (105:10): [True: 37.7k, False: 1.56k]
  |  |  |  Branch (105:23): [True: 37.7k, False: 0]
  |  |  |  Branch (105:23): [True: 37.7k, False: 0]
  |  |  ------------------
  |  |  106|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                                     \
  |  |  107|      0|         Botan::assertion_failure(#expr1 " implies " #expr2, msg, __func__, __FILE__, __LINE__); \
  |  |  108|      0|      }                                                                                          \
  |  |  109|  39.2k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (109:12): [Folded, False: 39.2k]
  |  |  ------------------
  ------------------
  146|       |
  147|  39.2k|   if(in != nullptr && out != nullptr && n > 0) {
  ------------------
  |  Branch (147:7): [True: 39.0k, False: 198]
  |  Branch (147:24): [True: 38.3k, False: 739]
  |  Branch (147:42): [True: 37.7k, False: 629]
  ------------------
  148|  37.7k|      std::memmove(out, in, sizeof(T) * n);
  149|  37.7k|   }
  150|  39.2k|}
_ZN5Botan19secure_scrub_memoryITkNS_6ranges23contiguous_output_rangeERNSt3__16vectorIhNS2_9allocatorIhEEEEEEvOT_:
   59|  9.79k|void secure_scrub_memory(ranges::contiguous_output_range auto&& data) {
   60|  9.79k|   secure_scrub_memory(std::ranges::data(data), ranges::size_bytes(data));
   61|  9.79k|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeENSt3__14spanIjLm1EEETkNS1_16contiguous_rangeENS3_IKhLm4EEEQaasr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISE_EESF_E4type10value_typeEEsr3stdE23is_trivially_copyable_vINS7_IXsr21__is_primary_templateINS8_Iu14__remove_cvrefIDTclL_ZNSA_5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENSG_ISO_EESP_E4type10value_typeEEEEvOSL_RKSB_:
  176|    236|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|    236|   ranges::assert_equal_byte_lengths(out, in);
  178|    236|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|    236|}
_ZN5Botan13typecast_copyIjTkNS_6ranges16contiguous_rangeENSt3__14spanIKhLm4EEEQaaaasr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISD_EESE_E4type10value_typeEEsr3stdE23is_trivially_copyable_vIT_Entsr3std6rangesE5rangeISK_EEEvRSK_RKSA_:
  188|    236|inline constexpr void typecast_copy(ToT& out, const FromR& in) {
  189|    236|   typecast_copy(std::span<ToT, 1>(&out, 1), in);
  190|    236|}
_ZN5Botan13typecast_copyIjTkNS_6ranges16contiguous_rangeENSt3__14spanIKhLm4EEEQaaaasr3stdE26is_default_constructible_vIT_Esr3stdE23is_trivially_copyable_vIS6_Esr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISE_EESF_E4type10value_typeEEEES6_RKSB_:
  210|    236|inline constexpr ToT typecast_copy(const FromR& src) {
  211|    236|   ToT dst;  // NOLINT(*-member-init)
  212|    236|   typecast_copy(dst, src);
  213|    236|   return dst;
  214|    236|}
_ZN5Botan9clear_memIjEEvPT_m:
  118|      6|inline constexpr void clear_mem(T* ptr, size_t n) {
  119|      6|   clear_bytes(ptr, sizeof(T) * n);
  120|      6|}

_ZN5Botan7X509_DNC2Ev:
   45|  1.07k|      X509_DN() = default;

_ZN5Botan6ranges24assert_exact_byte_lengthILm4ETkNS0_14spanable_rangeENSt3__14spanIhLm4EEEEEvRKT0_:
   77|  2.01k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  2.01k|   const std::span s{r};
   79|  2.01k|   if constexpr(statically_spanable_range<R>) {
   80|  2.01k|      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   81|       |   } else {
   82|       |      if(s.size_bytes() != expected) {
   83|       |         memory_region_size_violation();
   84|       |      }
   85|       |   }
   86|  2.01k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm4EEETpTkNS0_14spanable_rangeEJNS3_IKjLm1EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  1.00k|{
  101|  1.00k|   const std::span s0{r0};
  102|       |
  103|  1.00k|   if constexpr(statically_spanable_range<R0>) {
  104|  1.00k|      constexpr size_t expected_size = s0.size_bytes();
  105|  1.00k|      (assert_exact_byte_length<expected_size>(rs), ...);
  106|       |   } else {
  107|       |      const size_t expected_size = s0.size_bytes();
  108|       |      const bool correct_size =
  109|       |         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|       |      if(!correct_size) {
  112|       |         memory_region_size_violation();
  113|       |      }
  114|       |   }
  115|  1.00k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm4ETkNS0_14spanable_rangeENSt3__14spanIKjLm1EEEEEvRKT0_:
   77|  1.00k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  1.00k|   const std::span s{r};
   79|  1.00k|   if constexpr(statically_spanable_range<R>) {
   80|  1.00k|      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   81|       |   } else {
   82|       |      if(s.size_bytes() != expected) {
   83|       |         memory_region_size_violation();
   84|       |      }
   85|       |   }
   86|  1.00k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm4EEEEEmRKT_:
   59|  1.00k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  1.00k|   return std::span{r}.size_bytes();
   61|  1.00k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm1ETkNS0_14spanable_rangeENSt3__14spanIKhLm1EEEEEvRKT0_:
   77|   788k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|   788k|   const std::span s{r};
   79|   788k|   if constexpr(statically_spanable_range<R>) {
   80|   788k|      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   81|       |   } else {
   82|       |      if(s.size_bytes() != expected) {
   83|       |         memory_region_size_violation();
   84|       |      }
   85|       |   }
   86|   788k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm2ETkNS0_14spanable_rangeENSt3__14spanIKhLm2EEEEEvRKT0_:
   77|  63.3k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  63.3k|   const std::span s{r};
   79|  63.3k|   if constexpr(statically_spanable_range<R>) {
   80|  63.3k|      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   81|       |   } else {
   82|       |      if(s.size_bytes() != expected) {
   83|       |         memory_region_size_violation();
   84|       |      }
   85|       |   }
   86|  63.3k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanItLm1EEETpTkNS0_14spanable_rangeEJNS3_IKhLm2EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  31.6k|{
  101|  31.6k|   const std::span s0{r0};
  102|       |
  103|  31.6k|   if constexpr(statically_spanable_range<R0>) {
  104|  31.6k|      constexpr size_t expected_size = s0.size_bytes();
  105|  31.6k|      (assert_exact_byte_length<expected_size>(rs), ...);
  106|       |   } else {
  107|       |      const size_t expected_size = s0.size_bytes();
  108|       |      const bool correct_size =
  109|       |         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|       |      if(!correct_size) {
  112|       |         memory_region_size_violation();
  113|       |      }
  114|       |   }
  115|  31.6k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanItLm1EEEEEmRKT_:
   59|  31.6k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  31.6k|   return std::span{r}.size_bytes();
   61|  31.6k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm8ETkNS0_14spanable_rangeENSt3__14spanIhLm8EEEEEvRKT0_:
   77|    126|inline constexpr void assert_exact_byte_length(const R& r) {
   78|    126|   const std::span s{r};
   79|    126|   if constexpr(statically_spanable_range<R>) {
   80|    126|      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   81|       |   } else {
   82|       |      if(s.size_bytes() != expected) {
   83|       |         memory_region_size_violation();
   84|       |      }
   85|       |   }
   86|    126|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm8EEETpTkNS0_14spanable_rangeEJNS3_IKmLm1EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|    126|{
  101|    126|   const std::span s0{r0};
  102|       |
  103|    126|   if constexpr(statically_spanable_range<R0>) {
  104|    126|      constexpr size_t expected_size = s0.size_bytes();
  105|    126|      (assert_exact_byte_length<expected_size>(rs), ...);
  106|       |   } else {
  107|       |      const size_t expected_size = s0.size_bytes();
  108|       |      const bool correct_size =
  109|       |         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|       |      if(!correct_size) {
  112|       |         memory_region_size_violation();
  113|       |      }
  114|       |   }
  115|    126|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm8ETkNS0_14spanable_rangeENSt3__14spanIKmLm1EEEEEvRKT0_:
   77|    126|inline constexpr void assert_exact_byte_length(const R& r) {
   78|    126|   const std::span s{r};
   79|    126|   if constexpr(statically_spanable_range<R>) {
   80|    126|      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   81|       |   } else {
   82|       |      if(s.size_bytes() != expected) {
   83|       |         memory_region_size_violation();
   84|       |      }
   85|       |   }
   86|    126|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm8EEEEEmRKT_:
   59|    126|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|    126|   return std::span{r}.size_bytes();
   61|    126|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__16vectorIhNS2_9allocatorIhEEEEEEmRKT_:
   59|  9.79k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  9.79k|   return std::span{r}.size_bytes();
   61|  9.79k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm18446744073709551615EEETpTkNS0_14spanable_rangeEJNS3_IKjLm18446744073709551615EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|    126|{
  101|    126|   const std::span s0{r0};
  102|       |
  103|       |   if constexpr(statically_spanable_range<R0>) {
  104|       |      constexpr size_t expected_size = s0.size_bytes();
  105|       |      (assert_exact_byte_length<expected_size>(rs), ...);
  106|    126|   } else {
  107|    126|      const size_t expected_size = s0.size_bytes();
  108|    126|      const bool correct_size =
  109|    126|         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|    126|      if(!correct_size) {
  ------------------
  |  Branch (111:10): [True: 0, False: 126]
  ------------------
  112|      0|         memory_region_size_violation();
  113|      0|      }
  114|    126|   }
  115|    126|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm4ETkNS0_14spanable_rangeENSt3__14spanIKhLm4EEEEEvRKT0_:
   77|    472|inline constexpr void assert_exact_byte_length(const R& r) {
   78|    472|   const std::span s{r};
   79|    472|   if constexpr(statically_spanable_range<R>) {
   80|    472|      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
   81|       |   } else {
   82|       |      if(s.size_bytes() != expected) {
   83|       |         memory_region_size_violation();
   84|       |      }
   85|       |   }
   86|    472|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIjLm1EEETpTkNS0_14spanable_rangeEJNS3_IKhLm4EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|    236|{
  101|    236|   const std::span s0{r0};
  102|       |
  103|    236|   if constexpr(statically_spanable_range<R0>) {
  104|    236|      constexpr size_t expected_size = s0.size_bytes();
  105|    236|      (assert_exact_byte_length<expected_size>(rs), ...);
  106|       |   } else {
  107|       |      const size_t expected_size = s0.size_bytes();
  108|       |      const bool correct_size =
  109|       |         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|       |      if(!correct_size) {
  112|       |         memory_region_size_violation();
  113|       |      }
  114|       |   }
  115|    236|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIjLm1EEEEEmRKT_:
   59|    236|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|    236|   return std::span{r}.size_bytes();
   61|    236|}

_ZN5Botan16secure_allocatorIhE10deallocateEPhm:
   54|  1.62k|      void deallocate(T* p, std::size_t n) { deallocate_memory(p, n, sizeof(T)); }
_ZN5Botan16secure_allocatorIhE8allocateEm:
   52|  1.62k|      T* allocate(std::size_t n) { return static_cast<T*>(allocate_memory(n, sizeof(T))); }
_ZN5Botan16secure_allocatorIjE10deallocateEPjm:
   54|    138|      void deallocate(T* p, std::size_t n) { deallocate_memory(p, n, sizeof(T)); }
_ZN5Botan16secure_allocatorIjE8allocateEm:
   52|    138|      T* allocate(std::size_t n) { return static_cast<T*>(allocate_memory(n, sizeof(T))); }

_ZN5Botan18unwrap_strong_typeIRjEEDcOT_:
  243|  1.00k|[[nodiscard]] constexpr decltype(auto) unwrap_strong_type(T&& t) {
  244|  1.00k|   if constexpr(!concepts::strong_type<std::remove_cvref_t<T>>) {
  245|       |      // If the parameter type isn't a strong type, return it as is.
  246|  1.00k|      return std::forward<T>(t);
  247|       |   } else {
  248|       |      // Unwrap the strong type and return the underlying value.
  249|       |      return std::forward<T>(t).get();
  250|       |   }
  251|  1.00k|}
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEEC2Ev:
   76|  2.93k|      Strong_Base() = default;
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEEC2ES6_:
   83|  2.89k|      constexpr explicit Strong_Base(T v) : m_value(std::move(v)) {}
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEEaSEOS7_:
   80|  2.89k|      Strong_Base& operator=(Strong_Base&&) noexcept = default;
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEED2Ev:
   81|  5.83k|      ~Strong_Base() = default;
_ZN5Botan16wrap_strong_typeIhRhQoosr3stdE18constructible_fromIT_T0_Eaasr8conceptsE11strong_typeIS2_Esr3stdE18constructible_fromINS2_12wrapped_typeES3_EEEDcOS3_:
  268|   788k|[[nodiscard]] constexpr decltype(auto) wrap_strong_type(ParamT&& t) {
  269|   788k|   if constexpr(std::same_as<std::remove_cvref_t<ParamT>, T>) {
  270|       |      // Noop, if the parameter type already is the desired return type.
  271|   788k|      return std::forward<ParamT>(t);
  272|       |   } else if constexpr(std::constructible_from<T, ParamT>) {
  273|       |      // Implicit conversion from the parameter type to the return type.
  274|       |      return T{std::forward<ParamT>(t)};
  275|       |   } else {
  276|       |      // Explicitly calling the wrapped type's constructor to support
  277|       |      // implicit conversions on types that mark their constructors as explicit.
  278|       |      static_assert(concepts::strong_type<T> && std::constructible_from<typename T::wrapped_type, ParamT>);
  279|       |      return T{typename T::wrapped_type{std::forward<ParamT>(t)}};
  280|       |   }
  281|   788k|}
_ZN5Botan16wrap_strong_typeItRtQoosr3stdE18constructible_fromIT_T0_Eaasr8conceptsE11strong_typeIS2_Esr3stdE18constructible_fromINS2_12wrapped_typeES3_EEEDcOS3_:
  268|  31.6k|[[nodiscard]] constexpr decltype(auto) wrap_strong_type(ParamT&& t) {
  269|  31.6k|   if constexpr(std::same_as<std::remove_cvref_t<ParamT>, T>) {
  270|       |      // Noop, if the parameter type already is the desired return type.
  271|  31.6k|      return std::forward<ParamT>(t);
  272|       |   } else if constexpr(std::constructible_from<T, ParamT>) {
  273|       |      // Implicit conversion from the parameter type to the return type.
  274|       |      return T{std::forward<ParamT>(t)};
  275|       |   } else {
  276|       |      // Explicitly calling the wrapped type's constructor to support
  277|       |      // implicit conversions on types that mark their constructors as explicit.
  278|       |      static_assert(concepts::strong_type<T> && std::constructible_from<typename T::wrapped_type, ParamT>);
  279|       |      return T{typename T::wrapped_type{std::forward<ParamT>(t)}};
  280|       |   }
  281|  31.6k|}
_ZN5Botan18unwrap_strong_typeIRmEEDcOT_:
  243|    126|[[nodiscard]] constexpr decltype(auto) unwrap_strong_type(T&& t) {
  244|    126|   if constexpr(!concepts::strong_type<std::remove_cvref_t<T>>) {
  245|       |      // If the parameter type isn't a strong type, return it as is.
  246|    126|      return std::forward<T>(t);
  247|       |   } else {
  248|       |      // Unwrap the strong type and return the underlying value.
  249|       |      return std::forward<T>(t).get();
  250|       |   }
  251|    126|}
_ZN5Botan16wrap_strong_typeIjRjQoosr3stdE18constructible_fromIT_T0_Eaasr8conceptsE11strong_typeIS2_Esr3stdE18constructible_fromINS2_12wrapped_typeES3_EEEDcOS3_:
  268|    236|[[nodiscard]] constexpr decltype(auto) wrap_strong_type(ParamT&& t) {
  269|    236|   if constexpr(std::same_as<std::remove_cvref_t<ParamT>, T>) {
  270|       |      // Noop, if the parameter type already is the desired return type.
  271|    236|      return std::forward<ParamT>(t);
  272|       |   } else if constexpr(std::constructible_from<T, ParamT>) {
  273|       |      // Implicit conversion from the parameter type to the return type.
  274|       |      return T{std::forward<ParamT>(t)};
  275|       |   } else {
  276|       |      // Explicitly calling the wrapped type's constructor to support
  277|       |      // implicit conversions on types that mark their constructors as explicit.
  278|       |      static_assert(concepts::strong_type<T> && std::constructible_from<typename T::wrapped_type, ParamT>);
  279|       |      return T{typename T::wrapped_type{std::forward<ParamT>(t)}};
  280|       |   }
  281|    236|}

_ZN5Botan3TLS12Group_ParamsC2Ev:
  141|    270|      constexpr Group_Params() : m_code(Group_Params_Code::NONE) {}
_ZN5Botan3TLS12Group_ParamsC2Et:
  147|  19.8k|      constexpr Group_Params(uint16_t code) : m_code(static_cast<Group_Params_Code>(code)) {}
_ZNK5Botan3TLS12Group_Params9wire_codeEv:
  162|  19.7k|      constexpr uint16_t wire_code() const { return static_cast<uint16_t>(m_code); }

_ZN5Botan3TLS13TLS_ExceptionC2ENS0_9AlertTypeENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
   24|    259|            Exception(err_msg), m_alert_type(type) {}

_ZN5Botan3TLS10ExtensionsC2Ev:
  535|  2.89k|      Extensions() = default;
_ZN5Botan3TLS18Supported_Versions11static_typeEv:
  386|     17|      static Extension_Code static_type() { return Extension_Code::SupportedVersions; }
_ZN5Botan3TLS20Signature_Algorithms11static_typeEv:
  265|     15|      static Extension_Code static_type() { return Extension_Code::SignatureAlgorithms; }
_ZN5Botan3TLS25Signature_Algorithms_Cert11static_typeEv:
  298|     16|      static Extension_Code static_type() { return Extension_Code::CertSignatureAlgorithms; }
_ZN5Botan3TLS16Supported_Groups11static_typeEv:
  236|    205|      static Extension_Code static_type() { return Extension_Code::SupportedGroups; }
_ZN5Botan3TLS21Server_Name_Indicator11static_typeEv:
  110|     10|      static Extension_Code static_type() { return Extension_Code::ServerNameIndication; }
_ZN5Botan3TLS39Application_Layer_Protocol_Notification11static_typeEv:
  135|     45|      static Extension_Code static_type() { return Extension_Code::ApplicationLayerProtocolNegotiation; }
_ZN5Botan3TLS24SRTP_Protection_Profiles11static_typeEv:
  321|      3|      static Extension_Code static_type() { return Extension_Code::UseSrtp; }
_ZNK5Botan3TLS21Server_Name_Indicator4typeEv:
  112|     10|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS39Application_Layer_Protocol_Notification4typeEv:
  137|     45|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS23Client_Certificate_Type11static_typeEv:
  212|     18|      static Extension_Code static_type() { return Extension_Code::ClientCertificateType; }
_ZNK5Botan3TLS23Client_Certificate_Type4typeEv:
  214|     18|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS23Server_Certificate_Type11static_typeEv:
  226|     13|      static Extension_Code static_type() { return Extension_Code::ServerCertificateType; }
_ZNK5Botan3TLS23Server_Certificate_Type4typeEv:
  228|     13|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS16Supported_Groups4typeEv:
  238|    205|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS20Signature_Algorithms4typeEv:
  267|     15|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS25Signature_Algorithms_Cert4typeEv:
  300|     16|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS24SRTP_Protection_Profiles4typeEv:
  323|      3|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS26Certificate_Status_Request11static_typeEv:
  348|     41|      static Extension_Code static_type() { return Extension_Code::CertificateStatusRequest; }
_ZNK5Botan3TLS26Certificate_Status_Request4typeEv:
  350|     41|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS18Supported_Versions4typeEv:
  388|     17|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS17Record_Size_Limit11static_typeEv:
  417|     27|      static Extension_Code static_type() { return Extension_Code::RecordSizeLimit; }
_ZNK5Botan3TLS17Record_Size_Limit4typeEv:
  419|     27|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS17Unknown_Extension4typeEv:
  448|  3.20k|      Extension_Code type() const override { return m_type; }
_ZN5Botan3TLS10Extensions3addEPNS0_9ExtensionE:
  482|    189|      void add(Extension* extn) { add(std::unique_ptr<Extension>(extn)); }
_ZN5Botan3TLS9ExtensionD2Ev:
  102|  5.87k|      virtual ~Extension() = default;
_ZNK5Botan3TLS10Extensions3getINS0_23Renegotiation_ExtensionEEEPT_v:
  465|    196|      T* get() const {
  466|    196|         return dynamic_cast<T*>(get(T::static_type()));
  467|    196|      }

_ZNK5Botan3TLS23Renegotiation_Extension18renegotiation_infoEv:
   41|      7|      const std::vector<uint8_t>& renegotiation_info() const { return m_reneg_data; }
_ZNK5Botan3TLS24Session_Ticket_Extension4typeEv:
   58|     44|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS24Session_Ticket_Extension11static_typeEv:
   56|     44|      static Extension_Code static_type() { return Extension_Code::SessionTicket; }
_ZN5Botan3TLS23Renegotiation_ExtensionC2Ev:
   35|    189|      Renegotiation_Extension() = default;
_ZN5Botan3TLS23Supported_Point_Formats11static_typeEv:
   99|     15|      static Extension_Code static_type() { return Extension_Code::EcPointFormats; }
_ZN5Botan3TLS23Renegotiation_Extension11static_typeEv:
   31|    400|      static Extension_Code static_type() { return Extension_Code::SafeRenegotiation; }
_ZN5Botan3TLS22Extended_Master_Secret11static_typeEv:
  122|     32|      static Extension_Code static_type() { return Extension_Code::ExtendedMasterSecret; }
_ZN5Botan3TLS16Encrypt_then_MAC11static_typeEv:
  140|     23|      static Extension_Code static_type() { return Extension_Code::EncryptThenMac; }
_ZNK5Botan3TLS23Renegotiation_Extension4typeEv:
   33|    204|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS23Supported_Point_Formats4typeEv:
  101|     15|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS22Extended_Master_Secret4typeEv:
  124|     32|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS16Encrypt_then_MAC4typeEv:
  142|     23|      Extension_Code type() const override { return static_type(); }

_ZN5Botan3TLS6Cookie11static_typeEv:
   44|     12|      static Extension_Code static_type() { return Extension_Code::Cookie; }
_ZNK5Botan3TLS6Cookie4typeEv:
   46|     12|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS22PSK_Key_Exchange_Modes11static_typeEv:
   67|     54|      static Extension_Code static_type() { return Extension_Code::PskKeyExchangeModes; }
_ZNK5Botan3TLS22PSK_Key_Exchange_Modes4typeEv:
   69|     54|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS23Certificate_Authorities11static_typeEv:
   90|      8|      static Extension_Code static_type() { return Extension_Code::CertificateAuthorities; }
_ZNK5Botan3TLS23Certificate_Authorities4typeEv:
   92|      8|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS3PSK11static_typeEv:
  112|     27|      static Extension_Code static_type() { return Extension_Code::PresharedKey; }
_ZNK5Botan3TLS3PSK4typeEv:
  114|     27|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS9Key_Share11static_typeEv:
  212|     17|      static Extension_Code static_type() { return Extension_Code::KeyShare; }
_ZNK5Botan3TLS9Key_Share4typeEv:
  214|     17|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS19EarlyDataIndication11static_typeEv:
  306|     14|      static Extension_Code static_type() { return Extension_Code::EarlyData; }
_ZNK5Botan3TLS19EarlyDataIndication4typeEv:
  308|     14|      Extension_Code type() const override { return static_type(); }

_ZN5Botan3TLS17Handshake_MessageD2Ev:
   50|    697|      virtual ~Handshake_Message() = default;
_ZN5Botan3TLS17Handshake_MessageC2Ev:
   51|    697|      Handshake_Message() = default;

_ZN5Botan3TLS11PskIdentityC2ENSt3__16vectorIhNS2_9allocatorIhEEEEj:
   41|  3.84k|            m_identity(std::move(identity)), m_obfuscated_age(obfuscated_age) {}

_ZN5Botan3TLS16Protocol_VersionC2Ev:
   54|  2.89k|      Protocol_Version() : m_version(0) {}
_ZN5Botan3TLS16Protocol_VersionC2Et:
   56|  3.86k|      explicit Protocol_Version(uint16_t code) : m_version(code) {}
_ZN5Botan3TLS16Protocol_VersionC2Ehh:
   69|  2.87k|            Protocol_Version(static_cast<uint16_t>((static_cast<uint16_t>(major) << 8) | minor)) {}
_ZNK5Botan3TLS16Protocol_Version13major_versionEv:
   84|  5.72k|      uint8_t major_version() const { return static_cast<uint8_t>(m_version >> 8); }

LLVMFuzzerInitialize:
   28|      2|extern "C" int LLVMFuzzerInitialize(int* /*argc*/, char*** /*argv*/) {
   29|       |   /*
   30|       |   * This disables the mlock pool, as overwrites within the pool are
   31|       |   * opaque to ASan or other instrumentation.
   32|       |   */
   33|      2|   ::setenv("BOTAN_MLOCK_POOL_SIZE", "0", 1);
   34|      2|   return 0;
   35|      2|}
LLVMFuzzerTestOneInput:
   39|  2.90k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t in[], size_t len) {
   40|  2.90k|   if(len <= max_fuzzer_input_size) {
  ------------------
  |  Branch (40:7): [True: 2.89k, False: 9]
  ------------------
   41|  2.89k|      try {
   42|  2.89k|         fuzz(std::span<const uint8_t>(in, len));
   43|  2.89k|      } catch(const std::exception& e) {
   44|      0|         std::cerr << "Uncaught exception from fuzzer driver " << e.what() << "\n";
   45|      0|         abort();
   46|      0|      } catch(...) {
   47|      0|         std::cerr << "Uncaught exception from fuzzer driver (unknown type)\n";
   48|      0|         abort();
   49|      0|      }
   50|  2.89k|   }
   51|  2.90k|   return 0;
   52|  2.90k|}

_Z4fuzzNSt3__14spanIKhLm18446744073709551615EEE:
   11|  2.89k|void fuzz(std::span<const uint8_t> in) {
   12|  2.89k|   try {
   13|  2.89k|      const std::vector<uint8_t> v(in.begin(), in.end());
   14|  2.89k|      const Botan::TLS::Client_Hello_12 ch(v);  // TODO: We might want to do that for TLS 1.3 as well
   15|  2.89k|   } catch(const Botan::Exception& e) {}
   16|  2.89k|}

_ZN5Botan10BER_ObjectD2Ev:
   27|  9.79k|BER_Object::~BER_Object() {
   28|  9.79k|   secure_scrub_memory(m_value);
   29|  9.79k|}
_ZNK5Botan10BER_Object11assert_is_aENS_9ASN1_TypeENS_10ASN1_ClassENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
   34|  2.21k|void BER_Object::assert_is_a(ASN1_Type expected_type_tag, ASN1_Class expected_class_tag, std::string_view descr) const {
   35|  2.21k|   if(!this->is_a(expected_type_tag, expected_class_tag)) {
  ------------------
  |  Branch (35:7): [True: 168, False: 2.04k]
  ------------------
   36|    168|      std::stringstream msg;
   37|       |
   38|    168|      msg << "Tag mismatch when decoding " << descr << " got ";
   39|       |
   40|    168|      if(m_class_tag == ASN1_Class::NoObject && m_type_tag == ASN1_Type::NoObject) {
  ------------------
  |  Branch (40:10): [True: 0, False: 168]
  |  Branch (40:49): [True: 0, False: 0]
  ------------------
   41|      0|         msg << "EOF";
   42|    168|      } else {
   43|    168|         if(m_class_tag == ASN1_Class::Universal || m_class_tag == ASN1_Class::Constructed) {
  ------------------
  |  Branch (43:13): [True: 34, False: 134]
  |  Branch (43:53): [True: 109, False: 25]
  ------------------
   44|    143|            msg << asn1_tag_to_string(m_type_tag);
   45|    143|         } else {
   46|     25|            msg << std::to_string(static_cast<uint32_t>(m_type_tag));
   47|     25|         }
   48|       |
   49|    168|         msg << "/" << asn1_class_to_string(m_class_tag);
   50|    168|      }
   51|       |
   52|    168|      msg << " expected ";
   53|       |
   54|    168|      if(expected_class_tag == ASN1_Class::Universal || expected_class_tag == ASN1_Class::Constructed) {
  ------------------
  |  Branch (54:10): [True: 0, False: 168]
  |  Branch (54:57): [True: 168, False: 0]
  ------------------
   55|    168|         msg << asn1_tag_to_string(expected_type_tag);
   56|    168|      } else {
   57|      0|         msg << std::to_string(static_cast<uint32_t>(expected_type_tag));
   58|      0|      }
   59|       |
   60|    168|      msg << "/" << asn1_class_to_string(expected_class_tag);
   61|       |
   62|    168|      throw BER_Decoding_Error(msg.str());
   63|    168|   }
   64|  2.21k|}
_ZNK5Botan10BER_Object4is_aENS_9ASN1_TypeENS_10ASN1_ClassE:
   66|  2.21k|bool BER_Object::is_a(ASN1_Type expected_type_tag, ASN1_Class expected_class_tag) const {
   67|  2.21k|   return (m_type_tag == expected_type_tag && m_class_tag == expected_class_tag);
  ------------------
  |  Branch (67:12): [True: 2.04k, False: 163]
  |  Branch (67:47): [True: 2.04k, False: 5]
  ------------------
   68|  2.21k|}
_ZN5Botan10BER_Object11set_taggingENS_9ASN1_TypeENS_10ASN1_ClassE:
   74|  3.85k|void BER_Object::set_tagging(ASN1_Type type_tag, ASN1_Class class_tag) {
   75|  3.85k|   m_type_tag = type_tag;
   76|  3.85k|   m_class_tag = class_tag;
   77|  3.85k|}
_ZN5Botan20asn1_class_to_stringENS_10ASN1_ClassE:
   79|    336|std::string asn1_class_to_string(ASN1_Class type) {
   80|    336|   switch(type) {
   81|     34|      case ASN1_Class::Universal:
  ------------------
  |  Branch (81:7): [True: 34, False: 302]
  ------------------
   82|     34|         return "UNIVERSAL";
   83|    277|      case ASN1_Class::Constructed:
  ------------------
  |  Branch (83:7): [True: 277, False: 59]
  ------------------
   84|    277|         return "CONSTRUCTED";
   85|      2|      case ASN1_Class::ContextSpecific:
  ------------------
  |  Branch (85:7): [True: 2, False: 334]
  ------------------
   86|      2|         return "CONTEXT_SPECIFIC";
   87|      2|      case ASN1_Class::Application:
  ------------------
  |  Branch (87:7): [True: 2, False: 334]
  ------------------
   88|      2|         return "APPLICATION";
   89|      6|      case ASN1_Class::Private:
  ------------------
  |  Branch (89:7): [True: 6, False: 330]
  ------------------
   90|      6|         return "PRIVATE";
   91|      0|      case ASN1_Class::NoObject:
  ------------------
  |  Branch (91:7): [True: 0, False: 336]
  ------------------
   92|      0|         return "NO_OBJECT";
   93|     15|      default:
  ------------------
  |  Branch (93:7): [True: 15, False: 321]
  ------------------
   94|     15|         return "CLASS(" + std::to_string(static_cast<size_t>(type)) + ")";
   95|    336|   }
   96|    336|}
_ZN5Botan18asn1_tag_to_stringENS_9ASN1_TypeE:
   98|    397|std::string asn1_tag_to_string(ASN1_Type type) {
   99|    397|   switch(type) {
  100|    163|      case ASN1_Type::Sequence:
  ------------------
  |  Branch (100:7): [True: 163, False: 234]
  ------------------
  101|    163|         return "SEQUENCE";
  102|       |
  103|     12|      case ASN1_Type::Set:
  ------------------
  |  Branch (103:7): [True: 12, False: 385]
  ------------------
  104|     12|         return "SET";
  105|       |
  106|      4|      case ASN1_Type::PrintableString:
  ------------------
  |  Branch (106:7): [True: 4, False: 393]
  ------------------
  107|      4|         return "PRINTABLE STRING";
  108|       |
  109|      4|      case ASN1_Type::NumericString:
  ------------------
  |  Branch (109:7): [True: 4, False: 393]
  ------------------
  110|      4|         return "NUMERIC STRING";
  111|       |
  112|      9|      case ASN1_Type::Ia5String:
  ------------------
  |  Branch (112:7): [True: 9, False: 388]
  ------------------
  113|      9|         return "IA5 STRING";
  114|       |
  115|      1|      case ASN1_Type::TeletexString:
  ------------------
  |  Branch (115:7): [True: 1, False: 396]
  ------------------
  116|      1|         return "T61 STRING";
  117|       |
  118|     71|      case ASN1_Type::Utf8String:
  ------------------
  |  Branch (118:7): [True: 71, False: 326]
  ------------------
  119|     71|         return "UTF8 STRING";
  120|       |
  121|      7|      case ASN1_Type::VisibleString:
  ------------------
  |  Branch (121:7): [True: 7, False: 390]
  ------------------
  122|      7|         return "VISIBLE STRING";
  123|       |
  124|      1|      case ASN1_Type::BmpString:
  ------------------
  |  Branch (124:7): [True: 1, False: 396]
  ------------------
  125|      1|         return "BMP STRING";
  126|       |
  127|      1|      case ASN1_Type::UniversalString:
  ------------------
  |  Branch (127:7): [True: 1, False: 396]
  ------------------
  128|      1|         return "UNIVERSAL STRING";
  129|       |
  130|      1|      case ASN1_Type::UtcTime:
  ------------------
  |  Branch (130:7): [True: 1, False: 396]
  ------------------
  131|      1|         return "UTC TIME";
  132|       |
  133|      1|      case ASN1_Type::GeneralizedTime:
  ------------------
  |  Branch (133:7): [True: 1, False: 396]
  ------------------
  134|      1|         return "GENERALIZED TIME";
  135|       |
  136|      2|      case ASN1_Type::OctetString:
  ------------------
  |  Branch (136:7): [True: 2, False: 395]
  ------------------
  137|      2|         return "OCTET STRING";
  138|       |
  139|      1|      case ASN1_Type::BitString:
  ------------------
  |  Branch (139:7): [True: 1, False: 396]
  ------------------
  140|      1|         return "BIT STRING";
  141|       |
  142|      2|      case ASN1_Type::Enumerated:
  ------------------
  |  Branch (142:7): [True: 2, False: 395]
  ------------------
  143|      2|         return "ENUMERATED";
  144|       |
  145|      1|      case ASN1_Type::Integer:
  ------------------
  |  Branch (145:7): [True: 1, False: 396]
  ------------------
  146|      1|         return "INTEGER";
  147|       |
  148|      2|      case ASN1_Type::Null:
  ------------------
  |  Branch (148:7): [True: 2, False: 395]
  ------------------
  149|      2|         return "NULL";
  150|       |
  151|      2|      case ASN1_Type::ObjectId:
  ------------------
  |  Branch (151:7): [True: 2, False: 395]
  ------------------
  152|      2|         return "OBJECT";
  153|       |
  154|      4|      case ASN1_Type::Boolean:
  ------------------
  |  Branch (154:7): [True: 4, False: 393]
  ------------------
  155|      4|         return "BOOLEAN";
  156|       |
  157|      0|      case ASN1_Type::NoObject:
  ------------------
  |  Branch (157:7): [True: 0, False: 397]
  ------------------
  158|      0|         return "NO_OBJECT";
  159|       |
  160|    108|      default:
  ------------------
  |  Branch (160:7): [True: 108, False: 289]
  ------------------
  161|    108|         return "TAG(" + std::to_string(static_cast<uint32_t>(type)) + ")";
  162|    397|   }
  163|    397|}
_ZN5Botan18BER_Decoding_ErrorC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  168|    552|BER_Decoding_Error::BER_Decoding_Error(std::string_view err) : Decoding_Error(fmt("BER: {}", err)) {}
_ZN5Botan11BER_Bad_TagC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEj:
  170|     34|BER_Bad_Tag::BER_Bad_Tag(std::string_view str, uint32_t tagging) : BER_Decoding_Error(fmt("{}: {}", str, tagging)) {}
_ZN5Botan4ASN19to_stringERKNS_10BER_ObjectE:
  190|    272|std::string to_string(const BER_Object& obj) {
  191|    272|   return bytes_to_string(obj.data());
  192|    272|}

_ZN5Botan3OID11decode_fromERNS_11BER_DecoderE:
  223|    745|void OID::decode_from(BER_Decoder& decoder) {
  224|    745|   const BER_Object obj = decoder.get_next_object();
  225|    745|   if(obj.tagging() != (ASN1_Class::Universal | ASN1_Type::ObjectId)) {
  ------------------
  |  Branch (225:7): [True: 34, False: 711]
  ------------------
  226|     34|      throw BER_Bad_Tag("Error decoding OID, unknown tag", obj.tagging());
  227|     34|   }
  228|       |
  229|    711|   if(obj.length() == 0) {
  ------------------
  |  Branch (229:7): [True: 1, False: 710]
  ------------------
  230|      1|      throw BER_Decoding_Error("OID encoding is too short");
  231|      1|   }
  232|       |
  233|    710|   auto consume = [](BufferSlicer& data) -> uint32_t {
  234|    710|      BOTAN_ASSERT_NOMSG(!data.empty());
  235|    710|      uint32_t b = data.take_byte();
  236|       |
  237|    710|      if(b > 0x7F) {
  238|    710|         b &= 0x7F;
  239|       |
  240|       |         // Even BER requires that the OID have minimal length, ie that
  241|       |         // the first byte of a multibyte encoding cannot be zero
  242|       |         // See X.690 section 8.19.2
  243|    710|         if(b == 0) {
  244|    710|            throw Decoding_Error("Leading zero byte in multibyte OID encoding");
  245|    710|         }
  246|       |
  247|    710|         while(true) {
  248|    710|            if(data.empty()) {
  249|    710|               throw Decoding_Error("Truncated OID value");
  250|    710|            }
  251|       |
  252|    710|            const uint8_t next = data.take_byte();
  253|    710|            const bool more = (next & 0x80) == 0x80;
  254|    710|            const uint8_t value = next & 0x7F;
  255|       |
  256|    710|            if((b >> (32 - 7)) != 0) {
  257|    710|               throw Decoding_Error("OID component overflow");
  258|    710|            }
  259|       |
  260|    710|            b = (b << 7) | value;
  261|       |
  262|    710|            if(!more) {
  263|    710|               break;
  264|    710|            }
  265|    710|         }
  266|    710|      }
  267|       |
  268|    710|      return b;
  269|    710|   };
  270|       |
  271|    710|   BufferSlicer data(obj.data());
  272|    710|   std::vector<uint32_t> parts;
  273|  3.92k|   while(!data.empty()) {
  ------------------
  |  Branch (273:10): [True: 3.21k, False: 710]
  ------------------
  274|  3.21k|      const uint32_t comp = consume(data);
  275|       |
  276|  3.21k|      if(parts.empty()) {
  ------------------
  |  Branch (276:10): [True: 679, False: 2.54k]
  ------------------
  277|       |         // divide into root and second arc
  278|       |
  279|    679|         const uint32_t root_arc = [](uint32_t b0) -> uint32_t {
  280|    679|            if(b0 < 40) {
  281|    679|               return 0;
  282|    679|            } else if(b0 < 80) {
  283|    679|               return 1;
  284|    679|            } else {
  285|    679|               return 2;
  286|    679|            }
  287|    679|         }(comp);
  288|       |
  289|    679|         parts.push_back(root_arc);
  290|    679|         BOTAN_ASSERT_NOMSG(comp >= 40 * root_arc);
  ------------------
  |  |   77|    679|   do {                                                                     \
  |  |   78|    679|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|    679|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 679]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|    679|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 679]
  |  |  ------------------
  ------------------
  291|    679|         parts.push_back(comp - 40 * root_arc);
  292|  2.54k|      } else {
  293|  2.54k|         parts.push_back(comp);
  294|  2.54k|      }
  295|  3.21k|   }
  296|       |
  297|    710|   m_id = parts;
  298|    710|}
asn1_oid.cpp:_ZZN5Botan3OID11decode_fromERNS_11BER_DecoderEENK3$_0clERNS_12BufferSlicerE:
  233|  3.21k|   auto consume = [](BufferSlicer& data) -> uint32_t {
  234|  3.21k|      BOTAN_ASSERT_NOMSG(!data.empty());
  ------------------
  |  |   77|  3.21k|   do {                                                                     \
  |  |   78|  3.21k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  3.21k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 3.21k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  3.21k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 3.21k]
  |  |  ------------------
  ------------------
  235|  3.21k|      uint32_t b = data.take_byte();
  236|       |
  237|  3.21k|      if(b > 0x7F) {
  ------------------
  |  Branch (237:10): [True: 635, False: 2.58k]
  ------------------
  238|    635|         b &= 0x7F;
  239|       |
  240|       |         // Even BER requires that the OID have minimal length, ie that
  241|       |         // the first byte of a multibyte encoding cannot be zero
  242|       |         // See X.690 section 8.19.2
  243|    635|         if(b == 0) {
  ------------------
  |  Branch (243:13): [True: 3, False: 632]
  ------------------
  244|      3|            throw Decoding_Error("Leading zero byte in multibyte OID encoding");
  245|      3|         }
  246|       |
  247|  1.11k|         while(true) {
  ------------------
  |  Branch (247:16): [True: 1.11k, Folded]
  ------------------
  248|  1.11k|            if(data.empty()) {
  ------------------
  |  Branch (248:16): [True: 6, False: 1.11k]
  ------------------
  249|      6|               throw Decoding_Error("Truncated OID value");
  250|      6|            }
  251|       |
  252|  1.11k|            const uint8_t next = data.take_byte();
  253|  1.11k|            const bool more = (next & 0x80) == 0x80;
  254|  1.11k|            const uint8_t value = next & 0x7F;
  255|       |
  256|  1.11k|            if((b >> (32 - 7)) != 0) {
  ------------------
  |  Branch (256:16): [True: 13, False: 1.09k]
  ------------------
  257|     13|               throw Decoding_Error("OID component overflow");
  258|     13|            }
  259|       |
  260|  1.09k|            b = (b << 7) | value;
  261|       |
  262|  1.09k|            if(!more) {
  ------------------
  |  Branch (262:16): [True: 613, False: 484]
  ------------------
  263|    613|               break;
  264|    613|            }
  265|  1.09k|         }
  266|    632|      }
  267|       |
  268|  3.19k|      return b;
  269|  3.21k|   };
asn1_oid.cpp:_ZZN5Botan3OID11decode_fromERNS_11BER_DecoderEENK3$_1clEj:
  279|    679|         const uint32_t root_arc = [](uint32_t b0) -> uint32_t {
  280|    679|            if(b0 < 40) {
  ------------------
  |  Branch (280:16): [True: 229, False: 450]
  ------------------
  281|    229|               return 0;
  282|    450|            } else if(b0 < 80) {
  ------------------
  |  Branch (282:23): [True: 212, False: 238]
  ------------------
  283|    212|               return 1;
  284|    238|            } else {
  285|    238|               return 2;
  286|    238|            }
  287|    679|         }(comp);

_ZN5Botan11ASN1_StringC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEENS_9ASN1_TypeE:
  135|    815|ASN1_String::ASN1_String(std::string_view str, ASN1_Type t) : m_utf8_str(str), m_tag(t) {
  136|    815|   if(!is_utf8_subset_string_type(m_tag)) {
  ------------------
  |  Branch (136:7): [True: 0, False: 815]
  ------------------
  137|      0|      throw Invalid_Argument("ASN1_String only supports encoding to UTF-8 or a UTF-8 subset");
  138|      0|   }
  139|       |
  140|    815|   if(!is_valid_asn1_string_content(m_utf8_str, m_tag)) {
  ------------------
  |  Branch (140:7): [True: 0, False: 815]
  ------------------
  141|      0|      throw Invalid_Argument(fmt("ASN1_String: Invalid {} encoding", asn1_tag_to_string(m_tag)));
  142|      0|   }
  143|    815|}
_ZN5Botan11ASN1_StringC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  145|    815|ASN1_String::ASN1_String(std::string_view str) : ASN1_String(str, choose_encoding(str)) {}
_ZN5Botan11ASN1_String11decode_fromERNS_11BER_DecoderE:
  162|    665|void ASN1_String::decode_from(BER_Decoder& source) {
  163|    665|   const BER_Object obj = source.get_next_object();
  164|       |
  165|    665|   if(obj.get_class() != ASN1_Class::Universal || !is_asn1_string_type(obj.type())) {
  ------------------
  |  Branch (165:7): [True: 67, False: 598]
  |  Branch (165:51): [True: 68, False: 530]
  ------------------
  166|     78|      auto typ = static_cast<uint32_t>(obj.type());
  167|     78|      auto cls = static_cast<uint32_t>(obj.get_class());
  168|     78|      throw Decoding_Error(fmt("ASN1_String: Unknown string type {}/{}", typ, cls));
  169|     78|   }
  170|       |
  171|    587|   m_tag = obj.type();
  172|    587|   m_data.assign(obj.bits(), obj.bits() + obj.length());
  173|       |
  174|    587|   if(m_tag == ASN1_Type::BmpString) {
  ------------------
  |  Branch (174:7): [True: 81, False: 506]
  ------------------
  175|     81|      m_utf8_str = ucs2_to_utf8(m_data.data(), m_data.size());
  176|    506|   } else if(m_tag == ASN1_Type::UniversalString) {
  ------------------
  |  Branch (176:14): [True: 100, False: 406]
  ------------------
  177|    100|      m_utf8_str = ucs4_to_utf8(m_data.data(), m_data.size());
  178|    406|   } else if(m_tag == ASN1_Type::TeletexString) {
  ------------------
  |  Branch (178:14): [True: 77, False: 329]
  ------------------
  179|       |      /*
  180|       |      TeletexString is nominally ITU T.61 not ISO-8859-1 but it seems
  181|       |      the majority of implementations actually used that charset here.
  182|       |      */
  183|     77|      m_utf8_str = latin1_to_utf8(m_data.data(), m_data.size());
  184|    329|   } else {
  185|       |      // All other supported string types are UTF-8 or some subset thereof
  186|    329|      m_utf8_str = ASN1::to_string(obj);
  187|       |
  188|    329|      if(!is_valid_asn1_string_content(m_utf8_str, m_tag)) {
  ------------------
  |  Branch (188:10): [True: 86, False: 243]
  ------------------
  189|     86|         throw Decoding_Error(fmt("ASN1_String: Invalid {} encoding", asn1_tag_to_string(m_tag)));
  190|     86|      }
  191|    329|   }
  192|    587|}
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_119is_asn1_string_typeENS_9ASN1_TypeE:
   99|    598|bool is_asn1_string_type(ASN1_Type tag) {
  100|    598|   return (is_utf8_subset_string_type(tag) || tag == ASN1_Type::TeletexString || tag == ASN1_Type::BmpString ||
  ------------------
  |  Branch (100:12): [True: 272, False: 326]
  |  Branch (100:47): [True: 77, False: 249]
  |  Branch (100:82): [True: 81, False: 168]
  ------------------
  101|    168|           tag == ASN1_Type::UniversalString);
  ------------------
  |  Branch (101:12): [True: 100, False: 68]
  ------------------
  102|    598|}
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_126is_utf8_subset_string_typeENS_9ASN1_TypeE:
   94|  2.50k|bool is_utf8_subset_string_type(ASN1_Type tag) {
   95|  2.50k|   return (tag == ASN1_Type::NumericString || tag == ASN1_Type::PrintableString || tag == ASN1_Type::VisibleString ||
  ------------------
  |  Branch (95:12): [True: 40, False: 2.46k]
  |  Branch (95:47): [True: 1.67k, False: 790]
  |  Branch (95:84): [True: 92, False: 698]
  ------------------
   96|    698|           tag == ASN1_Type::Ia5String || tag == ASN1_Type::Utf8String);
  ------------------
  |  Branch (96:12): [True: 58, False: 640]
  |  Branch (96:43): [True: 314, False: 326]
  ------------------
   97|  2.50k|}
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_128is_valid_asn1_string_contentERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_9ASN1_TypeE:
  104|  1.08k|bool is_valid_asn1_string_content(const std::string& str, ASN1_Type tag) {
  105|  1.08k|   BOTAN_ASSERT_NOMSG(is_utf8_subset_string_type(tag));
  ------------------
  |  |   77|  1.08k|   do {                                                                     \
  |  |   78|  1.08k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  1.08k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 1.08k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  1.08k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 1.08k]
  |  |  ------------------
  ------------------
  106|       |
  107|  1.08k|   switch(tag) {
  108|    157|      case ASN1_Type::Utf8String:
  ------------------
  |  Branch (108:7): [True: 157, False: 930]
  ------------------
  109|    157|         return is_valid_utf8(str);
  110|     20|      case ASN1_Type::NumericString:
  ------------------
  |  Branch (110:7): [True: 20, False: 1.06k]
  ------------------
  111|    855|      case ASN1_Type::PrintableString:
  ------------------
  |  Branch (111:7): [True: 835, False: 252]
  ------------------
  112|    884|      case ASN1_Type::Ia5String:
  ------------------
  |  Branch (112:7): [True: 29, False: 1.05k]
  ------------------
  113|    930|      case ASN1_Type::VisibleString:
  ------------------
  |  Branch (113:7): [True: 46, False: 1.04k]
  ------------------
  114|    930|         return g_char_validator.valid_encoding(str, tag);
  115|      0|      default:
  ------------------
  |  Branch (115:7): [True: 0, False: 1.08k]
  ------------------
  116|      0|         return false;
  117|  1.08k|   }
  118|  1.08k|}
asn1_str.cpp:_ZNK5Botan12_GLOBAL__N_131ASN1_String_Codepoint_Validator14valid_encodingENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEENS_9ASN1_TypeE:
   25|  1.74k|      constexpr bool valid_encoding(std::string_view str, ASN1_Type tag) const {
   26|  1.74k|         const uint8_t mask = mask_for(tag);
   27|  1.74k|         for(const char c : str) {
  ------------------
  |  Branch (27:27): [True: 175, False: 1.72k]
  ------------------
   28|    175|            const uint8_t codepoint = static_cast<uint8_t>(c);
   29|    175|            const bool is_valid = (m_table[codepoint] & mask) != 0;
   30|       |
   31|    175|            if(!is_valid) {
  ------------------
  |  Branch (31:16): [True: 16, False: 159]
  ------------------
   32|     16|               return false;
   33|     16|            }
   34|    175|         }
   35|       |
   36|  1.72k|         return true;
   37|  1.74k|      }
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_131ASN1_String_Codepoint_Validator8mask_forENS_9ASN1_TypeE:
   45|  1.74k|      static constexpr uint8_t mask_for(ASN1_Type tag) {
   46|  1.74k|         switch(tag) {
   47|     20|            case ASN1_Type::NumericString:
  ------------------
  |  Branch (47:13): [True: 20, False: 1.72k]
  ------------------
   48|     20|               return Numeric_String;
   49|  1.65k|            case ASN1_Type::PrintableString:
  ------------------
  |  Branch (49:13): [True: 1.65k, False: 95]
  ------------------
   50|  1.65k|               return Printable_String;
   51|     29|            case ASN1_Type::Ia5String:
  ------------------
  |  Branch (51:13): [True: 29, False: 1.71k]
  ------------------
   52|     29|               return IA5_String;
   53|     46|            case ASN1_Type::VisibleString:
  ------------------
  |  Branch (53:13): [True: 46, False: 1.69k]
  ------------------
   54|     46|               return Visible_String;
   55|      0|            default:
  ------------------
  |  Branch (55:13): [True: 0, False: 1.74k]
  ------------------
   56|      0|               return 0;
   57|  1.74k|         }
   58|  1.74k|      }
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_115choose_encodingENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  120|    815|ASN1_Type choose_encoding(std::string_view str) {
  121|    815|   if(g_char_validator.valid_encoding(str, ASN1_Type::PrintableString)) {
  ------------------
  |  Branch (121:7): [True: 815, False: 0]
  ------------------
  122|    815|      return ASN1_Type::PrintableString;
  123|    815|   } else {
  124|      0|      return ASN1_Type::Utf8String;
  125|      0|   }
  126|    815|}

_ZN5Botan11BER_DecoderD2Ev:
  366|  3.85k|BER_Decoder::~BER_Decoder() = default;
_ZNK5Botan11BER_Decoder10more_itemsEv:
  371|  1.67k|bool BER_Decoder::more_items() const {
  372|  1.67k|   if(m_source->end_of_data() && !m_pushed.is_set()) {
  ------------------
  |  Branch (372:7): [True: 271, False: 1.40k]
  |  Branch (372:34): [True: 271, False: 0]
  ------------------
  373|    271|      return false;
  374|    271|   }
  375|  1.40k|   return true;
  376|  1.67k|}
_ZN5Botan11BER_Decoder10verify_endEv:
  381|    212|BER_Decoder& BER_Decoder::verify_end() {
  382|    212|   return verify_end("BER_Decoder::verify_end called, but data remains");
  383|    212|}
_ZN5Botan11BER_Decoder10verify_endENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  388|    212|BER_Decoder& BER_Decoder::verify_end(std::string_view err) {
  389|    212|   if(!m_source->end_of_data() || m_pushed.is_set()) {
  ------------------
  |  Branch (389:7): [True: 2, False: 210]
  |  Branch (389:35): [True: 0, False: 210]
  ------------------
  390|      2|      throw Decoding_Error(err);
  391|      2|   }
  392|    210|   return (*this);
  393|    212|}
_ZN5Botan11BER_Decoder14read_next_byteEv:
  405|  26.4k|std::optional<uint8_t> BER_Decoder::read_next_byte() {
  406|  26.4k|   BOTAN_ASSERT_NOMSG(m_source != nullptr);
  ------------------
  |  |   77|  26.4k|   do {                                                                     \
  |  |   78|  26.4k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  26.4k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 26.4k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  26.4k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 26.4k]
  |  |  ------------------
  ------------------
  407|  26.4k|   uint8_t b = 0;
  408|  26.4k|   if(m_source->read_byte(b) != 0) {
  ------------------
  |  Branch (408:7): [True: 25.7k, False: 738]
  ------------------
  409|  25.7k|      return b;
  410|  25.7k|   } else {
  411|    738|      return {};
  412|    738|   }
  413|  26.4k|}
_ZN5Botan11BER_Decoder15get_next_objectEv:
  426|  3.88k|BER_Object BER_Decoder::get_next_object() {
  427|  3.88k|   BER_Object next;
  428|       |
  429|  3.88k|   if(m_pushed.is_set()) {
  ------------------
  |  Branch (429:7): [True: 0, False: 3.88k]
  ------------------
  430|      0|      std::swap(next, m_pushed);
  431|      0|      return next;
  432|      0|   }
  433|       |
  434|  3.88k|   for(;;) {
  435|  3.88k|      ASN1_Type type_tag = ASN1_Type::NoObject;
  436|  3.88k|      ASN1_Class class_tag = ASN1_Class::NoObject;
  437|  3.88k|      decode_tag(m_source, type_tag, class_tag);
  438|  3.88k|      next.set_tagging(type_tag, class_tag);
  439|  3.88k|      if(next.is_set() == false) {  // no more objects
  ------------------
  |  Branch (439:10): [True: 7, False: 3.88k]
  ------------------
  440|      7|         return next;
  441|      7|      }
  442|       |
  443|  3.88k|      const size_t allow_indef = m_limits.allow_ber_encoding() ? m_limits.max_nested_indefinite_length() : 0;
  ------------------
  |  Branch (443:34): [True: 0, False: 3.88k]
  ------------------
  444|  3.88k|      const bool der_mode = m_limits.require_der_encoding();
  445|  3.88k|      const auto dl = decode_length(m_source, allow_indef, der_mode, is_constructed(class_tag));
  446|       |
  447|       |      // Per X.690 8.1.5 the only valid EOC encoding is the two-octet
  448|       |      // sequence 0x00 0x00. Reject any other length encoding on a tag of
  449|       |      // (Eoc, Universal) before we consume the "content" bytes.
  450|  3.88k|      if(type_tag == ASN1_Type::Eoc && class_tag == ASN1_Class::Universal &&
  ------------------
  |  Branch (450:10): [True: 73, False: 3.80k]
  |  Branch (450:40): [True: 65, False: 8]
  ------------------
  451|     65|         (dl.content_length() != 0 || dl.indefinite_length())) {
  ------------------
  |  Branch (451:11): [True: 44, False: 21]
  |  Branch (451:39): [True: 0, False: 21]
  ------------------
  452|     44|         throw BER_Decoding_Error("EOC marker with non-zero length");
  453|     44|      }
  454|       |
  455|  3.83k|      if(!m_source->check_available(dl.total_length())) {
  ------------------
  |  Branch (455:10): [True: 138, False: 3.70k]
  ------------------
  456|    138|         throw BER_Decoding_Error("Value truncated");
  457|    138|      }
  458|       |
  459|  3.70k|      uint8_t* out = next.mutable_bits(dl.content_length());
  460|  3.70k|      if(m_source->read(out, dl.content_length()) != dl.content_length()) {
  ------------------
  |  Branch (460:10): [True: 0, False: 3.70k]
  ------------------
  461|      0|         throw BER_Decoding_Error("Value truncated");
  462|      0|      }
  463|       |
  464|  3.70k|      if(dl.indefinite_length()) {
  ------------------
  |  Branch (464:10): [True: 0, False: 3.70k]
  ------------------
  465|       |         // After reading the data consume the 2-byte EOC
  466|      0|         uint8_t eoc[2] = {0xFF, 0xFF};
  467|      0|         if(m_source->read(eoc, 2) != 2 || eoc[0] != 0x00 || eoc[1] != 0x00) {
  ------------------
  |  Branch (467:13): [True: 0, False: 0]
  |  Branch (467:44): [True: 0, False: 0]
  |  Branch (467:62): [True: 0, False: 0]
  ------------------
  468|      0|            throw BER_Decoding_Error("Missing or malformed EOC marker");
  469|      0|         }
  470|      0|      }
  471|       |
  472|  3.70k|      if(next.tagging() == static_cast<uint32_t>(ASN1_Type::Eoc)) {
  ------------------
  |  Branch (472:10): [True: 21, False: 3.67k]
  ------------------
  473|     21|         if(m_limits.require_der_encoding()) {
  ------------------
  |  Branch (473:13): [True: 21, False: 0]
  ------------------
  474|     21|            throw BER_Decoding_Error("Detected EOC marker in DER structure");
  475|     21|         }
  476|      0|         continue;
  477|  3.67k|      } else {
  478|  3.67k|         break;
  479|  3.67k|      }
  480|  3.70k|   }
  481|       |
  482|  3.67k|   return next;
  483|  3.88k|}
_ZN5Botan11BER_Decoder10start_consENS_9ASN1_TypeENS_10ASN1_ClassE:
  514|  2.47k|BER_Decoder BER_Decoder::start_cons(ASN1_Type type_tag, ASN1_Class class_tag) {
  515|  2.47k|   BER_Object obj = get_next_object();
  516|  2.47k|   obj.assert_is_a(type_tag, class_tag | ASN1_Class::Constructed);
  517|  2.47k|   BER_Decoder child(std::move(obj), this);
  518|  2.47k|   return child;
  519|  2.47k|}
_ZN5Botan11BER_Decoder8end_consEv:
  524|  1.11k|BER_Decoder& BER_Decoder::end_cons() {
  525|  1.11k|   if(m_parent == nullptr) {
  ------------------
  |  Branch (525:7): [True: 0, False: 1.11k]
  ------------------
  526|      0|      throw Invalid_State("BER_Decoder::end_cons called with null parent");
  527|      0|   }
  528|  1.11k|   if(!m_source->end_of_data() || m_pushed.is_set()) {
  ------------------
  |  Branch (528:7): [True: 58, False: 1.05k]
  |  Branch (528:35): [True: 0, False: 1.05k]
  ------------------
  529|     58|      throw Decoding_Error("BER_Decoder::end_cons called with data left");
  530|     58|   }
  531|  1.05k|   return (*m_parent);
  532|  1.11k|}
_ZN5Botan11BER_DecoderC2EONS_10BER_ObjectEPS0_:
  535|  2.04k|      m_limits(parent != nullptr ? parent->limits() : BER_Decoder::Limits::BER()), m_parent(parent) {
  ------------------
  |  Branch (535:16): [True: 2.04k, False: 0]
  ------------------
  536|  2.04k|   m_data_src = std::make_unique<DataSource_BERObject>(std::move(obj));
  537|  2.04k|   m_source = m_data_src.get();
  538|  2.04k|}
_ZN5Botan11BER_DecoderC2ENSt3__14spanIKhLm18446744073709551615EEENS0_6LimitsE:
  548|  1.81k|BER_Decoder::BER_Decoder(std::span<const uint8_t> buf, Limits limits) : m_limits(limits) {
  549|  1.81k|   m_data_src = std::make_unique<DataSource_Memory>(buf);
  550|  1.81k|   m_source = m_data_src.get();
  551|  1.81k|}
_ZN5Botan11BER_Decoder6decodeERNS_11ASN1_ObjectENS_9ASN1_TypeENS_10ASN1_ClassE:
  560|  2.48k|BER_Decoder& BER_Decoder::decode(ASN1_Object& obj, ASN1_Type /*unused*/, ASN1_Class /*unused*/) {
  561|  2.48k|   obj.decode_from(*this);
  562|  2.48k|   return (*this);
  563|  2.48k|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_110decode_tagEPNS_10DataSourceERNS_9ASN1_TypeERNS_10ASN1_ClassE:
   27|  3.88k|size_t decode_tag(DataSource* ber, ASN1_Type& type_tag, ASN1_Class& class_tag) {
   28|  3.88k|   auto b = ber->read_byte();
   29|       |
   30|  3.88k|   if(!b) {
  ------------------
  |  Branch (30:7): [True: 7, False: 3.88k]
  ------------------
   31|      7|      type_tag = ASN1_Type::NoObject;
   32|      7|      class_tag = ASN1_Class::NoObject;
   33|      7|      return 0;
   34|      7|   }
   35|       |
   36|  3.88k|   if((*b & 0x1F) != 0x1F) {
  ------------------
  |  Branch (36:7): [True: 3.57k, False: 309]
  ------------------
   37|  3.57k|      type_tag = ASN1_Type(*b & 0x1F);
   38|  3.57k|      class_tag = ASN1_Class(*b & 0xE0);
   39|  3.57k|      return 1;
   40|  3.57k|   }
   41|       |
   42|    309|   size_t tag_bytes = 1;
   43|    309|   class_tag = ASN1_Class(*b & 0xE0);
   44|       |
   45|    309|   uint32_t tag_buf = 0;
   46|  1.06k|   while(true) {
  ------------------
  |  Branch (46:10): [True: 1.06k, Folded]
  ------------------
   47|  1.06k|      b = ber->read_byte();
   48|  1.06k|      if(!b) {
  ------------------
  |  Branch (48:10): [True: 13, False: 1.04k]
  ------------------
   49|     13|         throw BER_Decoding_Error("Long-form tag truncated");
   50|     13|      }
   51|  1.04k|      if((tag_buf >> 24) != 0) {
  ------------------
  |  Branch (51:10): [True: 11, False: 1.03k]
  ------------------
   52|     11|         throw BER_Decoding_Error("Long-form tag overflowed 32 bits");
   53|     11|      }
   54|       |      // This is required even by BER (see X.690 section 8.1.2.4.2 sentence c).
   55|       |      // Bits 7-1 of the first subsequent octet must not be all zero; this rules
   56|       |      // out both 0x80 (continuation with no data) and 0x00 (a long-form encoding
   57|       |      // of tag value 0, which collides with the EOC marker).
   58|  1.03k|      if(tag_bytes == 1 && (*b & 0x7F) == 0) {
  ------------------
  |  Branch (58:10): [True: 305, False: 733]
  |  Branch (58:28): [True: 2, False: 303]
  ------------------
   59|      2|         throw BER_Decoding_Error("Long form tag with leading zero");
   60|      2|      }
   61|  1.03k|      ++tag_bytes;
   62|  1.03k|      tag_buf = (tag_buf << 7) | (*b & 0x7F);
   63|  1.03k|      if((*b & 0x80) == 0) {
  ------------------
  |  Branch (63:10): [True: 283, False: 753]
  ------------------
   64|    283|         break;
   65|    283|      }
   66|  1.03k|   }
   67|       |   // Per X.690 8.1.2.2, tag values 0-30 shall be encoded in the short form.
   68|       |   // Long-form encoding is reserved for tag values >= 31 (X.690 8.1.2.3).
   69|       |   // This is unconditional and applies to BER as well as DER.
   70|    283|   if(tag_buf <= 30) {
  ------------------
  |  Branch (70:7): [True: 6, False: 277]
  ------------------
   71|      6|      throw BER_Decoding_Error("Long-form tag encoding used for small tag value");
   72|      6|   }
   73|       |
   74|    277|   if(tag_buf == static_cast<uint32_t>(ASN1_Type::NoObject)) {
  ------------------
  |  Branch (74:7): [True: 1, False: 276]
  ------------------
   75|      1|      throw BER_Decoding_Error("Tag value collides with internal sentinel");
   76|      1|   }
   77|       |
   78|       |   // NOLINTNEXTLINE(clang-analyzer-optin.core.EnumCastOutOfRange)
   79|    276|   type_tag = ASN1_Type(tag_buf);
   80|    276|   return tag_bytes;
   81|    277|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_113decode_lengthEPNS_10DataSourceEmbb:
  126|  3.84k|BerDecodedLength decode_length(DataSource* ber, size_t allow_indef, bool der_mode, bool constructed) {
  127|  3.84k|   uint8_t b = 0;
  128|  3.84k|   if(ber->read_byte(b) == 0) {
  ------------------
  |  Branch (128:7): [True: 64, False: 3.78k]
  ------------------
  129|     64|      throw BER_Decoding_Error("Length field not found");
  130|     64|   }
  131|  3.78k|   if((b & 0x80) == 0) {
  ------------------
  |  Branch (131:7): [True: 3.60k, False: 180]
  ------------------
  132|  3.60k|      return BerDecodedLength(b, 1);
  133|  3.60k|   }
  134|       |
  135|    180|   const size_t num_length_bytes = (b & 0x7F);
  136|    180|   if(num_length_bytes > 4) {
  ------------------
  |  Branch (136:7): [True: 20, False: 160]
  ------------------
  137|     20|      throw BER_Decoding_Error("Length field is too large");
  138|     20|   }
  139|       |
  140|    160|   const size_t field_size = 1 + num_length_bytes;
  141|       |
  142|    160|   if(num_length_bytes == 0) {
  ------------------
  |  Branch (142:7): [True: 12, False: 148]
  ------------------
  143|     12|      if(der_mode) {
  ------------------
  |  Branch (143:10): [True: 12, False: 0]
  ------------------
  144|     12|         throw BER_Decoding_Error("Detected indefinite-length encoding in DER structure");
  145|     12|      } else if(!constructed) {
  ------------------
  |  Branch (145:17): [True: 0, False: 0]
  ------------------
  146|       |         // Indefinite length is only valid for constructed types (X.690 8.1.3.2)
  147|      0|         throw BER_Decoding_Error("Indefinite-length encoding used with non-constructed type");
  148|      0|      } else if(allow_indef == 0) {
  ------------------
  |  Branch (148:17): [True: 0, False: 0]
  ------------------
  149|      0|         throw BER_Decoding_Error("Nested EOC markers too deep, rejecting to avoid stack exhaustion");
  150|      0|      } else {
  151|       |         // find_eoc returns bytes up to and including the EOC marker.
  152|       |         // Return the content length; the caller consumes the EOC separately.
  153|      0|         const size_t eoc_len = find_eoc(ber, /*base_offset=*/0, allow_indef - 1);
  154|      0|         if(eoc_len < 2) {
  ------------------
  |  Branch (154:13): [True: 0, False: 0]
  ------------------
  155|      0|            throw BER_Decoding_Error("Invalid EOC encoding");
  156|      0|         }
  157|      0|         return BerDecodedLength::indefinite(eoc_len - 2, field_size);
  158|      0|      }
  159|     12|   }
  160|       |
  161|    148|   size_t length = 0;
  162|       |
  163|    576|   for(size_t i = 0; i != num_length_bytes; ++i) {
  ------------------
  |  Branch (163:22): [True: 433, False: 143]
  ------------------
  164|    433|      if(ber->read_byte(b) == 0) {
  ------------------
  |  Branch (164:10): [True: 5, False: 428]
  ------------------
  165|      5|         throw BER_Decoding_Error("Corrupted length field");
  166|      5|      }
  167|       |      // Can't overflow since we already checked that num_length_bytes <= 4
  168|    428|      length = (length << 8) | b;
  169|    428|   }
  170|       |
  171|       |   // DER requires shortest possible length encoding
  172|    143|   if(der_mode) {
  ------------------
  |  Branch (172:7): [True: 143, False: 0]
  ------------------
  173|    143|      if(length < 128) {
  ------------------
  |  Branch (173:10): [True: 10, False: 133]
  ------------------
  174|     10|         throw BER_Decoding_Error("Detected non-canonical length encoding in DER structure");
  175|     10|      }
  176|    133|      if(num_length_bytes > 1 && length < (size_t(1) << ((num_length_bytes - 1) * 8))) {
  ------------------
  |  Branch (176:10): [True: 124, False: 9]
  |  Branch (176:34): [True: 2, False: 122]
  ------------------
  177|      2|         throw BER_Decoding_Error("Detected non-canonical length encoding in DER structure");
  178|      2|      }
  179|    133|   }
  180|       |
  181|    131|   return BerDecodedLength(length, field_size);
  182|    143|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_116BerDecodedLengthC2Emm:
   99|  3.73k|            BerDecodedLength(content_length, field_length, false) {}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_116BerDecodedLengthC2Emmb:
  116|  3.73k|            m_content_length(content_length), m_field_length(field_length), m_indefinite(indefinite) {}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_114is_constructedENS_10ASN1_ClassE:
   20|  3.84k|bool is_constructed(ASN1_Class class_tag) {
   21|  3.84k|   return (static_cast<uint32_t>(class_tag) & static_cast<uint32_t>(ASN1_Class::Constructed)) != 0;
   22|  3.84k|}
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_116BerDecodedLength14content_lengthEv:
  105|  10.7k|      size_t content_length() const { return m_content_length; }
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_116BerDecodedLength17indefinite_lengthEv:
  112|  3.57k|      bool indefinite_length() const { return m_indefinite; }
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_116BerDecodedLength12total_lengthEv:
  108|  3.69k|      size_t total_length() const { return m_indefinite ? m_content_length + 2 : m_content_length; }
  ------------------
  |  Branch (108:44): [True: 0, False: 3.69k]
  ------------------
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_120DataSource_BERObjectC2EONS_10BER_ObjectE:
  357|  2.04k|      explicit DataSource_BERObject(BER_Object&& obj) : m_obj(std::move(obj)) {}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_120DataSource_BERObject4readEPhm:
  327|  33.6k|      size_t read(uint8_t out[], size_t length) override {
  328|  33.6k|         BOTAN_ASSERT_NOMSG(m_offset <= m_obj.length());
  ------------------
  |  |   77|  33.6k|   do {                                                                     \
  |  |   78|  33.6k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  33.6k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 33.6k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  33.6k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 33.6k]
  |  |  ------------------
  ------------------
  329|  33.6k|         const size_t got = std::min<size_t>(m_obj.length() - m_offset, length);
  330|  33.6k|         copy_mem(out, m_obj.bits() + m_offset, got);
  331|  33.6k|         m_offset += got;
  332|  33.6k|         return got;
  333|  33.6k|      }
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_120DataSource_BERObject15check_availableEm:
  348|  2.18k|      bool check_available(size_t n) override {
  349|  2.18k|         BOTAN_ASSERT_NOMSG(m_offset <= m_obj.length());
  ------------------
  |  |   77|  2.18k|   do {                                                                     \
  |  |   78|  2.18k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  2.18k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 2.18k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  2.18k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 2.18k]
  |  |  ------------------
  ------------------
  350|  2.18k|         return (n <= (m_obj.length() - m_offset));
  351|  2.18k|      }
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_120DataSource_BERObject11end_of_dataEv:
  353|  1.98k|      bool end_of_data() const override { return get_bytes_read() == m_obj.length(); }
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_120DataSource_BERObject14get_bytes_readEv:
  355|  1.98k|      size_t get_bytes_read() const override { return m_offset; }

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

_ZN5Botan7SHA_25615compress_digestERNSt3__16vectorIjNS_16secure_allocatorIjEEEENS1_4spanIKhLm18446744073709551615EEEm:
   59|    314|                                                             size_t blocks) {
   60|    314|#if defined(BOTAN_HAS_SHA2_32_X86)
   61|    314|   if(CPUID::has(CPUID::Feature::SHA)) {
  ------------------
  |  Branch (61:7): [True: 314, False: 0]
  ------------------
   62|    314|      return SHA_256::compress_digest_x86(digest, input, blocks);
   63|    314|   }
   64|      0|#endif
   65|       |
   66|       |#if defined(BOTAN_HAS_SHA2_32_ARMV8)
   67|       |   if(CPUID::has(CPUID::Feature::SHA2)) {
   68|       |      return SHA_256::compress_digest_armv8(digest, input, blocks);
   69|       |   }
   70|       |#endif
   71|       |
   72|      0|#if defined(BOTAN_HAS_SHA2_32_X86_AVX2)
   73|      0|   if(CPUID::has(CPUID::Feature::AVX2, CPUID::Feature::BMI)) {
  ------------------
  |  Branch (73:7): [True: 0, False: 0]
  ------------------
   74|      0|      return SHA_256::compress_digest_x86_avx2(digest, input, blocks);
   75|      0|   }
   76|      0|#endif
   77|       |
   78|      0|#if defined(BOTAN_HAS_SHA2_32_SIMD)
   79|      0|   if(CPUID::has(CPUID::Feature::SIMD_4X32)) {
  ------------------
  |  Branch (79:7): [True: 0, False: 0]
  ------------------
   80|      0|      return SHA_256::compress_digest_x86_simd(digest, input, blocks);
   81|      0|   }
   82|      0|#endif
   83|       |
   84|      0|   uint32_t A = digest[0];
   85|      0|   uint32_t B = digest[1];
   86|      0|   uint32_t C = digest[2];
   87|      0|   uint32_t D = digest[3];
   88|      0|   uint32_t E = digest[4];
   89|      0|   uint32_t F = digest[5];
   90|      0|   uint32_t G = digest[6];
   91|      0|   uint32_t H = digest[7];
   92|       |
   93|      0|   std::array<uint32_t, 16> W{};
   94|       |
   95|      0|   BufferSlicer in(input);
   96|       |
   97|      0|   for(size_t i = 0; i != blocks; ++i) {
  ------------------
  |  Branch (97:22): [True: 0, False: 0]
  ------------------
   98|      0|      load_be(W, in.take<block_bytes>());
   99|       |
  100|       |      // clang-format off
  101|       |
  102|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W[ 0], W[14], W[ 9], W[ 1], 0x428A2F98);
  103|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W[ 1], W[15], W[10], W[ 2], 0x71374491);
  104|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W[ 2], W[ 0], W[11], W[ 3], 0xB5C0FBCF);
  105|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W[ 3], W[ 1], W[12], W[ 4], 0xE9B5DBA5);
  106|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W[ 4], W[ 2], W[13], W[ 5], 0x3956C25B);
  107|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W[ 5], W[ 3], W[14], W[ 6], 0x59F111F1);
  108|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W[ 6], W[ 4], W[15], W[ 7], 0x923F82A4);
  109|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W[ 7], W[ 5], W[ 0], W[ 8], 0xAB1C5ED5);
  110|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W[ 8], W[ 6], W[ 1], W[ 9], 0xD807AA98);
  111|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W[ 9], W[ 7], W[ 2], W[10], 0x12835B01);
  112|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W[10], W[ 8], W[ 3], W[11], 0x243185BE);
  113|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W[11], W[ 9], W[ 4], W[12], 0x550C7DC3);
  114|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W[12], W[10], W[ 5], W[13], 0x72BE5D74);
  115|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W[13], W[11], W[ 6], W[14], 0x80DEB1FE);
  116|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W[14], W[12], W[ 7], W[15], 0x9BDC06A7);
  117|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W[15], W[13], W[ 8], W[ 0], 0xC19BF174);
  118|       |
  119|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W[ 0], W[14], W[ 9], W[ 1], 0xE49B69C1);
  120|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W[ 1], W[15], W[10], W[ 2], 0xEFBE4786);
  121|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W[ 2], W[ 0], W[11], W[ 3], 0x0FC19DC6);
  122|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W[ 3], W[ 1], W[12], W[ 4], 0x240CA1CC);
  123|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W[ 4], W[ 2], W[13], W[ 5], 0x2DE92C6F);
  124|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W[ 5], W[ 3], W[14], W[ 6], 0x4A7484AA);
  125|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W[ 6], W[ 4], W[15], W[ 7], 0x5CB0A9DC);
  126|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W[ 7], W[ 5], W[ 0], W[ 8], 0x76F988DA);
  127|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W[ 8], W[ 6], W[ 1], W[ 9], 0x983E5152);
  128|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W[ 9], W[ 7], W[ 2], W[10], 0xA831C66D);
  129|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W[10], W[ 8], W[ 3], W[11], 0xB00327C8);
  130|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W[11], W[ 9], W[ 4], W[12], 0xBF597FC7);
  131|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W[12], W[10], W[ 5], W[13], 0xC6E00BF3);
  132|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W[13], W[11], W[ 6], W[14], 0xD5A79147);
  133|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W[14], W[12], W[ 7], W[15], 0x06CA6351);
  134|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W[15], W[13], W[ 8], W[ 0], 0x14292967);
  135|       |
  136|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W[ 0], W[14], W[ 9], W[ 1], 0x27B70A85);
  137|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W[ 1], W[15], W[10], W[ 2], 0x2E1B2138);
  138|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W[ 2], W[ 0], W[11], W[ 3], 0x4D2C6DFC);
  139|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W[ 3], W[ 1], W[12], W[ 4], 0x53380D13);
  140|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W[ 4], W[ 2], W[13], W[ 5], 0x650A7354);
  141|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W[ 5], W[ 3], W[14], W[ 6], 0x766A0ABB);
  142|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W[ 6], W[ 4], W[15], W[ 7], 0x81C2C92E);
  143|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W[ 7], W[ 5], W[ 0], W[ 8], 0x92722C85);
  144|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W[ 8], W[ 6], W[ 1], W[ 9], 0xA2BFE8A1);
  145|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W[ 9], W[ 7], W[ 2], W[10], 0xA81A664B);
  146|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W[10], W[ 8], W[ 3], W[11], 0xC24B8B70);
  147|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W[11], W[ 9], W[ 4], W[12], 0xC76C51A3);
  148|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W[12], W[10], W[ 5], W[13], 0xD192E819);
  149|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W[13], W[11], W[ 6], W[14], 0xD6990624);
  150|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W[14], W[12], W[ 7], W[15], 0xF40E3585);
  151|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W[15], W[13], W[ 8], W[ 0], 0x106AA070);
  152|       |
  153|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W[ 0], W[14], W[ 9], W[ 1], 0x19A4C116);
  154|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W[ 1], W[15], W[10], W[ 2], 0x1E376C08);
  155|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W[ 2], W[ 0], W[11], W[ 3], 0x2748774C);
  156|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W[ 3], W[ 1], W[12], W[ 4], 0x34B0BCB5);
  157|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W[ 4], W[ 2], W[13], W[ 5], 0x391C0CB3);
  158|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W[ 5], W[ 3], W[14], W[ 6], 0x4ED8AA4A);
  159|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W[ 6], W[ 4], W[15], W[ 7], 0x5B9CCA4F);
  160|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W[ 7], W[ 5], W[ 0], W[ 8], 0x682E6FF3);
  161|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W[ 8], W[ 6], W[ 1], W[ 9], 0x748F82EE);
  162|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W[ 9], W[ 7], W[ 2], W[10], 0x78A5636F);
  163|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W[10], W[ 8], W[ 3], W[11], 0x84C87814);
  164|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W[11], W[ 9], W[ 4], W[12], 0x8CC70208);
  165|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W[12], W[10], W[ 5], W[13], 0x90BEFFFA);
  166|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W[13], W[11], W[ 6], W[14], 0xA4506CEB);
  167|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W[14], W[12], W[ 7], W[15], 0xBEF9A3F7);
  168|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W[15], W[13], W[ 8], W[ 0], 0xC67178F2);
  169|       |
  170|       |      // clang-format on
  171|       |
  172|      0|      A = (digest[0] += A);
  173|      0|      B = (digest[1] += B);
  174|      0|      C = (digest[2] += C);
  175|      0|      D = (digest[3] += D);
  176|      0|      E = (digest[4] += E);
  177|      0|      F = (digest[5] += F);
  178|      0|      G = (digest[6] += G);
  179|      0|      H = (digest[7] += H);
  180|      0|   }
  181|      0|}
_ZN5Botan7SHA_25610compress_nERNSt3__16vectorIjNS_16secure_allocatorIjEEEENS1_4spanIKhLm18446744073709551615EEEm:
  215|    314|void SHA_256::compress_n(digest_type& digest, std::span<const uint8_t> input, size_t blocks) {
  216|    314|   SHA_256::compress_digest(digest, input, blocks);
  217|    314|}
_ZN5Botan7SHA_2564initERNSt3__16vectorIjNS_16secure_allocatorIjEEEE:
  219|    264|void SHA_256::init(digest_type& digest) {
  220|    264|   digest.assign({0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19});
  221|    264|}
_ZN5Botan7SHA_2568add_dataENSt3__14spanIKhLm18446744073709551615EEE:
  231|    264|void SHA_256::add_data(std::span<const uint8_t> input) {
  232|    264|   m_md.update(input);
  233|    264|}
_ZN5Botan7SHA_25612final_resultENSt3__14spanIhLm18446744073709551615EEE:
  235|    126|void SHA_256::final_result(std::span<uint8_t> output) {
  236|    126|   m_md.final(output);
  237|    126|}

_ZN5Botan7SHA_25619compress_digest_x86ERNSt3__16vectorIjNS_16secure_allocatorIjEEEENS1_4spanIKhLm18446744073709551615EEEm:
   58|    314|                                                                                    size_t blocks) {
   59|    314|   alignas(64) static const uint32_t K[] = {
   60|    314|      0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5,
   61|    314|      0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174,
   62|    314|      0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC, 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA,
   63|    314|      0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967,
   64|    314|      0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85,
   65|    314|      0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070,
   66|    314|      0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3,
   67|    314|      0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2,
   68|    314|   };
   69|       |
   70|    314|   const uint8_t* input = input_span.data();
   71|       |
   72|    314|   SIMD_4x32 S0 = SIMD_4x32::load_le(&digest[0]);  // NOLINT(*container-data-pointer)
   73|    314|   SIMD_4x32 S1 = SIMD_4x32::load_le(&digest[4]);
   74|       |
   75|    314|   sha256_permute_state(S0, S1);
   76|       |
   77|  3.25k|   while(blocks > 0) {
  ------------------
  |  Branch (77:10): [True: 2.94k, False: 314]
  ------------------
   78|  2.94k|      const auto S0_SAVE = S0;
   79|  2.94k|      const auto S1_SAVE = S1;
   80|       |
   81|  2.94k|      auto W0 = SIMD_4x32::load_be(input);
   82|  2.94k|      auto W1 = SIMD_4x32::load_be(input + 16);
   83|  2.94k|      auto W2 = SIMD_4x32::load_be(input + 32);
   84|  2.94k|      auto W3 = SIMD_4x32::load_be(input + 48);
   85|       |
   86|  2.94k|      sha256_rnds4(S0, S1, W0, SIMD_4x32::load_le(&K[0]));
   87|  2.94k|      sha256_rnds4(S0, S1, W1, SIMD_4x32::load_le(&K[4]));
   88|  2.94k|      sha256_rnds4(S0, S1, W2, SIMD_4x32::load_le(&K[8]));
   89|  2.94k|      sha256_rnds4(S0, S1, W3, SIMD_4x32::load_le(&K[12]));
   90|       |
   91|  2.94k|      W0 = SIMD_4x32(_mm_sha256msg1_epu32(W0.raw(), W1.raw()));
   92|  2.94k|      W1 = SIMD_4x32(_mm_sha256msg1_epu32(W1.raw(), W2.raw()));
   93|       |
   94|  2.94k|      sha256_msg_exp(W2, W3, W0, W1);
   95|       |
   96|  2.94k|      sha256_rnds4(S0, S1, W0, SIMD_4x32::load_le(&K[4 * 4]));
   97|  2.94k|      sha256_rnds4(S0, S1, W1, SIMD_4x32::load_le(&K[4 * 5]));
   98|       |
   99|  2.94k|      sha256_msg_exp(W0, W1, W2, W3);
  100|       |
  101|  2.94k|      sha256_rnds4(S0, S1, W2, SIMD_4x32::load_le(&K[4 * 6]));
  102|  2.94k|      sha256_rnds4(S0, S1, W3, SIMD_4x32::load_le(&K[4 * 7]));
  103|       |
  104|  2.94k|      sha256_msg_exp(W2, W3, W0, W1);
  105|       |
  106|  2.94k|      sha256_rnds4(S0, S1, W0, SIMD_4x32::load_le(&K[4 * 8]));
  107|  2.94k|      sha256_rnds4(S0, S1, W1, SIMD_4x32::load_le(&K[4 * 9]));
  108|       |
  109|  2.94k|      sha256_msg_exp(W0, W1, W2, W3);
  110|       |
  111|  2.94k|      sha256_rnds4(S0, S1, W2, SIMD_4x32::load_le(&K[4 * 10]));
  112|  2.94k|      sha256_rnds4(S0, S1, W3, SIMD_4x32::load_le(&K[4 * 11]));
  113|       |
  114|  2.94k|      sha256_msg_exp(W2, W3, W0, W1);
  115|       |
  116|  2.94k|      sha256_rnds4(S0, S1, W0, SIMD_4x32::load_le(&K[4 * 12]));
  117|  2.94k|      sha256_rnds4(S0, S1, W1, SIMD_4x32::load_le(&K[4 * 13]));
  118|       |
  119|  2.94k|      sha256_msg_exp(W0, W1, W2, W3);
  120|       |
  121|  2.94k|      sha256_rnds4(S0, S1, W2, SIMD_4x32::load_le(&K[4 * 14]));
  122|  2.94k|      sha256_rnds4(S0, S1, W3, SIMD_4x32::load_le(&K[4 * 15]));
  123|       |
  124|       |      // Add values back to state
  125|  2.94k|      S0 += S0_SAVE;
  126|  2.94k|      S1 += S1_SAVE;
  127|       |
  128|  2.94k|      input += 64;
  129|  2.94k|      blocks--;
  130|  2.94k|   }
  131|       |
  132|    314|   sha256_permute_state(S1, S0);
  133|       |
  134|    314|   S0.store_le(&digest[0]);  // NOLINT(*container-data-pointer)
  135|    314|   S1.store_le(&digest[4]);
  136|    314|}
sha2_32_x86.cpp:_ZN5Botan12_GLOBAL__N_120sha256_permute_stateERNS_9SIMD_4x32ES2_:
   43|    628|BOTAN_FORCE_INLINE BOTAN_FN_ISA_SHANI void sha256_permute_state(SIMD_4x32& S0, SIMD_4x32& S1) {
   44|    628|   S0 = SIMD_4x32(_mm_shuffle_epi32(S0.raw(), 0b10110001));  // CDAB
   45|    628|   S1 = SIMD_4x32(_mm_shuffle_epi32(S1.raw(), 0b00011011));  // EFGH
   46|       |
   47|    628|   const auto T = SIMD_4x32::alignr8(S0, S1);                  // ABEF
   48|       |   S1 = SIMD_4x32(_mm_blend_epi16(S1.raw(), S0.raw(), 0xF0));  // CDGH
   49|    628|   S0 = T;
   50|    628|}
sha2_32_x86.cpp:_ZN5Botan12_GLOBAL__N_112sha256_rnds4ERNS_9SIMD_4x32ES2_RKS1_S4_:
   27|  47.0k|                                                        const SIMD_4x32& k) {
   28|  47.0k|   const auto mk = msg + k;
   29|  47.0k|   S1 = SIMD_4x32(_mm_sha256rnds2_epu32(S1.raw(), S0.raw(), mk.raw()));
   30|  47.0k|   S0 = SIMD_4x32(_mm_sha256rnds2_epu32(S0.raw(), S1.raw(), mk.shift_elems_right<2>().raw()));
   31|  47.0k|}
sha2_32_x86.cpp:_ZN5Botan12_GLOBAL__N_114sha256_msg_expERNS_9SIMD_4x32ES2_S2_S2_:
   33|  17.6k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_SHANI void sha256_msg_exp(SIMD_4x32& W0, SIMD_4x32& W1, SIMD_4x32& W2, SIMD_4x32& W3) {
   34|  17.6k|   W2 += SIMD_4x32::alignr4(W1, W0);
   35|  17.6k|   W0 = SIMD_4x32(_mm_sha256msg1_epu32(W0.raw(), W1.raw()));
   36|  17.6k|   W2 = SIMD_4x32(_mm_sha256msg2_epu32(W2.raw(), W1.raw()));
   37|       |
   38|  17.6k|   W3 += SIMD_4x32::alignr4(W2, W1);
   39|  17.6k|   W1 = SIMD_4x32(_mm_sha256msg1_epu32(W1.raw(), W2.raw()));
   40|  17.6k|   W3 = SIMD_4x32(_mm_sha256msg2_epu32(W3.raw(), W2.raw()));
   41|  17.6k|}

_ZN5Botan3TLS21Client_Hello_InternalC2ERKNSt3__16vectorIhNS2_9allocatorIhEEEE:
   46|  2.89k|Client_Hello_Internal::Client_Hello_Internal(const std::vector<uint8_t>& buf) {
   47|       |   /*
   48|       |   Minimum possible client hello
   49|       |
   50|       |   version: 2 bytes
   51|       |   random: 32 bytes
   52|       |   session_id len: 1 byte
   53|       |   ciphersuite_len: 2
   54|       |   ciphersuite (single): 2
   55|       |   compression_len: 1
   56|       |   compression (single): 1
   57|       |   */
   58|       |
   59|  2.89k|   constexpr size_t MinimumClientHelloBytes = 2 + 32 + 1 + 2 + 2 + 1 + 1;
   60|  2.89k|   if(buf.size() < MinimumClientHelloBytes) {
  ------------------
  |  Branch (60:7): [True: 20, False: 2.87k]
  ------------------
   61|     20|      throw Decoding_Error("Client_Hello: Packet corrupted");
   62|     20|   }
   63|       |
   64|  2.87k|   TLS_Data_Reader reader("ClientHello", buf);
   65|       |
   66|  2.87k|   const uint8_t major_version = reader.get_byte();
   67|  2.87k|   const uint8_t minor_version = reader.get_byte();
   68|       |
   69|  2.87k|   m_legacy_version = Protocol_Version(major_version, minor_version);
   70|       |
   71|       |   // DTLS has an additional 1 byte cookie length field
   72|  2.87k|   if(m_legacy_version.is_datagram_protocol() && buf.size() < MinimumClientHelloBytes + 1) {
  ------------------
  |  Branch (72:7): [True: 141, False: 2.73k]
  |  Branch (72:50): [True: 3, False: 138]
  ------------------
   73|      3|      throw Decoding_Error("Client_Hello: DTLS packet corrupted");
   74|      3|   }
   75|       |
   76|  2.86k|   m_random = reader.get_fixed<uint8_t>(32);
   77|  2.86k|   m_session_id = Session_ID(reader.get_range<uint8_t>(1, 0, 32));
   78|       |
   79|  2.86k|   if(m_legacy_version.is_datagram_protocol()) {
  ------------------
  |  Branch (79:7): [True: 138, False: 2.73k]
  ------------------
   80|    138|      auto sha256 = HashFunction::create_or_throw("SHA-256");
   81|    138|      sha256->update(reader.get_data_read_so_far());
   82|       |
   83|    138|      m_hello_cookie = reader.get_range<uint8_t>(1, 0, 255);
   84|       |
   85|    138|      sha256->update(reader.get_remaining());
   86|    138|      m_cookie_input_bits = sha256->final_stdvec();
   87|    138|   }
   88|       |
   89|  2.86k|   m_suites = reader.get_range_vector<uint16_t>(2, 1, 32767);
   90|  2.86k|   m_comp_methods = reader.get_range_vector<uint8_t>(1, 1, 255);
   91|       |
   92|  2.86k|   m_extensions.deserialize(reader, Connection_Side::Client, Handshake_Type::ClientHello);
   93|  2.86k|}
_ZN5Botan3TLS12Client_HelloD2Ev:
  126|    697|Client_Hello::~Client_Hello() = default;
_ZN5Botan3TLS12Client_HelloC2ENSt3__110unique_ptrINS0_21Client_Hello_InternalENS2_14default_deleteIS4_EEEE:
  133|    697|Client_Hello::Client_Hello(std::unique_ptr<Client_Hello_Internal> data) : m_data(std::move(data)) {
  134|    697|   BOTAN_ASSERT_NONNULL(m_data);
  ------------------
  |  |  116|    697|   do {                                                                                   \
  |  |  117|    697|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (117:10): [True: 0, False: 697]
  |  |  ------------------
  |  |  118|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  119|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  120|      0|      }                                                                                   \
  |  |  121|    697|   } while(0)
  |  |  ------------------
  |  |  |  Branch (121:12): [Folded, False: 697]
  |  |  ------------------
  ------------------
  135|    697|}
_ZNK5Botan3TLS12Client_Hello13offered_suiteEt:
  209|    697|bool Client_Hello::offered_suite(uint16_t ciphersuite) const {
  210|    697|   return std::find(m_data->ciphersuites().cbegin(), m_data->ciphersuites().cend(), ciphersuite) !=
  211|    697|          m_data->ciphersuites().cend();
  212|    697|}
_ZN5Botan3TLS20Client_Hello_12_ShimC2ENSt3__110unique_ptrINS0_21Client_Hello_InternalENS2_14default_deleteIS4_EEEE:
  288|    697|      Client_Hello(std::move(data)) {}

_ZN5Botan3TLS15Client_Hello_12C2ERKNSt3__16vectorIhNS2_9allocatorIhEEEE:
  266|  2.89k|      Client_Hello_12(std::make_unique<Client_Hello_Internal>(buf)) {}
_ZN5Botan3TLS15Client_Hello_12C2ENSt3__110unique_ptrINS0_21Client_Hello_InternalENS2_14default_deleteIS4_EEEE:
  268|    697|Client_Hello_12::Client_Hello_12(std::unique_ptr<Client_Hello_Internal> data) : Client_Hello_12_Shim(std::move(data)) {
  269|    697|   const uint16_t TLS_EMPTY_RENEGOTIATION_INFO_SCSV = 0x00FF;
  270|       |
  271|    697|   if(offered_suite(static_cast<uint16_t>(TLS_EMPTY_RENEGOTIATION_INFO_SCSV))) {
  ------------------
  |  Branch (271:7): [True: 196, False: 501]
  ------------------
  272|    196|      if(const Renegotiation_Extension* reneg = m_data->extensions().get<Renegotiation_Extension>()) {
  ------------------
  |  Branch (272:41): [True: 7, False: 189]
  ------------------
  273|      7|         if(!reneg->renegotiation_info().empty()) {
  ------------------
  |  Branch (273:13): [True: 5, False: 2]
  ------------------
  274|      5|            throw TLS_Exception(Alert::HandshakeFailure, "Client sent renegotiation SCSV and non-empty extension");
  275|      5|         }
  276|    189|      } else {
  277|       |         // add fake extension
  278|    189|         m_data->extensions().add(new Renegotiation_Extension());  // NOLINT(*-owning-memory)
  279|    189|      }
  280|    196|   }
  281|    697|}

_ZN5Botan3TLS23Renegotiation_ExtensionC2ERNS0_15TLS_Data_ReaderEt:
   24|     30|      m_reneg_data(reader.get_range<uint8_t>(1, 0, 255)) {
   25|     30|   if(m_reneg_data.size() + 1 != extension_size) {
  ------------------
  |  Branch (25:7): [True: 14, False: 16]
  ------------------
   26|     14|      throw Decoding_Error("Bad encoding for secure renegotiation extn");
   27|     14|   }
   28|     30|}
_ZN5Botan3TLS23Supported_Point_FormatsC2ERNS0_15TLS_Data_ReaderEt:
   45|     74|Supported_Point_Formats::Supported_Point_Formats(TLS_Data_Reader& reader, uint16_t extension_size) {
   46|     74|   const uint8_t len = reader.get_byte();
   47|       |
   48|     74|   if(len + 1 != extension_size) {
  ------------------
  |  Branch (48:7): [True: 17, False: 57]
  ------------------
   49|     17|      throw Decoding_Error("Inconsistent length field in supported point formats list");
   50|     17|   }
   51|       |
   52|     57|   bool includes_uncompressed = false;
   53|    634|   for(size_t i = 0; i != len; ++i) {
  ------------------
  |  Branch (53:22): [True: 613, False: 21]
  ------------------
   54|    613|      const uint8_t format = reader.get_byte();
   55|       |
   56|    613|      if(static_cast<ECPointFormat>(format) == UNCOMPRESSED) {
  ------------------
  |  Branch (56:10): [True: 5, False: 608]
  ------------------
   57|      5|         m_prefers_compressed = false;
   58|      5|         reader.discard_next(len - i - 1);
   59|      5|         return;
   60|    608|      } else if(static_cast<ECPointFormat>(format) == ANSIX962_COMPRESSED_PRIME) {
  ------------------
  |  Branch (60:17): [True: 31, False: 577]
  ------------------
   61|     31|         m_prefers_compressed = true;
   62|     31|         std::vector<uint8_t> remaining_formats = reader.get_fixed<uint8_t>(len - i - 1);
   63|     31|         includes_uncompressed =
   64|     31|            std::any_of(std::begin(remaining_formats), std::end(remaining_formats), [](uint8_t remaining_format) {
   65|     31|               return static_cast<ECPointFormat>(remaining_format) == UNCOMPRESSED;
   66|     31|            });
   67|     31|         break;
   68|     31|      }
   69|       |
   70|       |      // ignore ANSIX962_COMPRESSED_CHAR2, we don't support these curves
   71|    613|   }
   72|       |
   73|       |   // RFC 4492 5.1.:
   74|       |   //   If the Supported Point Formats Extension is indeed sent, it MUST contain the value 0 (uncompressed)
   75|       |   //   as one of the items in the list of point formats.
   76|       |   // Note:
   77|       |   //   RFC 8422 5.1.2. explicitly requires this check,
   78|       |   //   but only if the Supported Groups extension was sent.
   79|     52|   if(!includes_uncompressed) {
  ------------------
  |  Branch (79:7): [True: 42, False: 10]
  ------------------
   80|     42|      throw TLS_Exception(Alert::IllegalParameter,
   81|     42|                          "Supported Point Formats Extension must contain the uncompressed point format");
   82|     42|   }
   83|     52|}
_ZN5Botan3TLS24Session_Ticket_ExtensionC2ERNS0_15TLS_Data_ReaderEtNS0_15Connection_SideE:
   87|     44|                                                   Connection_Side from) {
   88|       |   // RFC 5077 3.2: in a ServerHello the SessionTicket extension is just a
   89|       |   // flag indicating that a NewSessionTicket handshake message will follow;
   90|       |   // its extension_data MUST be empty. A ticket body is only valid in a
   91|       |   // ClientHello.
   92|     44|   if(from == Connection_Side::Server && extension_size != 0) {
  ------------------
  |  Branch (92:7): [True: 0, False: 44]
  |  Branch (92:42): [True: 0, False: 0]
  ------------------
   93|      0|      throw Decoding_Error("Server sent a non-empty SessionTicket extension");
   94|      0|   }
   95|     44|   m_ticket = Session_Ticket(reader.get_elem<uint8_t, std::vector<uint8_t>>(extension_size));
   96|     44|}
_ZN5Botan3TLS22Extended_Master_SecretC2ERNS0_15TLS_Data_ReaderEt:
   98|     44|Extended_Master_Secret::Extended_Master_Secret(TLS_Data_Reader& /*unused*/, uint16_t extension_size) {
   99|     44|   if(extension_size != 0) {
  ------------------
  |  Branch (99:7): [True: 12, False: 32]
  ------------------
  100|     12|      throw Decoding_Error("Invalid extended_master_secret extension");
  101|     12|   }
  102|     44|}
_ZN5Botan3TLS16Encrypt_then_MACC2ERNS0_15TLS_Data_ReaderEt:
  108|     35|Encrypt_then_MAC::Encrypt_then_MAC(TLS_Data_Reader& /*unused*/, uint16_t extension_size) {
  109|     35|   if(extension_size != 0) {
  ------------------
  |  Branch (109:7): [True: 12, False: 23]
  ------------------
  110|     12|      throw Decoding_Error("Invalid encrypt_then_mac extension");
  111|     12|   }
  112|     35|}
tls_extensions_12.cpp:_ZZN5Botan3TLS23Supported_Point_FormatsC1ERNS0_15TLS_Data_ReaderEtENK3$_0clEh:
   64|    278|            std::any_of(std::begin(remaining_formats), std::end(remaining_formats), [](uint8_t remaining_format) {
   65|    278|               return static_cast<ECPointFormat>(remaining_format) == UNCOMPRESSED;
   66|    278|            });

_ZN5Botan3TLS6CookieC2ERNS0_15TLS_Data_ReaderEt:
   26|     46|Cookie::Cookie(TLS_Data_Reader& reader, uint16_t extension_size) {
   27|       |   // RFC 8446 4.2.2
   28|       |   //    struct {
   29|       |   //       opaque cookie<1..2^16-1>;
   30|       |   //    } Cookie;
   31|       |   //
   32|       |   // The wire form requires a 2-byte length field plus at least one byte of
   33|       |   // cookie data, so the minimum extension size is 3 bytes.
   34|     46|   if(extension_size < 3) {
  ------------------
  |  Branch (34:7): [True: 1, False: 45]
  ------------------
   35|      1|      throw Decoding_Error("Empty cookie extension is illegal");
   36|      1|   }
   37|       |
   38|     45|   const uint16_t len = reader.get_uint16_t();
   39|       |
   40|     45|   if(static_cast<size_t>(len) + 2 != extension_size) {
  ------------------
  |  Branch (40:7): [True: 33, False: 12]
  ------------------
   41|     33|      throw Decoding_Error("Inconsistent length in cookie extension");
   42|     33|   }
   43|       |
   44|     12|   m_cookie = reader.get_fixed<uint8_t>(len);
   45|     12|}
_ZN5Botan3TLS22PSK_Key_Exchange_ModesC2ERNS0_15TLS_Data_ReaderEt:
   65|     78|PSK_Key_Exchange_Modes::PSK_Key_Exchange_Modes(TLS_Data_Reader& reader, uint16_t extension_size) {
   66|       |   // RFC 8446 4.2.9
   67|       |   //    struct {
   68|       |   //       PskKeyExchangeMode ke_modes<1..255>;
   69|       |   //    } PskKeyExchangeModes;
   70|       |   //
   71|       |   // The wire form is a 1-byte length followed by mode_count mode bytes,
   72|       |   // with mode_count in [1, 255], so the extension size is in [2, 256].
   73|     78|   if(extension_size < 2) {
  ------------------
  |  Branch (73:7): [True: 3, False: 75]
  ------------------
   74|      3|      throw Decoding_Error("Empty psk_key_exchange_modes extension is illegal");
   75|      3|   }
   76|       |
   77|     75|   const auto mode_count = reader.get_byte();
   78|     75|   if(static_cast<size_t>(mode_count) + 1 != extension_size) {
  ------------------
  |  Branch (78:7): [True: 21, False: 54]
  ------------------
   79|     21|      throw Decoding_Error("Inconsistent length in psk_key_exchange_modes extension");
   80|     21|   }
   81|       |
   82|  2.43k|   for(uint16_t i = 0; i < mode_count; ++i) {
  ------------------
  |  Branch (82:24): [True: 2.38k, False: 54]
  ------------------
   83|  2.38k|      const auto mode = static_cast<PSK_Key_Exchange_Mode>(reader.get_byte());
   84|  2.38k|      if(mode == PSK_Key_Exchange_Mode::PSK_KE || mode == PSK_Key_Exchange_Mode::PSK_DHE_KE) {
  ------------------
  |  Branch (84:10): [True: 880, False: 1.50k]
  |  Branch (84:51): [True: 688, False: 815]
  ------------------
   85|  1.56k|         m_modes.push_back(mode);
   86|  1.56k|      }
   87|  2.38k|   }
   88|     54|}
_ZN5Botan3TLS23Certificate_AuthoritiesC2ERNS0_15TLS_Data_ReaderEt:
  106|    933|Certificate_Authorities::Certificate_Authorities(TLS_Data_Reader& reader, uint16_t extension_size) {
  107|    933|   if(extension_size < 2) {
  ------------------
  |  Branch (107:7): [True: 2, False: 931]
  ------------------
  108|      2|      throw Decoding_Error("Empty certificate_authorities extension is illegal");
  109|      2|   }
  110|       |
  111|    931|   const uint16_t purported_size = reader.get_uint16_t();
  112|       |
  113|    931|   if(reader.remaining_bytes() != purported_size) {
  ------------------
  |  Branch (113:7): [True: 27, False: 904]
  ------------------
  114|     27|      throw Decoding_Error("Inconsistent length in certificate_authorities extension");
  115|     27|   }
  116|       |
  117|       |   // RFC 8446 4.2.4: DistinguishedName authorities<3..2^16-1>;
  118|    904|   if(purported_size < 3) {
  ------------------
  |  Branch (118:7): [True: 3, False: 901]
  ------------------
  119|      3|      throw Decoding_Error("Empty certificate_authorities list is illegal");
  120|      3|   }
  121|       |
  122|  2.00k|   while(reader.has_remaining()) {
  ------------------
  |  Branch (122:10): [True: 1.10k, False: 901]
  ------------------
  123|       |      // RFC 8446 4.2.4: opaque DistinguishedName<1..2^16-1>
  124|  1.10k|      const std::vector<uint8_t> name_bits = reader.get_range<uint8_t>(2, 1, 65535);
  125|       |
  126|  1.10k|      BER_Decoder decoder(name_bits, BER_Decoder::Limits::DER());
  127|  1.10k|      m_distinguished_names.emplace_back();
  128|  1.10k|      decoder.decode(m_distinguished_names.back()).verify_end();
  129|  1.10k|   }
  130|    901|}
_ZN5Botan3TLS19EarlyDataIndicationC2ERNS0_15TLS_Data_ReaderEtNS0_14Handshake_TypeE:
  149|     26|                                         Handshake_Type message_type) {
  150|     26|   if(message_type == Handshake_Type::NewSessionTicket) {
  ------------------
  |  Branch (150:7): [True: 0, False: 26]
  ------------------
  151|      0|      if(extension_size != 4) {
  ------------------
  |  Branch (151:10): [True: 0, False: 0]
  ------------------
  152|      0|         throw TLS_Exception(Alert::DecodeError,
  153|      0|                             "Received an early_data extension in a NewSessionTicket message "
  154|      0|                             "without maximum early data size indication");
  155|      0|      }
  156|       |
  157|      0|      m_max_early_data_size = reader.get_uint32_t();
  158|     26|   } else if(extension_size != 0) {
  ------------------
  |  Branch (158:14): [True: 12, False: 14]
  ------------------
  159|     12|      throw TLS_Exception(Alert::DecodeError,
  160|     12|                          "Received an early_data extension containing an unexpected data "
  161|     12|                          "size indication");
  162|     12|   }
  163|     26|}

_ZN5Botan3TLS9Key_ShareC2ERNS0_15TLS_Data_ReaderEtNS0_14Handshake_TypeE:
  401|     99|Key_Share::Key_Share(TLS_Data_Reader& reader, uint16_t extension_size, Handshake_Type message_type) {
  402|     99|   if(message_type == Handshake_Type::ClientHello) {
  ------------------
  |  Branch (402:7): [True: 99, False: 0]
  ------------------
  403|     99|      m_impl = std::make_unique<Key_Share_Impl>(Key_Share_ClientHello(reader, extension_size));
  404|     99|   } else if(message_type == Handshake_Type::HelloRetryRequest) {
  ------------------
  |  Branch (404:14): [True: 0, False: 0]
  ------------------
  405|       |      // Connection_Side::Server
  406|      0|      m_impl = std::make_unique<Key_Share_Impl>(Key_Share_HelloRetryRequest(reader, extension_size));
  407|      0|   } else if(message_type == Handshake_Type::ServerHello) {
  ------------------
  |  Branch (407:14): [True: 0, False: 0]
  ------------------
  408|       |      // Connection_Side::Server
  409|      0|      m_impl = std::make_unique<Key_Share_Impl>(Key_Share_ServerHello(reader, extension_size));
  410|      0|   } else {
  411|      0|      throw Invalid_Argument(std::string("cannot create a Key_Share extension for message of type: ") +
  412|      0|                             handshake_type_to_string(message_type));
  413|      0|   }
  414|     99|}
_ZN5Botan3TLS9Key_ShareD2Ev:
  433|     17|Key_Share::~Key_Share() = default;
tls_extensions_key_share.cpp:_ZN5Botan3TLS12_GLOBAL__N_121Key_Share_ClientHelloC2ERNS0_15TLS_Data_ReaderEt:
  185|     99|      Key_Share_ClientHello(TLS_Data_Reader& reader, uint16_t /* extension_size */) {
  186|       |         // The reader is per-extension (Extensions::deserialize binds it to
  187|       |         // exactly extension_size bytes). Enforce that the inner
  188|       |         // client_shares length matches what the outer extension has left,
  189|       |         // then let the entry loop consume everything; extn_reader's
  190|       |         // assert_done() at the deserialize call site catches any leftover.
  191|     99|         const auto client_key_share_length = reader.get_uint16_t();
  192|     99|         if(reader.remaining_bytes() != client_key_share_length) {
  ------------------
  |  Branch (192:13): [True: 29, False: 70]
  ------------------
  193|     29|            throw TLS_Exception(Alert::DecodeError, "Inconsistent length in client KeyShare extension");
  194|     29|         }
  195|       |
  196|     70|         std::unordered_set<uint16_t> seen_groups;
  197|    339|         while(reader.has_remaining()) {
  ------------------
  |  Branch (197:16): [True: 280, False: 59]
  ------------------
  198|       |            // Each KeyShareEntry is at least 4 bytes (group + 2-byte length).
  199|       |            // Cleaner failure than the reader underflow we'd otherwise hit
  200|       |            // when the inner buffer ends mid-entry.
  201|    280|            if(reader.remaining_bytes() < 4) {
  ------------------
  |  Branch (201:16): [True: 10, False: 270]
  ------------------
  202|     10|               throw TLS_Exception(Alert::DecodeError, "Not enough data to read another KeyShareEntry");
  203|     10|            }
  204|       |
  205|    270|            Key_Share_Entry new_entry(reader);
  206|       |
  207|       |            // RFC 8446 4.2.8
  208|       |            //    Clients MUST NOT offer multiple KeyShareEntry values for the same
  209|       |            //    group. [...]
  210|       |            //    Servers MAY check for violations of these rules and abort the
  211|       |            //    handshake with an "illegal_parameter" alert if one is violated.
  212|    270|            if(!seen_groups.insert(new_entry.group().wire_code()).second) {
  ------------------
  |  Branch (212:16): [True: 1, False: 269]
  ------------------
  213|      1|               throw TLS_Exception(Alert::IllegalParameter, "Received multiple key share entries for the same group");
  214|      1|            }
  215|       |
  216|    269|            m_client_shares.emplace_back(std::move(new_entry));
  217|    269|         }
  218|     70|      }
tls_extensions_key_share.cpp:_ZN5Botan3TLS12_GLOBAL__N_115Key_Share_EntryC2ERNS0_15TLS_Data_ReaderE:
   47|    270|      explicit Key_Share_Entry(TLS_Data_Reader& reader) {
   48|       |         // TODO check that the group actually exists before casting...
   49|    270|         m_group = static_cast<Named_Group>(reader.get_uint16_t());
   50|       |         // RFC 8446 4.2.8: opaque key_exchange<1..2^16-1>
   51|    270|         m_key_exchange = reader.get_range<uint8_t>(2, 1, 65535);
   52|    270|      }
tls_extensions_key_share.cpp:_ZNK5Botan3TLS12_GLOBAL__N_115Key_Share_Entry5groupEv:
  105|    229|      Named_Group group() const { return m_group; }
tls_extensions_key_share.cpp:_ZN5Botan3TLS12_GLOBAL__N_121Key_Share_ClientHelloD2Ev:
  243|     51|      ~Key_Share_ClientHello() = default;
tls_extensions_key_share.cpp:_ZN5Botan3TLS12_GLOBAL__N_121Key_Share_ClientHelloC2EOS2_:
  248|     34|      Key_Share_ClientHello(Key_Share_ClientHello&&) = default;
tls_extensions_key_share.cpp:_ZN5Botan3TLS9Key_Share14Key_Share_ImplC2ENSt3__17variantIJNS0_12_GLOBAL__N_121Key_Share_ClientHelloENS5_21Key_Share_ServerHelloENS5_27Key_Share_HelloRetryRequestEEEE:
  396|     17|      explicit Key_Share_Impl(Key_Share_Type ks) : key_share(std::move(ks)) {}

_ZN5Botan3TLS3PSKC2ERNS0_15TLS_Data_ReaderEtNS0_14Handshake_TypeE:
  142|    213|PSK::PSK(TLS_Data_Reader& reader, uint16_t extension_size, Handshake_Type message_type) {
  143|    213|   if(message_type == Handshake_Type::ServerHello) {
  ------------------
  |  Branch (143:7): [True: 0, False: 213]
  ------------------
  144|      0|      if(extension_size != 2) {
  ------------------
  |  Branch (144:10): [True: 0, False: 0]
  ------------------
  145|      0|         throw TLS_Exception(Alert::DecodeError, "Server provided a malformed PSK extension");
  146|      0|      }
  147|       |
  148|      0|      const uint16_t selected_id = reader.get_uint16_t();
  149|      0|      m_impl = std::make_unique<PSK_Internal>(Server_PSK(selected_id));
  150|    213|   } else if(message_type == Handshake_Type::ClientHello) {
  ------------------
  |  Branch (150:14): [True: 213, False: 0]
  ------------------
  151|    213|      const auto identities_length = reader.get_uint16_t();
  152|    213|      const auto identities_offset = reader.read_so_far();
  153|       |
  154|    213|      std::vector<PskIdentity> psk_identities;
  155|  4.10k|      while(reader.has_remaining() && (reader.read_so_far() - identities_offset) < identities_length) {
  ------------------
  |  Branch (155:13): [True: 4.02k, False: 80]
  |  Branch (155:39): [True: 3.88k, False: 133]
  ------------------
  156|       |         /* Per RFC 8446 PskIdentity is
  157|       |
  158|       |         struct {
  159|       |            opaque identity<1..2^16-1>;
  160|       |            uint32 obfuscated_ticket_age;
  161|       |         } PskIdentity;
  162|       |
  163|       |         so we should reject an empty identity. However BoGo seems to expect
  164|       |         being able to send us such an identity, so for now we accept it.
  165|       |         */
  166|       |
  167|  3.88k|         auto identity = reader.get_tls_length_value(2);
  168|  3.88k|         const auto obfuscated_ticket_age = reader.get_uint32_t();
  169|  3.88k|         psk_identities.emplace_back(std::move(identity), obfuscated_ticket_age);
  170|  3.88k|      }
  171|       |
  172|    213|      if(psk_identities.empty()) {
  ------------------
  |  Branch (172:10): [True: 1, False: 212]
  ------------------
  173|      1|         throw TLS_Exception(Alert::DecodeError, "Empty PSK list");
  174|      1|      }
  175|       |
  176|    212|      if(reader.read_so_far() - identities_offset != identities_length) {
  ------------------
  |  Branch (176:10): [True: 40, False: 172]
  ------------------
  177|     40|         throw TLS_Exception(Alert::DecodeError, "Inconsistent PSK identity list");
  178|     40|      }
  179|       |
  180|    172|      const auto binders_length = reader.get_uint16_t();
  181|    172|      const auto binders_offset = reader.read_so_far();
  182|       |
  183|    172|      if(binders_length == 0) {
  ------------------
  |  Branch (183:10): [True: 1, False: 171]
  ------------------
  184|      1|         throw TLS_Exception(Alert::DecodeError, "Empty PSK binders list");
  185|      1|      }
  186|       |
  187|    171|      std::vector<Client_PSK> psks;
  188|  1.87k|      for(auto& psk_identity : psk_identities) {
  ------------------
  |  Branch (188:30): [True: 1.87k, False: 142]
  ------------------
  189|  1.87k|         if(!reader.has_remaining() || reader.read_so_far() - binders_offset >= binders_length) {
  ------------------
  |  Branch (189:13): [True: 25, False: 1.85k]
  |  Branch (189:40): [True: 4, False: 1.84k]
  ------------------
  190|     29|            throw TLS_Exception(Alert::IllegalParameter, "Not enough PSK binders");
  191|     29|         }
  192|       |
  193|       |         // RFC 8446 4.2.11 declares PskBinderEntry opaque<32..255>, but we accept any
  194|       |         // 0..255 length here and let validate_binder reject, which yields a bad_record_mac
  195|       |         // alert rather than decode_error. BoringSSL behaves the same way and BoGo has
  196|       |         // tests that specifically expect this.
  197|       |
  198|  1.84k|         psks.emplace_back(std::move(psk_identity), reader.get_tls_length_value(1));
  199|  1.84k|      }
  200|       |
  201|    142|      if(reader.read_so_far() - binders_offset != binders_length) {
  ------------------
  |  Branch (201:10): [True: 52, False: 90]
  ------------------
  202|     52|         throw TLS_Exception(Alert::IllegalParameter, "Too many PSK binders");
  203|     52|      }
  204|       |
  205|     90|      m_impl = std::make_unique<PSK_Internal>(std::move(psks));
  206|     90|   } else {
  207|      0|      throw TLS_Exception(Alert::DecodeError, "Found a PSK extension in an unexpected handshake message");
  208|      0|   }
  209|    213|}
_ZN5Botan3TLS3PSKD2Ev:
  231|     27|PSK::~PSK() = default;
tls_extensions_psk.cpp:_ZN5Botan3TLS12_GLOBAL__N_110Client_PSKC2ENS0_11PskIdentityENSt3__16vectorIhNS4_9allocatorIhEEEE:
   56|  1.83k|            m_identity(std::move(id)), m_binder(std::move(bndr)), m_is_resumption(false) {}
tls_extensions_psk.cpp:_ZN5Botan3TLS3PSK12PSK_InternalC2ENSt3__16vectorINS0_12_GLOBAL__N_110Client_PSKENS3_9allocatorIS6_EEEE:
  136|     27|      explicit PSK_Internal(std::vector<Client_PSK> clt_psks) : psk(std::move(clt_psks)) {}

_ZN5Botan3TLS10ExtensionsD2Ev:
  138|  2.89k|Extensions::~Extensions() = default;
_ZNK5Botan3TLS10Extensions3hasENS0_14Extension_CodeE:
  140|  9.78k|bool Extensions::has(Extension_Code type) const {
  141|  9.78k|   return m_extensions.contains(type);
  142|  9.78k|}
_ZNK5Botan3TLS10Extensions3getENS0_14Extension_CodeE:
  144|    196|Extension* Extensions::get(Extension_Code type) const {
  145|    196|   const auto i = m_extensions.find(type);
  146|       |
  147|    196|   if(i == m_extensions.end()) {
  ------------------
  |  Branch (147:7): [True: 189, False: 7]
  ------------------
  148|    189|      return nullptr;
  149|    189|   } else {
  150|      7|      return i->second.get();
  151|      7|   }
  152|    196|}
_ZN5Botan3TLS10Extensions3addENSt3__110unique_ptrINS0_9ExtensionENS2_14default_deleteIS4_EEEE:
  154|  4.06k|void Extensions::add(std::unique_ptr<Extension> extn) {
  155|  4.06k|   const auto type = extn->type();
  156|  4.06k|   if(has(type)) {
  ------------------
  |  Branch (156:7): [True: 0, False: 4.06k]
  ------------------
  157|      0|      throw Invalid_Argument("cannot add the same extension twice: " + std::to_string(static_cast<uint16_t>(type)));
  158|      0|   }
  159|       |
  160|  4.06k|   m_extension_codes.push_back(type);
  161|  4.06k|   m_extensions.emplace(type, std::move(extn));
  162|  4.06k|}
_ZN5Botan3TLS10Extensions11deserializeERNS0_15TLS_Data_ReaderENS0_15Connection_SideENS0_14Handshake_TypeE:
  164|  2.68k|void Extensions::deserialize(TLS_Data_Reader& reader, const Connection_Side from, const Handshake_Type message_type) {
  165|  2.68k|   if(reader.has_remaining()) {
  ------------------
  |  Branch (165:7): [True: 2.63k, False: 47]
  ------------------
  166|  2.63k|      const uint16_t all_extn_size = reader.get_uint16_t();
  167|       |
  168|  2.63k|      if(reader.remaining_bytes() != all_extn_size) {
  ------------------
  |  Branch (168:10): [True: 54, False: 2.58k]
  ------------------
  169|     54|         throw Decoding_Error("Bad extension size");
  170|     54|      }
  171|       |
  172|  8.35k|      while(reader.has_remaining()) {
  ------------------
  |  Branch (172:13): [True: 5.77k, False: 2.58k]
  ------------------
  173|  5.77k|         const uint16_t extension_code = reader.get_uint16_t();
  174|  5.77k|         const uint16_t extension_size = reader.get_uint16_t();
  175|       |
  176|  5.77k|         const auto type = static_cast<Extension_Code>(extension_code);
  177|       |
  178|  5.77k|         if(this->has(type)) {
  ------------------
  |  Branch (178:13): [True: 1, False: 5.77k]
  ------------------
  179|      1|            throw TLS_Exception(TLS::Alert::DecodeError, "Peer sent duplicated extensions");
  180|      1|         }
  181|       |
  182|       |         // TODO offer a function on reader that returns a byte range as a reference
  183|       |         // to avoid this copy of the extension data
  184|  5.77k|         const std::vector<uint8_t> extn_data = reader.get_fixed<uint8_t>(extension_size);
  185|  5.77k|         m_raw_extension_data[type] = extn_data;
  186|  5.77k|         TLS_Data_Reader extn_reader("Extension", extn_data);
  187|  5.77k|         this->add(make_extension(extn_reader, type, from, message_type));
  188|  5.77k|         extn_reader.assert_done();
  189|  5.77k|      }
  190|  2.58k|   }
  191|  2.68k|}
_ZN5Botan3TLS17Unknown_ExtensionC2ENS0_14Extension_CodeERNS0_15TLS_Data_ReaderEt:
  311|  3.20k|      m_type(type), m_value(reader.get_fixed<uint8_t>(extension_size)) {}
_ZN5Botan3TLS21Server_Name_IndicatorC2ERNS0_15TLS_Data_ReaderEtNS0_15Connection_SideE:
  317|    126|Server_Name_Indicator::Server_Name_Indicator(TLS_Data_Reader& reader, uint16_t extension_size, Connection_Side from) {
  318|       |   /*
  319|       |   RFC 6066 Section 3
  320|       |
  321|       |      A server that receives a client hello containing the "server_name"
  322|       |      extension MAY use the information contained in the extension to guide
  323|       |      its selection of an appropriate certificate to return to the client,
  324|       |      and/or other aspects of security policy.  In this event, the server
  325|       |      SHALL include an extension of type "server_name" in the (extended)
  326|       |      server hello.  The "extension_data" field of this extension SHALL be
  327|       |      empty.
  328|       |   */
  329|    126|   if(from == Connection_Side::Server) {
  ------------------
  |  Branch (329:7): [True: 0, False: 126]
  ------------------
  330|      0|      if(extension_size != 0) {
  ------------------
  |  Branch (330:10): [True: 0, False: 0]
  ------------------
  331|      0|         throw TLS_Exception(Alert::IllegalParameter, "Server sent non-empty SNI extension");
  332|      0|      }
  333|    126|   } else {
  334|       |      // Clients are required to send at least one name in the SNI
  335|    126|      if(extension_size == 0) {
  ------------------
  |  Branch (335:10): [True: 14, False: 112]
  ------------------
  336|     14|         throw TLS_Exception(Alert::IllegalParameter, "Client sent empty SNI extension");
  337|     14|      }
  338|       |
  339|    112|      const uint16_t name_bytes = reader.get_uint16_t();
  340|       |
  341|       |      // RFC 6066 3: a ServerName carrying a host_name (the only NameType
  342|       |      // currently defined and the only one this implementation acts on)
  343|       |      // requires at least 1 byte name_type + 2 byte length + 1 byte HostName.
  344|    112|      if(name_bytes + 2 != extension_size || name_bytes < 4) {
  ------------------
  |  Branch (344:10): [True: 34, False: 78]
  |  Branch (344:46): [True: 3, False: 75]
  ------------------
  345|     36|         throw Decoding_Error("Bad encoding of SNI extension");
  346|     36|      }
  347|       |
  348|     76|      BOTAN_ASSERT_NOMSG(reader.remaining_bytes() == name_bytes);
  ------------------
  |  |   77|     76|   do {                                                                     \
  |  |   78|     76|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|     76|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 76]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|     76|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 76]
  |  |  ------------------
  ------------------
  349|       |
  350|    418|      while(reader.has_remaining()) {
  ------------------
  |  Branch (350:13): [True: 362, False: 56]
  ------------------
  351|    362|         const uint8_t name_type = reader.get_byte();
  352|       |
  353|    362|         if(name_type == 0) {
  ------------------
  |  Branch (353:13): [True: 75, False: 287]
  ------------------
  354|       |            /*
  355|       |            RFC 6066 Section 3
  356|       |               The ServerNameList MUST NOT contain more than one name of the same name_type.
  357|       |            */
  358|     75|            if(!m_sni_host_name.empty()) {
  ------------------
  |  Branch (358:16): [True: 20, False: 55]
  ------------------
  359|     20|               throw Decoding_Error("TLS ServerNameIndicator contains more than one host_name");
  360|     20|            }
  361|     55|            m_sni_host_name = reader.get_string(2, 1, 65535);
  362|    287|         } else {
  363|       |            /*
  364|       |            Unknown name type - skip its length-prefixed value and continue
  365|       |
  366|       |            RFC 6066 Section 3
  367|       |               For backward compatibility, all future data structures associated
  368|       |               with new NameTypes MUST begin with a 16-bit length field.
  369|       |            */
  370|    287|            const uint16_t unknown_name_len = reader.get_uint16_t();
  371|    287|            reader.discard_next(unknown_name_len);
  372|    287|         }
  373|    362|      }
  374|     76|   }
  375|    126|}
_ZN5Botan3TLS39Application_Layer_Protocol_NotificationC2ERNS0_15TLS_Data_ReaderEtNS0_15Connection_SideE:
  443|    148|                                                                                 Connection_Side from) {
  444|    148|   if(extension_size < 2) {
  ------------------
  |  Branch (444:7): [True: 3, False: 145]
  ------------------
  445|      3|      throw Decoding_Error("ALPN extension cannot be empty");
  446|      3|   }
  447|       |
  448|    145|   const uint16_t name_bytes = reader.get_uint16_t();
  449|       |
  450|    145|   size_t bytes_remaining = extension_size - 2;
  451|       |
  452|    145|   if(name_bytes != bytes_remaining) {
  ------------------
  |  Branch (452:7): [True: 28, False: 117]
  ------------------
  453|     28|      throw Decoding_Error("Bad encoding of ALPN extension, bad length field");
  454|     28|   }
  455|       |
  456|       |   // RFC 7301 3.1: ProtocolName protocol_name_list<2..2^16-1>
  457|    117|   if(name_bytes == 0) {
  ------------------
  |  Branch (457:7): [True: 1, False: 116]
  ------------------
  458|      1|      throw Decoding_Error("Empty ALPN protocol_name_list not allowed");
  459|      1|   }
  460|       |
  461|  4.73k|   while(bytes_remaining > 0) {
  ------------------
  |  Branch (461:10): [True: 4.65k, False: 86]
  ------------------
  462|  4.65k|      const std::string p = reader.get_string(1, 0, 255);
  463|       |
  464|  4.65k|      if(bytes_remaining < p.size() + 1) {
  ------------------
  |  Branch (464:10): [True: 0, False: 4.65k]
  ------------------
  465|      0|         throw Decoding_Error("Bad encoding of ALPN, length field too long");
  466|      0|      }
  467|       |
  468|  4.65k|      if(p.empty()) {
  ------------------
  |  Branch (468:10): [True: 30, False: 4.62k]
  ------------------
  469|     30|         throw Decoding_Error("Empty ALPN protocol not allowed");
  470|     30|      }
  471|       |
  472|  4.62k|      bytes_remaining -= (p.size() + 1);
  473|       |
  474|  4.62k|      m_protocols.push_back(p);
  475|  4.62k|   }
  476|       |
  477|       |   // RFC 7301 3.1
  478|       |   //    The "extension_data" field of the [...] extension is structured the
  479|       |   //    same as described above for the client "extension_data", except that
  480|       |   //    the "ProtocolNameList" MUST contain exactly one "ProtocolName".
  481|     86|   if(from == Connection_Side::Server && m_protocols.size() != 1) {
  ------------------
  |  Branch (481:7): [True: 0, False: 86]
  |  Branch (481:42): [True: 0, False: 0]
  ------------------
  482|      0|      throw TLS_Exception(
  483|      0|         Alert::DecodeError,
  484|      0|         "Server sent " + std::to_string(m_protocols.size()) + " protocols in ALPN extension response");
  485|      0|   }
  486|     86|}
_ZN5Botan3TLS21Certificate_Type_BaseC2ERNS0_15TLS_Data_ReaderEtNS0_15Connection_SideE:
  549|     50|      m_from(from) {
  550|     50|   if(extension_size == 0) {
  ------------------
  |  Branch (550:7): [True: 3, False: 47]
  ------------------
  551|      3|      throw Decoding_Error("Certificate type extension cannot be empty");
  552|      3|   }
  553|       |
  554|     47|   if(from == Connection_Side::Client) {
  ------------------
  |  Branch (554:7): [True: 47, False: 0]
  ------------------
  555|     47|      const auto type_bytes = reader.get_tls_length_value(1);
  556|     47|      if(static_cast<size_t>(extension_size) != type_bytes.size() + 1) {
  ------------------
  |  Branch (556:10): [True: 13, False: 34]
  ------------------
  557|     13|         throw Decoding_Error("certificate type extension had inconsistent length");
  558|     13|      }
  559|       |      // RFC 7250 4: {client,server}_certificate_types<1..2^8-1> so must be non-empty
  560|     34|      if(type_bytes.empty()) {
  ------------------
  |  Branch (560:10): [True: 1, False: 33]
  ------------------
  561|      1|         throw Decoding_Error("Certificate type extension contains no types");
  562|      1|      }
  563|     33|      std::transform(
  564|     33|         type_bytes.begin(), type_bytes.end(), std::back_inserter(m_certificate_types), [](const auto type_byte) {
  565|     33|            return static_cast<Certificate_Type>(type_byte);
  566|     33|         });
  567|     33|   } else {
  568|       |      // RFC 7250 4.2
  569|       |      //    Note that only a single value is permitted in the
  570|       |      //    server_certificate_type extension when carried in the server hello.
  571|      0|      if(extension_size != 1) {
  ------------------
  |  Branch (571:10): [True: 0, False: 0]
  ------------------
  572|      0|         throw Decoding_Error("Server's certificate type extension must be of length 1");
  573|      0|      }
  574|      0|      const auto type_byte = reader.get_byte();
  575|      0|      m_certificate_types.push_back(static_cast<Certificate_Type>(type_byte));
  576|      0|   }
  577|     47|}
_ZN5Botan3TLS16Supported_GroupsC2ERNS0_15TLS_Data_ReaderEt:
  662|    232|Supported_Groups::Supported_Groups(TLS_Data_Reader& reader, uint16_t extension_size) {
  663|    232|   const uint16_t len = reader.get_uint16_t();
  664|       |
  665|    232|   if(len + 2 != extension_size) {
  ------------------
  |  Branch (665:7): [True: 25, False: 207]
  ------------------
  666|     25|      throw Decoding_Error("Inconsistent length field in supported groups list");
  667|     25|   }
  668|       |
  669|       |   // RFC 8446 4.2.7: NamedGroup named_group_list<2..2^16-1>;
  670|    207|   if(len == 0) {
  ------------------
  |  Branch (670:7): [True: 1, False: 206]
  ------------------
  671|      1|      throw Decoding_Error("Empty supported groups list");
  672|      1|   }
  673|       |
  674|    206|   if(len % 2 == 1) {
  ------------------
  |  Branch (674:7): [True: 1, False: 205]
  ------------------
  675|      1|      throw Decoding_Error("Supported groups list of strange size");
  676|      1|   }
  677|       |
  678|    205|   const size_t elems = len / 2;
  679|       |
  680|    205|   std::unordered_set<uint16_t> seen;
  681|  19.7k|   for(size_t i = 0; i != elems; ++i) {
  ------------------
  |  Branch (681:22): [True: 19.5k, False: 205]
  ------------------
  682|  19.5k|      const auto group = static_cast<Group_Params>(reader.get_uint16_t());
  683|       |      // Note: RFC 8446 does not explicitly enforce that groups must be unique.
  684|  19.5k|      if(seen.insert(group.wire_code()).second) {
  ------------------
  |  Branch (684:10): [True: 13.7k, False: 5.78k]
  ------------------
  685|  13.7k|         m_groups.push_back(group);
  686|  13.7k|      }
  687|  19.5k|   }
  688|    205|}
_ZN5Botan3TLS20Signature_AlgorithmsC2ERNS0_15TLS_Data_ReaderEt:
  734|     21|      m_schemes(parse_signature_algorithms(reader, extension_size)) {}
_ZN5Botan3TLS25Signature_Algorithms_CertC2ERNS0_15TLS_Data_ReaderEt:
  741|     40|      m_schemes(parse_signature_algorithms(reader, extension_size)) {}
_ZN5Botan3TLS24SRTP_Protection_ProfilesC2ERNS0_15TLS_Data_ReaderEt:
  743|     52|SRTP_Protection_Profiles::SRTP_Protection_Profiles(TLS_Data_Reader& reader, uint16_t extension_size) {
  744|       |   // RFC 5764 4.1.1: UseSRTPData consists of
  745|       |   //    SRTPProtectionProfile SRTPProtectionProfiles<2..2^16-1>;
  746|       |   //    opaque srtp_mki<0..255>;
  747|       |   // for a wire size of 2 (profiles len) + 2*N + 1 (mki len) + mki_bytes,
  748|       |   // with N >= 1.
  749|     52|   if(extension_size < 5) {
  ------------------
  |  Branch (749:7): [True: 3, False: 49]
  ------------------
  750|      3|      throw Decoding_Error("Truncated SRTP protection extension");
  751|      3|   }
  752|     49|   const size_t max_profile_pairs = (static_cast<size_t>(extension_size) - 3) / 2;
  753|     49|   m_pp = reader.get_range<uint16_t>(2, 1, max_profile_pairs);
  754|     49|   const std::vector<uint8_t> mki = reader.get_range<uint8_t>(1, 0, 255);
  755|       |
  756|     49|   if(m_pp.size() * 2 + mki.size() + 3 != extension_size) {
  ------------------
  |  Branch (756:7): [True: 17, False: 32]
  ------------------
  757|     17|      throw Decoding_Error("Bad encoding for SRTP protection extension");
  758|     17|   }
  759|       |
  760|     32|   if(!mki.empty()) {
  ------------------
  |  Branch (760:7): [True: 6, False: 26]
  ------------------
  761|      6|      throw Decoding_Error("Unhandled non-empty MKI for SRTP protection extension");
  762|      6|   }
  763|     32|}
_ZN5Botan3TLS18Supported_VersionsC2ERNS0_15TLS_Data_ReaderEtNS0_15Connection_SideE:
  838|     43|Supported_Versions::Supported_Versions(TLS_Data_Reader& reader, uint16_t extension_size, Connection_Side from) {
  839|     43|   if(from == Connection_Side::Server) {
  ------------------
  |  Branch (839:7): [True: 0, False: 43]
  ------------------
  840|      0|      if(extension_size != 2) {
  ------------------
  |  Branch (840:10): [True: 0, False: 0]
  ------------------
  841|      0|         throw Decoding_Error("Server sent invalid supported_versions extension");
  842|      0|      }
  843|      0|      m_versions.push_back(Protocol_Version(reader.get_uint16_t()));
  844|     43|   } else {
  845|     43|      auto versions = reader.get_range<uint16_t>(1, 1, 127);
  846|       |
  847|    994|      for(auto v : versions) {
  ------------------
  |  Branch (847:18): [True: 994, False: 43]
  ------------------
  848|    994|         m_versions.push_back(Protocol_Version(v));
  849|    994|      }
  850|       |
  851|     43|      if(extension_size != 1 + 2 * versions.size()) {
  ------------------
  |  Branch (851:10): [True: 12, False: 31]
  ------------------
  852|     12|         throw Decoding_Error("Client sent invalid supported_versions extension");
  853|     12|      }
  854|     43|   }
  855|     43|}
_ZN5Botan3TLS17Record_Size_LimitC2ERNS0_15TLS_Data_ReaderEtNS0_15Connection_SideE:
  872|     49|Record_Size_Limit::Record_Size_Limit(TLS_Data_Reader& reader, uint16_t extension_size, Connection_Side from) {
  873|     49|   if(extension_size != 2) {
  ------------------
  |  Branch (873:7): [True: 14, False: 35]
  ------------------
  874|     14|      throw TLS_Exception(Alert::DecodeError, "invalid record_size_limit extension");
  875|     14|   }
  876|       |
  877|     35|   m_limit = reader.get_uint16_t();
  878|       |
  879|       |   // RFC 8449 4.
  880|       |   //    This value is the length of the plaintext of a protected record.
  881|       |   //    The value includes the content type and padding added in TLS 1.3 (that
  882|       |   //    is, the complete length of TLSInnerPlaintext).
  883|       |   //
  884|       |   //    A server MUST NOT enforce this restriction; a client might advertise
  885|       |   //    a higher limit that is enabled by an extension or version the server
  886|       |   //    does not understand. A client MAY abort the handshake with an
  887|       |   //    "illegal_parameter" alert.
  888|       |   //
  889|       |   // Note: We are currently supporting this extension in TLS 1.3 only, hence
  890|       |   //       we check for the TLS 1.3 limit. The TLS 1.2 limit would not include
  891|       |   //       the "content type byte" and hence be one byte less!
  892|     35|   if(m_limit > MAX_PLAINTEXT_SIZE + 1 /* encrypted content type byte */ && from == Connection_Side::Server) {
  ------------------
  |  Branch (892:7): [True: 10, False: 25]
  |  Branch (892:77): [True: 0, False: 10]
  ------------------
  893|      0|      throw TLS_Exception(Alert::IllegalParameter,
  894|      0|                          "Server requested a record size limit larger than the protocol's maximum");
  895|      0|   }
  896|       |
  897|       |   // RFC 8449 4.
  898|       |   //    Endpoints MUST NOT send a "record_size_limit" extension with a value
  899|       |   //    smaller than 64.  An endpoint MUST treat receipt of a smaller value
  900|       |   //    as a fatal error and generate an "illegal_parameter" alert.
  901|     35|   if(m_limit < 64) {
  ------------------
  |  Branch (901:7): [True: 8, False: 27]
  ------------------
  902|      8|      throw TLS_Exception(Alert::IllegalParameter, "Received a record size limit smaller than 64 bytes");
  903|      8|   }
  904|     35|}
tls_extensions.cpp:_ZN5Botan3TLS12_GLOBAL__N_114make_extensionERNS0_15TLS_Data_ReaderENS0_14Extension_CodeENS0_15Connection_SideENS0_14Handshake_TypeE:
   39|  5.68k|                                          const Handshake_Type message_type) {
   40|       |   // This cast is safe because we read exactly a 16 bit length field for
   41|       |   // the extension in Extensions::deserialize
   42|  5.68k|   const uint16_t size = static_cast<uint16_t>(reader.remaining_bytes());
   43|  5.68k|   switch(code) {
  ------------------
  |  Branch (43:11): [True: 2.48k, False: 3.19k]
  ------------------
   44|    126|      case Extension_Code::ServerNameIndication:
  ------------------
  |  Branch (44:7): [True: 126, False: 5.55k]
  ------------------
   45|    126|         return std::make_unique<Server_Name_Indicator>(reader, size, from);
   46|       |
   47|    232|      case Extension_Code::SupportedGroups:
  ------------------
  |  Branch (47:7): [True: 232, False: 5.45k]
  ------------------
   48|    232|         return std::make_unique<Supported_Groups>(reader, size);
   49|       |
   50|     98|      case Extension_Code::CertificateStatusRequest:
  ------------------
  |  Branch (50:7): [True: 98, False: 5.58k]
  ------------------
   51|     98|         return std::make_unique<Certificate_Status_Request>(reader, size, message_type, from);
   52|       |
   53|     21|      case Extension_Code::SignatureAlgorithms:
  ------------------
  |  Branch (53:7): [True: 21, False: 5.66k]
  ------------------
   54|     21|         return std::make_unique<Signature_Algorithms>(reader, size);
   55|       |
   56|     40|      case Extension_Code::CertSignatureAlgorithms:
  ------------------
  |  Branch (56:7): [True: 40, False: 5.64k]
  ------------------
   57|     40|         return std::make_unique<Signature_Algorithms_Cert>(reader, size);
   58|       |
   59|     52|      case Extension_Code::UseSrtp:
  ------------------
  |  Branch (59:7): [True: 52, False: 5.63k]
  ------------------
   60|     52|         return std::make_unique<SRTP_Protection_Profiles>(reader, size);
   61|       |
   62|    148|      case Extension_Code::ApplicationLayerProtocolNegotiation:
  ------------------
  |  Branch (62:7): [True: 148, False: 5.53k]
  ------------------
   63|    148|         return std::make_unique<Application_Layer_Protocol_Notification>(reader, size, from);
   64|       |
   65|     27|      case Extension_Code::ClientCertificateType:
  ------------------
  |  Branch (65:7): [True: 27, False: 5.65k]
  ------------------
   66|     27|         return std::make_unique<Client_Certificate_Type>(reader, size, from);
   67|       |
   68|     23|      case Extension_Code::ServerCertificateType:
  ------------------
  |  Branch (68:7): [True: 23, False: 5.66k]
  ------------------
   69|     23|         return std::make_unique<Server_Certificate_Type>(reader, size, from);
   70|       |
   71|     49|      case Extension_Code::RecordSizeLimit:
  ------------------
  |  Branch (71:7): [True: 49, False: 5.63k]
  ------------------
   72|     49|         return std::make_unique<Record_Size_Limit>(reader, size, from);
   73|       |
   74|     43|      case Extension_Code::SupportedVersions:
  ------------------
  |  Branch (74:7): [True: 43, False: 5.64k]
  ------------------
   75|     43|         return std::make_unique<Supported_Versions>(reader, size, from);
   76|       |
   77|      7|      case Extension_Code::Padding:
  ------------------
  |  Branch (77:7): [True: 7, False: 5.67k]
  ------------------
   78|      7|         break;  // RFC 7685, recognized but not implemented; falls through to Unknown_Extension
   79|       |
   80|      0|#if defined(BOTAN_HAS_TLS_12)
   81|     74|      case Extension_Code::EcPointFormats:
  ------------------
  |  Branch (81:7): [True: 74, False: 5.60k]
  ------------------
   82|     74|         return std::make_unique<Supported_Point_Formats>(reader, size);
   83|       |
   84|     30|      case Extension_Code::SafeRenegotiation:
  ------------------
  |  Branch (84:7): [True: 30, False: 5.65k]
  ------------------
   85|     30|         return std::make_unique<Renegotiation_Extension>(reader, size);
   86|       |
   87|     44|      case Extension_Code::ExtendedMasterSecret:
  ------------------
  |  Branch (87:7): [True: 44, False: 5.63k]
  ------------------
   88|     44|         return std::make_unique<Extended_Master_Secret>(reader, size);
   89|       |
   90|     35|      case Extension_Code::EncryptThenMac:
  ------------------
  |  Branch (90:7): [True: 35, False: 5.64k]
  ------------------
   91|     35|         return std::make_unique<Encrypt_then_MAC>(reader, size);
   92|       |
   93|     44|      case Extension_Code::SessionTicket:
  ------------------
  |  Branch (93:7): [True: 44, False: 5.63k]
  ------------------
   94|     44|         return std::make_unique<Session_Ticket_Extension>(reader, size, from);
   95|       |#else
   96|       |      case Extension_Code::EcPointFormats:
   97|       |      case Extension_Code::SafeRenegotiation:
   98|       |      case Extension_Code::ExtendedMasterSecret:
   99|       |      case Extension_Code::EncryptThenMac:
  100|       |      case Extension_Code::SessionTicket:
  101|       |         break;  // considered as 'unknown extension'
  102|       |#endif
  103|       |
  104|      0|#if defined(BOTAN_HAS_TLS_13)
  105|    213|      case Extension_Code::PresharedKey:
  ------------------
  |  Branch (105:7): [True: 213, False: 5.47k]
  ------------------
  106|    213|         return std::make_unique<PSK>(reader, size, message_type);
  107|       |
  108|     26|      case Extension_Code::EarlyData:
  ------------------
  |  Branch (108:7): [True: 26, False: 5.65k]
  ------------------
  109|     26|         return std::make_unique<EarlyDataIndication>(reader, size, message_type);
  110|       |
  111|     46|      case Extension_Code::Cookie:
  ------------------
  |  Branch (111:7): [True: 46, False: 5.63k]
  ------------------
  112|     46|         return std::make_unique<Cookie>(reader, size);
  113|       |
  114|     78|      case Extension_Code::PskKeyExchangeModes:
  ------------------
  |  Branch (114:7): [True: 78, False: 5.60k]
  ------------------
  115|     78|         return std::make_unique<PSK_Key_Exchange_Modes>(reader, size);
  116|       |
  117|    933|      case Extension_Code::CertificateAuthorities:
  ------------------
  |  Branch (117:7): [True: 933, False: 4.75k]
  ------------------
  118|    933|         return std::make_unique<Certificate_Authorities>(reader, size);
  119|       |
  120|     99|      case Extension_Code::KeyShare:
  ------------------
  |  Branch (120:7): [True: 99, False: 5.58k]
  ------------------
  121|     99|         return std::make_unique<Key_Share>(reader, size, message_type);
  122|       |#else
  123|       |      case Extension_Code::PresharedKey:
  124|       |      case Extension_Code::EarlyData:
  125|       |      case Extension_Code::Cookie:
  126|       |      case Extension_Code::PskKeyExchangeModes:
  127|       |      case Extension_Code::CertificateAuthorities:
  128|       |      case Extension_Code::KeyShare:
  129|       |         break;  // considered as 'unknown extension'
  130|       |#endif
  131|  5.68k|   }
  132|       |
  133|  3.20k|   return std::make_unique<Unknown_Extension>(code, reader, size);
  134|  5.68k|}
tls_extensions.cpp:_ZZN5Botan3TLS21Certificate_Type_BaseC1ERNS0_15TLS_Data_ReaderEtNS0_15Connection_SideEENK3$_0clIhEEDaT_:
  564|  1.70k|         type_bytes.begin(), type_bytes.end(), std::back_inserter(m_certificate_types), [](const auto type_byte) {
  565|  1.70k|            return static_cast<Certificate_Type>(type_byte);
  566|  1.70k|         });
tls_extensions.cpp:_ZN5Botan3TLS12_GLOBAL__N_126parse_signature_algorithmsERNS0_15TLS_Data_ReaderEt:
  710|     61|std::vector<Signature_Scheme> parse_signature_algorithms(TLS_Data_Reader& reader, uint16_t extension_size) {
  711|     61|   uint16_t len = reader.get_uint16_t();
  712|       |
  713|     61|   if(len + 2 != extension_size || len % 2 == 1 || len == 0) {
  ------------------
  |  Branch (713:7): [True: 28, False: 33]
  |  Branch (713:36): [True: 1, False: 32]
  |  Branch (713:52): [True: 1, False: 31]
  ------------------
  714|     25|      throw Decoding_Error("Bad encoding on signature algorithms extension");
  715|     25|   }
  716|       |
  717|     36|   std::vector<Signature_Scheme> schemes;
  718|     36|   schemes.reserve(len / 2);
  719|  6.04k|   while(len > 0) {
  ------------------
  |  Branch (719:10): [True: 6.00k, False: 36]
  ------------------
  720|  6.00k|      schemes.emplace_back(reader.get_uint16_t());
  721|  6.00k|      len -= 2;
  722|  6.00k|   }
  723|       |
  724|     36|   return schemes;
  725|     61|}

_ZN5Botan3TLS26Certificate_Status_RequestC2ERNS0_15TLS_Data_ReaderEtNS0_14Handshake_TypeENS0_15Connection_SideE:
  104|     98|                                                       Connection_Side from) {
  105|       |   // This parser needs to take TLS 1.2 and TLS 1.3 into account. The
  106|       |   // extension's content and structure is dependent on the context it
  107|       |   // was sent in (i.e. the enclosing handshake message). Below is a list
  108|       |   // of handshake messages this can appear in.
  109|       |   //
  110|       |   // TLS 1.2
  111|       |   //  * Client Hello
  112|       |   //  * Server Hello
  113|       |   //
  114|       |   // TLS 1.3
  115|       |   //  * Client Hello
  116|       |   //  * Certificate Request
  117|       |   //  * Certificate (Entry)
  118|       |
  119|       |   // RFC 6066 8.
  120|       |   //    In order to indicate their desire to receive certificate status
  121|       |   //    information, clients MAY include an extension of type "status_request"
  122|       |   //    in the (extended) client hello.
  123|     98|   if(message_type == Handshake_Type::ClientHello) {
  ------------------
  |  Branch (123:7): [True: 98, False: 0]
  ------------------
  124|     98|      m_impl = std::make_unique<Certificate_Status_Request_Internal>(
  125|     98|         RFC6066_Certificate_Status_Request(reader, extension_size));
  126|     98|   }
  127|       |
  128|       |   // RFC 6066 8.
  129|       |   //    If a server returns a "CertificateStatus" message, then the server MUST
  130|       |   //    have included an extension of type "status_request" with empty
  131|       |   //    "extension_data" in the extended server hello.
  132|       |   //
  133|       |   // RFC 8446 4.4.2.1
  134|       |   //    A server MAY request that a client present an OCSP response with its
  135|       |   //    certificate by sending an empty "status_request" extension in its
  136|       |   //    CertificateRequest message.
  137|      0|   else if(message_type == Handshake_Type::ServerHello || message_type == Handshake_Type::CertificateRequest) {
  ------------------
  |  Branch (137:12): [True: 0, False: 0]
  |  Branch (137:59): [True: 0, False: 0]
  ------------------
  138|      0|      m_impl = std::make_unique<Certificate_Status_Request_Internal>(
  139|      0|         RFC6066_Empty_Certificate_Status_Request(extension_size));
  140|      0|   }
  141|       |
  142|       |   // RFC 8446 4.4.2.1
  143|       |   //    In TLS 1.3, the server's OCSP information is carried in an extension
  144|       |   //    in the CertificateEntry [in a Certificate handshake message] [...].
  145|       |   //    Specifically, the body of the "status_request" extension from the
  146|       |   //    server MUST be a CertificateStatus structure as defined in [RFC6066]
  147|       |   //    [...].
  148|       |   //
  149|       |   // RFC 8446 4.4.2.1
  150|       |   //    If the client opts to send an OCSP response, the body of its
  151|       |   //    "status_request" extension MUST be a CertificateStatus structure as
  152|       |   //    defined in [RFC6066].
  153|      0|   else if(message_type == Handshake_Type::Certificate) {
  ------------------
  |  Branch (153:12): [True: 0, False: 0]
  ------------------
  154|      0|      m_impl = std::make_unique<Certificate_Status_Request_Internal>(
  155|      0|         Certificate_Status(reader.get_fixed<uint8_t>(extension_size), from));
  156|      0|   }
  157|       |
  158|       |   // all other contexts are not allowed for this extension
  159|      0|   else {
  160|      0|      throw TLS_Exception(Alert::UnsupportedExtension,
  161|      0|                          "Server sent a Certificate_Status_Request extension in an unsupported context");
  162|      0|   }
  163|     98|}
_ZN5Botan3TLS26Certificate_Status_RequestD2Ev:
  176|     41|Certificate_Status_Request::~Certificate_Status_Request() = default;
tls_extensions_cert_status_req.cpp:_ZN5Botan3TLS12_GLOBAL__N_134RFC6066_Certificate_Status_RequestC2ERNS0_15TLS_Data_ReaderEt:
   38|     98|      RFC6066_Certificate_Status_Request(TLS_Data_Reader& reader, uint16_t extension_size) {
   39|     98|         if(extension_size == 0) {
  ------------------
  |  Branch (39:13): [True: 2, False: 96]
  ------------------
   40|      2|            throw Decoding_Error("Received an unexpectedly empty Certificate_Status_Request");
   41|      2|         }
   42|       |
   43|     96|         const uint8_t type = reader.get_byte();
   44|     96|         if(type == 1 /* ocsp */) {
  ------------------
  |  Branch (44:13): [True: 73, False: 23]
  ------------------
   45|       |            // RFC 6066 Section 8: OCSP CertificateStatusRequest is
   46|       |            //    ResponderID responder_id_list<0..2^16-1>;
   47|       |            //    Extensions  request_extensions;
   48|       |            //
   49|       |            // for a total wire size of 1 (status_type) + 2 (resp_id_list len)
   50|       |            //   + len_resp_id_list + 2 (request_ext len) + len_requ_ext.
   51|     73|            if(extension_size < 5) {
  ------------------
  |  Branch (51:16): [True: 2, False: 71]
  ------------------
   52|      2|               throw Decoding_Error("Truncated OCSP CertificateStatusRequest");
   53|      2|            }
   54|     71|            const size_t len_resp_id_list = reader.get_uint16_t();
   55|     71|            if(len_resp_id_list > static_cast<size_t>(extension_size) - 5) {
  ------------------
  |  Branch (55:16): [True: 20, False: 51]
  ------------------
   56|     20|               throw Decoding_Error("Inconsistent length in OCSP CertificateStatusRequest");
   57|     20|            }
   58|     51|            ocsp_names = reader.get_fixed<uint8_t>(len_resp_id_list);
   59|     51|            const size_t len_requ_ext = reader.get_uint16_t();
   60|     51|            if(len_resp_id_list + len_requ_ext + 5 != extension_size) {
  ------------------
  |  Branch (60:16): [True: 33, False: 18]
  ------------------
   61|     33|               throw Decoding_Error("Inconsistent length in OCSP CertificateStatusRequest");
   62|     33|            }
   63|     18|            extension_bytes = reader.get_fixed<uint8_t>(len_requ_ext);
   64|     23|         } else {
   65|       |            // RFC 6066 does not specify anything but 'ocsp' and we
   66|       |            // don't support anything else either.
   67|     23|            reader.discard_next(extension_size - 1);
   68|     23|         }
   69|     96|      }
tls_extensions_cert_status_req.cpp:_ZN5Botan3TLS35Certificate_Status_Request_InternalC2ENSt3__17variantIJNS0_12_GLOBAL__N_140RFC6066_Empty_Certificate_Status_RequestENS4_34RFC6066_Certificate_Status_RequestENS0_18Certificate_StatusEEEE:
   96|     41|      explicit Certificate_Status_Request_Internal(Contents c) : content(std::move(c)) {}

_ZNK5Botan3TLS15TLS_Data_Reader15assert_at_leastEm:
   14|   129k|void TLS_Data_Reader::assert_at_least(size_t n) const {
   15|   129k|   const size_t left = remaining_bytes();
   16|   129k|   if(left < n) {
  ------------------
  |  Branch (16:7): [True: 434, False: 128k]
  ------------------
   17|    434|      throw_decode_error(fmt("Expected {} bytes remaining, only {} left", n, left));
   18|    434|   }
   19|   129k|}
_ZNK5Botan3TLS15TLS_Data_Reader18throw_decode_errorENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
   21|    568|void TLS_Data_Reader::throw_decode_error(std::string_view why) const {
   22|    568|   throw Decoding_Error(fmt("Invalid {}: {}", m_typename, why));
   23|    568|}

_ZN5Botan3TLS16Signature_SchemeC2Et:
   49|  6.00k|Signature_Scheme::Signature_Scheme(uint16_t wire_code) : Signature_Scheme(Signature_Scheme::Code(wire_code)) {}
_ZN5Botan3TLS16Signature_SchemeC2ENS1_4CodeE:
   51|  6.00k|Signature_Scheme::Signature_Scheme(Signature_Scheme::Code wire_code) : m_code(wire_code) {}

_ZNK5Botan3TLS16Protocol_Version20is_datagram_protocolEv:
   54|  5.72k|bool Protocol_Version::is_datagram_protocol() const {
   55|  5.72k|   return major_version() > 250;
   56|  5.72k|}

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

_ZN5Botan13is_valid_utf8ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  106|    157|bool is_valid_utf8(const std::string& utf8) {
  107|    157|   try {
  108|    157|      size_t pos = 0;
  109|  1.74k|      while(pos < utf8.size()) {
  ------------------
  |  Branch (109:13): [True: 1.58k, False: 157]
  ------------------
  110|  1.58k|         const uint32_t c = next_utf8_codepoint(utf8, pos);
  111|  1.58k|         BOTAN_UNUSED(c);
  ------------------
  |  |  144|  1.58k|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
  112|  1.58k|      }
  113|    157|   } catch(Decoding_Error&) {
  114|     70|      return false;
  115|     70|   }
  116|     87|   return true;
  117|    157|}
_ZN5Botan12ucs2_to_utf8EPKhm:
  119|     81|std::string ucs2_to_utf8(const uint8_t ucs2[], size_t len) {
  120|     81|   if(len % 2 != 0) {
  ------------------
  |  Branch (120:7): [True: 2, False: 79]
  ------------------
  121|      2|      throw Decoding_Error("Invalid length for UCS-2 string");
  122|      2|   }
  123|       |
  124|     79|   const size_t chars = len / 2;
  125|       |
  126|     79|   std::string s;
  127|    655|   for(size_t i = 0; i != chars; ++i) {
  ------------------
  |  Branch (127:22): [True: 576, False: 79]
  ------------------
  128|    576|      const uint32_t c = load_be<uint16_t>(ucs2, i);
  129|    576|      append_utf8_for(s, c);
  130|    576|   }
  131|       |
  132|     79|   return s;
  133|     81|}
_ZN5Botan12ucs4_to_utf8EPKhm:
  153|    100|std::string ucs4_to_utf8(const uint8_t ucs4[], size_t len) {
  154|    100|   if(len % 4 != 0) {
  ------------------
  |  Branch (154:7): [True: 1, False: 99]
  ------------------
  155|      1|      throw Decoding_Error("Invalid length for UCS-4 string");
  156|      1|   }
  157|       |
  158|     99|   const size_t chars = len / 4;
  159|       |
  160|     99|   std::string s;
  161|    335|   for(size_t i = 0; i != chars; ++i) {
  ------------------
  |  Branch (161:22): [True: 236, False: 99]
  ------------------
  162|    236|      const uint32_t c = load_be<uint32_t>(ucs4, i);
  163|    236|      append_utf8_for(s, c);
  164|    236|   }
  165|       |
  166|     99|   return s;
  167|    100|}
_ZN5Botan14latin1_to_utf8EPKhm:
  188|     77|std::string latin1_to_utf8(const uint8_t chars[], size_t len) {
  189|     77|   std::string s;
  190|    814|   for(size_t i = 0; i != len; ++i) {
  ------------------
  |  Branch (190:22): [True: 737, False: 77]
  ------------------
  191|    737|      const uint32_t c = static_cast<uint8_t>(chars[i]);
  192|    737|      append_utf8_for(s, c);
  193|    737|   }
  194|     77|   return s;
  195|     77|}
charset.cpp:_ZN5Botan12_GLOBAL__N_119next_utf8_codepointERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERm:
   52|  1.58k|uint32_t next_utf8_codepoint(const std::string& utf8, size_t& pos) {
   53|  1.58k|   auto read_continuation = [&]() -> uint32_t {
   54|  1.58k|      if(pos >= utf8.size()) {
   55|  1.58k|         throw Decoding_Error("Invalid UTF-8 sequence");
   56|  1.58k|      }
   57|  1.58k|      const uint8_t b = static_cast<uint8_t>(utf8[pos++]);
   58|  1.58k|      if((b & 0xC0) != 0x80) {
   59|  1.58k|         throw Decoding_Error("Invalid UTF-8 sequence");
   60|  1.58k|      }
   61|  1.58k|      return b & 0x3F;
   62|  1.58k|   };
   63|       |
   64|  1.58k|   const uint8_t lead = static_cast<uint8_t>(utf8[pos++]);
   65|  1.58k|   uint32_t c = 0;
   66|       |
   67|  1.58k|   if(lead <= 0x7F) {
  ------------------
  |  Branch (67:7): [True: 1.31k, False: 268]
  ------------------
   68|  1.31k|      c = lead;
   69|  1.31k|   } else if((lead & 0xE0) == 0xC0) {
  ------------------
  |  Branch (69:14): [True: 85, False: 183]
  ------------------
   70|     85|      c = (lead & 0x1F) << 6;
   71|     85|      c |= read_continuation();
   72|     85|      if(c < 0x80) {
  ------------------
  |  Branch (72:10): [True: 3, False: 82]
  ------------------
   73|      3|         throw Decoding_Error("Overlong UTF-8 sequence");
   74|      3|      }
   75|    183|   } else if((lead & 0xF0) == 0xE0) {
  ------------------
  |  Branch (75:14): [True: 78, False: 105]
  ------------------
   76|     78|      c = (lead & 0x0F) << 12;
   77|     78|      c |= read_continuation() << 6;
   78|     78|      c |= read_continuation();
   79|     78|      if(c < 0x800) {
  ------------------
  |  Branch (79:10): [True: 4, False: 74]
  ------------------
   80|      4|         throw Decoding_Error("Overlong UTF-8 sequence");
   81|      4|      }
   82|    105|   } else if((lead & 0xF8) == 0xF0) {
  ------------------
  |  Branch (82:14): [True: 76, False: 29]
  ------------------
   83|     76|      c = (lead & 0x07) << 18;
   84|     76|      c |= read_continuation() << 12;
   85|     76|      c |= read_continuation() << 6;
   86|     76|      c |= read_continuation();
   87|     76|      if(c < 0x10000) {
  ------------------
  |  Branch (87:10): [True: 6, False: 70]
  ------------------
   88|      6|         throw Decoding_Error("Overlong UTF-8 sequence");
   89|      6|      }
   90|     76|   } else {
   91|     29|      throw Decoding_Error("Invalid UTF-8 sequence");
   92|     29|   }
   93|       |
   94|  1.54k|   if(c > 0x10FFFF) {
  ------------------
  |  Branch (94:7): [True: 4, False: 1.53k]
  ------------------
   95|      4|      throw Decoding_Error("UTF-8 sequence encodes value outside Unicode range");
   96|      4|   }
   97|  1.53k|   if(c >= 0xD800 && c < 0xE000) {
  ------------------
  |  Branch (97:7): [True: 96, False: 1.44k]
  |  Branch (97:22): [True: 11, False: 85]
  ------------------
   98|     11|      throw Decoding_Error("UTF-8 sequence encodes surrogate code point");
   99|     11|   }
  100|       |
  101|  1.52k|   return c;
  102|  1.53k|}
charset.cpp:_ZZN5Botan12_GLOBAL__N_119next_utf8_codepointERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERmENK3$_0clEv:
   53|    456|   auto read_continuation = [&]() -> uint32_t {
   54|    456|      if(pos >= utf8.size()) {
  ------------------
  |  Branch (54:10): [True: 1, False: 455]
  ------------------
   55|      1|         throw Decoding_Error("Invalid UTF-8 sequence");
   56|      1|      }
   57|    455|      const uint8_t b = static_cast<uint8_t>(utf8[pos++]);
   58|    455|      if((b & 0xC0) != 0x80) {
  ------------------
  |  Branch (58:10): [True: 12, False: 443]
  ------------------
   59|     12|         throw Decoding_Error("Invalid UTF-8 sequence");
   60|     12|      }
   61|    443|      return b & 0x3F;
   62|    455|   };
charset.cpp:_ZN5Botan12_GLOBAL__N_115append_utf8_forERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEj:
   18|  1.54k|void append_utf8_for(std::string& s, uint32_t c) {
   19|  1.54k|   if(c >= 0xD800 && c < 0xE000) {
  ------------------
  |  Branch (19:7): [True: 404, False: 1.14k]
  |  Branch (19:22): [True: 13, False: 391]
  ------------------
   20|     13|      throw Decoding_Error("Invalid Unicode character");
   21|     13|   }
   22|       |
   23|  1.53k|   if(c <= 0x7F) {
  ------------------
  |  Branch (23:7): [True: 626, False: 910]
  ------------------
   24|    626|      const uint8_t b0 = static_cast<uint8_t>(c);
   25|    626|      s.push_back(static_cast<char>(b0));
   26|    910|   } else if(c <= 0x7FF) {
  ------------------
  |  Branch (26:14): [True: 325, False: 585]
  ------------------
   27|    325|      const uint8_t b0 = 0xC0 | static_cast<uint8_t>(c >> 6);
   28|    325|      const uint8_t b1 = 0x80 | static_cast<uint8_t>(c & 0x3F);
   29|    325|      s.push_back(static_cast<char>(b0));
   30|    325|      s.push_back(static_cast<char>(b1));
   31|    585|   } else if(c <= 0xFFFF) {
  ------------------
  |  Branch (31:14): [True: 405, False: 180]
  ------------------
   32|    405|      const uint8_t b0 = 0xE0 | static_cast<uint8_t>(c >> 12);
   33|    405|      const uint8_t b1 = 0x80 | static_cast<uint8_t>((c >> 6) & 0x3F);
   34|    405|      const uint8_t b2 = 0x80 | static_cast<uint8_t>(c & 0x3F);
   35|    405|      s.push_back(static_cast<char>(b0));
   36|    405|      s.push_back(static_cast<char>(b1));
   37|    405|      s.push_back(static_cast<char>(b2));
   38|    405|   } else if(c <= 0x10FFFF) {
  ------------------
  |  Branch (38:14): [True: 125, False: 55]
  ------------------
   39|    125|      const uint8_t b0 = 0xF0 | static_cast<uint8_t>(c >> 18);
   40|    125|      const uint8_t b1 = 0x80 | static_cast<uint8_t>((c >> 12) & 0x3F);
   41|    125|      const uint8_t b2 = 0x80 | static_cast<uint8_t>((c >> 6) & 0x3F);
   42|    125|      const uint8_t b3 = 0x80 | static_cast<uint8_t>(c & 0x3F);
   43|    125|      s.push_back(static_cast<char>(b0));
   44|    125|      s.push_back(static_cast<char>(b1));
   45|    125|      s.push_back(static_cast<char>(b2));
   46|    125|      s.push_back(static_cast<char>(b3));
   47|    125|   } else {
   48|     55|      throw Decoding_Error("Invalid Unicode character");
   49|     55|   }
   50|  1.53k|}

_ZN5Botan5CPUID10CPUID_DataC2Ev:
   80|      1|CPUID::CPUID_Data::CPUID_Data() {
   81|       |   // NOLINTBEGIN(*-prefer-member-initializer)
   82|      1|#if defined(BOTAN_HAS_CPUID_DETECTION)
   83|      1|   m_processor_features = detect_cpu_features(~cleared_cpuid_bits());
   84|       |#else
   85|       |   m_processor_features = 0;
   86|       |#endif
   87|       |   // NOLINTEND(*-prefer-member-initializer)
   88|      1|}
cpuid.cpp:_ZN5Botan12_GLOBAL__N_118cleared_cpuid_bitsEv:
   59|      1|uint32_t cleared_cpuid_bits() {
   60|      1|   uint32_t cleared = 0;
   61|       |
   62|      1|   #if defined(BOTAN_HAS_OS_UTILS)
   63|      1|   std::string clear_cpuid_env;
   64|      1|   if(OS::read_env_variable(clear_cpuid_env, "BOTAN_CLEAR_CPUID")) {
  ------------------
  |  Branch (64:7): [True: 0, False: 1]
  ------------------
   65|      0|      for(const auto& cpuid : split_on(clear_cpuid_env, ',')) {
  ------------------
  |  Branch (65:29): [True: 0, False: 0]
  ------------------
   66|      0|         if(auto bit = CPUID::bit_from_string(cpuid)) {
  ------------------
  |  Branch (66:18): [True: 0, False: 0]
  ------------------
   67|      0|            cleared |= bit->as_u32();
   68|      0|         }
   69|      0|      }
   70|      0|   }
   71|      1|   #endif
   72|       |
   73|      1|   return cleared;
   74|      1|}

_ZN5Botan5CPUID10CPUID_Data19detect_cpu_featuresEj:
   62|      1|uint32_t CPUID::CPUID_Data::detect_cpu_features(uint32_t allowed) {
   63|      1|   enum class x86_CPUID_1_bits : uint64_t {
   64|      1|      RDTSC = (1ULL << 4),
   65|      1|      SSE2 = (1ULL << 26),
   66|      1|      CLMUL = (1ULL << 33),
   67|      1|      SSSE3 = (1ULL << 41),
   68|      1|      SSE41 = (1ULL << 51),
   69|      1|      AESNI = (1ULL << 57),
   70|       |      // AVX + OSXSAVE
   71|      1|      OSXSAVE = (1ULL << 59) | (1ULL << 60),
   72|      1|      RDRAND = (1ULL << 62)
   73|      1|   };
   74|       |
   75|      1|   enum class x86_CPUID_7_bits : uint64_t {
   76|      1|      BMI1 = (1ULL << 3),
   77|      1|      AVX2 = (1ULL << 5),
   78|      1|      BMI2 = (1ULL << 8),
   79|      1|      BMI_1_AND_2 = BMI1 | BMI2,
   80|      1|      AVX512_F = (1ULL << 16),
   81|      1|      AVX512_DQ = (1ULL << 17),
   82|      1|      RDSEED = (1ULL << 18),
   83|      1|      ADX = (1ULL << 19),
   84|      1|      AVX512_IFMA = (1ULL << 21),
   85|      1|      SHA = (1ULL << 29),
   86|      1|      AVX512_BW = (1ULL << 30),
   87|      1|      AVX512_VL = (1ULL << 31),
   88|      1|      AVX512_VBMI = (1ULL << 33),
   89|      1|      AVX512_VBMI2 = (1ULL << 38),
   90|      1|      GFNI = (1ULL << 40),
   91|      1|      AVX512_VAES = (1ULL << 41),
   92|      1|      AVX512_VCLMUL = (1ULL << 42),
   93|      1|      AVX512_VBITALG = (1ULL << 44),
   94|       |
   95|       |      /*
   96|       |      We only enable AVX512 support if all of the below flags are available
   97|       |
   98|       |      This is more than we strictly need for most uses, however it also has
   99|       |      the effect of preventing execution of AVX512 codepaths on cores that
  100|       |      have serious downclocking problems when AVX512 code executes,
  101|       |      especially Intel Skylake.
  102|       |
  103|       |      VBMI2/VBITALG are the key flags here as they restrict us to Intel Ice
  104|       |      Lake/Rocket Lake, or AMD Zen4, all of which do not have penalties for
  105|       |      executing AVX512.
  106|       |
  107|       |      There is nothing stopping some future processor from supporting the
  108|       |      above flags and having AVX512 penalties, but maybe you should not have
  109|       |      bought such a processor.
  110|       |      */
  111|      1|      AVX512_PROFILE =
  112|      1|         AVX512_F | AVX512_DQ | AVX512_IFMA | AVX512_BW | AVX512_VL | AVX512_VBMI | AVX512_VBMI2 | AVX512_VBITALG,
  113|      1|   };
  114|       |
  115|       |   // NOLINTNEXTLINE(performance-enum-size)
  116|      1|   enum class x86_CPUID_7_1_bits : uint64_t {
  117|      1|      SHA512 = (1 << 0),
  118|      1|      SM3 = (1 << 1),
  119|      1|      SM4 = (1 << 2),
  120|      1|   };
  121|       |
  122|      1|   uint32_t feat = 0;
  123|      1|   uint32_t cpuid[4] = {0};
  124|      1|   bool has_os_ymm_support = false;
  125|      1|   bool has_os_zmm_support = false;
  126|       |
  127|       |   // CPUID 0: vendor identification, max sublevel
  128|      1|   invoke_cpuid(0, cpuid);
  129|       |
  130|      1|   const uint32_t max_supported_sublevel = cpuid[0];
  131|       |
  132|      1|   if(max_supported_sublevel >= 1) {
  ------------------
  |  Branch (132:7): [True: 1, False: 0]
  ------------------
  133|       |      // CPUID 1: feature bits
  134|      1|      invoke_cpuid(1, cpuid);
  135|      1|      const uint64_t flags0 = (static_cast<uint64_t>(cpuid[2]) << 32) | cpuid[3];
  136|       |
  137|      1|      feat |= if_set(flags0, x86_CPUID_1_bits::RDTSC, CPUFeature::Bit::RDTSC, allowed);
  138|       |
  139|      1|      feat |= if_set(flags0, x86_CPUID_1_bits::RDRAND, CPUFeature::Bit::RDRAND, allowed);
  140|       |
  141|      1|      feat |= if_set(flags0, x86_CPUID_1_bits::SSE2, CPUFeature::Bit::SSE2, allowed);
  142|       |
  143|      1|      if(is_set(feat, CPUFeature::Bit::SSE2)) {
  ------------------
  |  Branch (143:10): [True: 1, False: 0]
  ------------------
  144|      1|         feat |= if_set(flags0, x86_CPUID_1_bits::SSSE3, CPUFeature::Bit::SSSE3, allowed);
  145|       |
  146|      1|         if(is_set(feat, CPUFeature::Bit::SSSE3)) {
  ------------------
  |  Branch (146:13): [True: 1, False: 0]
  ------------------
  147|      1|            feat |= if_set(flags0, x86_CPUID_1_bits::CLMUL, CPUFeature::Bit::CLMUL, allowed);
  148|      1|            feat |= if_set(flags0, x86_CPUID_1_bits::AESNI, CPUFeature::Bit::AESNI, allowed);
  149|      1|         }
  150|       |
  151|      1|         const uint64_t osxsave64 = static_cast<uint64_t>(x86_CPUID_1_bits::OSXSAVE);
  152|      1|         if((flags0 & osxsave64) == osxsave64) {
  ------------------
  |  Branch (152:13): [True: 1, False: 0]
  ------------------
  153|      1|            const uint64_t xcr_flags = xgetbv();
  154|      1|            if((xcr_flags & 0x6) == 0x6) {
  ------------------
  |  Branch (154:16): [True: 1, False: 0]
  ------------------
  155|      1|               has_os_ymm_support = true;
  156|      1|               has_os_zmm_support = (xcr_flags & 0xE0) == 0xE0;
  157|      1|            }
  158|      1|         }
  159|      1|      }
  160|      1|   }
  161|       |
  162|      1|   if(max_supported_sublevel >= 7) {
  ------------------
  |  Branch (162:7): [True: 1, False: 0]
  ------------------
  163|      1|      clear_mem(cpuid, 4);
  164|      1|      invoke_cpuid_sublevel(7, 0, cpuid);
  165|       |
  166|      1|      const uint64_t flags7 = (static_cast<uint64_t>(cpuid[2]) << 32) | cpuid[1];
  167|       |
  168|      1|      clear_mem(cpuid, 4);
  169|      1|      invoke_cpuid_sublevel(7, 1, cpuid);
  170|      1|      const uint32_t flags7_1 = cpuid[0];
  171|       |
  172|      1|      feat |= if_set(flags7, x86_CPUID_7_bits::RDSEED, CPUFeature::Bit::RDSEED, allowed);
  173|      1|      feat |= if_set(flags7, x86_CPUID_7_bits::ADX, CPUFeature::Bit::ADX, allowed);
  174|       |
  175|       |      /*
  176|       |      We only set the BMI bit if both BMI1 and BMI2 are supported, since
  177|       |      typically we want to use both extensions in the same code.
  178|       |      */
  179|      1|      feat |= if_set(flags7, x86_CPUID_7_bits::BMI_1_AND_2, CPUFeature::Bit::BMI, allowed);
  180|       |
  181|      1|      if(is_set(feat, CPUFeature::Bit::SSSE3)) {
  ------------------
  |  Branch (181:10): [True: 1, False: 0]
  ------------------
  182|      1|         feat |= if_set(flags7, x86_CPUID_7_bits::SHA, CPUFeature::Bit::SHA, allowed);
  183|      1|         feat |= if_set(flags7_1, x86_CPUID_7_1_bits::SM3, CPUFeature::Bit::SM3, allowed);
  184|       |
  185|       |         // We only consider AVX2 if SSSE3 is supported
  186|      1|         if(has_os_ymm_support) {
  ------------------
  |  Branch (186:13): [True: 1, False: 0]
  ------------------
  187|      1|            feat |= if_set(flags7, x86_CPUID_7_bits::AVX2, CPUFeature::Bit::AVX2, allowed);
  188|       |
  189|      1|            if(is_set(feat, CPUFeature::Bit::AVX2)) {
  ------------------
  |  Branch (189:16): [True: 1, False: 0]
  ------------------
  190|      1|               feat |= if_set(flags7, x86_CPUID_7_bits::GFNI, CPUFeature::Bit::GFNI, allowed);
  191|      1|               feat |= if_set(flags7, x86_CPUID_7_bits::AVX512_VAES, CPUFeature::Bit::AVX2_AES, allowed);
  192|      1|               feat |= if_set(flags7, x86_CPUID_7_bits::AVX512_VCLMUL, CPUFeature::Bit::AVX2_CLMUL, allowed);
  193|      1|               feat |= if_set(flags7_1, x86_CPUID_7_1_bits::SHA512, CPUFeature::Bit::SHA512, allowed);
  194|      1|               feat |= if_set(flags7_1, x86_CPUID_7_1_bits::SM4, CPUFeature::Bit::SM4, allowed);
  195|       |
  196|       |               // Likewise we only consider AVX-512 if AVX2 is supported
  197|      1|               if(has_os_zmm_support) {
  ------------------
  |  Branch (197:19): [True: 0, False: 1]
  ------------------
  198|      0|                  feat |= if_set(flags7, x86_CPUID_7_bits::AVX512_PROFILE, CPUFeature::Bit::AVX512, allowed);
  199|       |
  200|      0|                  if(is_set(feat, CPUFeature::Bit::AVX512)) {
  ------------------
  |  Branch (200:22): [True: 0, False: 0]
  ------------------
  201|      0|                     feat |= if_set(flags7, x86_CPUID_7_bits::AVX512_VAES, CPUFeature::Bit::AVX512_AES, allowed);
  202|      0|                     feat |= if_set(flags7, x86_CPUID_7_bits::AVX512_VCLMUL, CPUFeature::Bit::AVX512_CLMUL, allowed);
  203|      0|                  }
  204|      0|               }
  205|      1|            }
  206|      1|         }
  207|      1|      }
  208|      1|   }
  209|       |
  210|       |/*
  211|       |   * If we don't have access to CPUID, we can still safely assume that
  212|       |   * any x86-64 processor has SSE2 and RDTSC
  213|       |   */
  214|      1|#if defined(BOTAN_TARGET_ARCH_IS_X86_64)
  215|      1|   if(feat == 0) {
  ------------------
  |  Branch (215:7): [True: 0, False: 1]
  ------------------
  216|      0|      feat |= CPUFeature::Bit::SSE2 & allowed;
  217|      0|      feat |= CPUFeature::Bit::RDTSC & allowed;
  218|      0|   }
  219|      1|#endif
  220|       |
  221|      1|   return feat;
  222|      1|}
cpuid_x86.cpp:_ZN5Botan12_GLOBAL__N_112invoke_cpuidEjPj:
   24|      2|void invoke_cpuid(uint32_t type, uint32_t out[4]) {
   25|      2|   clear_mem(out, 4);
   26|       |
   27|      2|#if defined(BOTAN_USE_GCC_INLINE_ASM)
   28|       |   // NOLINTNEXTLINE(*-no-assembler)
   29|      2|   asm volatile("cpuid\n\t" : "=a"(out[0]), "=b"(out[1]), "=c"(out[2]), "=d"(out[3]) : "0"(type));
   30|       |
   31|       |#elif defined(BOTAN_BUILD_COMPILER_IS_MSVC)
   32|       |   __cpuid((int*)out, type);
   33|       |
   34|       |#else
   35|       |   BOTAN_UNUSED(type);
   36|       |   #warning "No way of calling x86 cpuid instruction for this compiler"
   37|       |#endif
   38|      2|}
cpuid_x86.cpp:_ZN5Botan12_GLOBAL__N_16xgetbvEv:
   56|      1|BOTAN_FUNC_ISA("xsave") uint64_t xgetbv() {
   57|       |   return _xgetbv(0);
   58|      1|}
cpuid_x86.cpp:_ZN5Botan12_GLOBAL__N_121invoke_cpuid_sublevelEjjPj:
   40|      2|void invoke_cpuid_sublevel(uint32_t type, uint32_t level, uint32_t out[4]) {
   41|      2|   clear_mem(out, 4);
   42|       |
   43|      2|#if defined(BOTAN_USE_GCC_INLINE_ASM)
   44|       |   // NOLINTNEXTLINE(*-no-assembler)
   45|      2|   asm volatile("cpuid\n\t" : "=a"(out[0]), "=b"(out[1]), "=c"(out[2]), "=d"(out[3]) : "0"(type), "2"(level));
   46|       |
   47|       |#elif defined(BOTAN_BUILD_COMPILER_IS_MSVC)
   48|       |   __cpuidex((int*)out, type, level);
   49|       |
   50|       |#else
   51|       |   BOTAN_UNUSED(type, level);
   52|       |   #warning "No way of calling x86 cpuid instruction for this compiler"
   53|       |#endif
   54|      2|}

_ZN5Botan10DataSource9read_byteERh:
   27|  30.7k|size_t DataSource::read_byte(uint8_t& out) {
   28|  30.7k|   return read(&out, 1);
   29|  30.7k|}
_ZN5Botan10DataSource9read_byteEv:
   34|  4.95k|std::optional<uint8_t> DataSource::read_byte() {
   35|  4.95k|   uint8_t b = 0;
   36|  4.95k|   if(this->read(&b, 1) == 1) {
  ------------------
  |  Branch (36:7): [True: 4.93k, False: 20]
  ------------------
   37|  4.93k|      return b;
   38|  4.93k|   } else {
   39|     20|      return {};
   40|     20|   }
   41|  4.95k|}
_ZN5Botan17DataSource_Memory4readEPhm:
   73|  5.65k|size_t DataSource_Memory::read(uint8_t out[], size_t length) {
   74|  5.65k|   const size_t got = std::min<size_t>(m_source.size() - m_offset, length);
   75|  5.65k|   copy_mem(out, m_source.data() + m_offset, got);
   76|  5.65k|   m_offset += got;
   77|  5.65k|   return got;
   78|  5.65k|}
_ZN5Botan17DataSource_Memory15check_availableEm:
   80|  1.51k|bool DataSource_Memory::check_available(size_t n) {
   81|  1.51k|   return (n <= (m_source.size() - m_offset));
   82|  1.51k|}
_ZNK5Botan17DataSource_Memory11end_of_dataEv:
  101|  1.00k|bool DataSource_Memory::end_of_data() const {
  102|  1.00k|   return (m_offset == m_source.size());
  103|  1.00k|}

_ZN5Botan9ExceptionC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   71|  2.27k|Exception::Exception(std::string_view msg) : m_msg(msg) {}
_ZN5Botan14Decoding_ErrorC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  125|  2.01k|Decoding_Error::Decoding_Error(std::string_view name) : Exception(name) {}

_ZN5Botan19secure_scrub_memoryEPvm:
   25|  11.5k|void secure_scrub_memory(void* ptr, size_t n) {
   26|  11.5k|   return secure_zeroize_buffer(ptr, n);
   27|  11.5k|}
_ZN5Botan21secure_zeroize_bufferEPvm:
   29|  11.6k|void secure_zeroize_buffer(void* ptr, size_t n) {
   30|  11.6k|   if(n == 0) {
  ------------------
  |  Branch (30:7): [True: 6.97k, False: 4.71k]
  ------------------
   31|  6.97k|      return;
   32|  6.97k|   }
   33|       |
   34|       |#if defined(BOTAN_TARGET_OS_HAS_RTLSECUREZEROMEMORY)
   35|       |   ::RtlSecureZeroMemory(ptr, n);
   36|       |
   37|       |#elif defined(BOTAN_TARGET_OS_HAS_EXPLICIT_BZERO)
   38|  4.71k|   ::explicit_bzero(ptr, n);
   39|       |
   40|       |#elif defined(BOTAN_TARGET_OS_HAS_EXPLICIT_MEMSET)
   41|       |   (void)::explicit_memset(ptr, 0, n);
   42|       |
   43|       |#else
   44|       |   /*
   45|       |   * Call memset through a static volatile pointer, which the compiler should
   46|       |   * not elide. This construct should be safe in conforming compilers, but who
   47|       |   * knows. This has been checked to generate the expected code, which saves the
   48|       |   * memset address in the data segment and unconditionally loads and jumps to
   49|       |   * that address, with the following targets:
   50|       |   *
   51|       |   * x86-64: Clang 19, GCC 6, 11, 13, 14
   52|       |   * riscv64: GCC 14
   53|       |   * aarch64: GCC 14
   54|       |   * armv7: GCC 14
   55|       |   *
   56|       |   * Actually all of them generated the expected jump even without marking the
   57|       |   * function pointer as volatile. However this seems worth including as an
   58|       |   * additional precaution.
   59|       |   */
   60|       |   static void* (*const volatile memset_ptr)(void*, int, size_t) = std::memset;
   61|       |   (memset_ptr)(ptr, 0, n);
   62|       |#endif
   63|  4.71k|}

_ZN5Botan2OS17read_env_variableERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_17basic_string_viewIcS4_EE:
  448|      1|bool OS::read_env_variable(std::string& value_out, std::string_view name_view) {
  449|      1|   value_out = "";
  450|       |
  451|      1|   if(running_in_privileged_state()) {
  ------------------
  |  Branch (451:7): [True: 0, False: 1]
  ------------------
  452|      0|      return false;
  453|      0|   }
  454|       |
  455|       |#if defined(BOTAN_TARGET_OS_HAS_WIN32) && \
  456|       |   (defined(BOTAN_BUILD_COMPILER_IS_MSVC) || defined(BOTAN_BUILD_COMPILER_IS_CLANGCL))
  457|       |   const std::string name(name_view);
  458|       |   char val[128] = {0};
  459|       |   size_t req_size = 0;
  460|       |   if(getenv_s(&req_size, val, sizeof(val), name.c_str()) == 0) {
  461|       |      // Microsoft's implementation always writes a terminating \0,
  462|       |      // and includes it in the reported length of the environment variable
  463|       |      // if a value exists.
  464|       |      if(req_size > 0 && val[req_size - 1] == '\0') {
  465|       |         value_out = std::string(val);
  466|       |      } else {
  467|       |         value_out = std::string(val, req_size);
  468|       |      }
  469|       |      return true;
  470|       |   }
  471|       |#else
  472|      1|   const std::string name(name_view);
  473|      1|   if(const char* val = std::getenv(name.c_str())) {
  ------------------
  |  Branch (473:19): [True: 0, False: 1]
  ------------------
  474|      0|      value_out = val;
  475|      0|      return true;
  476|      0|   }
  477|      1|#endif
  478|       |
  479|      1|   return false;
  480|      1|}
os_utils.cpp:_ZN5Botan12_GLOBAL__N_110get_auxvalENSt3__18optionalImEE:
  118|      1|std::optional<unsigned long> get_auxval(std::optional<unsigned long> id) {
  119|      1|   if(id) {
  ------------------
  |  Branch (119:7): [True: 1, False: 0]
  ------------------
  120|      1|#if defined(BOTAN_TARGET_OS_HAS_GETAUXVAL)
  121|      1|      return ::getauxval(*id);
  122|       |#elif defined(BOTAN_TARGET_OS_HAS_ELF_AUX_INFO)
  123|       |      unsigned long auxinfo = 0;
  124|       |      if(::elf_aux_info(static_cast<int>(*id), &auxinfo, sizeof(auxinfo)) == 0) {
  125|       |         return auxinfo;
  126|       |      }
  127|       |#endif
  128|      1|   }
  129|       |
  130|      0|   return {};
  131|      1|}
os_utils.cpp:_ZN5Botan12_GLOBAL__N_127running_in_privileged_stateEv:
  152|      1|bool running_in_privileged_state() {
  153|      1|#if defined(AT_SECURE)
  154|      1|   if(auto at_secure = get_auxval(AT_SECURE)) {
  ------------------
  |  Branch (154:12): [True: 1, False: 0]
  ------------------
  155|      1|      return at_secure != 0;
  156|      1|   }
  157|      0|#endif
  158|       |
  159|      0|#if defined(BOTAN_TARGET_OS_HAS_POSIX1)
  160|      0|   return (::getuid() != ::geteuid()) || (::getgid() != ::getegid());
  ------------------
  |  Branch (160:11): [True: 0, False: 0]
  |  Branch (160:42): [True: 0, False: 0]
  ------------------
  161|       |#else
  162|       |   return false;
  163|       |#endif
  164|      1|}

_ZN5Botan7X509_DN13add_attributeERKNS_3OIDERKNS_11ASN1_StringE:
  109|    315|void X509_DN::add_attribute(const OID& oid, const ASN1_String& str) {
  110|    315|   if(str.empty()) {
  ------------------
  |  Branch (110:7): [True: 233, False: 82]
  ------------------
  111|    233|      return;
  112|    233|   }
  113|       |
  114|     82|   m_rdn.push_back(std::make_pair(oid, str));
  115|     82|   m_dn_bits.clear();
  116|     82|}
_ZN5Botan7X509_DN11decode_fromERNS_11BER_DecoderE:
  338|  1.07k|void X509_DN::decode_from(BER_Decoder& source) {
  339|  1.07k|   std::vector<uint8_t> bits;
  340|       |
  341|  1.07k|   source.start_sequence().raw_bytes(bits).end_cons();
  342|       |
  343|  1.07k|   BER_Decoder sequence(bits, source.limits());
  344|       |
  345|  1.07k|   m_rdn.clear();
  346|       |
  347|  1.66k|   while(sequence.more_items()) {
  ------------------
  |  Branch (347:10): [True: 585, False: 1.07k]
  ------------------
  348|    585|      BER_Decoder rdn = sequence.start_set();
  349|       |
  350|  1.40k|      while(rdn.more_items()) {
  ------------------
  |  Branch (350:13): [True: 815, False: 585]
  ------------------
  351|    815|         OID oid;
  352|    815|         ASN1_String str;
  353|       |
  354|    815|         rdn.start_sequence()
  355|    815|            .decode(oid)
  356|    815|            .decode(str)  // TODO support Any
  357|    815|            .end_cons();
  358|       |
  359|    815|         add_attribute(oid, str);
  360|    815|      }
  361|    585|   }
  362|       |
  363|       |   // Have to assign last as add_attribute zaps m_dn_bits
  364|  1.07k|   m_dn_bits = bits;
  365|  1.07k|}

