_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EED2Ev:
   64|    140|      ~AlignmentBuffer() { secure_zeroize_buffer(m_buffer.data(), sizeof(T) * m_buffer.size()); }
_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EEC2Ev:
   62|    140|      AlignmentBuffer() = default;
_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE5clearEv:
   71|    270|      void clear() {
   72|    270|         zeroize_buffer(m_buffer.data(), m_buffer.size());
   73|    270|         m_position = 0;
   74|    270|      }
_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE21handle_unaligned_dataERNS_12BufferSlicerE:
  166|    331|      [[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|    331|         const size_t defer = (defers_final_block()) ? 1 : 0;
  ------------------
  |  Branch (170:31): [True: 0, False: 331]
  ------------------
  171|       |
  172|    331|         if(in_alignment() && slicer.remaining() >= m_buffer.size() + defer) {
  ------------------
  |  Branch (172:13): [True: 220, False: 111]
  |  Branch (172:31): [True: 24, False: 196]
  ------------------
  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|     24|            return std::nullopt;
  177|     24|         }
  178|       |
  179|       |         // Fill the buffer with as much input data as needed to reach alignment
  180|       |         // or until the input source is depleted.
  181|    307|         const auto elements_to_consume = std::min(m_buffer.size() - m_position, slicer.remaining());
  182|    307|         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|    307|         if(ready_to_consume() && (!defers_final_block() || !slicer.empty())) {
  ------------------
  |  Branch (188:13): [True: 78, False: 229]
  |  Branch (188:36): [True: 78, False: 0]
  |  Branch (188:61): [True: 0, False: 0]
  ------------------
  189|     78|            return consume();
  190|    229|         } else {
  191|    229|            return std::nullopt;
  192|    229|         }
  193|    307|      }
_ZNK5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE18defers_final_blockEv:
  233|    511|      constexpr bool defers_final_block() const {
  234|    511|         return FINAL_BLOCK_STRATEGY == AlignmentBufferFinalBlock::must_be_deferred;
  235|    511|      }
_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE6appendENSt3__14spanIKhLm18446744073709551615EEE:
   90|    437|      void append(std::span<const T> elements) {
   91|    437|         BOTAN_ASSERT_NOMSG(elements.size() <= elements_until_alignment());
  ------------------
  |  |   84|    437|   do {                                                                     \
  |  |   85|    437|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|    437|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 437]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|    437|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 437]
  |  |  ------------------
  ------------------
   92|    437|         std::copy(elements.begin(), elements.end(), m_buffer.begin() + m_position);
   93|    437|         m_position += elements.size();
   94|    437|      }
_ZNK5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE24elements_until_alignmentEv:
  221|    844|      size_t elements_until_alignment() const { return m_buffer.size() - m_position; }
_ZNK5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE16ready_to_consumeEv:
  231|    831|      bool ready_to_consume() const { return m_position == m_buffer.size(); }
_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE7consumeEv:
  200|    236|      [[nodiscard]] std::span<const T> consume() {
  201|    236|         BOTAN_ASSERT_NOMSG(ready_to_consume());
  ------------------
  |  |   84|    236|   do {                                                                     \
  |  |   85|    236|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|    236|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 236]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|    236|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 236]
  |  |  ------------------
  ------------------
  202|    236|         m_position = 0;
  203|    236|         return m_buffer;
  204|    236|      }
_ZNK5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE12in_alignmentEv:
  226|    764|      bool in_alignment() const { return m_position == 0; }
_ZNK5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE23aligned_data_to_processERNS_12BufferSlicerE:
  126|    102|      [[nodiscard]] std::tuple<std::span<const uint8_t>, size_t> aligned_data_to_process(BufferSlicer& slicer) const {
  127|    102|         BOTAN_ASSERT_NOMSG(in_alignment());
  ------------------
  |  |   84|    102|   do {                                                                     \
  |  |   85|    102|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|    102|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 102]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|    102|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 102]
  |  |  ------------------
  ------------------
  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|    102|         const size_t defer = (defers_final_block()) ? 1 : 0;
  ------------------
  |  Branch (131:31): [True: 0, False: 102]
  ------------------
  132|    102|         const size_t full_blocks_to_process = (slicer.remaining() - defer) / m_buffer.size();
  133|    102|         return {slicer.take(full_blocks_to_process * m_buffer.size()), full_blocks_to_process};
  134|    102|      }
_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE18fill_up_with_zerosEv:
   79|    158|      void fill_up_with_zeros() {
   80|    158|         if(!ready_to_consume()) {
  ------------------
  |  Branch (80:13): [True: 147, False: 11]
  ------------------
   81|    147|            zeroize_buffer(&m_buffer[m_position], elements_until_alignment());
   82|    147|            m_position = m_buffer.size();
   83|    147|         }
   84|    158|      }
_ZN5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE20directly_modify_lastEm:
  113|    130|      std::span<T> directly_modify_last(size_t elements) {
  114|    130|         BOTAN_ASSERT_NOMSG(size() >= elements);
  ------------------
  |  |   84|    130|   do {                                                                     \
  |  |   85|    130|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|    130|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 130]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|    130|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 130]
  |  |  ------------------
  ------------------
  115|    130|         return std::span(m_buffer).last(elements);
  116|    130|      }
_ZNK5Botan15AlignmentBufferIhLm64ELNS_25AlignmentBufferFinalBlockE0EE4sizeEv:
  217|    130|      constexpr size_t size() const { return m_buffer.size(); }

_ZN5Botan8high_bitITkNSt3__117unsigned_integralEjEEmT_:
   73|    945|BOTAN_FORCE_INLINE constexpr size_t high_bit(T n) {
   74|    945|   size_t hb = 0;
   75|       |
   76|  5.67k|   for(size_t s = 8 * sizeof(T) / 2; s > 0; s /= 2) {
  ------------------
  |  Branch (76:38): [True: 4.72k, False: 945]
  ------------------
   77|       |      // Equivalent to: ((n >> s) == 0) ? 0 : s;
   78|  4.72k|      const size_t z = s - ct_if_is_zero_ret<T>(n >> s, s);
   79|  4.72k|      hb += z;
   80|  4.72k|      n >>= z;
   81|  4.72k|   }
   82|       |
   83|    945|   hb += static_cast<size_t>(n);
   84|       |
   85|    945|   return hb;
   86|    945|}
_ZN5Botan17ct_if_is_zero_retITkNSt3__117unsigned_integralEjEEmT_m:
   45|  4.72k|BOTAN_FORCE_INLINE constexpr size_t ct_if_is_zero_ret(T x, size_t s) {
   46|       |   /*
   47|       |   Similar to `return ct_is_zero(x) & s` but has to account for possibility that
   48|       |   sizeof(T) is smaller than sizeof(size_t) which would lead to incomplete masking
   49|       |   */
   50|  4.72k|   const T a = ~x & (x - 1);
   51|  4.72k|   const size_t a_top = static_cast<size_t>(CT::value_barrier<T>(a >> (sizeof(T) * 8 - 1)));
   52|  4.72k|   const size_t mask = static_cast<size_t>(0) - a_top;
   53|  4.72k|   return mask & s;
   54|  4.72k|}

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

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

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

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

_ZN5Botan3fmtIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEES7_NS1_17basic_string_viewIcS4_EEDpRKT_:
   53|     67|std::string fmt(std::string_view format, const T&... args) {
   54|     67|   std::ostringstream oss;
   55|     67|   oss.imbue(std::locale::classic());
   56|     67|   fmt_detail::do_fmt(oss, format, args...);
   57|     67|   return oss.str();
   58|     67|}
_ZN5Botan10fmt_detail6do_fmtINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEJEEEvRNS2_19basic_ostringstreamIcS5_S7_EENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|     67|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|     67|   size_t i = 0;
   27|       |
   28|  1.47k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 1.47k, False: 0]
  ------------------
   29|  1.47k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 67, False: 1.40k]
  |  Branch (29:30): [True: 67, False: 0]
  |  Branch (29:59): [True: 67, False: 0]
  ------------------
   30|     67|         oss << val;
   31|     67|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  1.40k|      } else {
   33|  1.40k|         oss << format[i];
   34|  1.40k|      }
   35|       |
   36|  1.40k|      i += 1;
   37|  1.40k|   }
   38|     67|}
_ZN5Botan10fmt_detail6do_fmtERNSt3__119basic_ostringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_17basic_string_viewIcS4_EE:
   20|  2.08k|inline void do_fmt(std::ostringstream& oss, std::string_view format) {
   21|  2.08k|   oss << format;
   22|  2.08k|}
_ZN5Botan3fmtIJmmEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_17basic_string_viewIcS4_EEDpRKT_:
   53|    501|std::string fmt(std::string_view format, const T&... args) {
   54|    501|   std::ostringstream oss;
   55|    501|   oss.imbue(std::locale::classic());
   56|    501|   fmt_detail::do_fmt(oss, format, args...);
   57|    501|   return oss.str();
   58|    501|}
_ZN5Botan10fmt_detail6do_fmtImJmEEEvRNSt3__119basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|    501|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|    501|   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: 501, False: 4.50k]
  |  Branch (29:30): [True: 501, False: 0]
  |  Branch (29:59): [True: 501, False: 0]
  ------------------
   30|    501|         oss << val;
   31|    501|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  4.50k|      } else {
   33|  4.50k|         oss << format[i];
   34|  4.50k|      }
   35|       |
   36|  4.50k|      i += 1;
   37|  4.50k|   }
   38|    501|}
_ZN5Botan10fmt_detail6do_fmtImJEEEvRNSt3__119basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|    501|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|    501|   size_t i = 0;
   27|       |
   28|  12.0k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 12.0k, False: 0]
  ------------------
   29|  12.0k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 501, False: 11.5k]
  |  Branch (29:30): [True: 501, False: 0]
  |  Branch (29:59): [True: 501, False: 0]
  ------------------
   30|    501|         oss << val;
   31|    501|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  11.5k|      } else {
   33|  11.5k|         oss << format[i];
   34|  11.5k|      }
   35|       |
   36|  11.5k|      i += 1;
   37|  11.5k|   }
   38|    501|}
_ZN5Botan3fmtIJPKcNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEEEENS3_12basic_stringIcS6_NS3_9allocatorIcEEEES7_DpRKT_:
   53|    645|std::string fmt(std::string_view format, const T&... args) {
   54|    645|   std::ostringstream oss;
   55|    645|   oss.imbue(std::locale::classic());
   56|    645|   fmt_detail::do_fmt(oss, format, args...);
   57|    645|   return oss.str();
   58|    645|}
_ZN5Botan10fmt_detail6do_fmtIPKcJNSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEEEEvRNS4_19basic_ostringstreamIcS7_NS4_9allocatorIcEEEES8_RKT_DpRKT0_:
   25|    645|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|    645|   size_t i = 0;
   27|       |
   28|  5.80k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 5.80k, False: 0]
  ------------------
   29|  5.80k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 645, False: 5.16k]
  |  Branch (29:30): [True: 645, False: 0]
  |  Branch (29:59): [True: 645, False: 0]
  ------------------
   30|    645|         oss << val;
   31|    645|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  5.16k|      } else {
   33|  5.16k|         oss << format[i];
   34|  5.16k|      }
   35|       |
   36|  5.16k|      i += 1;
   37|  5.16k|   }
   38|    645|}
_ZN5Botan10fmt_detail6do_fmtINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEJEEEvRNS2_19basic_ostringstreamIcS5_NS2_9allocatorIcEEEES6_RKT_DpRKT0_:
   25|  1.38k|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|  1.38k|   size_t i = 0;
   27|       |
   28|  6.35k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 6.35k, False: 0]
  ------------------
   29|  6.35k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 1.38k, False: 4.97k]
  |  Branch (29:30): [True: 1.38k, False: 0]
  |  Branch (29:59): [True: 1.38k, False: 0]
  ------------------
   30|  1.38k|         oss << val;
   31|  1.38k|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  4.97k|      } else {
   33|  4.97k|         oss << format[i];
   34|  4.97k|      }
   35|       |
   36|  4.97k|      i += 1;
   37|  4.97k|   }
   38|  1.38k|}
_ZN5Botan3fmtIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEEENS1_12basic_stringIcS4_NS1_9allocatorIcEEEES5_DpRKT_:
   53|    736|std::string fmt(std::string_view format, const T&... args) {
   54|    736|   std::ostringstream oss;
   55|    736|   oss.imbue(std::locale::classic());
   56|    736|   fmt_detail::do_fmt(oss, format, args...);
   57|    736|   return oss.str();
   58|    736|}
_ZN5Botan3fmtIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEjEEENS1_12basic_stringIcS4_NS1_9allocatorIcEEEES5_DpRKT_:
   53|     53|std::string fmt(std::string_view format, const T&... args) {
   54|     53|   std::ostringstream oss;
   55|     53|   oss.imbue(std::locale::classic());
   56|     53|   fmt_detail::do_fmt(oss, format, args...);
   57|     53|   return oss.str();
   58|     53|}
_ZN5Botan10fmt_detail6do_fmtINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEJjEEEvRNS2_19basic_ostringstreamIcS5_NS2_9allocatorIcEEEES6_RKT_DpRKT0_:
   25|     53|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|     53|   size_t i = 0;
   27|       |
   28|     53|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 53, False: 0]
  ------------------
   29|     53|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 53, False: 0]
  |  Branch (29:30): [True: 53, False: 0]
  |  Branch (29:59): [True: 53, False: 0]
  ------------------
   30|     53|         oss << val;
   31|     53|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|     53|      } else {
   33|      0|         oss << format[i];
   34|      0|      }
   35|       |
   36|      0|      i += 1;
   37|      0|   }
   38|     53|}
_ZN5Botan10fmt_detail6do_fmtIjJEEEvRNSt3__119basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|    135|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|    135|   size_t i = 0;
   27|       |
   28|    323|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 323, False: 0]
  ------------------
   29|    323|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 135, False: 188]
  |  Branch (29:30): [True: 135, False: 0]
  |  Branch (29:59): [True: 135, False: 0]
  ------------------
   30|    135|         oss << val;
   31|    135|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|    188|      } else {
   33|    188|         oss << format[i];
   34|    188|      }
   35|       |
   36|    188|      i += 1;
   37|    188|   }
   38|    135|}
_ZN5Botan3fmtIJjjEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_17basic_string_viewIcS4_EEDpRKT_:
   53|     82|std::string fmt(std::string_view format, const T&... args) {
   54|     82|   std::ostringstream oss;
   55|     82|   oss.imbue(std::locale::classic());
   56|     82|   fmt_detail::do_fmt(oss, format, args...);
   57|     82|   return oss.str();
   58|     82|}
_ZN5Botan10fmt_detail6do_fmtIjJjEEEvRNSt3__119basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|     82|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|     82|   size_t i = 0;
   27|       |
   28|  2.78k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 2.78k, False: 0]
  ------------------
   29|  2.78k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 82, False: 2.70k]
  |  Branch (29:30): [True: 82, False: 0]
  |  Branch (29:59): [True: 82, False: 0]
  ------------------
   30|     82|         oss << val;
   31|     82|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  2.70k|      } else {
   33|  2.70k|         oss << format[i];
   34|  2.70k|      }
   35|       |
   36|  2.70k|      i += 1;
   37|  2.70k|   }
   38|     82|}

_ZN5Botan11checked_mulITkNSt3__117unsigned_integralEmEENS1_8optionalIT_EES3_S3_:
   46|  2.67k|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|  2.67k|   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|  2.67k|   if(a != 0 && r / a != b) {
  ------------------
  |  Branch (53:7): [True: 2.67k, False: 0]
  |  Branch (53:17): [True: 0, False: 2.67k]
  ------------------
   54|      0|      return {};
   55|      0|   }
   56|  2.67k|   return r;
   57|  2.67k|}
_ZN5Botan11checked_addITkNSt3__117unsigned_integralEjEENS1_8optionalIT_EES3_S3_:
   19|  1.30k|constexpr inline std::optional<T> checked_add(T a, T b) {
   20|  1.30k|   const T r = a + b;
   21|  1.30k|   if(r < a || r < b) {
  ------------------
  |  Branch (21:7): [True: 0, False: 1.30k]
  |  Branch (21:16): [True: 0, False: 1.30k]
  ------------------
   22|      0|      return {};
   23|      0|   }
   24|  1.30k|   return r;
   25|  1.30k|}
_ZN5Botan11checked_addITkNSt3__117unsigned_integralEmTpTkNS1_17unsigned_integralEJmmEQ10all_same_vIT_DpT0_EEENS1_8optionalIS2_EES2_S2_S4_:
   37|  2.76k|constexpr inline std::optional<T> checked_add(T a, T b, Ts... rest) {
   38|  2.76k|   if(auto r = checked_add(a, b)) {
  ------------------
  |  Branch (38:12): [True: 2.76k, False: 0]
  ------------------
   39|  2.76k|      return checked_add(r.value(), rest...);
   40|  2.76k|   } else {
   41|      0|      return {};
   42|      0|   }
   43|  2.76k|}
_ZN5Botan11checked_addITkNSt3__117unsigned_integralEmEENS1_8optionalIT_EES3_S3_:
   19|  8.29k|constexpr inline std::optional<T> checked_add(T a, T b) {
   20|  8.29k|   const T r = a + b;
   21|  8.29k|   if(r < a || r < b) {
  ------------------
  |  Branch (21:7): [True: 0, False: 8.29k]
  |  Branch (21:16): [True: 0, False: 8.29k]
  ------------------
   22|      0|      return {};
   23|      0|   }
   24|  8.29k|   return r;
   25|  8.29k|}
_ZN5Botan11checked_addITkNSt3__117unsigned_integralEmTpTkNS1_17unsigned_integralEJmEQ10all_same_vIT_DpT0_EEENS1_8optionalIS2_EES2_S2_S4_:
   37|  2.76k|constexpr inline std::optional<T> checked_add(T a, T b, Ts... rest) {
   38|  2.76k|   if(auto r = checked_add(a, b)) {
  ------------------
  |  Branch (38:12): [True: 2.76k, False: 0]
  ------------------
   39|  2.76k|      return checked_add(r.value(), rest...);
   40|  2.76k|   } else {
   41|      0|      return {};
   42|      0|   }
   43|  2.76k|}

_ZN5Botan6detail9store_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEjTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm4EEEQnt15custom_storableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEEvS9_OT1_:
  525|  1.04k|inline constexpr void store_any(WrappedInT wrapped_in, OutR&& out_range) {
  526|  1.04k|   const auto in = detail::unwrap_strong_type_or_enum(wrapped_in);
  527|  1.04k|   using InT = decltype(in);
  528|  1.04k|   ranges::assert_exact_byte_length<sizeof(in)>(out_range);
  529|  1.04k|   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.04k|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (534:7): [Folded, False: 1.04k]
  ------------------
  535|      0|      return fallback_store_any<endianness, InT>(in, std::forward<OutR>(out_range));
  536|  1.04k|   } 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.04k|      } else {
  542|  1.04k|         static_assert(opposite(endianness) == std::endian::native);
  543|  1.04k|         typecast_copy(out, reverse_bytes(in));
  544|  1.04k|      }
  545|  1.04k|   }
  546|  1.04k|}
_ZN5Botan6detail26unwrap_strong_type_or_enumITkNS0_20unsigned_integralishEjEEDaT_:
  190|  1.04k|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.04k|   } else {
  195|  1.04k|      return Botan::unwrap_strong_type(t);
  196|  1.04k|   }
  197|  1.04k|}
_ZN5Botan7load_beIhJPKhRmEEEDaDpOT0_:
  504|   769k|inline constexpr auto load_be(ParamTs&&... params) {
  505|   769k|   return detail::load_any<std::endian::big, OutT>(std::forward<ParamTs>(params)...);
  506|   769k|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEhEET0_PKhm:
  454|   769k|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|   769k|   constexpr size_t out_size = sizeof(OutT);
  457|   769k|   return load_any<endianness, OutT>(std::span<const uint8_t, out_size>(in + off * out_size, out_size));
  458|   769k|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEhTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm1EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_:
  278|   769k|inline constexpr WrappedOutT load_any(InR&& in_range) {
  279|   769k|   using OutT = detail::wrapped_type<WrappedOutT>;
  280|   769k|   ranges::assert_exact_byte_length<sizeof(OutT)>(in_range);
  281|       |
  282|   769k|   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|   769k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  287|   769k|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|   769k|      } else {
  289|   769k|         const std::span in{in_range};
  290|   769k|         if constexpr(sizeof(OutT) == 1) {
  291|   769k|            return static_cast<OutT>(in[0]);
  292|   769k|         } else if constexpr(endianness == std::endian::native) {
  293|   769k|            return typecast_copy<OutT>(in);
  294|   769k|         } else {
  295|   769k|            static_assert(opposite(endianness) == std::endian::native);
  296|   769k|            return reverse_bytes(typecast_copy<OutT>(in));
  297|   769k|         }
  298|   769k|      }
  299|   769k|   }());
  300|   769k|}
_ZN5Botan6detail24wrap_strong_type_or_enumITkNS0_20unsigned_integralishEhTkNSt3__117unsigned_integralEhEEDaT0_:
  200|   769k|constexpr auto wrap_strong_type_or_enum(T t) {
  201|       |   if constexpr(std::is_enum_v<OutT>) {
  202|       |      return static_cast<OutT>(t);
  203|   769k|   } else {
  204|   769k|      return Botan::wrap_strong_type<OutT>(t);
  205|   769k|   }
  206|   769k|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEhTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm1EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_ENKUlvE_clEv:
  282|   769k|   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|   769k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (286:10): [Folded, False: 769k]
  ------------------
  287|      0|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|   769k|      } else {
  289|   769k|         const std::span in{in_range};
  290|   769k|         if constexpr(sizeof(OutT) == 1) {
  291|   769k|            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|   769k|      }
  299|   769k|   }());
_ZN5Botan11make_uint16Ehh:
   92|  55.3k|inline constexpr uint16_t make_uint16(uint8_t i0, uint8_t i1) {
   93|  55.3k|   return static_cast<uint16_t>((static_cast<uint16_t>(i0) << 8) | i1);
   94|  55.3k|}
_ZN5Botan11make_uint32Ehhhh:
  104|  2.81k|inline constexpr uint32_t make_uint32(uint8_t i0, uint8_t i1, uint8_t i2, uint8_t i3) {
  105|  2.81k|   return ((static_cast<uint32_t>(i0) << 24) | (static_cast<uint32_t>(i1) << 16) | (static_cast<uint32_t>(i2) << 8) |
  106|  2.81k|           (static_cast<uint32_t>(i3)));
  107|  2.81k|}
_ZN5Botan7load_beItJPKhRmEEEDaDpOT0_:
  504|  19.1k|inline constexpr auto load_be(ParamTs&&... params) {
  505|  19.1k|   return detail::load_any<std::endian::big, OutT>(std::forward<ParamTs>(params)...);
  506|  19.1k|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEtEET0_PKhm:
  454|  19.1k|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|  19.1k|   constexpr size_t out_size = sizeof(OutT);
  457|  19.1k|   return load_any<endianness, OutT>(std::span<const uint8_t, out_size>(in + off * out_size, out_size));
  458|  19.1k|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEtTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm2EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_:
  278|  19.1k|inline constexpr WrappedOutT load_any(InR&& in_range) {
  279|  19.1k|   using OutT = detail::wrapped_type<WrappedOutT>;
  280|  19.1k|   ranges::assert_exact_byte_length<sizeof(OutT)>(in_range);
  281|       |
  282|  19.1k|   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|  19.1k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  287|  19.1k|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|  19.1k|      } else {
  289|  19.1k|         const std::span in{in_range};
  290|  19.1k|         if constexpr(sizeof(OutT) == 1) {
  291|  19.1k|            return static_cast<OutT>(in[0]);
  292|  19.1k|         } else if constexpr(endianness == std::endian::native) {
  293|  19.1k|            return typecast_copy<OutT>(in);
  294|  19.1k|         } else {
  295|  19.1k|            static_assert(opposite(endianness) == std::endian::native);
  296|  19.1k|            return reverse_bytes(typecast_copy<OutT>(in));
  297|  19.1k|         }
  298|  19.1k|      }
  299|  19.1k|   }());
  300|  19.1k|}
_ZN5Botan6detail24wrap_strong_type_or_enumITkNS0_20unsigned_integralishEtTkNSt3__117unsigned_integralEtEEDaT0_:
  200|  19.1k|constexpr auto wrap_strong_type_or_enum(T t) {
  201|       |   if constexpr(std::is_enum_v<OutT>) {
  202|       |      return static_cast<OutT>(t);
  203|  19.1k|   } else {
  204|  19.1k|      return Botan::wrap_strong_type<OutT>(t);
  205|  19.1k|   }
  206|  19.1k|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEtTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm2EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_ENKUlvE_clEv:
  282|  19.1k|   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|  19.1k|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (286:10): [Folded, False: 19.1k]
  ------------------
  287|      0|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|  19.1k|      } else {
  289|  19.1k|         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|  19.1k|         } else {
  295|  19.1k|            static_assert(opposite(endianness) == std::endian::native);
  296|  19.1k|            return reverse_bytes(typecast_copy<OutT>(in));
  297|  19.1k|         }
  298|  19.1k|      }
  299|  19.1k|   }());
_ZN5Botan8store_beINS_6detail10AutoDetectEJRKmPhEEEDaDpOT0_:
  745|    130|inline constexpr auto store_be(ParamTs&&... params) {
  746|    130|   return detail::store_any<std::endian::big, ModifierT>(std::forward<ParamTs>(params)...);
  747|    130|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS0_20unsigned_integralishEmQoosr3stdE7same_asIS4_T0_Esr3stdE7same_asIT1_S5_EEEvS6_Ph:
  711|    130|inline constexpr void store_any(T in, uint8_t out[]) {
  712|       |   // asserts that *out points to enough bytes to write into
  713|    130|   store_any<endianness, InT>(in, std::span<uint8_t, sizeof(T)>(out, sizeof(T)));
  714|    130|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ENS0_10AutoDetectETkNS0_20unsigned_integralishEmTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm8EEEQsr3stdE7same_asIS4_T0_EEEvT1_OT2_:
  646|    130|inline constexpr void store_any(T in, OutR&& out_range) {
  647|    130|   store_any<endianness, T>(in, std::forward<OutR>(out_range));
  648|    130|}
_ZN5Botan6detail9store_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEmTkNS_6ranges23contiguous_output_rangeIhEENS2_4spanIhLm8EEEQnt15custom_storableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEEvS9_OT1_:
  525|    130|inline constexpr void store_any(WrappedInT wrapped_in, OutR&& out_range) {
  526|    130|   const auto in = detail::unwrap_strong_type_or_enum(wrapped_in);
  527|    130|   using InT = decltype(in);
  528|    130|   ranges::assert_exact_byte_length<sizeof(in)>(out_range);
  529|    130|   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|    130|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (534:7): [Folded, False: 130]
  ------------------
  535|      0|      return fallback_store_any<endianness, InT>(in, std::forward<OutR>(out_range));
  536|    130|   } 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|    130|      } else {
  542|    130|         static_assert(opposite(endianness) == std::endian::native);
  543|    130|         typecast_copy(out, reverse_bytes(in));
  544|    130|      }
  545|    130|   }
  546|    130|}
_ZN5Botan6detail26unwrap_strong_type_or_enumITkNS0_20unsigned_integralishEmEEDaT_:
  190|    130|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|    130|   } else {
  195|    130|      return Botan::unwrap_strong_type(t);
  196|    130|   }
  197|    130|}
_ZN5Botan8get_byteILm0EmEEhT0_QltT_stS1_:
   81|    352|{
   82|    352|   const size_t shift = ((~B) & (sizeof(T) - 1)) << 3;
   83|    352|   return static_cast<uint8_t>((input >> shift) & 0xFF);
   84|    352|}
_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.04k|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, Ts... ins) {
  583|  1.04k|   ranges::assert_exact_byte_length<(sizeof(Ts) + ...)>(out);
  584|  1.04k|   auto store_one = [off = 0]<typename T>(auto o, T i) mutable {
  585|  1.04k|      store_any<endianness, T>(i, o.subspan(off).template first<sizeof(T)>());
  586|  1.04k|      off += sizeof(T);
  587|  1.04k|   };
  588|       |
  589|  1.04k|   (store_one(std::span{out}, ins), ...);
  590|  1.04k|}
_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.04k|   auto store_one = [off = 0]<typename T>(auto o, T i) mutable {
  585|  1.04k|      store_any<endianness, T>(i, o.subspan(off).template first<sizeof(T)>());
  586|  1.04k|      off += sizeof(T);
  587|  1.04k|   };
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEjEET0_PKhm:
  454|    323|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|    323|   constexpr size_t out_size = sizeof(OutT);
  457|    323|   return load_any<endianness, OutT>(std::span<const uint8_t, out_size>(in + off * out_size, out_size));
  458|    323|}
_ZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEjTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm4EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_:
  278|    323|inline constexpr WrappedOutT load_any(InR&& in_range) {
  279|    323|   using OutT = detail::wrapped_type<WrappedOutT>;
  280|    323|   ranges::assert_exact_byte_length<sizeof(OutT)>(in_range);
  281|       |
  282|    323|   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|    323|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  287|    323|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|    323|      } else {
  289|    323|         const std::span in{in_range};
  290|    323|         if constexpr(sizeof(OutT) == 1) {
  291|    323|            return static_cast<OutT>(in[0]);
  292|    323|         } else if constexpr(endianness == std::endian::native) {
  293|    323|            return typecast_copy<OutT>(in);
  294|    323|         } else {
  295|    323|            static_assert(opposite(endianness) == std::endian::native);
  296|    323|            return reverse_bytes(typecast_copy<OutT>(in));
  297|    323|         }
  298|    323|      }
  299|    323|   }());
  300|    323|}
_ZN5Botan6detail24wrap_strong_type_or_enumITkNS0_20unsigned_integralishEjTkNSt3__117unsigned_integralEjEEDaT0_:
  200|    323|constexpr auto wrap_strong_type_or_enum(T t) {
  201|       |   if constexpr(std::is_enum_v<OutT>) {
  202|       |      return static_cast<OutT>(t);
  203|    323|   } else {
  204|    323|      return Botan::wrap_strong_type<OutT>(t);
  205|    323|   }
  206|    323|}
_ZZN5Botan6detail8load_anyILNSt3__16endianE64206ETkNS0_20unsigned_integralishEjTkNS_6ranges16contiguous_rangeIhEENS2_4spanIKhLm4EEEQnt15custom_loadableINS0_19wrapped_type_helperIu14__remove_cvrefIT0_EE4typeEEEESA_OT1_ENKUlvE_clEv:
  282|    323|   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|    323|      if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (286:10): [Folded, False: 323]
  ------------------
  287|      0|         return fallback_load_any<endianness, OutT>(std::forward<InR>(in_range));
  288|    323|      } else {
  289|    323|         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|    323|         } else {
  295|    323|            static_assert(opposite(endianness) == std::endian::native);
  296|    323|            return reverse_bytes(typecast_copy<OutT>(in));
  297|    323|         }
  298|    323|      }
  299|    323|   }());
_ZN5Botan11copy_out_beITkNS_6ranges14spanable_rangeENSt3__16vectorIjNS_16secure_allocatorIjEEEEEEvNS2_4spanIhLm18446744073709551615EEERKT_:
  773|    130|inline void copy_out_be(std::span<uint8_t> out, const InR& in) {
  774|    130|   using T = std::ranges::range_value_t<InR>;
  775|    130|   std::span<const T> in_s{in};
  776|    130|   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|    130|   for(size_t i = 0; i < remaining_bytes; ++i) {
  ------------------
  |  Branch (779:22): [True: 0, False: 130]
  ------------------
  780|      0|      out[i] = get_byte_var(i, in_s.front());
  781|      0|   }
  782|    130|}
_ZN5Botan6detail33copy_out_any_word_aligned_portionILNSt3__16endianE64206ETkNS0_20unsigned_integralishEjEEmRNS2_4spanIhLm18446744073709551615EEERNS4_IKT0_Lm18446744073709551615EEE:
  752|    130|inline size_t copy_out_any_word_aligned_portion(std::span<uint8_t>& out, std::span<const T>& in) {
  753|    130|   const size_t full_words = out.size() / sizeof(T);
  754|    130|   const size_t full_word_bytes = full_words * sizeof(T);
  755|    130|   const size_t remaining_bytes = out.size() - full_word_bytes;
  756|    130|   BOTAN_ASSERT_NOMSG(in.size_bytes() >= full_word_bytes + remaining_bytes);
  ------------------
  |  |   84|    130|   do {                                                                     \
  |  |   85|    130|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|    130|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 130]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|    130|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 130]
  |  |  ------------------
  ------------------
  757|       |
  758|       |   // copy full words
  759|    130|   store_any<endianness, T>(out.first(full_word_bytes), in.first(full_words));
  760|    130|   out = out.subspan(full_word_bytes);
  761|    130|   in = in.subspan(full_words);
  762|       |
  763|    130|   return remaining_bytes;
  764|    130|}
_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|    130|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  604|    130|   ranges::assert_equal_byte_lengths(out, in);
  605|    130|   using element_type = std::ranges::range_value_t<InR>;
  606|       |
  607|    130|   auto store_elementwise = [&] {
  608|    130|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|    130|      std::span<uint8_t> out_s(out);
  610|    130|      for(auto in_elem : in) {
  611|    130|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|    130|         out_s = out_s.subspan(bytes_per_element);
  613|    130|      }
  614|    130|   };
  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|    130|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (619:7): [Folded, False: 130]
  ------------------
  620|      0|      store_elementwise();
  621|    130|   } else {
  622|       |      if constexpr(endianness == std::endian::native && !custom_storable<element_type>) {
  623|       |         typecast_copy(out, in);
  624|    130|      } else {
  625|    130|         store_elementwise();
  626|    130|      }
  627|    130|   }
  628|    130|}
_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|    130|   auto store_elementwise = [&] {
  608|    130|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|    130|      std::span<uint8_t> out_s(out);
  610|  1.04k|      for(auto in_elem : in) {
  ------------------
  |  Branch (610:24): [True: 1.04k, False: 130]
  ------------------
  611|  1.04k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  1.04k|         out_s = out_s.subspan(bytes_per_element);
  613|  1.04k|      }
  614|    130|   };
_ZN5Botan6detail9store_anyILNSt3__16endianE57005ENS0_10AutoDetectETpTkNS0_20unsigned_integralishEJmEQ10all_same_vIDpT1_EEEDaS6_:
  696|  3.01k|inline constexpr auto store_any(Ts... ins) {
  697|  3.01k|   return store_any<endianness, OutR>(std::array{ins...});
  698|  3.01k|}
_ZN5Botan6detail9store_anyILNSt3__16endianE57005ENS0_10AutoDetectETkNS_6ranges14spanable_rangeENS2_5arrayImLm1EEEQoooosr3stdE7same_asIS4_T0_Eaasr6rangesE25statically_spanable_rangeIS8_Esr3stdE21default_initializableIS8_Esr8conceptsE21resizable_byte_bufferIS8_EEEDaOT1_:
  663|  3.01k|inline constexpr auto store_any(InR&& in_range) {
  664|  3.01k|   auto out = []([[maybe_unused]] const auto& in) {
  665|  3.01k|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|  3.01k|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|  3.01k|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|  3.01k|            return std::array<uint8_t, bytes>();
  669|  3.01k|         } else {
  670|  3.01k|            static_assert(
  671|  3.01k|               !std::same_as<AutoDetect, OutR>,
  672|  3.01k|               "cannot infer a suitable result container type from the given parameters at compile time, please specify it explicitly");
  673|  3.01k|         }
  674|  3.01k|      } else if constexpr(concepts::resizable_byte_buffer<OutR>) {
  675|  3.01k|         return OutR(std::span{in}.size_bytes());
  676|  3.01k|      } else {
  677|  3.01k|         return OutR{};
  678|  3.01k|      }
  679|  3.01k|   }(in_range);
  680|       |
  681|  3.01k|   store_any<endianness, std::ranges::range_value_t<InR>>(out, std::forward<InR>(in_range));
  682|  3.01k|   return out;
  683|  3.01k|}
_ZZN5Botan6detail9store_anyILNSt3__16endianE57005ENS0_10AutoDetectETkNS_6ranges14spanable_rangeENS2_5arrayImLm1EEEQoooosr3stdE7same_asIS4_T0_Eaasr6rangesE25statically_spanable_rangeIS8_Esr3stdE21default_initializableIS8_Esr8conceptsE21resizable_byte_bufferIS8_EEEDaOT1_ENKUlRKT_E_clIS7_EEDaSD_:
  664|  3.01k|   auto out = []([[maybe_unused]] const auto& in) {
  665|  3.01k|      if constexpr(std::same_as<AutoDetect, OutR>) {
  666|  3.01k|         if constexpr(ranges::statically_spanable_range<InR>) {
  667|  3.01k|            constexpr size_t bytes = decltype(std::span{in})::extent * sizeof(std::ranges::range_value_t<InR>);
  668|  3.01k|            return std::array<uint8_t, bytes>();
  669|       |         } else {
  670|       |            static_assert(
  671|       |               !std::same_as<AutoDetect, OutR>,
  672|       |               "cannot infer a suitable result container type from the given parameters at compile time, please specify it explicitly");
  673|       |         }
  674|       |      } else if constexpr(concepts::resizable_byte_buffer<OutR>) {
  675|       |         return OutR(std::span{in}.size_bytes());
  676|       |      } else {
  677|       |         return OutR{};
  678|       |      }
  679|  3.01k|   }(in_range);
_ZN5Botan6detail9store_anyILNSt3__16endianE57005EmTkNS_6ranges23contiguous_output_rangeIhEERNS2_5arrayIhLm8EEETkNS4_14spanable_rangeENS6_ImLm1EEEQoosr3stdE7same_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|  3.01k|inline constexpr void store_any(OutR&& out /* NOLINT(*-std-forward) */, const InR& in) {
  604|  3.01k|   ranges::assert_equal_byte_lengths(out, in);
  605|  3.01k|   using element_type = std::ranges::range_value_t<InR>;
  606|       |
  607|  3.01k|   auto store_elementwise = [&] {
  608|  3.01k|      constexpr size_t bytes_per_element = sizeof(element_type);
  609|  3.01k|      std::span<uint8_t> out_s(out);
  610|  3.01k|      for(auto in_elem : in) {
  611|  3.01k|         store_any<endianness, element_type>(out_s.template first<bytes_per_element>(), in_elem);
  612|  3.01k|         out_s = out_s.subspan(bytes_per_element);
  613|  3.01k|      }
  614|  3.01k|   };
  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|  3.01k|   if(std::is_constant_evaluated()) /* TODO: C++23: if consteval {} */ {
  ------------------
  |  Branch (619:7): [Folded, False: 3.01k]
  ------------------
  620|      0|      store_elementwise();
  621|  3.01k|   } else {
  622|  3.01k|      if constexpr(endianness == std::endian::native && !custom_storable<element_type>) {
  623|  3.01k|         typecast_copy(out, in);
  624|       |      } else {
  625|       |         store_elementwise();
  626|       |      }
  627|  3.01k|   }
  628|  3.01k|}
_ZN5Botan7load_beIjJPKhRmEEEDaDpOT0_:
  504|    323|inline constexpr auto load_be(ParamTs&&... params) {
  505|    323|   return detail::load_any<std::endian::big, OutT>(std::forward<ParamTs>(params)...);
  506|    323|}
_ZN5Botan8store_leINS_6detail10AutoDetectEJmEEEDaDpOT0_:
  736|  3.01k|inline constexpr auto store_le(ParamTs&&... params) {
  737|  3.01k|   return detail::store_any<std::endian::little, ModifierT>(std::forward<ParamTs>(params)...);
  738|  3.01k|}

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

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

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

_ZN5Botan9SIMD_4x32C2EDv2_x:
 1008|   272k|      explicit BOTAN_FN_ISA_SIMD_4X32 SIMD_4x32(native_simd_type x) noexcept : m_simd(x) {}
_ZN5Botan9SIMD_4x327load_beEPKv:
  198|  9.80k|      static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 load_be(const void* in) noexcept {
  199|  9.80k|#if defined(BOTAN_SIMD_USE_SSSE3) || defined(BOTAN_SIMD_USE_LSX) || defined(BOTAN_SIMD_USE_SIMD128)
  200|  9.80k|         return load_le(in).bswap();
  201|       |
  202|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  203|       |         uint32_t R0 = Botan::load_be<uint32_t>(reinterpret_cast<const uint8_t*>(in), 0);
  204|       |         uint32_t R1 = Botan::load_be<uint32_t>(reinterpret_cast<const uint8_t*>(in), 1);
  205|       |         uint32_t R2 = Botan::load_be<uint32_t>(reinterpret_cast<const uint8_t*>(in), 2);
  206|       |         uint32_t R3 = Botan::load_be<uint32_t>(reinterpret_cast<const uint8_t*>(in), 3);
  207|       |         __vector unsigned int val = {R0, R1, R2, R3};
  208|       |         return SIMD_4x32(val);
  209|       |
  210|       |#elif defined(BOTAN_SIMD_USE_NEON)
  211|       |         SIMD_4x32 l(vld1q_u32(static_cast<const uint32_t*>(in)));
  212|       |         if constexpr(std::endian::native == std::endian::little) {
  213|       |            return l.bswap();
  214|       |         } else {
  215|       |            return l;
  216|       |         }
  217|       |#endif
  218|  9.80k|      }
_ZN5Botan9SIMD_4x327load_leEPKv:
  171|  49.6k|      static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 load_le(const void* in) noexcept {
  172|  49.6k|#if defined(BOTAN_SIMD_USE_SSSE3)
  173|  49.6k|         return SIMD_4x32(_mm_loadu_si128(reinterpret_cast<const __m128i*>(in)));
  174|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  175|       |         uint32_t R0 = Botan::load_le<uint32_t>(reinterpret_cast<const uint8_t*>(in), 0);
  176|       |         uint32_t R1 = Botan::load_le<uint32_t>(reinterpret_cast<const uint8_t*>(in), 1);
  177|       |         uint32_t R2 = Botan::load_le<uint32_t>(reinterpret_cast<const uint8_t*>(in), 2);
  178|       |         uint32_t R3 = Botan::load_le<uint32_t>(reinterpret_cast<const uint8_t*>(in), 3);
  179|       |         __vector unsigned int val = {R0, R1, R2, R3};
  180|       |         return SIMD_4x32(val);
  181|       |#elif defined(BOTAN_SIMD_USE_NEON)
  182|       |         SIMD_4x32 l(vld1q_u32(static_cast<const uint32_t*>(in)));
  183|       |         if constexpr(std::endian::native == std::endian::big) {
  184|       |            return l.bswap();
  185|       |         } else {
  186|       |            return l;
  187|       |         }
  188|       |#elif defined(BOTAN_SIMD_USE_LSX)
  189|       |         return SIMD_4x32(__lsx_vld(in, 0));
  190|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  191|       |         return SIMD_4x32(wasm_v128_load(in));
  192|       |#endif
  193|  49.6k|      }
_ZNK5Botan9SIMD_4x325bswapEv:
  586|  9.80k|      BOTAN_FN_ISA_SIMD_4X32 SIMD_4x32 bswap() const noexcept {
  587|  9.80k|#if defined(BOTAN_SIMD_USE_SSSE3)
  588|  9.80k|         const auto idx = _mm_set_epi8(12, 13, 14, 15, 8, 9, 10, 11, 4, 5, 6, 7, 0, 1, 2, 3);
  589|       |
  590|  9.80k|         return SIMD_4x32(_mm_shuffle_epi8(raw(), idx));
  591|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  592|       |   #ifdef BOTAN_SIMD_USE_VSX
  593|       |         return SIMD_4x32(vec_revb(m_simd));
  594|       |   #else
  595|       |         const __vector unsigned char rev[1] = {
  596|       |            {3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12},
  597|       |         };
  598|       |
  599|       |         return SIMD_4x32(vec_perm(m_simd, m_simd, rev[0]));
  600|       |   #endif
  601|       |
  602|       |#elif defined(BOTAN_SIMD_USE_NEON)
  603|       |         return SIMD_4x32(vreinterpretq_u32_u8(vrev32q_u8(vreinterpretq_u8_u32(m_simd))));
  604|       |#elif defined(BOTAN_SIMD_USE_LSX)
  605|       |         return SIMD_4x32(__lsx_vshuf4i_b(m_simd, 0b00011011));
  606|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  607|       |         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));
  608|       |#endif
  609|  9.80k|      }
_ZNK5Botan9SIMD_4x323rawEv:
 1006|   474k|      native_simd_type BOTAN_FN_ISA_SIMD_4X32 raw() const noexcept { return m_simd; }
_ZNK5Botan9SIMD_4x32plERKS0_:
  395|  39.2k|      SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 operator+(const SIMD_4x32& other) const noexcept {
  396|  39.2k|         SIMD_4x32 retval(*this);
  397|  39.2k|         retval += other;
  398|  39.2k|         return retval;
  399|  39.2k|      }
_ZN5Botan9SIMD_4x32pLERKS0_:
  437|  73.5k|      void BOTAN_FN_ISA_SIMD_4X32 operator+=(const SIMD_4x32& other) noexcept {
  438|  73.5k|#if defined(BOTAN_SIMD_USE_SSSE3)
  439|  73.5k|         m_simd = _mm_add_epi32(m_simd, other.m_simd);
  440|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  441|       |         m_simd = vec_add(m_simd, other.m_simd);
  442|       |#elif defined(BOTAN_SIMD_USE_NEON)
  443|       |         m_simd = vaddq_u32(m_simd, other.m_simd);
  444|       |#elif defined(BOTAN_SIMD_USE_LSX)
  445|       |         m_simd = __lsx_vadd_w(m_simd, other.m_simd);
  446|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  447|       |         m_simd = wasm_i32x4_add(m_simd, other.m_simd);
  448|       |#endif
  449|  73.5k|      }
_ZNK5Botan9SIMD_4x328store_leEPj:
  228|    636|      void BOTAN_FN_ISA_SIMD_4X32 store_le(uint32_t out[4]) const noexcept {
  229|    636|         this->store_le(reinterpret_cast<uint8_t*>(out));
  230|    636|      }
_ZNK5Botan9SIMD_4x328store_leEPh:
  243|    636|      void BOTAN_FN_ISA_SIMD_4X32 store_le(uint8_t out[]) const noexcept {
  244|    636|#if defined(BOTAN_SIMD_USE_SSSE3)
  245|       |
  246|    636|         _mm_storeu_si128(reinterpret_cast<__m128i*>(out), raw());
  247|       |
  248|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  249|       |
  250|       |         union {
  251|       |               __vector unsigned int V;
  252|       |               uint32_t R[4];
  253|       |         } vec{};
  254|       |
  255|       |         // NOLINTNEXTLINE(*-union-access)
  256|       |         vec.V = raw();
  257|       |         // NOLINTNEXTLINE(*-union-access)
  258|       |         Botan::store_le(out, vec.R[0], vec.R[1], vec.R[2], vec.R[3]);
  259|       |
  260|       |#elif defined(BOTAN_SIMD_USE_NEON)
  261|       |         if constexpr(std::endian::native == std::endian::little) {
  262|       |            vst1q_u8(out, vreinterpretq_u8_u32(m_simd));
  263|       |         } else {
  264|       |            vst1q_u8(out, vreinterpretq_u8_u32(bswap().m_simd));
  265|       |         }
  266|       |#elif defined(BOTAN_SIMD_USE_LSX)
  267|       |         __lsx_vst(raw(), out, 0);
  268|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  269|       |         wasm_v128_store(out, m_simd);
  270|       |#endif
  271|    636|      }
_ZN5Botan9SIMD_4x327alignr8ERKS0_S2_:
  918|    636|      static inline SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 alignr8(const SIMD_4x32& a, const SIMD_4x32& b) {
  919|    636|#if defined(BOTAN_SIMD_USE_SSSE3)
  920|    636|         return SIMD_4x32(_mm_alignr_epi8(a.raw(), b.raw(), 8));
  921|       |#elif defined(BOTAN_SIMD_USE_NEON)
  922|       |         return SIMD_4x32(vextq_u32(b.raw(), a.raw(), 2));
  923|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  924|       |         const __vector unsigned char mask = {8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23};
  925|       |         return SIMD_4x32(vec_perm(b.raw(), a.raw(), mask));
  926|       |#elif defined(BOTAN_SIMD_USE_LSX)
  927|       |         return SIMD_4x32(__lsx_vshuf4i_d(a.raw(), b.raw(), 0b0011));
  928|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  929|       |         return SIMD_4x32(
  930|       |            wasm_i8x16_shuffle(b.raw(), a.raw(), 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23));
  931|       |#endif
  932|    636|      }
_ZN5Botan9SIMD_4x327alignr4ERKS0_S2_:
  901|  29.4k|      static inline SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 alignr4(const SIMD_4x32& a, const SIMD_4x32& b) {
  902|  29.4k|#if defined(BOTAN_SIMD_USE_SSSE3)
  903|  29.4k|         return SIMD_4x32(_mm_alignr_epi8(a.raw(), b.raw(), 4));
  904|       |#elif defined(BOTAN_SIMD_USE_NEON)
  905|       |         return SIMD_4x32(vextq_u32(b.raw(), a.raw(), 1));
  906|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  907|       |         const __vector unsigned char mask = {4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19};
  908|       |         return SIMD_4x32(vec_perm(b.raw(), a.raw(), mask));
  909|       |#elif defined(BOTAN_SIMD_USE_LSX)
  910|       |         const auto mask = SIMD_4x32(0x07060504, 0x0B0A0908, 0x0F0E0D0C, 0x13121110);
  911|       |         return SIMD_4x32(__lsx_vshuf_b(a.raw(), b.raw(), mask.raw()));
  912|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  913|       |         return SIMD_4x32(
  914|       |            wasm_i8x16_shuffle(b.raw(), a.raw(), 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19));
  915|       |#endif
  916|  29.4k|      }
_ZNK5Botan9SIMD_4x3217shift_elems_rightILm2EEES0_vQleT_Li3E:
  651|  39.2k|      {
  652|  39.2k|#if defined(BOTAN_SIMD_USE_SSSE3)
  653|  39.2k|         return SIMD_4x32(_mm_srli_si128(raw(), 4 * I));
  654|       |#elif defined(BOTAN_SIMD_USE_NEON)
  655|       |         return SIMD_4x32(vextq_u32(raw(), vdupq_n_u32(0), I));
  656|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  657|       |         const __vector unsigned int zero = vec_splat_u32(0);
  658|       |
  659|       |         const __vector unsigned char shuf[3] = {
  660|       |            {4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19},
  661|       |            {8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23},
  662|       |            {12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27},
  663|       |         };
  664|       |
  665|       |         return SIMD_4x32(vec_perm(raw(), zero, shuf[I - 1]));
  666|       |#elif defined(BOTAN_SIMD_USE_LSX)
  667|       |         return SIMD_4x32(__lsx_vbsrl_v(raw(), 4 * I));
  668|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  669|       |         if constexpr(I == 0) {
  670|       |            return SIMD_4x32(m_simd);
  671|       |         }
  672|       |
  673|       |         const auto zero = wasm_u32x4_const_splat(0);
  674|       |         if constexpr(I == 1) {
  675|       |            return SIMD_4x32(
  676|       |               wasm_i8x16_shuffle(m_simd, zero, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 16, 16));
  677|       |         }
  678|       |         if constexpr(I == 2) {
  679|       |            return SIMD_4x32(
  680|       |               wasm_i8x16_shuffle(m_simd, zero, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 16, 16, 16, 16, 16, 16));
  681|       |         }
  682|       |
  683|       |         return SIMD_4x32(
  684|       |            wasm_i8x16_shuffle(m_simd, zero, 12, 13, 14, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16));
  685|       |#endif
  686|  39.2k|      }

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

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

_ZN5Botan2CT13value_barrierITkNSt3__117unsigned_integralEjQntsr3stdE7same_asIbT_EEES3_S3_:
   43|  4.72k|constexpr inline T value_barrier(T x) {
   44|  4.72k|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (44:7): [Folded, False: 4.72k]
  ------------------
   45|      0|      return x;
   46|  4.72k|   } else {
   47|  4.72k|#if defined(BOTAN_CT_VALUE_BARRIER_USE_ASM)
   48|       |      /*
   49|       |      * We may want a "stronger" statement such as
   50|       |      *     asm volatile("" : "+r,m"(x) : : "memory);
   51|       |      * (see https://theunixzoo.co.uk/blog/2021-10-14-preventing-optimisations.html)
   52|       |      * however the current approach seems sufficient with current compilers,
   53|       |      * and is minimally damaging with regards to degrading code generation.
   54|       |      */
   55|  4.72k|      asm("" : "+r"(x) : /* no input */);  // NOLINT(*-no-assembler)
   56|  4.72k|      return x;
   57|       |#elif defined(BOTAN_CT_VALUE_BARRIER_USE_VOLATILE)
   58|       |      volatile T vx = x;
   59|       |      return vx;
   60|       |#else
   61|       |      return x;
   62|       |#endif
   63|  4.72k|   }
   64|  4.72k|}

_ZNK5Botan10BER_Object6is_setEv:
  267|  20.1k|      bool is_set() const { return m_type_tag != ASN1_Type::NoObject; }
_ZNK5Botan10BER_Object7taggingEv:
  272|  9.67k|      uint32_t tagging() const { return type_tag() | class_tag(); }
_ZNK5Botan10BER_Object8type_tagEv:
  277|  9.67k|      ASN1_Type type_tag() const { return m_type_tag; }
_ZNK5Botan10BER_Object9class_tagEv:
  282|  9.67k|      ASN1_Class class_tag() const { return m_class_tag; }
_ZNK5Botan10BER_Object4typeEv:
  287|  3.45k|      ASN1_Type type() const { return m_type_tag; }
_ZNK5Botan10BER_Object9get_classEv:
  292|  1.81k|      ASN1_Class get_class() const { return m_class_tag; }
_ZNK5Botan10BER_Object4bitsEv:
  298|  23.6k|      const uint8_t* bits() const { return m_value.data(); }
_ZNK5Botan10BER_Object6lengthEv:
  303|  60.9k|      size_t length() const { return m_value.size(); }
_ZNK5Botan10BER_Object4dataEv:
  308|  2.59k|      std::span<const uint8_t> data() const { return std::span{m_value}; }
_ZN5Botan10BER_Object12mutable_bitsEm:
  344|  7.78k|      uint8_t* mutable_bits(size_t length) {
  345|  7.78k|         m_value.resize(length);
  346|  7.78k|         return m_value.data();
  347|  7.78k|      }
_ZNK5Botan3OID14get_componentsEv:
  530|  5.00k|      const std::vector<uint32_t>& get_components() const {
  531|  5.00k|         return m_id;
  532|  5.00k|      }
_ZNK5Botan11ASN1_String5valueEv:
  590|  1.30k|      const std::string& value() const { return m_utf8_str; }
_ZN5BotanorENS_10ASN1_ClassES0_:
   91|  4.21k|inline ASN1_Class operator|(ASN1_Class x, ASN1_Class y) {
   92|  4.21k|   return static_cast<ASN1_Class>(static_cast<uint32_t>(x) | static_cast<uint32_t>(y));
   93|  4.21k|}
_ZN5BotanorENS_9ASN1_TypeENS_10ASN1_ClassE:
   98|  9.67k|inline uint32_t operator|(ASN1_Type x, ASN1_Class y) {
   99|  9.67k|   return static_cast<uint32_t>(x) | static_cast<uint32_t>(y);
  100|  9.67k|}
_ZN5BotanorENS_10ASN1_ClassENS_9ASN1_TypeE:
  105|  1.83k|inline uint32_t operator|(ASN1_Class x, ASN1_Type y) {
  106|  1.83k|   return static_cast<uint32_t>(x) | static_cast<uint32_t>(y);
  107|  1.83k|}
_ZN5Botan11ASN1_ObjectD2Ev:
  168|  12.7k|      virtual ~ASN1_Object() = default;
_ZN5Botan11ASN1_ObjectC2ERKS0_:
  151|  1.30k|      ASN1_Object(const ASN1_Object&) = default;
_ZN5Botan11ASN1_ObjectC2Ev:
  146|  5.30k|      ASN1_Object() = default;
_ZN5Botan11ASN1_ObjectC2EOS0_:
  161|  6.12k|      ASN1_Object(ASN1_Object&&) = default;
_ZN5Botan3OIDC2Ev:
  423|  1.87k|      explicit OID() = default;
_ZN5Botan10BER_ObjectC2Ev:
  239|  14.6k|      BER_Object() = default;
_ZN5Botan11ASN1_ObjectaSEOS0_:
  166|  1.46k|      ASN1_Object& operator=(ASN1_Object&&) = default;
_ZN5Botan10BER_ObjectC2EOS0_:
  249|  3.83k|      BER_Object(BER_Object&& other) = default;

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

_ZN5Botan11BER_Decoder6Limits3DEREv:
   43|  1.55k|            static Limits DER() { return Limits(false, 0, false, DefaultMaxObjectSize, false); }
_ZN5Botan11BER_Decoder6LimitsC2EbmbNSt3__18optionalImEEb:
  134|  1.55k|                  m_allow_ber(allow_ber),
  135|  1.55k|                  m_max_nested_indef(max_nested_indef),
  136|  1.55k|                  m_allow_standalone_eoc(allow_standalone_eoc),
  137|  1.55k|                  m_max_object_size(max_object_size),
  138|  1.55k|                  m_reject_default_value_encoding(reject_default_value_encoding) {}
_ZN5Botan11BER_Decoder14start_sequenceEv:
  276|  3.43k|      BER_Decoder start_sequence() { return start_cons(ASN1_Type::Sequence, ASN1_Class::Universal); }
_ZNK5Botan11BER_Decoder6Limits18allow_ber_encodingEv:
   57|  20.1k|            bool allow_ber_encoding() const { return m_allow_ber; }
_ZNK5Botan11BER_Decoder6Limits20require_der_encodingEv:
   62|  12.0k|            bool require_der_encoding() const { return !allow_ber_encoding(); }
_ZNK5Botan11BER_Decoder6Limits15max_object_sizeEv:
   81|  7.90k|            std::optional<size_t> max_object_size() const { return m_max_object_size; }
_ZNK5Botan11BER_Decoder6limitsEv:
  198|  5.00k|      Limits limits() const { return m_limits; }
_ZN5Botan11BER_Decoder9start_setEv:
  282|  1.03k|      BER_Decoder start_set() { return start_cons(ASN1_Type::Set, ASN1_Class::Universal); }
_ZN5Botan11BER_Decoder9raw_bytesINSt3__19allocatorIhEEEERS0_RNS2_6vectorIhT_EE:
  339|  1.16k|      BER_Decoder& raw_bytes(std::vector<uint8_t, Alloc>& out) {
  340|  1.16k|         out.clear();
  341|  1.16k|         uint8_t buf[64];
  342|  2.34k|         while(const size_t got = this->read_bytes(std::span{buf})) {
  ------------------
  |  Branch (342:29): [True: 1.17k, False: 1.16k]
  ------------------
  343|  1.17k|            out.insert(out.end(), buf, buf + got);
  344|  1.17k|         }
  345|  1.16k|         return (*this);
  346|  1.16k|      }

_ZN5Botan20Buffered_Computation6updateENSt3__14spanIKhLm18446744073709551615EEE:
   41|    270|      void update(std::span<const uint8_t> in) { add_data(in); }
_ZN5Botan20Buffered_Computation12final_stdvecEv:
  114|    130|      std::vector<uint8_t> final_stdvec() { return final<std::vector<uint8_t>>(); }
_ZN5Botan20Buffered_Computation5finalITkNS_8concepts21resizable_byte_bufferENSt3__16vectorIhNS3_9allocatorIhEEEEEET_v:
  104|    130|      T final() {
  105|    130|         T output(output_length());
  106|    130|         final_result(output);
  107|    130|         return output;
  108|    130|      }
_ZN5Botan20Buffered_ComputationD2Ev:
  169|    140|      virtual ~Buffered_Computation() = default;

_ZN5Botan17DataSource_MemoryC2ENSt3__14spanIKhLm18446744073709551615EEE:
  181|  2.71k|      explicit DataSource_Memory(std::span<const uint8_t> in) : m_offset(0) {
  182|       |         // Guard against forming a range from a null pointer (eg an empty span)
  183|  2.71k|         if(!in.empty()) {
  ------------------
  |  Branch (183:13): [True: 2.53k, False: 179]
  ------------------
  184|  2.53k|            m_source.assign(in.begin(), in.end());
  185|  2.53k|         }
  186|  2.71k|      }
_ZN5Botan10DataSourceC2Ev:
  107|  7.55k|      DataSource() = default;
_ZN5Botan10DataSourceD2Ev:
  109|  6.55k|      virtual ~DataSource() = default;

_ZN5Botan11DER_Encoder10add_objectENS_9ASN1_TypeENS_10ASN1_ClassENSt3__14spanIKhLm18446744073709551615EEE:
  410|  1.30k|      DER_Encoder& add_object(ASN1_Type type_tag, ASN1_Class class_tag, std::span<const uint8_t> rep) {
  411|  1.30k|         return add_object(type_tag, class_tag, rep.data(), rep.size());
  412|  1.30k|      }
_ZN5Botan11DER_Encoder10add_objectENS_9ASN1_TypeENS_10ASN1_ClassERKNSt3__16vectorIhNS3_9allocatorIhEEEE:
  421|  1.30k|      DER_Encoder& add_object(ASN1_Type type_tag, ASN1_Class class_tag, const std::vector<uint8_t>& rep) {
  422|  1.30k|         return add_object(type_tag, class_tag, std::span{rep});
  423|  1.30k|      }

_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.04k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromT& in) {
  200|  1.04k|   typecast_copy(out, std::span<const FromT, 1>(&in, 1));
  201|  1.04k|}
_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.04k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|  1.04k|   ranges::assert_equal_byte_lengths(out, in);
  178|  1.04k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|  1.04k|}
_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|  19.1k|inline constexpr ToT typecast_copy(const FromR& src) {
  211|  19.1k|   ToT dst;  // NOLINT(*-member-init)
  212|  19.1k|   typecast_copy(dst, src);
  213|  19.1k|   return dst;
  214|  19.1k|}
_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|  19.1k|inline constexpr void typecast_copy(ToT& out, const FromR& in) {
  189|  19.1k|   typecast_copy(std::span<ToT, 1>(&out, 1), in);
  190|  19.1k|}
_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|  19.1k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|  19.1k|   ranges::assert_equal_byte_lengths(out, in);
  178|  19.1k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|  19.1k|}
_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|    130|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromT& in) {
  200|    130|   typecast_copy(out, std::span<const FromT, 1>(&in, 1));
  201|    130|}
_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|    130|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|    130|   ranges::assert_equal_byte_lengths(out, in);
  178|    130|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|    130|}
_ZN5Botan8copy_memIhQsr3stdE12is_trivial_vIu7__decayIT_EEEEvPS1_PKS1_m:
  144|  34.7k|inline constexpr void copy_mem(T* out, const T* in, size_t n) {
  145|  34.7k|   BOTAN_ASSERT_IMPLICATION(n > 0, in != nullptr && out != nullptr, "If n > 0 then args are not null");
  ------------------
  |  |  110|  34.7k|   do {                                                                                          \
  |  |  111|  34.7k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                              \
  |  |  112|  64.4k|      if((expr1) && !(expr2)) {                                                                  \
  |  |  ------------------
  |  |  |  Branch (112:10): [True: 32.2k, False: 2.47k]
  |  |  |  Branch (112:23): [True: 32.2k, False: 0]
  |  |  |  Branch (112:23): [True: 32.2k, False: 0]
  |  |  ------------------
  |  |  113|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                                     \
  |  |  114|      0|         Botan::assertion_failure(#expr1 " implies " #expr2, msg, __func__, __FILE__, __LINE__); \
  |  |  115|      0|      }                                                                                          \
  |  |  116|  34.7k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (116:12): [Folded, False: 34.7k]
  |  |  ------------------
  ------------------
  146|       |
  147|  34.7k|   if(in != nullptr && out != nullptr && n > 0) {
  ------------------
  |  Branch (147:7): [True: 34.5k, False: 182]
  |  Branch (147:24): [True: 33.3k, False: 1.20k]
  |  Branch (147:42): [True: 32.2k, False: 1.08k]
  ------------------
  148|  32.2k|      std::memmove(out, in, sizeof(T) * n);
  149|  32.2k|   }
  150|  34.7k|}
_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|    323|inline constexpr ToT typecast_copy(const FromR& src) {
  211|    323|   ToT dst;  // NOLINT(*-member-init)
  212|    323|   typecast_copy(dst, src);
  213|    323|   return dst;
  214|    323|}
_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|    323|inline constexpr void typecast_copy(ToT& out, const FromR& in) {
  189|    323|   typecast_copy(std::span<ToT, 1>(&out, 1), in);
  190|    323|}
_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|    323|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|    323|   ranges::assert_equal_byte_lengths(out, in);
  178|    323|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|    323|}
_ZN5Botan19secure_scrub_memoryITkNS_6ranges23contiguous_output_rangeERNSt3__16vectorIhNS2_9allocatorIhEEEEEEvOT_:
   59|  18.4k|void secure_scrub_memory(ranges::contiguous_output_range auto&& data) {
   60|  18.4k|   secure_scrub_memory(std::ranges::data(data), ranges::size_bytes(data));
   61|  18.4k|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeERNSt3__15arrayIhLm8EEETkNS1_16contiguous_rangeENS3_ImLm1EEEQaasr3stdE23is_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|  3.01k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|  3.01k|   ranges::assert_equal_byte_lengths(out, in);
  178|  3.01k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|  3.01k|}
_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:
  159|  1.55k|      X509_DN() = default;

_ZN5Botan6ranges24assert_exact_byte_lengthILm4ETkNS0_14spanable_rangeENSt3__14spanIhLm4EEEEEvRKT0_:
   77|  2.08k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  2.08k|   const std::span s{r};
   79|  2.08k|   if constexpr(statically_spanable_range<R>) {
   80|  2.08k|      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.08k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm4EEETpTkNS0_14spanable_rangeEJNS3_IKjLm1EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  1.04k|{
  101|  1.04k|   const std::span s0{r0};
  102|       |
  103|  1.04k|   if constexpr(statically_spanable_range<R0>) {
  104|  1.04k|      constexpr size_t expected_size = s0.size_bytes();
  105|  1.04k|      (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.04k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm4ETkNS0_14spanable_rangeENSt3__14spanIKjLm1EEEEEvRKT0_:
   77|  1.04k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  1.04k|   const std::span s{r};
   79|  1.04k|   if constexpr(statically_spanable_range<R>) {
   80|  1.04k|      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.04k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm4EEEEEmRKT_:
   59|  1.04k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  1.04k|   return std::span{r}.size_bytes();
   61|  1.04k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm1ETkNS0_14spanable_rangeENSt3__14spanIKhLm1EEEEEvRKT0_:
   77|   769k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|   769k|   const std::span s{r};
   79|   769k|   if constexpr(statically_spanable_range<R>) {
   80|   769k|      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|   769k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm2ETkNS0_14spanable_rangeENSt3__14spanIKhLm2EEEEEvRKT0_:
   77|  38.3k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  38.3k|   const std::span s{r};
   79|  38.3k|   if constexpr(statically_spanable_range<R>) {
   80|  38.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|  38.3k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanItLm1EEETpTkNS0_14spanable_rangeEJNS3_IKhLm2EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  19.1k|{
  101|  19.1k|   const std::span s0{r0};
  102|       |
  103|  19.1k|   if constexpr(statically_spanable_range<R0>) {
  104|  19.1k|      constexpr size_t expected_size = s0.size_bytes();
  105|  19.1k|      (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|  19.1k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanItLm1EEEEEmRKT_:
   59|  19.1k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  19.1k|   return std::span{r}.size_bytes();
   61|  19.1k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm8ETkNS0_14spanable_rangeENSt3__14spanIhLm8EEEEEvRKT0_:
   77|    130|inline constexpr void assert_exact_byte_length(const R& r) {
   78|    130|   const std::span s{r};
   79|    130|   if constexpr(statically_spanable_range<R>) {
   80|    130|      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|    130|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm8EEETpTkNS0_14spanable_rangeEJNS3_IKmLm1EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|    130|{
  101|    130|   const std::span s0{r0};
  102|       |
  103|    130|   if constexpr(statically_spanable_range<R0>) {
  104|    130|      constexpr size_t expected_size = s0.size_bytes();
  105|    130|      (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|    130|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm8ETkNS0_14spanable_rangeENSt3__14spanIKmLm1EEEEEvRKT0_:
   77|    130|inline constexpr void assert_exact_byte_length(const R& r) {
   78|    130|   const std::span s{r};
   79|    130|   if constexpr(statically_spanable_range<R>) {
   80|    130|      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|    130|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm8EEEEEmRKT_:
   59|    130|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|    130|   return std::span{r}.size_bytes();
   61|    130|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm4ETkNS0_14spanable_rangeENSt3__14spanIKhLm4EEEEEvRKT0_:
   77|    646|inline constexpr void assert_exact_byte_length(const R& r) {
   78|    646|   const std::span s{r};
   79|    646|   if constexpr(statically_spanable_range<R>) {
   80|    646|      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|    646|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIjLm1EEETpTkNS0_14spanable_rangeEJNS3_IKhLm4EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|    323|{
  101|    323|   const std::span s0{r0};
  102|       |
  103|    323|   if constexpr(statically_spanable_range<R0>) {
  104|    323|      constexpr size_t expected_size = s0.size_bytes();
  105|    323|      (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|    323|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIjLm1EEEEEmRKT_:
   59|    323|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|    323|   return std::span{r}.size_bytes();
   61|    323|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__16vectorIhNS2_9allocatorIhEEEEEEmRKT_:
   59|  18.4k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  18.4k|   return std::span{r}.size_bytes();
   61|  18.4k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm18446744073709551615EEETpTkNS0_14spanable_rangeEJNS3_IKjLm18446744073709551615EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|    130|{
  101|    130|   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|    130|   } else {
  107|    130|      const size_t expected_size = s0.size_bytes();
  108|    130|      const bool correct_size =
  109|    130|         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|    130|      if(!correct_size) {
  ------------------
  |  Branch (111:10): [True: 0, False: 130]
  ------------------
  112|      0|         memory_region_size_violation();
  113|      0|      }
  114|    130|   }
  115|    130|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayIhLm8EEETpTkNS0_14spanable_rangeEJNS3_ImLm1EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  6.02k|{
  101|  6.02k|   const std::span s0{r0};
  102|       |
  103|  6.02k|   if constexpr(statically_spanable_range<R0>) {
  104|  6.02k|      constexpr size_t expected_size = s0.size_bytes();
  105|  6.02k|      (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|  6.02k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm8ETkNS0_14spanable_rangeENSt3__15arrayImLm1EEEEEvRKT0_:
   77|  6.02k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  6.02k|   const std::span s{r};
   79|  6.02k|   if constexpr(statically_spanable_range<R>) {
   80|  6.02k|      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|  6.02k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__15arrayIhLm8EEEEEmRKT_:
   59|  3.01k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  3.01k|   return std::span{r}.size_bytes();
   61|  3.01k|}

_ZN5Botan16secure_allocatorIhE10deallocateEPhm:
  102|  2.53k|      void deallocate(T* p, std::size_t n) { deallocate_memory(p, n, sizeof(T)); }
_ZN5Botan16secure_allocatorIhE8allocateEm:
   95|  2.53k|      T* allocate(std::size_t n) { return static_cast<T*>(allocate_memory(n, sizeof(T))); }
_ZN5Botan16secure_allocatorIjE10deallocateEPjm:
  102|    140|      void deallocate(T* p, std::size_t n) { deallocate_memory(p, n, sizeof(T)); }
_ZN5Botan16secure_allocatorIjE8allocateEm:
   95|    140|      T* allocate(std::size_t n) { return static_cast<T*>(allocate_memory(n, sizeof(T))); }

_ZN5Botan18unwrap_strong_typeIRjEEDcOT_:
  328|  1.04k|[[nodiscard]] constexpr decltype(auto) unwrap_strong_type(T&& t) {
  329|  1.04k|   if constexpr(!concepts::strong_type<std::remove_cvref_t<T>>) {
  330|       |      // If the parameter type isn't a strong type, return it as is.
  331|  1.04k|      return std::forward<T>(t);
  332|       |   } else {
  333|       |      // Unwrap the strong type and return the underlying value.
  334|       |      return std::forward<T>(t).get();
  335|       |   }
  336|  1.04k|}
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEEC2Ev:
   85|  3.18k|      Strong_Base() = default;
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEEC2ES6_:
  105|  3.14k|      constexpr explicit Strong_Base(T v) : m_value(std::move(v)) {}
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEEaSEOS7_:
   99|  3.14k|      Strong_Base& operator=(Strong_Base&&) noexcept = default;
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEED2Ev:
  101|  6.33k|      ~Strong_Base() = default;
_ZN5Botan16wrap_strong_typeIhRhQoosr3stdE18constructible_fromIT_T0_Eaasr8conceptsE11strong_typeIS2_Esr3stdE18constructible_fromINS2_12wrapped_typeES3_EEEDcOS3_:
  353|   769k|[[nodiscard]] constexpr decltype(auto) wrap_strong_type(ParamT&& t) {
  354|   769k|   if constexpr(std::same_as<std::remove_cvref_t<ParamT>, T>) {
  355|       |      // Noop, if the parameter type already is the desired return type.
  356|   769k|      return std::forward<ParamT>(t);
  357|       |   } else if constexpr(std::constructible_from<T, ParamT>) {
  358|       |      // Implicit conversion from the parameter type to the return type.
  359|       |      return T{std::forward<ParamT>(t)};
  360|       |   } else {
  361|       |      // Explicitly calling the wrapped type's constructor to support
  362|       |      // implicit conversions on types that mark their constructors as explicit.
  363|       |      static_assert(concepts::strong_type<T> && std::constructible_from<typename T::wrapped_type, ParamT>);
  364|       |      return T{typename T::wrapped_type{std::forward<ParamT>(t)}};
  365|       |   }
  366|   769k|}
_ZN5Botan16wrap_strong_typeItRtQoosr3stdE18constructible_fromIT_T0_Eaasr8conceptsE11strong_typeIS2_Esr3stdE18constructible_fromINS2_12wrapped_typeES3_EEEDcOS3_:
  353|  19.1k|[[nodiscard]] constexpr decltype(auto) wrap_strong_type(ParamT&& t) {
  354|  19.1k|   if constexpr(std::same_as<std::remove_cvref_t<ParamT>, T>) {
  355|       |      // Noop, if the parameter type already is the desired return type.
  356|  19.1k|      return std::forward<ParamT>(t);
  357|       |   } else if constexpr(std::constructible_from<T, ParamT>) {
  358|       |      // Implicit conversion from the parameter type to the return type.
  359|       |      return T{std::forward<ParamT>(t)};
  360|       |   } else {
  361|       |      // Explicitly calling the wrapped type's constructor to support
  362|       |      // implicit conversions on types that mark their constructors as explicit.
  363|       |      static_assert(concepts::strong_type<T> && std::constructible_from<typename T::wrapped_type, ParamT>);
  364|       |      return T{typename T::wrapped_type{std::forward<ParamT>(t)}};
  365|       |   }
  366|  19.1k|}
_ZN5Botan18unwrap_strong_typeIRmEEDcOT_:
  328|    130|[[nodiscard]] constexpr decltype(auto) unwrap_strong_type(T&& t) {
  329|    130|   if constexpr(!concepts::strong_type<std::remove_cvref_t<T>>) {
  330|       |      // If the parameter type isn't a strong type, return it as is.
  331|    130|      return std::forward<T>(t);
  332|       |   } else {
  333|       |      // Unwrap the strong type and return the underlying value.
  334|       |      return std::forward<T>(t).get();
  335|       |   }
  336|    130|}
_ZN5Botan16wrap_strong_typeIjRjQoosr3stdE18constructible_fromIT_T0_Eaasr8conceptsE11strong_typeIS2_Esr3stdE18constructible_fromINS2_12wrapped_typeES3_EEEDcOS3_:
  353|    323|[[nodiscard]] constexpr decltype(auto) wrap_strong_type(ParamT&& t) {
  354|    323|   if constexpr(std::same_as<std::remove_cvref_t<ParamT>, T>) {
  355|       |      // Noop, if the parameter type already is the desired return type.
  356|    323|      return std::forward<ParamT>(t);
  357|       |   } else if constexpr(std::constructible_from<T, ParamT>) {
  358|       |      // Implicit conversion from the parameter type to the return type.
  359|       |      return T{std::forward<ParamT>(t)};
  360|       |   } else {
  361|       |      // Explicitly calling the wrapped type's constructor to support
  362|       |      // implicit conversions on types that mark their constructors as explicit.
  363|       |      static_assert(concepts::strong_type<T> && std::constructible_from<typename T::wrapped_type, ParamT>);
  364|       |      return T{typename T::wrapped_type{std::forward<ParamT>(t)}};
  365|       |   }
  366|    323|}

_ZN5Botan3TLS12Group_ParamsC2Ev:
  145|    303|      constexpr Group_Params() : m_code(Group_Params_Code::NONE) {}
_ZN5Botan3TLS12Group_ParamsC2Et:
  151|  24.2k|      constexpr Group_Params(uint16_t code) : m_code(static_cast<Group_Params_Code>(code)) {}
_ZNK5Botan3TLS12Group_Params9wire_codeEv:
  166|  24.2k|      constexpr uint16_t wire_code() const { return static_cast<uint16_t>(m_code); }

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

_ZN5Botan3TLS21Server_Name_Indicator11static_typeEv:
  123|     11|      static Extension_Code static_type() { return Extension_Code::ServerNameIndication; }
_ZNK5Botan3TLS21Server_Name_Indicator4typeEv:
  125|     11|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS39Application_Layer_Protocol_Notification11static_typeEv:
  148|     46|      static Extension_Code static_type() { return Extension_Code::ApplicationLayerProtocolNegotiation; }
_ZNK5Botan3TLS39Application_Layer_Protocol_Notification4typeEv:
  150|     46|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS23Client_Certificate_Type11static_typeEv:
  225|     18|      static Extension_Code static_type() { return Extension_Code::ClientCertificateType; }
_ZNK5Botan3TLS23Client_Certificate_Type4typeEv:
  227|     18|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS23Server_Certificate_Type11static_typeEv:
  239|     13|      static Extension_Code static_type() { return Extension_Code::ServerCertificateType; }
_ZNK5Botan3TLS23Server_Certificate_Type4typeEv:
  241|     13|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS16Supported_Groups11static_typeEv:
  249|    203|      static Extension_Code static_type() { return Extension_Code::SupportedGroups; }
_ZNK5Botan3TLS16Supported_Groups4typeEv:
  251|    203|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS20Signature_Algorithms11static_typeEv:
  278|     11|      static Extension_Code static_type() { return Extension_Code::SignatureAlgorithms; }
_ZNK5Botan3TLS20Signature_Algorithms4typeEv:
  280|     11|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS25Signature_Algorithms_Cert11static_typeEv:
  311|     18|      static Extension_Code static_type() { return Extension_Code::CertSignatureAlgorithms; }
_ZNK5Botan3TLS25Signature_Algorithms_Cert4typeEv:
  313|     18|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS24SRTP_Protection_Profiles11static_typeEv:
  334|     11|      static Extension_Code static_type() { return Extension_Code::UseSrtp; }
_ZNK5Botan3TLS24SRTP_Protection_Profiles4typeEv:
  336|     11|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS26Certificate_Status_Request11static_typeEv:
  361|     41|      static Extension_Code static_type() { return Extension_Code::CertificateStatusRequest; }
_ZNK5Botan3TLS26Certificate_Status_Request4typeEv:
  363|     41|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS18Supported_Versions11static_typeEv:
  399|     17|      static Extension_Code static_type() { return Extension_Code::SupportedVersions; }
_ZNK5Botan3TLS18Supported_Versions4typeEv:
  401|     17|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS17Record_Size_Limit11static_typeEv:
  430|     22|      static Extension_Code static_type() { return Extension_Code::RecordSizeLimit; }
_ZNK5Botan3TLS17Record_Size_Limit4typeEv:
  432|     22|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS17Unknown_Extension4typeEv:
  461|  2.82k|      Extension_Code type() const override { return m_type; }
_ZN5Botan3TLS10Extensions3addEPNS0_9ExtensionE:
  495|    177|      void add(Extension* extn) { add(std::unique_ptr<Extension>(extn)); }
_ZN5Botan3TLS10ExtensionsC2Ev:
  548|  3.15k|      Extensions() = default;
_ZN5Botan3TLS9ExtensionD2Ev:
  115|  5.75k|      virtual ~Extension() = default;
_ZNK5Botan3TLS10Extensions3getINS0_23Renegotiation_ExtensionEEEPT_v:
  478|    180|      T* get() const {
  479|    180|         return dynamic_cast<T*>(get(T::static_type()));
  480|    180|      }

_ZNK5Botan3TLS23Renegotiation_Extension18renegotiation_infoEv:
   41|      3|      const std::vector<uint8_t>& renegotiation_info() const { return m_reneg_data; }
_ZNK5Botan3TLS24Session_Ticket_Extension4typeEv:
   58|     28|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS24Session_Ticket_Extension11static_typeEv:
   56|     28|      static Extension_Code static_type() { return Extension_Code::SessionTicket; }
_ZN5Botan3TLS23Renegotiation_ExtensionC2Ev:
   35|    177|      Renegotiation_Extension() = default;
_ZN5Botan3TLS23Supported_Point_Formats11static_typeEv:
   99|     14|      static Extension_Code static_type() { return Extension_Code::EcPointFormats; }
_ZN5Botan3TLS23Renegotiation_Extension11static_typeEv:
   31|    369|      static Extension_Code static_type() { return Extension_Code::SafeRenegotiation; }
_ZN5Botan3TLS22Extended_Master_Secret11static_typeEv:
  122|     24|      static Extension_Code static_type() { return Extension_Code::ExtendedMasterSecret; }
_ZN5Botan3TLS16Encrypt_then_MAC11static_typeEv:
  140|     18|      static Extension_Code static_type() { return Extension_Code::EncryptThenMac; }
_ZNK5Botan3TLS23Renegotiation_Extension4typeEv:
   33|    189|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS23Supported_Point_Formats4typeEv:
  101|     14|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS22Extended_Master_Secret4typeEv:
  124|     24|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS16Encrypt_then_MAC4typeEv:
  142|     18|      Extension_Code type() const override { return static_type(); }

_ZN5Botan3TLS6Cookie11static_typeEv:
   44|     17|      static Extension_Code static_type() { return Extension_Code::Cookie; }
_ZNK5Botan3TLS6Cookie4typeEv:
   46|     17|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS22PSK_Key_Exchange_Modes11static_typeEv:
   67|     46|      static Extension_Code static_type() { return Extension_Code::PskKeyExchangeModes; }
_ZNK5Botan3TLS22PSK_Key_Exchange_Modes4typeEv:
   69|     46|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS23Certificate_Authorities11static_typeEv:
   90|      7|      static Extension_Code static_type() { return Extension_Code::CertificateAuthorities; }
_ZNK5Botan3TLS23Certificate_Authorities4typeEv:
   92|      7|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS3PSK11static_typeEv:
  112|     31|      static Extension_Code static_type() { return Extension_Code::PresharedKey; }
_ZNK5Botan3TLS3PSK4typeEv:
  114|     31|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS9Key_Share11static_typeEv:
  212|     13|      static Extension_Code static_type() { return Extension_Code::KeyShare; }
_ZNK5Botan3TLS9Key_Share4typeEv:
  214|     13|      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:
   54|    660|      virtual ~Handshake_Message() = default;
_ZN5Botan3TLS17Handshake_MessageC2Ev:
   55|    660|      Handshake_Message() = default;

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

_ZN5Botan3TLS16Protocol_VersionC2Ev:
   56|  3.15k|      Protocol_Version() : m_version(0) {}
_ZN5Botan3TLS16Protocol_VersionC2Et:
   58|  4.07k|      explicit Protocol_Version(uint16_t code) : m_version(code) {}
_ZN5Botan3TLS16Protocol_VersionC2Ehh:
   71|  3.13k|            Protocol_Version(static_cast<uint16_t>((static_cast<uint16_t>(major) << 8) | minor)) {}
_ZNK5Botan3TLS16Protocol_Version13major_versionEv:
   86|  6.25k|      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|  3.16k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t in[], size_t len) {
   40|  3.16k|   if(len <= max_fuzzer_input_size) {
  ------------------
  |  Branch (40:7): [True: 3.15k, False: 8]
  ------------------
   41|  3.15k|      try {
   42|  3.15k|         fuzz(std::span<const uint8_t>(in, len));
   43|  3.15k|      } 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|  3.15k|   }
   51|  3.16k|   return 0;
   52|  3.16k|}

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

_ZNK5Botan11ASN1_Object10BER_encodeEv:
   21|  1.30k|std::vector<uint8_t> ASN1_Object::BER_encode() const {
   22|  1.30k|   std::vector<uint8_t> output;
   23|  1.30k|   DER_Encoder der(output);
   24|  1.30k|   this->encode_into(der);
   25|  1.30k|   return output;
   26|  1.30k|}
_ZN5Botan10BER_ObjectD2Ev:
   58|  18.4k|BER_Object::~BER_Object() {
   59|  18.4k|   secure_scrub_memory(m_value);
   60|  18.4k|}
_ZNK5Botan10BER_Object11assert_is_aENS_9ASN1_TypeENS_10ASN1_ClassENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
   65|  4.21k|void BER_Object::assert_is_a(ASN1_Type expected_type_tag, ASN1_Class expected_class_tag, std::string_view descr) const {
   66|  4.21k|   if(!this->is_a(expected_type_tag, expected_class_tag)) {
  ------------------
  |  Branch (66:7): [True: 189, False: 4.02k]
  ------------------
   67|    189|      std::stringstream msg;
   68|       |
   69|    189|      msg << "Tag mismatch when decoding " << descr << " got ";
   70|       |
   71|    189|      if(m_class_tag == ASN1_Class::NoObject && m_type_tag == ASN1_Type::NoObject) {
  ------------------
  |  Branch (71:10): [True: 0, False: 189]
  |  Branch (71:49): [True: 0, False: 0]
  ------------------
   72|      0|         msg << "EOF";
   73|    189|      } else {
   74|    189|         if(m_class_tag == ASN1_Class::Universal || m_class_tag == ASN1_Class::Constructed) {
  ------------------
  |  Branch (74:13): [True: 27, False: 162]
  |  Branch (74:53): [True: 126, False: 36]
  ------------------
   75|    153|            msg << asn1_tag_to_string(m_type_tag);
   76|    153|         } else {
   77|     36|            msg << std::to_string(static_cast<uint32_t>(m_type_tag));
   78|     36|         }
   79|       |
   80|    189|         msg << "/" << asn1_class_to_string(m_class_tag);
   81|    189|      }
   82|       |
   83|    189|      msg << " expected ";
   84|       |
   85|    189|      if(expected_class_tag == ASN1_Class::Universal || expected_class_tag == ASN1_Class::Constructed) {
  ------------------
  |  Branch (85:10): [True: 0, False: 189]
  |  Branch (85:57): [True: 189, False: 0]
  ------------------
   86|    189|         msg << asn1_tag_to_string(expected_type_tag);
   87|    189|      } else {
   88|      0|         msg << std::to_string(static_cast<uint32_t>(expected_type_tag));
   89|      0|      }
   90|       |
   91|    189|      msg << "/" << asn1_class_to_string(expected_class_tag);
   92|       |
   93|    189|      throw BER_Decoding_Error(msg.str());
   94|    189|   }
   95|  4.21k|}
_ZNK5Botan10BER_Object4is_aENS_9ASN1_TypeENS_10ASN1_ClassE:
   97|  4.21k|bool BER_Object::is_a(ASN1_Type expected_type_tag, ASN1_Class expected_class_tag) const {
   98|  4.21k|   return (m_type_tag == expected_type_tag && m_class_tag == expected_class_tag);
  ------------------
  |  Branch (98:12): [True: 4.03k, False: 179]
  |  Branch (98:47): [True: 4.02k, False: 10]
  ------------------
   99|  4.21k|}
_ZN5Botan10BER_Object11set_taggingENS_9ASN1_TypeENS_10ASN1_ClassE:
  105|  8.05k|void BER_Object::set_tagging(ASN1_Type type_tag, ASN1_Class class_tag) {
  106|  8.05k|   m_type_tag = type_tag;
  107|  8.05k|   m_class_tag = class_tag;
  108|  8.05k|}
_ZN5Botan20asn1_class_to_stringENS_10ASN1_ClassE:
  110|    378|std::string asn1_class_to_string(ASN1_Class type) {
  111|    378|   switch(type) {
  112|     27|      case ASN1_Class::Universal:
  ------------------
  |  Branch (112:7): [True: 27, False: 351]
  ------------------
  113|     27|         return "UNIVERSAL";
  114|    315|      case ASN1_Class::Constructed:
  ------------------
  |  Branch (114:7): [True: 315, False: 63]
  ------------------
  115|    315|         return "CONSTRUCTED";
  116|      2|      case ASN1_Class::ContextSpecific:
  ------------------
  |  Branch (116:7): [True: 2, False: 376]
  ------------------
  117|      2|         return "CONTEXT_SPECIFIC";
  118|      8|      case ASN1_Class::Application:
  ------------------
  |  Branch (118:7): [True: 8, False: 370]
  ------------------
  119|      8|         return "APPLICATION";
  120|      5|      case ASN1_Class::Private:
  ------------------
  |  Branch (120:7): [True: 5, False: 373]
  ------------------
  121|      5|         return "PRIVATE";
  122|      0|      case ASN1_Class::NoObject:
  ------------------
  |  Branch (122:7): [True: 0, False: 378]
  ------------------
  123|      0|         return "NO_OBJECT";
  124|     21|      default:
  ------------------
  |  Branch (124:7): [True: 21, False: 357]
  ------------------
  125|     21|         return "CLASS(" + std::to_string(static_cast<size_t>(type)) + ")";
  126|    378|   }
  127|    378|}
_ZN5Botan18asn1_tag_to_stringENS_9ASN1_TypeE:
  129|    409|std::string asn1_tag_to_string(ASN1_Type type) {
  130|    409|   switch(type) {
  131|    180|      case ASN1_Type::Sequence:
  ------------------
  |  Branch (131:7): [True: 180, False: 229]
  ------------------
  132|    180|         return "SEQUENCE";
  133|       |
  134|     15|      case ASN1_Type::Set:
  ------------------
  |  Branch (134:7): [True: 15, False: 394]
  ------------------
  135|     15|         return "SET";
  136|       |
  137|      5|      case ASN1_Type::PrintableString:
  ------------------
  |  Branch (137:7): [True: 5, False: 404]
  ------------------
  138|      5|         return "PRINTABLE STRING";
  139|       |
  140|      2|      case ASN1_Type::NumericString:
  ------------------
  |  Branch (140:7): [True: 2, False: 407]
  ------------------
  141|      2|         return "NUMERIC STRING";
  142|       |
  143|      5|      case ASN1_Type::Ia5String:
  ------------------
  |  Branch (143:7): [True: 5, False: 404]
  ------------------
  144|      5|         return "IA5 STRING";
  145|       |
  146|      1|      case ASN1_Type::TeletexString:
  ------------------
  |  Branch (146:7): [True: 1, False: 408]
  ------------------
  147|      1|         return "T61 STRING";
  148|       |
  149|     59|      case ASN1_Type::Utf8String:
  ------------------
  |  Branch (149:7): [True: 59, False: 350]
  ------------------
  150|     59|         return "UTF8 STRING";
  151|       |
  152|      3|      case ASN1_Type::VisibleString:
  ------------------
  |  Branch (152:7): [True: 3, False: 406]
  ------------------
  153|      3|         return "VISIBLE STRING";
  154|       |
  155|      1|      case ASN1_Type::BmpString:
  ------------------
  |  Branch (155:7): [True: 1, False: 408]
  ------------------
  156|      1|         return "BMP STRING";
  157|       |
  158|      2|      case ASN1_Type::UniversalString:
  ------------------
  |  Branch (158:7): [True: 2, False: 407]
  ------------------
  159|      2|         return "UNIVERSAL STRING";
  160|       |
  161|      1|      case ASN1_Type::UtcTime:
  ------------------
  |  Branch (161:7): [True: 1, False: 408]
  ------------------
  162|      1|         return "UTC TIME";
  163|       |
  164|      3|      case ASN1_Type::GeneralizedTime:
  ------------------
  |  Branch (164:7): [True: 3, False: 406]
  ------------------
  165|      3|         return "GENERALIZED TIME";
  166|       |
  167|      3|      case ASN1_Type::OctetString:
  ------------------
  |  Branch (167:7): [True: 3, False: 406]
  ------------------
  168|      3|         return "OCTET STRING";
  169|       |
  170|      2|      case ASN1_Type::BitString:
  ------------------
  |  Branch (170:7): [True: 2, False: 407]
  ------------------
  171|      2|         return "BIT STRING";
  172|       |
  173|      1|      case ASN1_Type::Enumerated:
  ------------------
  |  Branch (173:7): [True: 1, False: 408]
  ------------------
  174|      1|         return "ENUMERATED";
  175|       |
  176|      3|      case ASN1_Type::Integer:
  ------------------
  |  Branch (176:7): [True: 3, False: 406]
  ------------------
  177|      3|         return "INTEGER";
  178|       |
  179|      1|      case ASN1_Type::Null:
  ------------------
  |  Branch (179:7): [True: 1, False: 408]
  ------------------
  180|      1|         return "NULL";
  181|       |
  182|      2|      case ASN1_Type::ObjectId:
  ------------------
  |  Branch (182:7): [True: 2, False: 407]
  ------------------
  183|      2|         return "OBJECT";
  184|       |
  185|      2|      case ASN1_Type::Boolean:
  ------------------
  |  Branch (185:7): [True: 2, False: 407]
  ------------------
  186|      2|         return "BOOLEAN";
  187|       |
  188|      0|      case ASN1_Type::NoObject:
  ------------------
  |  Branch (188:7): [True: 0, False: 409]
  ------------------
  189|      0|         return "NO_OBJECT";
  190|       |
  191|    118|      default:
  ------------------
  |  Branch (191:7): [True: 118, False: 291]
  ------------------
  192|    118|         return "TAG(" + std::to_string(static_cast<uint32_t>(type)) + ")";
  193|    409|   }
  194|    409|}
_ZN5Botan18BER_Decoding_ErrorC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  199|    736|BER_Decoding_Error::BER_Decoding_Error(std::string_view err) : Decoding_Error(fmt("BER: {}", err)) {}
_ZN5Botan11BER_Bad_TagC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEj:
  201|     53|BER_Bad_Tag::BER_Bad_Tag(std::string_view str, uint32_t tagging) : BER_Decoding_Error(fmt("{}: {}", str, tagging)) {}
_ZN5Botan4ASN19to_stringERKNS_10BER_ObjectE:
  224|    812|std::string to_string(const BER_Object& obj) {
  225|    812|   return bytes_to_string(obj.data());
  226|    812|}

_ZN5BotanltERKNS_3OIDES2_:
  175|  2.50k|bool operator<(const OID& a, const OID& b) {
  176|  2.50k|   const std::vector<uint32_t>& oid1 = a.get_components();
  177|  2.50k|   const std::vector<uint32_t>& oid2 = b.get_components();
  178|       |
  179|  2.50k|   return std::lexicographical_compare(oid1.begin(), oid1.end(), oid2.begin(), oid2.end());
  180|  2.50k|}
_ZNK5Botan3OID11encode_intoERNS_11DER_EncoderE:
  185|  1.30k|void OID::encode_into(DER_Encoder& der) const {
  186|  1.30k|   if(m_id.size() < 2) {
  ------------------
  |  Branch (186:7): [True: 0, False: 1.30k]
  ------------------
  187|      0|      throw Invalid_Argument("OID::encode_into: OID is invalid");
  188|      0|   }
  189|       |
  190|  1.30k|   auto append = [](std::vector<uint8_t>& encoding, uint32_t z) {
  191|  1.30k|      if(z <= 0x7F) {
  192|  1.30k|         encoding.push_back(static_cast<uint8_t>(z));
  193|  1.30k|      } else {
  194|  1.30k|         const size_t z7 = (high_bit(z) + 7 - 1) / 7;
  195|       |
  196|  1.30k|         for(size_t j = 0; j != z7; ++j) {
  197|  1.30k|            uint8_t zp = static_cast<uint8_t>(z >> (7 * (z7 - j - 1)) & 0x7F);
  198|       |
  199|  1.30k|            if(j != z7 - 1) {
  200|  1.30k|               zp |= 0x80;
  201|  1.30k|            }
  202|       |
  203|  1.30k|            encoding.push_back(zp);
  204|  1.30k|         }
  205|  1.30k|      }
  206|  1.30k|   };
  207|       |
  208|  1.30k|   std::vector<uint8_t> encoding;
  209|       |
  210|       |   // We know 40 * root can't overflow because root is between 0 and 2
  211|  1.30k|   auto first = checked_add(40 * m_id[0], m_id[1]);
  212|  1.30k|   BOTAN_ASSERT_NOMSG(first.has_value());
  ------------------
  |  |   84|  1.30k|   do {                                                                     \
  |  |   85|  1.30k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  1.30k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 1.30k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  1.30k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 1.30k]
  |  |  ------------------
  ------------------
  213|       |
  214|  1.30k|   append(encoding, *first);
  215|       |
  216|  5.46k|   for(size_t i = 2; i != m_id.size(); ++i) {
  ------------------
  |  Branch (216:22): [True: 4.16k, False: 1.30k]
  ------------------
  217|  4.16k|      append(encoding, m_id[i]);
  218|  4.16k|   }
  219|  1.30k|   der.add_object(ASN1_Type::ObjectId, ASN1_Class::Universal, encoding);
  220|  1.30k|}
_ZN5Botan3OID11decode_fromERNS_11BER_DecoderE:
  225|  1.86k|void OID::decode_from(BER_Decoder& decoder) {
  226|  1.86k|   const BER_Object obj = decoder.get_next_object();
  227|  1.86k|   if(obj.tagging() != (ASN1_Class::Universal | ASN1_Type::ObjectId)) {
  ------------------
  |  Branch (227:7): [True: 53, False: 1.80k]
  ------------------
  228|     53|      throw BER_Bad_Tag("Error decoding OID, unknown tag", obj.tagging());
  229|     53|   }
  230|       |
  231|  1.80k|   if(obj.length() == 0) {
  ------------------
  |  Branch (231:7): [True: 3, False: 1.80k]
  ------------------
  232|      3|      throw BER_Decoding_Error("OID encoding is too short");
  233|      3|   }
  234|       |
  235|  1.80k|   auto consume = [](BufferSlicer& data) -> uint32_t {
  236|  1.80k|      BOTAN_ASSERT_NOMSG(!data.empty());
  237|  1.80k|      uint32_t b = data.take_byte();
  238|       |
  239|  1.80k|      if(b > 0x7F) {
  240|  1.80k|         b &= 0x7F;
  241|       |
  242|       |         // Even BER requires that the OID have minimal length, ie that
  243|       |         // the first byte of a multibyte encoding cannot be zero
  244|       |         // See X.690 section 8.19.2
  245|  1.80k|         if(b == 0) {
  246|  1.80k|            throw Decoding_Error("Leading zero byte in multibyte OID encoding");
  247|  1.80k|         }
  248|       |
  249|  1.80k|         while(true) {
  250|  1.80k|            if(data.empty()) {
  251|  1.80k|               throw Decoding_Error("Truncated OID value");
  252|  1.80k|            }
  253|       |
  254|  1.80k|            const uint8_t next = data.take_byte();
  255|  1.80k|            const bool more = (next & 0x80) == 0x80;
  256|  1.80k|            const uint8_t value = next & 0x7F;
  257|       |
  258|  1.80k|            if((b >> (32 - 7)) != 0) {
  259|  1.80k|               throw Decoding_Error("OID component overflow");
  260|  1.80k|            }
  261|       |
  262|  1.80k|            b = (b << 7) | value;
  263|       |
  264|  1.80k|            if(!more) {
  265|  1.80k|               break;
  266|  1.80k|            }
  267|  1.80k|         }
  268|  1.80k|      }
  269|       |
  270|  1.80k|      return b;
  271|  1.80k|   };
  272|       |
  273|  1.80k|   BufferSlicer data(obj.data());
  274|  1.80k|   std::vector<uint32_t> parts;
  275|       |
  276|       |   // Each byte of the DER encoding can result in at most one additional arc,
  277|       |   // except the first byte which always encodes two.
  278|  1.80k|   parts.reserve(obj.length() + 1);
  279|       |
  280|  8.86k|   while(!data.empty()) {
  ------------------
  |  Branch (280:10): [True: 7.06k, False: 1.80k]
  ------------------
  281|  7.06k|      const uint32_t comp = consume(data);
  282|       |
  283|  7.06k|      if(parts.empty()) {
  ------------------
  |  Branch (283:10): [True: 1.77k, False: 5.28k]
  ------------------
  284|       |         // divide into root and second arc
  285|       |
  286|  1.77k|         const uint32_t root_arc = [](uint32_t b0) -> uint32_t {
  287|  1.77k|            if(b0 < 40) {
  288|  1.77k|               return 0;
  289|  1.77k|            } else if(b0 < 80) {
  290|  1.77k|               return 1;
  291|  1.77k|            } else {
  292|  1.77k|               return 2;
  293|  1.77k|            }
  294|  1.77k|         }(comp);
  295|       |
  296|  1.77k|         parts.push_back(root_arc);
  297|  1.77k|         BOTAN_ASSERT_NOMSG(comp >= 40 * root_arc);
  ------------------
  |  |   84|  1.77k|   do {                                                                     \
  |  |   85|  1.77k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  1.77k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 1.77k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  1.77k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 1.77k]
  |  |  ------------------
  ------------------
  298|  1.77k|         parts.push_back(comp - 40 * root_arc);
  299|  5.28k|      } else {
  300|  5.28k|         parts.push_back(comp);
  301|  5.28k|      }
  302|  7.06k|   }
  303|       |
  304|  1.80k|   m_id = std::move(parts);
  305|  1.80k|}
asn1_oid.cpp:_ZZNK5Botan3OID11encode_intoERNS_11DER_EncoderEENK3$_0clERNSt3__16vectorIhNS4_9allocatorIhEEEEj:
  190|  5.46k|   auto append = [](std::vector<uint8_t>& encoding, uint32_t z) {
  191|  5.46k|      if(z <= 0x7F) {
  ------------------
  |  Branch (191:10): [True: 4.52k, False: 945]
  ------------------
  192|  4.52k|         encoding.push_back(static_cast<uint8_t>(z));
  193|  4.52k|      } else {
  194|    945|         const size_t z7 = (high_bit(z) + 7 - 1) / 7;
  195|       |
  196|  3.32k|         for(size_t j = 0; j != z7; ++j) {
  ------------------
  |  Branch (196:28): [True: 2.37k, False: 945]
  ------------------
  197|  2.37k|            uint8_t zp = static_cast<uint8_t>(z >> (7 * (z7 - j - 1)) & 0x7F);
  198|       |
  199|  2.37k|            if(j != z7 - 1) {
  ------------------
  |  Branch (199:16): [True: 1.43k, False: 945]
  ------------------
  200|  1.43k|               zp |= 0x80;
  201|  1.43k|            }
  202|       |
  203|  2.37k|            encoding.push_back(zp);
  204|  2.37k|         }
  205|    945|      }
  206|  5.46k|   };
asn1_oid.cpp:_ZZN5Botan3OID11decode_fromERNS_11BER_DecoderEENK3$_0clERNS_12BufferSlicerE:
  235|  7.06k|   auto consume = [](BufferSlicer& data) -> uint32_t {
  236|  7.06k|      BOTAN_ASSERT_NOMSG(!data.empty());
  ------------------
  |  |   84|  7.06k|   do {                                                                     \
  |  |   85|  7.06k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  7.06k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 7.06k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  7.06k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 7.06k]
  |  |  ------------------
  ------------------
  237|  7.06k|      uint32_t b = data.take_byte();
  238|       |
  239|  7.06k|      if(b > 0x7F) {
  ------------------
  |  Branch (239:10): [True: 1.32k, False: 5.73k]
  ------------------
  240|  1.32k|         b &= 0x7F;
  241|       |
  242|       |         // Even BER requires that the OID have minimal length, ie that
  243|       |         // the first byte of a multibyte encoding cannot be zero
  244|       |         // See X.690 section 8.19.2
  245|  1.32k|         if(b == 0) {
  ------------------
  |  Branch (245:13): [True: 2, False: 1.32k]
  ------------------
  246|      2|            throw Decoding_Error("Leading zero byte in multibyte OID encoding");
  247|      2|         }
  248|       |
  249|  2.18k|         while(true) {
  ------------------
  |  Branch (249:16): [True: 2.18k, Folded]
  ------------------
  250|  2.18k|            if(data.empty()) {
  ------------------
  |  Branch (250:16): [True: 3, False: 2.18k]
  ------------------
  251|      3|               throw Decoding_Error("Truncated OID value");
  252|      3|            }
  253|       |
  254|  2.18k|            const uint8_t next = data.take_byte();
  255|  2.18k|            const bool more = (next & 0x80) == 0x80;
  256|  2.18k|            const uint8_t value = next & 0x7F;
  257|       |
  258|  2.18k|            if((b >> (32 - 7)) != 0) {
  ------------------
  |  Branch (258:16): [True: 13, False: 2.17k]
  ------------------
  259|     13|               throw Decoding_Error("OID component overflow");
  260|     13|            }
  261|       |
  262|  2.17k|            b = (b << 7) | value;
  263|       |
  264|  2.17k|            if(!more) {
  ------------------
  |  Branch (264:16): [True: 1.30k, False: 864]
  ------------------
  265|  1.30k|               break;
  266|  1.30k|            }
  267|  2.17k|         }
  268|  1.32k|      }
  269|       |
  270|  7.04k|      return b;
  271|  7.06k|   };
asn1_oid.cpp:_ZZN5Botan3OID11decode_fromERNS_11BER_DecoderEENK3$_1clEj:
  286|  1.77k|         const uint32_t root_arc = [](uint32_t b0) -> uint32_t {
  287|  1.77k|            if(b0 < 40) {
  ------------------
  |  Branch (287:16): [True: 488, False: 1.28k]
  ------------------
  288|    488|               return 0;
  289|  1.28k|            } else if(b0 < 80) {
  ------------------
  |  Branch (289:23): [True: 586, False: 700]
  ------------------
  290|    586|               return 1;
  291|    700|            } else {
  292|    700|               return 2;
  293|    700|            }
  294|  1.77k|         }(comp);

_ZN5Botan11ASN1_StringC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEENS_9ASN1_TypeE:
  135|  1.87k|ASN1_String::ASN1_String(std::string_view str, ASN1_Type t) : m_utf8_str(str), m_tag(t) {
  136|  1.87k|   if(!is_utf8_subset_string_type(m_tag)) {
  ------------------
  |  Branch (136:7): [True: 0, False: 1.87k]
  ------------------
  137|      0|      throw Invalid_Argument("ASN1_String only supports encoding to UTF-8 or a UTF-8 subset");
  138|      0|   }
  139|       |
  140|  1.87k|   if(!is_valid_asn1_string_content(m_utf8_str, m_tag)) {
  ------------------
  |  Branch (140:7): [True: 0, False: 1.87k]
  ------------------
  141|      0|      throw Invalid_Argument(fmt("ASN1_String: Invalid {} encoding", asn1_tag_to_string(m_tag)));
  142|      0|   }
  143|  1.87k|}
_ZN5Botan11ASN1_StringC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  145|  1.87k|ASN1_String::ASN1_String(std::string_view str) : ASN1_String(str, choose_encoding(str)) {}
_ZN5Botan11ASN1_String11decode_fromERNS_11BER_DecoderE:
  162|  1.76k|void ASN1_String::decode_from(BER_Decoder& source) {
  163|  1.76k|   const BER_Object obj = source.get_next_object();
  164|       |
  165|  1.76k|   if(obj.get_class() != ASN1_Class::Universal || !is_asn1_string_type(obj.type())) {
  ------------------
  |  Branch (165:7): [True: 40, False: 1.72k]
  |  Branch (165:51): [True: 75, False: 1.64k]
  ------------------
  166|     82|      auto typ = static_cast<uint32_t>(obj.type());
  167|     82|      auto cls = static_cast<uint32_t>(obj.get_class());
  168|     82|      throw Decoding_Error(fmt("ASN1_String: Unknown string type {}/{}", typ, cls));
  169|     82|   }
  170|       |
  171|  1.68k|   m_tag = obj.type();
  172|  1.68k|   m_data.assign(obj.bits(), obj.bits() + obj.length());
  173|       |
  174|  1.68k|   if(m_tag == ASN1_Type::BmpString) {
  ------------------
  |  Branch (174:7): [True: 271, False: 1.40k]
  ------------------
  175|    271|      m_utf8_str = ucs2_to_utf8(m_data);
  176|  1.40k|   } else if(m_tag == ASN1_Type::UniversalString) {
  ------------------
  |  Branch (176:14): [True: 168, False: 1.24k]
  ------------------
  177|    168|      m_utf8_str = ucs4_to_utf8(m_data);
  178|  1.24k|   } else if(m_tag == ASN1_Type::TeletexString) {
  ------------------
  |  Branch (178:14): [True: 396, False: 845]
  ------------------
  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|    396|      m_utf8_str = latin1_to_utf8(m_data);
  184|    845|   } else {
  185|       |      // All other supported string types are UTF-8 or some subset thereof
  186|    845|      m_utf8_str = ASN1::to_string(obj);
  187|       |
  188|    845|      if(!is_valid_asn1_string_content(m_utf8_str, m_tag)) {
  ------------------
  |  Branch (188:10): [True: 67, False: 778]
  ------------------
  189|     67|         throw Decoding_Error(fmt("ASN1_String: Invalid {} encoding", asn1_tag_to_string(m_tag)));
  190|     67|      }
  191|    845|   }
  192|  1.68k|}
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_119is_asn1_string_typeENS_9ASN1_TypeE:
   99|  1.72k|bool is_asn1_string_type(ASN1_Type tag) {
  100|  1.72k|   return (is_utf8_subset_string_type(tag) || tag == ASN1_Type::TeletexString || tag == ASN1_Type::BmpString ||
  ------------------
  |  Branch (100:12): [True: 812, False: 910]
  |  Branch (100:47): [True: 396, False: 514]
  |  Branch (100:82): [True: 271, False: 243]
  ------------------
  101|    243|           tag == ASN1_Type::UniversalString);
  ------------------
  |  Branch (101:12): [True: 168, False: 75]
  ------------------
  102|  1.72k|}
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_126is_utf8_subset_string_typeENS_9ASN1_TypeE:
   94|  6.29k|bool is_utf8_subset_string_type(ASN1_Type tag) {
   95|  6.29k|   return (tag == ASN1_Type::NumericString || tag == ASN1_Type::PrintableString || tag == ASN1_Type::VisibleString ||
  ------------------
  |  Branch (95:12): [True: 66, False: 6.22k]
  |  Branch (95:47): [True: 4.12k, False: 2.10k]
  |  Branch (95:84): [True: 276, False: 1.83k]
  ------------------
   96|  1.83k|           tag == ASN1_Type::Ia5String || tag == ASN1_Type::Utf8String);
  ------------------
  |  Branch (96:12): [True: 242, False: 1.58k]
  |  Branch (96:43): [True: 678, False: 910]
  ------------------
   97|  6.29k|}
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_128is_valid_asn1_string_contentERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_9ASN1_TypeE:
  104|  2.69k|bool is_valid_asn1_string_content(const std::string& str, ASN1_Type tag) {
  105|  2.69k|   BOTAN_ASSERT_NOMSG(is_utf8_subset_string_type(tag));
  ------------------
  |  |   84|  2.69k|   do {                                                                     \
  |  |   85|  2.69k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  2.69k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 2.69k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  2.69k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 2.69k]
  |  |  ------------------
  ------------------
  106|       |
  107|  2.69k|   switch(tag) {
  108|    339|      case ASN1_Type::Utf8String:
  ------------------
  |  Branch (108:7): [True: 339, False: 2.35k]
  ------------------
  109|    339|         return is_valid_utf8(str);
  110|     33|      case ASN1_Type::NumericString:
  ------------------
  |  Branch (110:7): [True: 33, False: 2.65k]
  ------------------
  111|  2.09k|      case ASN1_Type::PrintableString:
  ------------------
  |  Branch (111:7): [True: 2.06k, False: 631]
  ------------------
  112|  2.21k|      case ASN1_Type::Ia5String:
  ------------------
  |  Branch (112:7): [True: 121, False: 2.57k]
  ------------------
  113|  2.35k|      case ASN1_Type::VisibleString:
  ------------------
  |  Branch (113:7): [True: 138, False: 2.55k]
  ------------------
  114|  2.35k|         return g_char_validator.valid_encoding(str, tag);
  115|      0|      default:
  ------------------
  |  Branch (115:7): [True: 0, False: 2.69k]
  ------------------
  116|      0|         return false;
  117|  2.69k|   }
  118|  2.69k|}
asn1_str.cpp:_ZNK5Botan12_GLOBAL__N_131ASN1_String_Codepoint_Validator14valid_encodingENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEENS_9ASN1_TypeE:
   25|  4.23k|      constexpr bool valid_encoding(std::string_view str, ASN1_Type tag) const {
   26|  4.23k|         const uint8_t mask = mask_for(tag);
   27|  4.23k|         for(const char c : str) {
  ------------------
  |  Branch (27:27): [True: 504, False: 4.22k]
  ------------------
   28|    504|            const uint8_t codepoint = static_cast<uint8_t>(c);
   29|    504|            const bool is_valid = (m_table[codepoint] & mask) != 0;
   30|       |
   31|    504|            if(!is_valid) {
  ------------------
  |  Branch (31:16): [True: 10, False: 494]
  ------------------
   32|     10|               return false;
   33|     10|            }
   34|    504|         }
   35|       |
   36|  4.22k|         return true;
   37|  4.23k|      }
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_131ASN1_String_Codepoint_Validator8mask_forENS_9ASN1_TypeE:
   45|  4.23k|      static constexpr uint8_t mask_for(ASN1_Type tag) {
   46|  4.23k|         switch(tag) {
   47|     33|            case ASN1_Type::NumericString:
  ------------------
  |  Branch (47:13): [True: 33, False: 4.19k]
  ------------------
   48|     33|               return Numeric_String;
   49|  3.93k|            case ASN1_Type::PrintableString:
  ------------------
  |  Branch (49:13): [True: 3.93k, False: 292]
  ------------------
   50|  3.93k|               return Printable_String;
   51|    121|            case ASN1_Type::Ia5String:
  ------------------
  |  Branch (51:13): [True: 121, False: 4.11k]
  ------------------
   52|    121|               return IA5_String;
   53|    138|            case ASN1_Type::VisibleString:
  ------------------
  |  Branch (53:13): [True: 138, False: 4.09k]
  ------------------
   54|    138|               return Visible_String;
   55|      0|            default:
  ------------------
  |  Branch (55:13): [True: 0, False: 4.23k]
  ------------------
   56|      0|               return 0;
   57|  4.23k|         }
   58|  4.23k|      }
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_115choose_encodingENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  120|  1.87k|ASN1_Type choose_encoding(std::string_view str) {
  121|  1.87k|   if(g_char_validator.valid_encoding(str, ASN1_Type::PrintableString)) {
  ------------------
  |  Branch (121:7): [True: 1.87k, False: 0]
  ------------------
  122|  1.87k|      return ASN1_Type::PrintableString;
  123|  1.87k|   } else {
  124|      0|      return ASN1_Type::Utf8String;
  125|      0|   }
  126|  1.87k|}

_ZN5Botan11BER_DecoderD2Ev:
  456|  6.55k|BER_Decoder::~BER_Decoder() = default;
_ZNK5Botan11BER_Decoder10more_itemsEv:
  461|  3.89k|bool BER_Decoder::more_items() const {
  462|  3.89k|   if(m_source->end_of_data() && !m_pushed.is_set()) {
  ------------------
  |  Branch (462:7): [True: 988, False: 2.91k]
  |  Branch (462:34): [True: 988, False: 0]
  ------------------
  463|    988|      return false;
  464|    988|   }
  465|  2.91k|   return true;
  466|  3.89k|}
_ZN5Botan11BER_Decoder10verify_endEv:
  471|    560|BER_Decoder& BER_Decoder::verify_end() {
  472|    560|   return verify_end("BER_Decoder::verify_end called, but data remains");
  473|    560|}
_ZN5Botan11BER_Decoder10verify_endENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  478|    560|BER_Decoder& BER_Decoder::verify_end(std::string_view err) {
  479|    560|   if(!m_source->end_of_data() || m_pushed.is_set()) {
  ------------------
  |  Branch (479:7): [True: 221, False: 339]
  |  Branch (479:35): [True: 0, False: 339]
  ------------------
  480|    221|      throw Decoding_Error(err);
  481|    221|   }
  482|    339|   return (*this);
  483|    560|}
_ZN5Botan11BER_Decoder10read_bytesENSt3__14spanIhLm18446744073709551615EEE:
  505|  2.34k|size_t BER_Decoder::read_bytes(std::span<uint8_t> out) {
  506|  2.34k|   BOTAN_ASSERT_NOMSG(m_source != nullptr);
  ------------------
  |  |   84|  2.34k|   do {                                                                     \
  |  |   85|  2.34k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  2.34k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 2.34k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  2.34k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 2.34k]
  |  |  ------------------
  ------------------
  507|  2.34k|   return m_source->read(out.data(), out.size());
  508|  2.34k|}
_ZN5Botan11BER_Decoder15get_next_objectEv:
  521|  8.08k|BER_Object BER_Decoder::get_next_object() {
  522|  8.08k|   BER_Object next;
  523|       |
  524|  8.08k|   if(m_pushed.is_set()) {
  ------------------
  |  Branch (524:7): [True: 0, False: 8.08k]
  ------------------
  525|      0|      std::swap(next, m_pushed);
  526|      0|      return next;
  527|      0|   }
  528|       |
  529|  8.08k|   for(;;) {
  530|  8.08k|      ASN1_Type type_tag = ASN1_Type::NoObject;
  531|  8.08k|      ASN1_Class class_tag = ASN1_Class::NoObject;
  532|  8.08k|      decode_tag(m_source, type_tag, class_tag);
  533|  8.08k|      next.set_tagging(type_tag, class_tag);
  534|  8.08k|      if(next.is_set() == false) {  // no more objects
  ------------------
  |  Branch (534:10): [True: 7, False: 8.07k]
  ------------------
  535|      7|         return next;
  536|      7|      }
  537|       |
  538|  8.07k|      const size_t allow_indef = m_limits.allow_ber_encoding() ? m_limits.max_nested_indefinite_length() : 0;
  ------------------
  |  Branch (538:34): [True: 0, False: 8.07k]
  ------------------
  539|  8.07k|      const bool der_mode = m_limits.require_der_encoding();
  540|  8.07k|      const auto dl = decode_length(m_source, allow_indef, der_mode, is_constructed(class_tag));
  541|       |
  542|       |      // Per X.690 8.1.5 the only valid EOC encoding is the two-octet
  543|       |      // sequence 0x00 0x00. Reject any other length encoding on a tag of
  544|       |      // (Eoc, Universal) before we consume the "content" bytes.
  545|  8.07k|      if(type_tag == ASN1_Type::Eoc && class_tag == ASN1_Class::Universal &&
  ------------------
  |  Branch (545:10): [True: 63, False: 8.01k]
  |  Branch (545:40): [True: 49, False: 14]
  ------------------
  546|     49|         (dl.content_length() != 0 || dl.indefinite_length())) {
  ------------------
  |  Branch (546:11): [True: 36, False: 13]
  |  Branch (546:39): [True: 0, False: 13]
  ------------------
  547|     36|         throw BER_Decoding_Error("EOC marker with non-zero length");
  548|     36|      }
  549|       |
  550|  8.04k|      if(const auto max_size = m_limits.max_object_size(); max_size && dl.content_length() > *max_size) {
  ------------------
  |  Branch (550:60): [True: 7.90k, False: 141]
  |  Branch (550:72): [True: 29, False: 7.87k]
  ------------------
  551|     29|         throw BER_Decoding_Error("Encoded object exceeds maximum size");
  552|     29|      }
  553|       |
  554|  8.01k|      if(!m_source->check_available(dl.total_length())) {
  ------------------
  |  Branch (554:10): [True: 83, False: 7.92k]
  ------------------
  555|     83|         throw BER_Decoding_Error("Value truncated");
  556|     83|      }
  557|       |
  558|  7.92k|      uint8_t* out = next.mutable_bits(dl.content_length());
  559|  7.92k|      if(m_source->read(out, dl.content_length()) != dl.content_length()) {
  ------------------
  |  Branch (559:10): [True: 0, False: 7.92k]
  ------------------
  560|      0|         throw BER_Decoding_Error("Value truncated");
  561|      0|      }
  562|       |
  563|  7.92k|      if(dl.indefinite_length()) {
  ------------------
  |  Branch (563:10): [True: 0, False: 7.92k]
  ------------------
  564|       |         // After reading the data consume the 2-byte EOC
  565|      0|         uint8_t eoc[2] = {0xFF, 0xFF};
  566|      0|         if(m_source->read(eoc, 2) != 2 || eoc[0] != 0x00 || eoc[1] != 0x00) {
  ------------------
  |  Branch (566:13): [True: 0, False: 0]
  |  Branch (566:44): [True: 0, False: 0]
  |  Branch (566:62): [True: 0, False: 0]
  ------------------
  567|      0|            throw BER_Decoding_Error("Missing or malformed EOC marker");
  568|      0|         }
  569|      0|      }
  570|       |
  571|  7.92k|      if(next.tagging() == static_cast<uint32_t>(ASN1_Type::Eoc)) {
  ------------------
  |  Branch (571:10): [True: 13, False: 7.91k]
  ------------------
  572|     13|         if(m_limits.require_der_encoding()) {
  ------------------
  |  Branch (572:13): [True: 13, False: 0]
  ------------------
  573|     13|            throw BER_Decoding_Error("Detected EOC marker in DER structure");
  574|     13|         }
  575|       |         // An EOC marker is only valid as an indefinite-length terminator, which
  576|       |         // is consumed above when reading the indefinite-length object. A
  577|       |         // standalone EOC is rejected unless the caller opted to tolerate it.
  578|      0|         if(m_limits.allow_standalone_eoc()) {
  ------------------
  |  Branch (578:13): [True: 0, False: 0]
  ------------------
  579|      0|            continue;
  580|      0|         }
  581|      0|         throw BER_Decoding_Error("Encountered EOC marker outside of indefinite-length encoding");
  582|      0|      }
  583|       |
  584|  7.91k|      break;
  585|  7.92k|   }
  586|       |
  587|  7.91k|   return next;
  588|  8.08k|}
_ZN5Botan11BER_Decoder10start_consENS_9ASN1_TypeENS_10ASN1_ClassE:
  619|  4.46k|BER_Decoder BER_Decoder::start_cons(ASN1_Type type_tag, ASN1_Class class_tag) {
  620|  4.46k|   BER_Object obj = get_next_object();
  621|  4.46k|   obj.assert_is_a(type_tag, class_tag | ASN1_Class::Constructed);
  622|       |
  623|       |   // In DER mode the elements of a universal SET must appear in sorted order
  624|  4.46k|   if(m_limits.require_der_encoding() && type_tag == ASN1_Type::Set && class_tag == ASN1_Class::Universal) {
  ------------------
  |  Branch (624:7): [True: 4.02k, False: 434]
  |  Branch (624:42): [True: 1.00k, False: 3.02k]
  |  Branch (624:72): [True: 1.00k, False: 0]
  ------------------
  625|  1.00k|      verify_set_is_sorted(std::span<const uint8_t>{obj.bits(), obj.length()});
  626|  1.00k|   }
  627|       |
  628|  4.46k|   BER_Decoder child(std::move(obj), this);
  629|  4.46k|   return child;
  630|  4.46k|}
_ZN5Botan11BER_Decoder8end_consEv:
  635|  2.67k|BER_Decoder& BER_Decoder::end_cons() {
  636|  2.67k|   if(m_parent == nullptr) {
  ------------------
  |  Branch (636:7): [True: 0, False: 2.67k]
  ------------------
  637|      0|      throw Invalid_State("BER_Decoder::end_cons called with null parent");
  638|      0|   }
  639|  2.67k|   if(!m_source->end_of_data() || m_pushed.is_set()) {
  ------------------
  |  Branch (639:7): [True: 14, False: 2.65k]
  |  Branch (639:35): [True: 0, False: 2.65k]
  ------------------
  640|     14|      throw Decoding_Error("BER_Decoder::end_cons called with data left");
  641|     14|   }
  642|  2.65k|   return (*m_parent);
  643|  2.67k|}
_ZN5Botan11BER_DecoderC2EONS_10BER_ObjectEPS0_:
  646|  3.83k|      m_limits(parent != nullptr ? parent->limits() : BER_Decoder::Limits::BER()), m_parent(parent) {
  ------------------
  |  Branch (646:16): [True: 3.83k, False: 0]
  ------------------
  647|  3.83k|   m_data_src = std::make_unique<DataSource_BERObject>(std::move(obj));
  648|  3.83k|   m_source = m_data_src.get();
  649|  3.83k|}
_ZN5Botan11BER_DecoderC2ENSt3__14spanIKhLm18446744073709551615EEENS0_6LimitsE:
  664|  2.71k|BER_Decoder::BER_Decoder(std::span<const uint8_t> buf, Limits limits) : m_limits(limits) {
  665|  2.71k|   m_data_src = std::make_unique<DataSource_Memory>(buf);
  666|  2.71k|   m_source = m_data_src.get();
  667|  2.71k|}
_ZN5Botan11BER_Decoder6decodeERNS_11ASN1_ObjectENS_9ASN1_TypeENS_10ASN1_ClassE:
  676|  5.17k|BER_Decoder& BER_Decoder::decode(ASN1_Object& obj, ASN1_Type type_tag, ASN1_Class class_tag) {
  677|       |   // TODO support this case properly
  678|  5.17k|   if(type_tag != ASN1_Type::NoObject || class_tag != ASN1_Class::NoObject) {
  ------------------
  |  Branch (678:7): [True: 0, False: 5.17k]
  |  Branch (678:42): [True: 0, False: 5.17k]
  ------------------
  679|      0|      throw Not_Implemented("BER_Decoder::decode(ASN1_Object) does not support implicit tagged decoding");
  680|      0|   }
  681|  5.17k|   obj.decode_from(*this);
  682|  5.17k|   return (*this);
  683|  5.17k|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_110decode_tagEPNS_10DataSourceERNS_9ASN1_TypeERNS_10ASN1_ClassE:
   29|  8.08k|size_t decode_tag(DataSource* ber, ASN1_Type& type_tag, ASN1_Class& class_tag) {
   30|  8.08k|   auto b = ber->read_byte();
   31|       |
   32|  8.08k|   if(!b) {
  ------------------
  |  Branch (32:7): [True: 7, False: 8.07k]
  ------------------
   33|      7|      type_tag = ASN1_Type::NoObject;
   34|      7|      class_tag = ASN1_Class::NoObject;
   35|      7|      return 0;
   36|      7|   }
   37|       |
   38|  8.07k|   if((*b & 0x1F) != 0x1F) {
  ------------------
  |  Branch (38:7): [True: 7.73k, False: 346]
  ------------------
   39|  7.73k|      type_tag = ASN1_Type(*b & 0x1F);
   40|  7.73k|      class_tag = ASN1_Class(*b & 0xE0);
   41|       |      // The EOC marker is primitive; a constructed universal tag 0 has no
   42|       |      // valid meaning and would otherwise bypass the EOC handling, which
   43|       |      // matches on (Eoc, Universal) exactly
   44|  7.73k|      if(type_tag == ASN1_Type::Eoc && class_tag == ASN1_Class::Constructed) {
  ------------------
  |  Branch (44:10): [True: 67, False: 7.66k]
  |  Branch (44:40): [True: 1, False: 66]
  ------------------
   45|      1|         throw BER_Decoding_Error("EOC tag with constructed encoding");
   46|      1|      }
   47|  7.73k|      return 1;
   48|  7.73k|   }
   49|       |
   50|    346|   size_t tag_bytes = 1;
   51|    346|   class_tag = ASN1_Class(*b & 0xE0);
   52|       |
   53|    346|   uint32_t tag_buf = 0;
   54|  1.28k|   while(true) {
  ------------------
  |  Branch (54:10): [True: 1.28k, Folded]
  ------------------
   55|  1.28k|      b = ber->read_byte();
   56|  1.28k|      if(!b) {
  ------------------
  |  Branch (56:10): [True: 14, False: 1.27k]
  ------------------
   57|     14|         throw BER_Decoding_Error("Long-form tag truncated");
   58|     14|      }
   59|       |      // Reject if shifting in another 7 bits would overflow the uint32_t tag
   60|  1.27k|      if((tag_buf >> 25) != 0) {
  ------------------
  |  Branch (60:10): [True: 8, False: 1.26k]
  ------------------
   61|      8|         throw BER_Decoding_Error("Long-form tag overflowed 32 bits");
   62|      8|      }
   63|       |      // This is required even by BER (see X.690 section 8.1.2.4.2 sentence c).
   64|       |      // Bits 7-1 of the first subsequent octet must not be all zero; this rules
   65|       |      // out both 0x80 (continuation with no data) and 0x00 (a long-form encoding
   66|       |      // of tag value 0, which collides with the EOC marker).
   67|  1.26k|      if(tag_bytes == 1 && (*b & 0x7F) == 0) {
  ------------------
  |  Branch (67:10): [True: 345, False: 922]
  |  Branch (67:28): [True: 3, False: 342]
  ------------------
   68|      3|         throw BER_Decoding_Error("Long form tag with leading zero");
   69|      3|      }
   70|  1.26k|      ++tag_bytes;
   71|  1.26k|      tag_buf = (tag_buf << 7) | (*b & 0x7F);
   72|  1.26k|      if((*b & 0x80) == 0) {
  ------------------
  |  Branch (72:10): [True: 321, False: 943]
  ------------------
   73|    321|         break;
   74|    321|      }
   75|  1.26k|   }
   76|       |   // Per X.690 8.1.2.2, tag values 0-30 shall be encoded in the short form.
   77|       |   // Long-form encoding is reserved for tag values >= 31 (X.690 8.1.2.3).
   78|       |   // This is unconditional and applies to BER as well as DER.
   79|    321|   if(tag_buf <= 30) {
  ------------------
  |  Branch (79:7): [True: 5, False: 316]
  ------------------
   80|      5|      throw BER_Decoding_Error("Long-form tag encoding used for small tag value");
   81|      5|   }
   82|       |
   83|    316|   if(tag_buf == static_cast<uint32_t>(ASN1_Type::NoObject)) {
  ------------------
  |  Branch (83:7): [True: 1, False: 315]
  ------------------
   84|      1|      throw BER_Decoding_Error("Tag value collides with internal sentinel");
   85|      1|   }
   86|       |
   87|       |   // NOLINTNEXTLINE(clang-analyzer-optin.core.EnumCastOutOfRange)
   88|    315|   type_tag = ASN1_Type(tag_buf);
   89|    315|   return tag_bytes;
   90|    316|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_113decode_lengthEPNS_10DataSourceEmbb:
  135|  8.04k|BerDecodedLength decode_length(DataSource* ber, size_t allow_indef, bool der_mode, bool constructed) {
  136|  8.04k|   uint8_t b = 0;
  137|  8.04k|   if(ber->read_byte(b) == 0) {
  ------------------
  |  Branch (137:7): [True: 76, False: 7.96k]
  ------------------
  138|     76|      throw BER_Decoding_Error("Length field not found");
  139|     76|   }
  140|  7.96k|   if((b & 0x80) == 0) {
  ------------------
  |  Branch (140:7): [True: 7.79k, False: 176]
  ------------------
  141|  7.79k|      return BerDecodedLength(b, 1);
  142|  7.79k|   }
  143|       |
  144|    176|   const size_t num_length_bytes = (b & 0x7F);
  145|    176|   if(num_length_bytes > 4) {
  ------------------
  |  Branch (145:7): [True: 6, False: 170]
  ------------------
  146|      6|      throw BER_Decoding_Error("Length field is too large");
  147|      6|   }
  148|       |
  149|    170|   const size_t field_size = 1 + num_length_bytes;
  150|       |
  151|    170|   if(num_length_bytes == 0) {
  ------------------
  |  Branch (151:7): [True: 9, False: 161]
  ------------------
  152|      9|      if(der_mode) {
  ------------------
  |  Branch (152:10): [True: 9, False: 0]
  ------------------
  153|      9|         throw BER_Decoding_Error("Detected indefinite-length encoding in DER structure");
  154|      9|      } else if(!constructed) {
  ------------------
  |  Branch (154:17): [True: 0, False: 0]
  ------------------
  155|       |         // Indefinite length is only valid for constructed types (X.690 8.1.3.2)
  156|      0|         throw BER_Decoding_Error("Indefinite-length encoding used with non-constructed type");
  157|      0|      } else if(allow_indef == 0) {
  ------------------
  |  Branch (157:17): [True: 0, False: 0]
  ------------------
  158|      0|         throw BER_Decoding_Error("Nested EOC markers too deep, rejecting to avoid stack exhaustion");
  159|      0|      } else {
  160|       |         // find_eoc returns bytes up to and including the EOC marker.
  161|       |         // Return the content length; the caller consumes the EOC separately.
  162|      0|         const size_t eoc_len = find_eoc(ber, /*base_offset=*/0, allow_indef - 1);
  163|      0|         if(eoc_len < 2) {
  ------------------
  |  Branch (163:13): [True: 0, False: 0]
  ------------------
  164|      0|            throw BER_Decoding_Error("Invalid EOC encoding");
  165|      0|         }
  166|      0|         return BerDecodedLength::indefinite(eoc_len - 2, field_size);
  167|      0|      }
  168|      9|   }
  169|       |
  170|    161|   size_t length = 0;
  171|       |
  172|    596|   for(size_t i = 0; i != num_length_bytes; ++i) {
  ------------------
  |  Branch (172:22): [True: 440, False: 156]
  ------------------
  173|    440|      if(ber->read_byte(b) == 0) {
  ------------------
  |  Branch (173:10): [True: 5, False: 435]
  ------------------
  174|      5|         throw BER_Decoding_Error("Corrupted length field");
  175|      5|      }
  176|       |      // Can't overflow since we already checked that num_length_bytes <= 4
  177|    435|      length = (length << 8) | b;
  178|    435|   }
  179|       |
  180|       |   // DER requires shortest possible length encoding
  181|    156|   if(der_mode) {
  ------------------
  |  Branch (181:7): [True: 156, False: 0]
  ------------------
  182|    156|      if(length < 128) {
  ------------------
  |  Branch (182:10): [True: 12, False: 144]
  ------------------
  183|     12|         throw BER_Decoding_Error("Detected non-canonical length encoding in DER structure");
  184|     12|      }
  185|    144|      if(num_length_bytes > 1 && length < (size_t(1) << ((num_length_bytes - 1) * 8))) {
  ------------------
  |  Branch (185:10): [True: 122, False: 22]
  |  Branch (185:34): [True: 1, False: 121]
  ------------------
  186|      1|         throw BER_Decoding_Error("Detected non-canonical length encoding in DER structure");
  187|      1|      }
  188|    144|   }
  189|       |
  190|    143|   return BerDecodedLength(length, field_size);
  191|    156|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_116BerDecodedLengthC2Emm:
  108|  7.93k|            BerDecodedLength(content_length, field_length, false) {}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_116BerDecodedLengthC2Emmb:
  125|  7.93k|            m_content_length(content_length), m_field_length(field_length), m_indefinite(indefinite) {}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_18peek_tagEPNS_10DataSourceEmRNS_9ASN1_TypeERNS_10ASN1_ClassE:
  197|  2.81k|size_t peek_tag(DataSource* src, size_t offset, ASN1_Type& type_tag, ASN1_Class& class_tag) {
  198|  2.81k|   uint8_t b = 0;
  199|  2.81k|   if(src->peek(&b, 1, offset) == 0) {
  ------------------
  |  Branch (199:7): [True: 0, False: 2.81k]
  ------------------
  200|      0|      type_tag = ASN1_Type::NoObject;
  201|      0|      class_tag = ASN1_Class::NoObject;
  202|      0|      return 0;
  203|      0|   }
  204|       |
  205|  2.81k|   if((b & 0x1F) != 0x1F) {
  ------------------
  |  Branch (205:7): [True: 2.52k, False: 293]
  ------------------
  206|  2.52k|      type_tag = ASN1_Type(b & 0x1F);
  207|  2.52k|      class_tag = ASN1_Class(b & 0xE0);
  208|       |      // The EOC marker is primitive; a constructed universal tag 0 has no
  209|       |      // valid meaning and would otherwise bypass the EOC handling, which
  210|       |      // matches on (Eoc, Universal) exactly
  211|  2.52k|      if(type_tag == ASN1_Type::Eoc && class_tag == ASN1_Class::Constructed) {
  ------------------
  |  Branch (211:10): [True: 245, False: 2.28k]
  |  Branch (211:40): [True: 1, False: 244]
  ------------------
  212|      1|         throw BER_Decoding_Error("EOC tag with constructed encoding");
  213|      1|      }
  214|  2.52k|      return 1;
  215|  2.52k|   }
  216|       |
  217|    293|   class_tag = ASN1_Class(b & 0xE0);
  218|    293|   size_t tag_bytes = 1;
  219|    293|   uint32_t tag_buf = 0;
  220|       |
  221|    765|   while(true) {
  ------------------
  |  Branch (221:10): [True: 765, Folded]
  ------------------
  222|    765|      if(src->peek(&b, 1, offset + tag_bytes) == 0) {
  ------------------
  |  Branch (222:10): [True: 3, False: 762]
  ------------------
  223|      3|         throw BER_Decoding_Error("Long-form tag truncated");
  224|      3|      }
  225|       |      // Reject if shifting in another 7 bits would overflow the uint32_t tag
  226|    762|      if((tag_buf >> 25) != 0) {
  ------------------
  |  Branch (226:10): [True: 13, False: 749]
  ------------------
  227|     13|         throw BER_Decoding_Error("Long-form tag overflowed 32 bits");
  228|     13|      }
  229|       |      // Required even by BER (X.690 section 8.1.2.4.2 sentence c).
  230|       |      // Bits 7-1 of the first subsequent octet must not be all zero; this rules
  231|       |      // out both 0x80 (continuation with no data) and 0x00 (a long-form encoding
  232|       |      // of tag value 0, which collides with the EOC marker).
  233|    749|      if(tag_bytes == 1 && (b & 0x7F) == 0) {
  ------------------
  |  Branch (233:10): [True: 292, False: 457]
  |  Branch (233:28): [True: 2, False: 290]
  ------------------
  234|      2|         throw BER_Decoding_Error("Long form tag with leading zero");
  235|      2|      }
  236|    747|      ++tag_bytes;
  237|    747|      tag_buf = (tag_buf << 7) | (b & 0x7F);
  238|    747|      if((b & 0x80) == 0) {
  ------------------
  |  Branch (238:10): [True: 275, False: 472]
  ------------------
  239|    275|         break;
  240|    275|      }
  241|    747|   }
  242|       |
  243|       |   // Per X.690 8.1.2.2, tag values 0-30 shall be encoded in the short form.
  244|       |   // Long-form encoding is reserved for tag values >= 31 (X.690 8.1.2.3).
  245|       |   // This is unconditional and applies to BER as well as DER.
  246|    275|   if(tag_buf <= 30) {
  ------------------
  |  Branch (246:7): [True: 5, False: 270]
  ------------------
  247|      5|      throw BER_Decoding_Error("Long-form tag encoding used for small tag value");
  248|      5|   }
  249|       |
  250|    270|   if(tag_buf == static_cast<uint32_t>(ASN1_Type::NoObject)) {
  ------------------
  |  Branch (250:7): [True: 1, False: 269]
  ------------------
  251|      1|      throw BER_Decoding_Error("Tag value collides with internal sentinel");
  252|      1|   }
  253|       |
  254|       |   // NOLINTNEXTLINE(clang-analyzer-optin.core.EnumCastOutOfRange)
  255|    269|   type_tag = ASN1_Type(tag_buf);
  256|    269|   return tag_bytes;
  257|    270|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_111peek_lengthEPNS_10DataSourceEmRmmbb:
  265|  2.79k|   DataSource* src, size_t offset, size_t& field_size, size_t allow_indef, bool constructed, bool der_mode) {
  266|  2.79k|   uint8_t b = 0;
  267|  2.79k|   if(src->peek(&b, 1, offset) == 0) {
  ------------------
  |  Branch (267:7): [True: 8, False: 2.78k]
  ------------------
  268|      8|      throw BER_Decoding_Error("Length field not found");
  269|      8|   }
  270|       |
  271|  2.78k|   field_size = 1;
  272|  2.78k|   if((b & 0x80) == 0) {
  ------------------
  |  Branch (272:7): [True: 2.64k, False: 143]
  ------------------
  273|  2.64k|      return b;
  274|  2.64k|   }
  275|       |
  276|    143|   const size_t num_length_bytes = (b & 0x7F);
  277|    143|   field_size += num_length_bytes;
  278|    143|   if(field_size > 5) {
  ------------------
  |  Branch (278:7): [True: 17, False: 126]
  ------------------
  279|     17|      throw BER_Decoding_Error("Length field is too large");
  280|     17|   }
  281|       |
  282|    126|   if(num_length_bytes == 0) {
  ------------------
  |  Branch (282:7): [True: 1, False: 125]
  ------------------
  283|       |      // Indefinite length is not allowed in DER
  284|      1|      if(der_mode) {
  ------------------
  |  Branch (284:10): [True: 1, False: 0]
  ------------------
  285|      1|         throw BER_Decoding_Error("Detected indefinite-length encoding in DER structure");
  286|      1|      }
  287|       |      // Indefinite length is only valid for constructed types (X.690 8.1.3.2)
  288|      0|      if(!constructed) {
  ------------------
  |  Branch (288:10): [True: 0, False: 0]
  ------------------
  289|      0|         throw BER_Decoding_Error("Indefinite-length encoding used with non-constructed type");
  290|      0|      }
  291|      0|      if(allow_indef == 0) {
  ------------------
  |  Branch (291:10): [True: 0, False: 0]
  ------------------
  292|      0|         throw BER_Decoding_Error("Nested EOC markers too deep, rejecting to avoid stack exhaustion");
  293|      0|      }
  294|      0|      return find_eoc(src, offset + 1, allow_indef - 1);
  295|      0|   }
  296|       |
  297|    125|   size_t length = 0;
  298|    477|   for(size_t i = 0; i < num_length_bytes; ++i) {
  ------------------
  |  Branch (298:22): [True: 354, False: 123]
  ------------------
  299|    354|      if(src->peek(&b, 1, offset + 1 + i) == 0) {
  ------------------
  |  Branch (299:10): [True: 2, False: 352]
  ------------------
  300|      2|         throw BER_Decoding_Error("Corrupted length field");
  301|      2|      }
  302|    352|      if(get_byte<0>(length) != 0) {
  ------------------
  |  Branch (302:10): [True: 0, False: 352]
  ------------------
  303|      0|         throw BER_Decoding_Error("Field length overflow");
  304|      0|      }
  305|    352|      length = (length << 8) | b;
  306|    352|   }
  307|    123|   return length;
  308|    125|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_114is_constructedENS_10ASN1_ClassE:
   22|  10.8k|bool is_constructed(ASN1_Class class_tag) {
   23|  10.8k|   return (static_cast<uint32_t>(class_tag) & static_cast<uint32_t>(ASN1_Class::Constructed)) != 0;
   24|  10.8k|}
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_116BerDecodedLength14content_lengthEv:
  114|  31.3k|      size_t content_length() const { return m_content_length; }
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_116BerDecodedLength17indefinite_lengthEv:
  121|  7.80k|      bool indefinite_length() const { return m_indefinite; }
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_116BerDecodedLength12total_lengthEv:
  117|  7.87k|      size_t total_length() const { return m_indefinite ? m_content_length + 2 : m_content_length; }
  ------------------
  |  Branch (117:44): [True: 0, False: 7.87k]
  ------------------
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_120verify_set_is_sortedENSt3__14spanIKhLm18446744073709551615EEE:
  426|  1.00k|void verify_set_is_sorted(std::span<const uint8_t> content) {
  427|  1.00k|   DataSource_Span src(content);
  428|  1.00k|   size_t offset = 0;
  429|  1.00k|   std::optional<std::span<const uint8_t>> prev;
  430|       |
  431|  3.68k|   while(offset < content.size()) {
  ------------------
  |  Branch (431:10): [True: 2.81k, False: 867]
  ------------------
  432|  2.81k|      ASN1_Type type_tag = ASN1_Type::NoObject;
  433|  2.81k|      ASN1_Class class_tag = ASN1_Class::NoObject;
  434|  2.81k|      const size_t tag_size = peek_tag(&src, offset, type_tag, class_tag);
  435|       |
  436|  2.81k|      size_t length_size = 0;
  437|  2.81k|      const size_t item_size =
  438|  2.81k|         peek_length(&src, offset + tag_size, length_size, /*allow_indef=*/0, is_constructed(class_tag), true);
  439|       |
  440|  2.81k|      const auto end = checked_add(offset, tag_size, length_size, item_size);
  441|  2.81k|      if(!end || *end > content.size()) {
  ------------------
  |  Branch (441:10): [True: 53, False: 2.76k]
  |  Branch (441:18): [True: 78, False: 2.68k]
  ------------------
  442|     78|         throw BER_Decoding_Error("SET element exceeds available data");
  443|     78|      }
  444|       |
  445|  2.74k|      const auto elem = content.subspan(offset, *end - offset);
  446|  2.74k|      if(prev && std::lexicographical_compare(elem.begin(), elem.end(), prev->begin(), prev->end())) {
  ------------------
  |  Branch (446:10): [True: 1.74k, False: 999]
  |  Branch (446:18): [True: 58, False: 1.68k]
  ------------------
  447|     58|         throw BER_Decoding_Error("Detected unsorted SET in DER structure");
  448|     58|      }
  449|  2.68k|      prev = elem;
  450|  2.68k|      offset = *end;
  451|  2.68k|   }
  452|  1.00k|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_115DataSource_SpanC2ENSt3__14spanIKhLm18446744073709551615EEE:
  414|  1.00k|      explicit DataSource_Span(std::span<const uint8_t> buf) : m_buf(buf) {}
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_115DataSource_Span4peekEPhmm:
  399|  6.73k|      size_t peek(uint8_t out[], size_t length, size_t peek_offset) const override {
  400|  6.73k|         if(peek_offset >= m_buf.size() - m_offset) {
  ------------------
  |  Branch (400:13): [True: 13, False: 6.71k]
  ------------------
  401|     13|            return 0;
  402|     13|         }
  403|  6.71k|         const size_t got = std::min(m_buf.size() - m_offset - peek_offset, length);
  404|  6.71k|         copy_mem(out, m_buf.data() + m_offset + peek_offset, got);
  405|  6.71k|         return got;
  406|  6.73k|      }
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_120DataSource_BERObjectC2EONS_10BER_ObjectE:
  379|  3.83k|      explicit DataSource_BERObject(BER_Object&& obj) : m_obj(std::move(obj)) {}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_120DataSource_BERObject4readEPhm:
  349|  19.3k|      size_t read(uint8_t out[], size_t length) override {
  350|  19.3k|         BOTAN_ASSERT_NOMSG(m_offset <= m_obj.length());
  ------------------
  |  |   84|  19.3k|   do {                                                                     \
  |  |   85|  19.3k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  19.3k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 19.3k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  19.3k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 19.3k]
  |  |  ------------------
  ------------------
  351|  19.3k|         const size_t got = std::min<size_t>(m_obj.length() - m_offset, length);
  352|  19.3k|         copy_mem(out, m_obj.bits() + m_offset, got);
  353|  19.3k|         m_offset += got;
  354|  19.3k|         return got;
  355|  19.3k|      }
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_120DataSource_BERObject15check_availableEm:
  370|  5.47k|      bool check_available(size_t n) override {
  371|  5.47k|         BOTAN_ASSERT_NOMSG(m_offset <= m_obj.length());
  ------------------
  |  |   84|  5.47k|   do {                                                                     \
  |  |   85|  5.47k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  5.47k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 5.47k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  5.47k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 5.47k]
  |  |  ------------------
  ------------------
  372|  5.47k|         return (n <= (m_obj.length() - m_offset));
  373|  5.47k|      }
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_120DataSource_BERObject11end_of_dataEv:
  375|  4.97k|      bool end_of_data() const override { return get_bytes_read() == m_obj.length(); }
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_120DataSource_BERObject14get_bytes_readEv:
  377|  4.97k|      size_t get_bytes_read() const override { return m_offset; }

_ZN5Botan11DER_EncoderC2ERNSt3__16vectorIhNS1_9allocatorIhEEEE:
   89|  1.30k|DER_Encoder::DER_Encoder(std::vector<uint8_t>& vec) {
   90|  1.30k|   m_append_output = [&vec](const uint8_t b[], size_t l) {
   91|  1.30k|      if(l > 0) {
   92|  1.30k|         vec.insert(vec.end(), b, b + l);
   93|  1.30k|      }
   94|  1.30k|   };
   95|  1.30k|}
_ZN5Botan11DER_Encoder10add_objectENS_9ASN1_TypeENS_10ASN1_ClassEPKhm:
  285|  1.30k|DER_Encoder& DER_Encoder::add_object(ASN1_Type type_tag, ASN1_Class class_tag, const uint8_t rep[], size_t length) {
  286|  1.30k|   std::vector<uint8_t> hdr;
  287|  1.30k|   encode_tag(hdr, type_tag, class_tag);
  288|  1.30k|   encode_length(hdr, length);
  289|       |
  290|  1.30k|   if(!m_subsequences.empty()) {
  ------------------
  |  Branch (290:7): [True: 0, False: 1.30k]
  ------------------
  291|      0|      m_subsequences[m_subsequences.size() - 1].add_bytes(hdr.data(), hdr.size(), rep, length);
  292|  1.30k|   } else if(m_append_output) {
  ------------------
  |  Branch (292:14): [True: 1.30k, False: 0]
  ------------------
  293|  1.30k|      m_append_output(hdr.data(), hdr.size());
  294|  1.30k|      m_append_output(rep, length);
  295|  1.30k|   } else {
  296|      0|      m_default_outbuf += hdr;
  297|      0|      m_default_outbuf += std::make_pair(rep, length);
  298|      0|   }
  299|       |
  300|  1.30k|   return (*this);
  301|  1.30k|}
der_enc.cpp:_ZN5Botan12_GLOBAL__N_110encode_tagERNSt3__16vectorIhNS1_9allocatorIhEEEENS_9ASN1_TypeENS_10ASN1_ClassE:
   26|  1.30k|void encode_tag(std::vector<uint8_t>& encoded_tag, ASN1_Type type_tag_e, ASN1_Class class_tag_e) {
   27|  1.30k|   const uint32_t type_tag = static_cast<uint32_t>(type_tag_e);
   28|  1.30k|   const uint32_t class_tag = static_cast<uint32_t>(class_tag_e);
   29|       |
   30|  1.30k|   if((class_tag | 0xE0) != 0xE0) {
  ------------------
  |  Branch (30:7): [True: 0, False: 1.30k]
  ------------------
   31|      0|      throw Encoding_Error(fmt("DER_Encoder: Invalid class tag {}", std::to_string(class_tag)));
   32|      0|   }
   33|       |
   34|  1.30k|   if(type_tag <= 30) {
  ------------------
  |  Branch (34:7): [True: 1.30k, False: 0]
  ------------------
   35|  1.30k|      encoded_tag.push_back(static_cast<uint8_t>(type_tag | class_tag));
   36|  1.30k|   } else {
   37|      0|      size_t blocks = high_bit(static_cast<uint32_t>(type_tag)) + 6;
   38|      0|      blocks = (blocks - (blocks % 7)) / 7;
   39|       |
   40|      0|      BOTAN_ASSERT_NOMSG(blocks > 0);
  ------------------
  |  |   84|      0|   do {                                                                     \
  |  |   85|      0|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|      0|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|      0|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
   41|       |
   42|      0|      encoded_tag.push_back(static_cast<uint8_t>(class_tag | 0x1F));
   43|      0|      for(size_t i = 0; i != blocks - 1; ++i) {
  ------------------
  |  Branch (43:25): [True: 0, False: 0]
  ------------------
   44|      0|         encoded_tag.push_back(0x80 | ((type_tag >> 7 * (blocks - i - 1)) & 0x7F));
   45|      0|      }
   46|      0|      encoded_tag.push_back(type_tag & 0x7F);
   47|      0|   }
   48|  1.30k|}
der_enc.cpp:_ZN5Botan12_GLOBAL__N_113encode_lengthERNSt3__16vectorIhNS1_9allocatorIhEEEEm:
   53|  1.30k|void encode_length(std::vector<uint8_t>& encoded_length, size_t length) {
   54|  1.30k|   if(length <= 127) {
  ------------------
  |  Branch (54:7): [True: 1.30k, False: 0]
  ------------------
   55|  1.30k|      encoded_length.push_back(static_cast<uint8_t>(length));
   56|  1.30k|   } else {
   57|      0|      const size_t bytes_needed = significant_bytes(length);
   58|       |
   59|      0|      encoded_length.push_back(static_cast<uint8_t>(0x80 | bytes_needed));
   60|       |
   61|      0|      for(size_t i = sizeof(length) - bytes_needed; i < sizeof(length); ++i) {
  ------------------
  |  Branch (61:53): [True: 0, False: 0]
  ------------------
   62|      0|         encoded_length.push_back(get_byte_var(i, length));
   63|      0|      }
   64|      0|   }
   65|  1.30k|}
der_enc.cpp:_ZZN5Botan11DER_EncoderC1ERNSt3__16vectorIhNS1_9allocatorIhEEEEENK3$_0clEPKhm:
   90|  2.60k|   m_append_output = [&vec](const uint8_t b[], size_t l) {
   91|  2.60k|      if(l > 0) {
  ------------------
  |  Branch (91:10): [True: 2.60k, False: 0]
  ------------------
   92|  2.60k|         vec.insert(vec.end(), b, b + l);
   93|  2.60k|      }
   94|  2.60k|   };

_ZN5Botan12HashFunction6createENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEES5_:
  111|    140|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|    140|   if(provider.empty() == false && provider != "base") {
  ------------------
  |  Branch (122:7): [True: 0, False: 140]
  |  Branch (122:36): [True: 0, False: 0]
  ------------------
  123|      0|      return nullptr;  // unknown provider
  124|      0|   }
  125|       |
  126|    140|#if defined(BOTAN_HAS_SHA1)
  127|    140|   if(algo_spec == "SHA-1") {
  ------------------
  |  Branch (127:7): [True: 0, False: 140]
  ------------------
  128|      0|      return std::make_unique<SHA_1>();
  129|      0|   }
  130|    140|#endif
  131|       |
  132|    140|#if defined(BOTAN_HAS_SHA2_32)
  133|    140|   if(algo_spec == "SHA-224") {
  ------------------
  |  Branch (133:7): [True: 0, False: 140]
  ------------------
  134|      0|      return std::make_unique<SHA_224>();
  135|      0|   }
  136|       |
  137|    140|   if(algo_spec == "SHA-256") {
  ------------------
  |  Branch (137:7): [True: 140, False: 0]
  ------------------
  138|    140|      return std::make_unique<SHA_256>();
  139|    140|   }
  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|    140|std::unique_ptr<HashFunction> HashFunction::create_or_throw(std::string_view algo, std::string_view provider) {
  309|    140|   if(auto hash = HashFunction::create(algo, provider)) {
  ------------------
  |  Branch (309:12): [True: 140, False: 0]
  ------------------
  310|    140|      return hash;
  311|    140|   }
  312|      0|   throw Lookup_Error("Hash", algo, provider);
  313|    140|}

_ZN5Botan7SHA_25615compress_digestERNSt3__16vectorIjNS_16secure_allocatorIjEEEENS1_4spanIKhLm18446744073709551615EEEm:
   59|    318|                                                             size_t blocks) {
   60|    318|#if defined(BOTAN_HAS_SHA2_32_X86)
   61|    318|   if(CPUID::has(CPUID::Feature::SHA)) {
  ------------------
  |  Branch (61:7): [True: 318, False: 0]
  ------------------
   62|    318|      return SHA_256::compress_digest_x86(digest, input, blocks);
   63|    318|   }
   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], SHA256_K[ 0]);
  103|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W[ 1], W[15], W[10], W[ 2], SHA256_K[ 1]);
  104|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W[ 2], W[ 0], W[11], W[ 3], SHA256_K[ 2]);
  105|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W[ 3], W[ 1], W[12], W[ 4], SHA256_K[ 3]);
  106|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W[ 4], W[ 2], W[13], W[ 5], SHA256_K[ 4]);
  107|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W[ 5], W[ 3], W[14], W[ 6], SHA256_K[ 5]);
  108|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W[ 6], W[ 4], W[15], W[ 7], SHA256_K[ 6]);
  109|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W[ 7], W[ 5], W[ 0], W[ 8], SHA256_K[ 7]);
  110|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W[ 8], W[ 6], W[ 1], W[ 9], SHA256_K[ 8]);
  111|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W[ 9], W[ 7], W[ 2], W[10], SHA256_K[ 9]);
  112|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W[10], W[ 8], W[ 3], W[11], SHA256_K[10]);
  113|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W[11], W[ 9], W[ 4], W[12], SHA256_K[11]);
  114|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W[12], W[10], W[ 5], W[13], SHA256_K[12]);
  115|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W[13], W[11], W[ 6], W[14], SHA256_K[13]);
  116|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W[14], W[12], W[ 7], W[15], SHA256_K[14]);
  117|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W[15], W[13], W[ 8], W[ 0], SHA256_K[15]);
  118|       |
  119|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W[ 0], W[14], W[ 9], W[ 1], SHA256_K[16]);
  120|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W[ 1], W[15], W[10], W[ 2], SHA256_K[17]);
  121|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W[ 2], W[ 0], W[11], W[ 3], SHA256_K[18]);
  122|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W[ 3], W[ 1], W[12], W[ 4], SHA256_K[19]);
  123|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W[ 4], W[ 2], W[13], W[ 5], SHA256_K[20]);
  124|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W[ 5], W[ 3], W[14], W[ 6], SHA256_K[21]);
  125|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W[ 6], W[ 4], W[15], W[ 7], SHA256_K[22]);
  126|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W[ 7], W[ 5], W[ 0], W[ 8], SHA256_K[23]);
  127|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W[ 8], W[ 6], W[ 1], W[ 9], SHA256_K[24]);
  128|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W[ 9], W[ 7], W[ 2], W[10], SHA256_K[25]);
  129|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W[10], W[ 8], W[ 3], W[11], SHA256_K[26]);
  130|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W[11], W[ 9], W[ 4], W[12], SHA256_K[27]);
  131|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W[12], W[10], W[ 5], W[13], SHA256_K[28]);
  132|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W[13], W[11], W[ 6], W[14], SHA256_K[29]);
  133|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W[14], W[12], W[ 7], W[15], SHA256_K[30]);
  134|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W[15], W[13], W[ 8], W[ 0], SHA256_K[31]);
  135|       |
  136|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W[ 0], W[14], W[ 9], W[ 1], SHA256_K[32]);
  137|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W[ 1], W[15], W[10], W[ 2], SHA256_K[33]);
  138|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W[ 2], W[ 0], W[11], W[ 3], SHA256_K[34]);
  139|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W[ 3], W[ 1], W[12], W[ 4], SHA256_K[35]);
  140|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W[ 4], W[ 2], W[13], W[ 5], SHA256_K[36]);
  141|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W[ 5], W[ 3], W[14], W[ 6], SHA256_K[37]);
  142|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W[ 6], W[ 4], W[15], W[ 7], SHA256_K[38]);
  143|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W[ 7], W[ 5], W[ 0], W[ 8], SHA256_K[39]);
  144|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W[ 8], W[ 6], W[ 1], W[ 9], SHA256_K[40]);
  145|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W[ 9], W[ 7], W[ 2], W[10], SHA256_K[41]);
  146|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W[10], W[ 8], W[ 3], W[11], SHA256_K[42]);
  147|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W[11], W[ 9], W[ 4], W[12], SHA256_K[43]);
  148|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W[12], W[10], W[ 5], W[13], SHA256_K[44]);
  149|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W[13], W[11], W[ 6], W[14], SHA256_K[45]);
  150|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W[14], W[12], W[ 7], W[15], SHA256_K[46]);
  151|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W[15], W[13], W[ 8], W[ 0], SHA256_K[47]);
  152|       |
  153|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W[ 0], W[14], W[ 9], W[ 1], SHA256_K[48]);
  154|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W[ 1], W[15], W[10], W[ 2], SHA256_K[49]);
  155|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W[ 2], W[ 0], W[11], W[ 3], SHA256_K[50]);
  156|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W[ 3], W[ 1], W[12], W[ 4], SHA256_K[51]);
  157|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W[ 4], W[ 2], W[13], W[ 5], SHA256_K[52]);
  158|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W[ 5], W[ 3], W[14], W[ 6], SHA256_K[53]);
  159|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W[ 6], W[ 4], W[15], W[ 7], SHA256_K[54]);
  160|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W[ 7], W[ 5], W[ 0], W[ 8], SHA256_K[55]);
  161|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W[ 8], W[ 6], W[ 1], W[ 9], SHA256_K[56]);
  162|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W[ 9], W[ 7], W[ 2], W[10], SHA256_K[57]);
  163|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W[10], W[ 8], W[ 3], W[11], SHA256_K[58]);
  164|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W[11], W[ 9], W[ 4], W[12], SHA256_K[59]);
  165|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W[12], W[10], W[ 5], W[13], SHA256_K[60]);
  166|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W[13], W[11], W[ 6], W[14], SHA256_K[61]);
  167|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W[14], W[12], W[ 7], W[15], SHA256_K[62]);
  168|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W[15], W[13], W[ 8], W[ 0], SHA256_K[63]);
  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|    318|void SHA_256::compress_n(digest_type& digest, std::span<const uint8_t> input, size_t blocks) {
  216|    318|   SHA_256::compress_digest(digest, input, blocks);
  217|    318|}
_ZN5Botan7SHA_2564initERNSt3__16vectorIjNS_16secure_allocatorIjEEEE:
  219|    270|void SHA_256::init(digest_type& digest) {
  220|    270|   digest.assign({0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19});
  221|    270|}
_ZN5Botan7SHA_2568add_dataENSt3__14spanIKhLm18446744073709551615EEE:
  231|    270|void SHA_256::add_data(std::span<const uint8_t> input) {
  232|    270|   m_md.update(input);
  233|    270|}
_ZN5Botan7SHA_25612final_resultENSt3__14spanIhLm18446744073709551615EEE:
  235|    130|void SHA_256::final_result(std::span<uint8_t> output) {
  236|    130|   m_md.final(output);
  237|    130|}

_ZN5Botan7SHA_25619compress_digest_x86ERNSt3__16vectorIjNS_16secure_allocatorIjEEEENS1_4spanIKhLm18446744073709551615EEEm:
   59|    318|                                                                                    size_t blocks) {
   60|    318|   const uint8_t* input = input_span.data();
   61|       |
   62|    318|   SIMD_4x32 S0 = SIMD_4x32::load_le(&digest[0]);  // NOLINT(*container-data-pointer)
   63|    318|   SIMD_4x32 S1 = SIMD_4x32::load_le(&digest[4]);
   64|       |
   65|    318|   sha256_permute_state(S0, S1);
   66|       |
   67|  2.76k|   while(blocks > 0) {
  ------------------
  |  Branch (67:10): [True: 2.45k, False: 318]
  ------------------
   68|  2.45k|      const auto S0_SAVE = S0;
   69|  2.45k|      const auto S1_SAVE = S1;
   70|       |
   71|  2.45k|      auto W0 = SIMD_4x32::load_be(input);
   72|  2.45k|      auto W1 = SIMD_4x32::load_be(input + 16);
   73|  2.45k|      auto W2 = SIMD_4x32::load_be(input + 32);
   74|  2.45k|      auto W3 = SIMD_4x32::load_be(input + 48);
   75|       |
   76|  2.45k|      sha256_rnds4(S0, S1, W0, SIMD_4x32::load_le(&SHA256_K[0]));
   77|  2.45k|      sha256_rnds4(S0, S1, W1, SIMD_4x32::load_le(&SHA256_K[4]));
   78|  2.45k|      sha256_rnds4(S0, S1, W2, SIMD_4x32::load_le(&SHA256_K[8]));
   79|  2.45k|      sha256_rnds4(S0, S1, W3, SIMD_4x32::load_le(&SHA256_K[12]));
   80|       |
   81|  2.45k|      W0 = SIMD_4x32(_mm_sha256msg1_epu32(W0.raw(), W1.raw()));
   82|  2.45k|      W1 = SIMD_4x32(_mm_sha256msg1_epu32(W1.raw(), W2.raw()));
   83|       |
   84|  2.45k|      sha256_msg_exp(W2, W3, W0, W1);
   85|       |
   86|  2.45k|      sha256_rnds4(S0, S1, W0, SIMD_4x32::load_le(&SHA256_K[4 * 4]));
   87|  2.45k|      sha256_rnds4(S0, S1, W1, SIMD_4x32::load_le(&SHA256_K[4 * 5]));
   88|       |
   89|  2.45k|      sha256_msg_exp(W0, W1, W2, W3);
   90|       |
   91|  2.45k|      sha256_rnds4(S0, S1, W2, SIMD_4x32::load_le(&SHA256_K[4 * 6]));
   92|  2.45k|      sha256_rnds4(S0, S1, W3, SIMD_4x32::load_le(&SHA256_K[4 * 7]));
   93|       |
   94|  2.45k|      sha256_msg_exp(W2, W3, W0, W1);
   95|       |
   96|  2.45k|      sha256_rnds4(S0, S1, W0, SIMD_4x32::load_le(&SHA256_K[4 * 8]));
   97|  2.45k|      sha256_rnds4(S0, S1, W1, SIMD_4x32::load_le(&SHA256_K[4 * 9]));
   98|       |
   99|  2.45k|      sha256_msg_exp(W0, W1, W2, W3);
  100|       |
  101|  2.45k|      sha256_rnds4(S0, S1, W2, SIMD_4x32::load_le(&SHA256_K[4 * 10]));
  102|  2.45k|      sha256_rnds4(S0, S1, W3, SIMD_4x32::load_le(&SHA256_K[4 * 11]));
  103|       |
  104|  2.45k|      sha256_msg_exp(W2, W3, W0, W1);
  105|       |
  106|  2.45k|      sha256_rnds4(S0, S1, W0, SIMD_4x32::load_le(&SHA256_K[4 * 12]));
  107|  2.45k|      sha256_rnds4(S0, S1, W1, SIMD_4x32::load_le(&SHA256_K[4 * 13]));
  108|       |
  109|  2.45k|      sha256_msg_exp(W0, W1, W2, W3);
  110|       |
  111|  2.45k|      sha256_rnds4(S0, S1, W2, SIMD_4x32::load_le(&SHA256_K[4 * 14]));
  112|  2.45k|      sha256_rnds4(S0, S1, W3, SIMD_4x32::load_le(&SHA256_K[4 * 15]));
  113|       |
  114|       |      // Add values back to state
  115|  2.45k|      S0 += S0_SAVE;
  116|  2.45k|      S1 += S1_SAVE;
  117|       |
  118|  2.45k|      input += 64;
  119|  2.45k|      blocks--;
  120|  2.45k|   }
  121|       |
  122|    318|   sha256_permute_state(S1, S0);
  123|       |
  124|    318|   S0.store_le(&digest[0]);  // NOLINT(*container-data-pointer)
  125|    318|   S1.store_le(&digest[4]);
  126|    318|}
sha2_32_x86.cpp:_ZN5Botan12_GLOBAL__N_120sha256_permute_stateERNS_9SIMD_4x32ES2_:
   44|    636|BOTAN_FORCE_INLINE BOTAN_FN_ISA_SHANI void sha256_permute_state(SIMD_4x32& S0, SIMD_4x32& S1) {
   45|    636|   S0 = SIMD_4x32(_mm_shuffle_epi32(S0.raw(), 0b10110001));  // CDAB
   46|    636|   S1 = SIMD_4x32(_mm_shuffle_epi32(S1.raw(), 0b00011011));  // EFGH
   47|       |
   48|    636|   const auto T = SIMD_4x32::alignr8(S0, S1);                  // ABEF
   49|       |   S1 = SIMD_4x32(_mm_blend_epi16(S1.raw(), S0.raw(), 0xF0));  // CDGH
   50|    636|   S0 = T;
   51|    636|}
sha2_32_x86.cpp:_ZN5Botan12_GLOBAL__N_112sha256_rnds4ERNS_9SIMD_4x32ES2_RKS1_S4_:
   28|  39.2k|                                                        const SIMD_4x32& k) {
   29|  39.2k|   const auto mk = msg + k;
   30|  39.2k|   S1 = SIMD_4x32(_mm_sha256rnds2_epu32(S1.raw(), S0.raw(), mk.raw()));
   31|  39.2k|   S0 = SIMD_4x32(_mm_sha256rnds2_epu32(S0.raw(), S1.raw(), mk.shift_elems_right<2>().raw()));
   32|  39.2k|}
sha2_32_x86.cpp:_ZN5Botan12_GLOBAL__N_114sha256_msg_expERNS_9SIMD_4x32ES2_S2_S2_:
   34|  14.7k|BOTAN_FORCE_INLINE BOTAN_FN_ISA_SHANI void sha256_msg_exp(SIMD_4x32& W0, SIMD_4x32& W1, SIMD_4x32& W2, SIMD_4x32& W3) {
   35|  14.7k|   W2 += SIMD_4x32::alignr4(W1, W0);
   36|  14.7k|   W0 = SIMD_4x32(_mm_sha256msg1_epu32(W0.raw(), W1.raw()));
   37|  14.7k|   W2 = SIMD_4x32(_mm_sha256msg2_epu32(W2.raw(), W1.raw()));
   38|       |
   39|  14.7k|   W3 += SIMD_4x32::alignr4(W2, W1);
   40|  14.7k|   W1 = SIMD_4x32(_mm_sha256msg1_epu32(W1.raw(), W2.raw()));
   41|  14.7k|   W3 = SIMD_4x32(_mm_sha256msg2_epu32(W3.raw(), W2.raw()));
   42|  14.7k|}

_ZN5Botan3TLS21Client_Hello_InternalC2ENSt3__14spanIKhLm18446744073709551615EEE:
   46|  3.15k|Client_Hello_Internal::Client_Hello_Internal(std::span<const 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|  3.15k|   constexpr size_t MinimumClientHelloBytes = 2 + 32 + 1 + 2 + 2 + 1 + 1;
   60|  3.15k|   if(buf.size() < MinimumClientHelloBytes) {
  ------------------
  |  Branch (60:7): [True: 20, False: 3.13k]
  ------------------
   61|     20|      throw Decoding_Error("Client_Hello: Packet corrupted");
   62|     20|   }
   63|       |
   64|  3.13k|   TLS_Data_Reader reader("ClientHello", buf);
   65|       |
   66|  3.13k|   const uint8_t major_version = reader.get_byte();
   67|  3.13k|   const uint8_t minor_version = reader.get_byte();
   68|       |
   69|  3.13k|   m_legacy_version = Protocol_Version(major_version, minor_version);
   70|       |
   71|       |   // DTLS has an additional 1 byte cookie length field
   72|  3.13k|   if(m_legacy_version.is_datagram_protocol() && buf.size() < MinimumClientHelloBytes + 1) {
  ------------------
  |  Branch (72:7): [True: 144, False: 2.99k]
  |  Branch (72:50): [True: 2, False: 142]
  ------------------
   73|      2|      throw Decoding_Error("Client_Hello: DTLS packet corrupted");
   74|      2|   }
   75|       |
   76|  3.13k|   m_random = reader.get_fixed<uint8_t>(32);
   77|  3.13k|   m_session_id = Session_ID(reader.get_range<uint8_t>(1, 0, 32));
   78|       |
   79|  3.13k|   if(m_legacy_version.is_datagram_protocol()) {
  ------------------
  |  Branch (79:7): [True: 140, False: 2.99k]
  ------------------
   80|    140|      auto sha256 = HashFunction::create_or_throw("SHA-256");
   81|    140|      sha256->update(reader.get_data_read_so_far());
   82|       |
   83|    140|      m_hello_cookie = reader.get_range<uint8_t>(1, 0, 255);
   84|       |
   85|    140|      sha256->update(reader.get_remaining());
   86|    140|      m_cookie_input_bits = sha256->final_stdvec();
   87|    140|   }
   88|       |
   89|  3.13k|   m_suites = reader.get_range_vector<uint16_t>(2, 1, 32767);
   90|  3.13k|   m_comp_methods = reader.get_range_vector<uint8_t>(1, 1, 255);
   91|       |
   92|  3.13k|   m_extensions.deserialize(reader, Connection_Side::Client, Handshake_Type::ClientHello);
   93|  3.13k|}
_ZN5Botan3TLS12Client_HelloD2Ev:
  126|    660|Client_Hello::~Client_Hello() = default;
_ZN5Botan3TLS12Client_HelloC2ENSt3__110unique_ptrINS0_21Client_Hello_InternalENS2_14default_deleteIS4_EEEE:
  133|    660|Client_Hello::Client_Hello(std::unique_ptr<Client_Hello_Internal> data) : m_data(std::move(data)) {
  134|    660|   BOTAN_ASSERT_NONNULL(m_data);
  ------------------
  |  |  123|    660|   do {                                                                                   \
  |  |  124|    660|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 660]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|    660|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 660]
  |  |  ------------------
  ------------------
  135|    660|}
_ZNK5Botan3TLS12Client_Hello13offered_suiteEt:
  209|    660|bool Client_Hello::offered_suite(uint16_t ciphersuite) const {
  210|    660|   return std::find(m_data->ciphersuites().cbegin(), m_data->ciphersuites().cend(), ciphersuite) !=
  211|    660|          m_data->ciphersuites().cend();
  212|    660|}
_ZN5Botan3TLS20Client_Hello_12_ShimC2ENSt3__110unique_ptrINS0_21Client_Hello_InternalENS2_14default_deleteIS4_EEEE:
  288|    660|      Client_Hello(std::move(data)) {}

_ZN5Botan3TLS15Client_Hello_12C2ENSt3__14spanIKhLm18446744073709551615EEE:
  274|  3.15k|      Client_Hello_12(std::make_unique<Client_Hello_Internal>(buf)) {}
_ZN5Botan3TLS15Client_Hello_12C2ENSt3__110unique_ptrINS0_21Client_Hello_InternalENS2_14default_deleteIS4_EEEE:
  285|    660|Client_Hello_12::Client_Hello_12(std::unique_ptr<Client_Hello_Internal> data) : Client_Hello_12_Shim(std::move(data)) {
  286|    660|   const uint16_t TLS_EMPTY_RENEGOTIATION_INFO_SCSV = 0x00FF;
  287|       |
  288|    660|   if(offered_suite(static_cast<uint16_t>(TLS_EMPTY_RENEGOTIATION_INFO_SCSV))) {
  ------------------
  |  Branch (288:7): [True: 180, False: 480]
  ------------------
  289|    180|      if(const Renegotiation_Extension* reneg = m_data->extensions().get<Renegotiation_Extension>()) {
  ------------------
  |  Branch (289:41): [True: 3, False: 177]
  ------------------
  290|      3|         if(!reneg->renegotiation_info().empty()) {
  ------------------
  |  Branch (290:13): [True: 1, False: 2]
  ------------------
  291|      1|            throw TLS_Exception(Alert::HandshakeFailure, "Client sent renegotiation SCSV and non-empty extension");
  292|      1|         }
  293|    177|      } else {
  294|       |         // add fake extension
  295|    177|         m_data->extensions().add(new Renegotiation_Extension());  // NOLINT(*-owning-memory)
  296|    177|      }
  297|    180|   }
  298|    660|}

_ZN5Botan3TLS23Renegotiation_ExtensionC2ERNS0_15TLS_Data_ReaderEt:
   24|     26|      m_reneg_data(reader.get_range<uint8_t>(1, 0, 255)) {
   25|     26|   if(m_reneg_data.size() + 1 != extension_size) {
  ------------------
  |  Branch (25:7): [True: 12, False: 14]
  ------------------
   26|     12|      throw Decoding_Error("Bad encoding for secure renegotiation extn");
   27|     12|   }
   28|     26|}
_ZN5Botan3TLS23Supported_Point_FormatsC2ERNS0_15TLS_Data_ReaderEt:
   45|     58|Supported_Point_Formats::Supported_Point_Formats(TLS_Data_Reader& reader, uint16_t extension_size) {
   46|     58|   const uint8_t len = reader.get_byte();
   47|       |
   48|     58|   if(len + 1 != extension_size) {
  ------------------
  |  Branch (48:7): [True: 13, False: 45]
  ------------------
   49|     13|      throw Decoding_Error("Inconsistent length field in supported point formats list");
   50|     13|   }
   51|       |
   52|     45|   bool includes_uncompressed = false;
   53|    642|   for(size_t i = 0; i != len; ++i) {
  ------------------
  |  Branch (53:22): [True: 624, False: 18]
  ------------------
   54|    624|      const uint8_t format = reader.get_byte();
   55|       |
   56|    624|      if(static_cast<ECPointFormat>(format) == UNCOMPRESSED) {
  ------------------
  |  Branch (56:10): [True: 5, False: 619]
  ------------------
   57|      5|         m_prefers_compressed = false;
   58|      5|         reader.discard_next(len - i - 1);
   59|      5|         return;
   60|    619|      } else if(static_cast<ECPointFormat>(format) == ANSIX962_COMPRESSED_PRIME) {
  ------------------
  |  Branch (60:17): [True: 22, False: 597]
  ------------------
   61|     22|         m_prefers_compressed = true;
   62|     22|         std::vector<uint8_t> remaining_formats = reader.get_fixed<uint8_t>(len - i - 1);
   63|     22|         includes_uncompressed =
   64|     22|            std::any_of(std::begin(remaining_formats), std::end(remaining_formats), [](uint8_t remaining_format) {
   65|     22|               return static_cast<ECPointFormat>(remaining_format) == UNCOMPRESSED;
   66|     22|            });
   67|     22|         break;
   68|     22|      }
   69|       |
   70|       |      // ignore ANSIX962_COMPRESSED_CHAR2, we don't support these curves
   71|    624|   }
   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|     40|   if(!includes_uncompressed) {
  ------------------
  |  Branch (79:7): [True: 31, False: 9]
  ------------------
   80|     31|      throw TLS_Exception(Alert::IllegalParameter,
   81|     31|                          "Supported Point Formats Extension must contain the uncompressed point format");
   82|     31|   }
   83|     40|}
_ZN5Botan3TLS24Session_Ticket_ExtensionC2ERNS0_15TLS_Data_ReaderEtNS0_15Connection_SideE:
   87|     28|                                                   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|     28|   if(from == Connection_Side::Server && extension_size != 0) {
  ------------------
  |  Branch (92:7): [True: 0, False: 28]
  |  Branch (92:42): [True: 0, False: 0]
  ------------------
   93|      0|      throw Decoding_Error("Server sent a non-empty SessionTicket extension");
   94|      0|   }
   95|     28|   m_ticket = Session_Ticket(reader.get_elem<uint8_t, std::vector<uint8_t>>(extension_size));
   96|     28|}
_ZN5Botan3TLS22Extended_Master_SecretC2ERNS0_15TLS_Data_ReaderEt:
   98|     33|Extended_Master_Secret::Extended_Master_Secret(TLS_Data_Reader& /*unused*/, uint16_t extension_size) {
   99|     33|   if(extension_size != 0) {
  ------------------
  |  Branch (99:7): [True: 9, False: 24]
  ------------------
  100|      9|      throw Decoding_Error("Invalid extended_master_secret extension");
  101|      9|   }
  102|     33|}
_ZN5Botan3TLS16Encrypt_then_MACC2ERNS0_15TLS_Data_ReaderEt:
  108|     27|Encrypt_then_MAC::Encrypt_then_MAC(TLS_Data_Reader& /*unused*/, uint16_t extension_size) {
  109|     27|   if(extension_size != 0) {
  ------------------
  |  Branch (109:7): [True: 9, False: 18]
  ------------------
  110|      9|      throw Decoding_Error("Invalid encrypt_then_mac extension");
  111|      9|   }
  112|     27|}
tls_extensions_12.cpp:_ZZN5Botan3TLS23Supported_Point_FormatsC1ERNS0_15TLS_Data_ReaderEtENK3$_0clEh:
   64|    232|            std::any_of(std::begin(remaining_formats), std::end(remaining_formats), [](uint8_t remaining_format) {
   65|    232|               return static_cast<ECPointFormat>(remaining_format) == UNCOMPRESSED;
   66|    232|            });

_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: 3, False: 43]
  ------------------
   35|      3|      throw Decoding_Error("Empty cookie extension is illegal");
   36|      3|   }
   37|       |
   38|     43|   const uint16_t len = reader.get_uint16_t();
   39|       |
   40|     43|   if(static_cast<size_t>(len) + 2 != extension_size) {
  ------------------
  |  Branch (40:7): [True: 26, False: 17]
  ------------------
   41|     26|      throw Decoding_Error("Inconsistent length in cookie extension");
   42|     26|   }
   43|       |
   44|     17|   m_cookie = reader.get_fixed<uint8_t>(len);
   45|     17|}
_ZN5Botan3TLS22PSK_Key_Exchange_ModesC2ERNS0_15TLS_Data_ReaderEt:
   65|     71|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|     71|   if(extension_size < 2) {
  ------------------
  |  Branch (73:7): [True: 3, False: 68]
  ------------------
   74|      3|      throw Decoding_Error("Empty psk_key_exchange_modes extension is illegal");
   75|      3|   }
   76|       |
   77|     68|   const auto mode_count = reader.get_byte();
   78|     68|   if(static_cast<size_t>(mode_count) + 1 != extension_size) {
  ------------------
  |  Branch (78:7): [True: 22, False: 46]
  ------------------
   79|     22|      throw Decoding_Error("Inconsistent length in psk_key_exchange_modes extension");
   80|     22|   }
   81|       |
   82|  1.22k|   for(uint16_t i = 0; i < mode_count; ++i) {
  ------------------
  |  Branch (82:24): [True: 1.18k, False: 46]
  ------------------
   83|  1.18k|      const auto mode = static_cast<PSK_Key_Exchange_Mode>(reader.get_byte());
   84|  1.18k|      if(mode == PSK_Key_Exchange_Mode::PSK_KE || mode == PSK_Key_Exchange_Mode::PSK_DHE_KE) {
  ------------------
  |  Branch (84:10): [True: 404, False: 776]
  |  Branch (84:51): [True: 243, False: 533]
  ------------------
   85|    647|         m_modes.push_back(mode);
   86|    647|      }
   87|  1.18k|   }
   88|     46|}
_ZN5Botan3TLS23Certificate_AuthoritiesC2ERNS0_15TLS_Data_ReaderEt:
  106|  1.38k|Certificate_Authorities::Certificate_Authorities(TLS_Data_Reader& reader, uint16_t extension_size) {
  107|  1.38k|   if(extension_size < 2) {
  ------------------
  |  Branch (107:7): [True: 2, False: 1.38k]
  ------------------
  108|      2|      throw Decoding_Error("Empty certificate_authorities extension is illegal");
  109|      2|   }
  110|       |
  111|  1.38k|   const uint16_t purported_size = reader.get_uint16_t();
  112|       |
  113|  1.38k|   if(reader.remaining_bytes() != purported_size) {
  ------------------
  |  Branch (113:7): [True: 28, False: 1.35k]
  ------------------
  114|     28|      throw Decoding_Error("Inconsistent length in certificate_authorities extension");
  115|     28|   }
  116|       |
  117|       |   // RFC 8446 4.2.4: DistinguishedName authorities<3..2^16-1>;
  118|  1.35k|   if(purported_size < 3) {
  ------------------
  |  Branch (118:7): [True: 2, False: 1.35k]
  ------------------
  119|      2|      throw Decoding_Error("Empty certificate_authorities list is illegal");
  120|      2|   }
  121|       |
  122|  3.03k|   while(reader.has_remaining()) {
  ------------------
  |  Branch (122:10): [True: 1.68k, False: 1.35k]
  ------------------
  123|       |      // RFC 8446 4.2.4: opaque DistinguishedName<1..2^16-1>
  124|  1.68k|      const std::vector<uint8_t> name_bits = reader.get_range<uint8_t>(2, 1, 65535);
  125|       |
  126|  1.68k|      BER_Decoder decoder(name_bits, BER_Decoder::Limits::DER());
  127|  1.68k|      m_distinguished_names.emplace_back();
  128|  1.68k|      decoder.decode(m_distinguished_names.back()).verify_end();
  129|  1.68k|   }
  130|  1.35k|}
_ZN5Botan3TLS19EarlyDataIndicationC2ERNS0_15TLS_Data_ReaderEtNS0_14Handshake_TypeE:
  149|     15|                                         Handshake_Type message_type) {
  150|     15|   if(message_type == Handshake_Type::NewSessionTicket) {
  ------------------
  |  Branch (150:7): [True: 0, False: 15]
  ------------------
  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|     15|   } else if(extension_size != 0) {
  ------------------
  |  Branch (158:14): [True: 1, False: 14]
  ------------------
  159|      1|      throw TLS_Exception(Alert::DecodeError,
  160|      1|                          "Received an early_data extension containing an unexpected data "
  161|      1|                          "size indication");
  162|      1|   }
  163|     15|}

_ZN5Botan3TLS9Key_ShareC2ERNS0_15TLS_Data_ReaderEtNS0_14Handshake_TypeE:
  405|     74|Key_Share::Key_Share(TLS_Data_Reader& reader, uint16_t extension_size, Handshake_Type message_type) {
  406|     74|   if(message_type == Handshake_Type::ClientHello) {
  ------------------
  |  Branch (406:7): [True: 74, False: 0]
  ------------------
  407|     74|      m_impl = std::make_unique<Key_Share_Impl>(Key_Share_ClientHello(reader, extension_size));
  408|     74|   } else if(message_type == Handshake_Type::HelloRetryRequest) {
  ------------------
  |  Branch (408:14): [True: 0, False: 0]
  ------------------
  409|       |      // Connection_Side::Server
  410|      0|      m_impl = std::make_unique<Key_Share_Impl>(Key_Share_HelloRetryRequest(reader, extension_size));
  411|      0|   } else if(message_type == Handshake_Type::ServerHello) {
  ------------------
  |  Branch (411:14): [True: 0, False: 0]
  ------------------
  412|       |      // Connection_Side::Server
  413|      0|      m_impl = std::make_unique<Key_Share_Impl>(Key_Share_ServerHello(reader, extension_size));
  414|      0|   } else {
  415|      0|      throw Invalid_Argument(std::string("cannot create a Key_Share extension for message of type: ") +
  416|      0|                             handshake_type_to_string(message_type));
  417|      0|   }
  418|     74|}
_ZN5Botan3TLS9Key_ShareD2Ev:
  437|     13|Key_Share::~Key_Share() = default;
tls_extensions_key_share.cpp:_ZN5Botan3TLS12_GLOBAL__N_121Key_Share_ClientHelloC2ERNS0_15TLS_Data_ReaderEt:
  189|     74|      Key_Share_ClientHello(TLS_Data_Reader& reader, uint16_t /* extension_size */) {
  190|       |         // The reader is per-extension (Extensions::deserialize binds it to
  191|       |         // exactly extension_size bytes). Enforce that the inner
  192|       |         // client_shares length matches what the outer extension has left,
  193|       |         // then let the entry loop consume everything; extn_reader's
  194|       |         // assert_done() at the deserialize call site catches any leftover.
  195|     74|         const auto client_key_share_length = reader.get_uint16_t();
  196|     74|         if(reader.remaining_bytes() != client_key_share_length) {
  ------------------
  |  Branch (196:13): [True: 13, False: 61]
  ------------------
  197|     13|            throw TLS_Exception(Alert::DecodeError, "Inconsistent length in client KeyShare extension");
  198|     13|         }
  199|       |
  200|     61|         std::unordered_set<uint16_t> seen_groups;
  201|    363|         while(reader.has_remaining()) {
  ------------------
  |  Branch (201:16): [True: 317, False: 46]
  ------------------
  202|       |            // Each KeyShareEntry is at least 4 bytes (group + 2-byte length).
  203|       |            // Cleaner failure than the reader underflow we'd otherwise hit
  204|       |            // when the inner buffer ends mid-entry.
  205|    317|            if(reader.remaining_bytes() < 4) {
  ------------------
  |  Branch (205:16): [True: 14, False: 303]
  ------------------
  206|     14|               throw TLS_Exception(Alert::DecodeError, "Not enough data to read another KeyShareEntry");
  207|     14|            }
  208|       |
  209|    303|            Key_Share_Entry new_entry(reader);
  210|       |
  211|       |            // RFC 8446 4.2.8
  212|       |            //    Clients MUST NOT offer multiple KeyShareEntry values for the same
  213|       |            //    group. [...]
  214|       |            //    Servers MAY check for violations of these rules and abort the
  215|       |            //    handshake with an "illegal_parameter" alert if one is violated.
  216|    303|            if(!seen_groups.insert(new_entry.group().wire_code()).second) {
  ------------------
  |  Branch (216:16): [True: 1, False: 302]
  ------------------
  217|      1|               throw TLS_Exception(Alert::IllegalParameter, "Received multiple key share entries for the same group");
  218|      1|            }
  219|       |
  220|    302|            m_client_shares.emplace_back(std::move(new_entry));
  221|    302|         }
  222|     61|      }
tls_extensions_key_share.cpp:_ZN5Botan3TLS12_GLOBAL__N_115Key_Share_EntryC2ERNS0_15TLS_Data_ReaderE:
   73|    303|      explicit Key_Share_Entry(TLS_Data_Reader& reader) {
   74|       |         // TODO check that the group actually exists before casting...
   75|    303|         m_group = static_cast<Named_Group>(reader.get_uint16_t());
   76|       |         // RFC 8446 4.2.8: opaque key_exchange<1..2^16-1>
   77|    303|         m_key_exchange = reader.get_range<uint8_t>(2, 1, 65535);
   78|    303|      }
tls_extensions_key_share.cpp:_ZNK5Botan3TLS12_GLOBAL__N_115Key_Share_Entry5groupEv:
  107|    271|      Named_Group group() const { return m_group; }
tls_extensions_key_share.cpp:_ZN5Botan3TLS12_GLOBAL__N_121Key_Share_ClientHelloD2Ev:
  247|     39|      ~Key_Share_ClientHello() = default;
tls_extensions_key_share.cpp:_ZN5Botan3TLS12_GLOBAL__N_121Key_Share_ClientHelloC2EOS2_:
  252|     26|      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:
  400|     13|      explicit Key_Share_Impl(Key_Share_Type ks) : key_share(std::move(ks)) {}

_ZN5Botan3TLS3PSKC2ERNS0_15TLS_Data_ReaderEtNS0_14Handshake_TypeE:
  142|    190|PSK::PSK(TLS_Data_Reader& reader, uint16_t extension_size, Handshake_Type message_type) {
  143|    190|   if(message_type == Handshake_Type::ServerHello) {
  ------------------
  |  Branch (143:7): [True: 0, False: 190]
  ------------------
  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|    190|   } else if(message_type == Handshake_Type::ClientHello) {
  ------------------
  |  Branch (150:14): [True: 190, False: 0]
  ------------------
  151|    190|      const auto identities_length = reader.get_uint16_t();
  152|    190|      const auto identities_offset = reader.read_so_far();
  153|       |
  154|    190|      std::vector<PskIdentity> psk_identities;
  155|  3.04k|      while(reader.has_remaining() && (reader.read_so_far() - identities_offset) < identities_length) {
  ------------------
  |  Branch (155:13): [True: 2.98k, False: 58]
  |  Branch (155:39): [True: 2.85k, False: 132]
  ------------------
  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|  2.85k|         auto identity = reader.get_tls_length_value(2);
  168|  2.85k|         const auto obfuscated_ticket_age = reader.get_uint32_t();
  169|  2.85k|         psk_identities.emplace_back(std::move(identity), obfuscated_ticket_age);
  170|  2.85k|      }
  171|       |
  172|    190|      if(psk_identities.empty()) {
  ------------------
  |  Branch (172:10): [True: 1, False: 189]
  ------------------
  173|      1|         throw TLS_Exception(Alert::DecodeError, "Empty PSK list");
  174|      1|      }
  175|       |
  176|    189|      if(reader.read_so_far() - identities_offset != identities_length) {
  ------------------
  |  Branch (176:10): [True: 26, False: 163]
  ------------------
  177|     26|         throw TLS_Exception(Alert::DecodeError, "Inconsistent PSK identity list");
  178|     26|      }
  179|       |
  180|    163|      const auto binders_length = reader.get_uint16_t();
  181|    163|      const auto binders_offset = reader.read_so_far();
  182|       |
  183|    163|      if(binders_length == 0) {
  ------------------
  |  Branch (183:10): [True: 1, False: 162]
  ------------------
  184|      1|         throw TLS_Exception(Alert::DecodeError, "Empty PSK binders list");
  185|      1|      }
  186|       |
  187|    162|      std::vector<Client_PSK> psks;
  188|  1.84k|      for(auto& psk_identity : psk_identities) {
  ------------------
  |  Branch (188:30): [True: 1.84k, False: 132]
  ------------------
  189|  1.84k|         if(!reader.has_remaining() || reader.read_so_far() - binders_offset >= binders_length) {
  ------------------
  |  Branch (189:13): [True: 20, False: 1.82k]
  |  Branch (189:40): [True: 10, False: 1.81k]
  ------------------
  190|     30|            throw TLS_Exception(Alert::IllegalParameter, "Not enough PSK binders");
  191|     30|         }
  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.81k|         psks.emplace_back(std::move(psk_identity), reader.get_tls_length_value(1));
  199|  1.81k|      }
  200|       |
  201|    132|      if(reader.read_so_far() - binders_offset != binders_length) {
  ------------------
  |  Branch (201:10): [True: 48, False: 84]
  ------------------
  202|     48|         throw TLS_Exception(Alert::IllegalParameter, "Too many PSK binders");
  203|     48|      }
  204|       |
  205|     84|      m_impl = std::make_unique<PSK_Internal>(std::move(psks));
  206|     84|   } else {
  207|      0|      throw TLS_Exception(Alert::DecodeError, "Found a PSK extension in an unexpected handshake message");
  208|      0|   }
  209|    190|}
_ZN5Botan3TLS3PSKD2Ev:
  231|     31|PSK::~PSK() = default;
tls_extensions_psk.cpp:_ZN5Botan3TLS12_GLOBAL__N_110Client_PSKC2ENS0_11PskIdentityENSt3__16vectorIhNS4_9allocatorIhEEEE:
   56|  1.81k|            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|     31|      explicit PSK_Internal(std::vector<Client_PSK> clt_psks) : psk(std::move(clt_psks)) {}

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

_ZN5Botan3TLS26Certificate_Status_RequestC2ERNS0_15TLS_Data_ReaderEtNS0_14Handshake_TypeENS0_15Connection_SideE:
  104|     95|                                                       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|     95|   if(message_type == Handshake_Type::ClientHello) {
  ------------------
  |  Branch (123:7): [True: 95, False: 0]
  ------------------
  124|     95|      m_impl = std::make_unique<Certificate_Status_Request_Internal>(
  125|     95|         RFC6066_Certificate_Status_Request(reader, extension_size));
  126|     95|   }
  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|     95|}
_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|     95|      RFC6066_Certificate_Status_Request(TLS_Data_Reader& reader, uint16_t extension_size) {
   39|     95|         if(extension_size == 0) {
  ------------------
  |  Branch (39:13): [True: 1, False: 94]
  ------------------
   40|      1|            throw Decoding_Error("Received an unexpectedly empty Certificate_Status_Request");
   41|      1|         }
   42|       |
   43|     94|         const uint8_t type = reader.get_byte();
   44|     94|         if(type == 1 /* ocsp */) {
  ------------------
  |  Branch (44:13): [True: 71, 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|     71|            if(extension_size < 5) {
  ------------------
  |  Branch (51:16): [True: 3, False: 68]
  ------------------
   52|      3|               throw Decoding_Error("Truncated OCSP CertificateStatusRequest");
   53|      3|            }
   54|     68|            const size_t len_resp_id_list = reader.get_uint16_t();
   55|     68|            if(len_resp_id_list > static_cast<size_t>(extension_size) - 5) {
  ------------------
  |  Branch (55:16): [True: 17, False: 51]
  ------------------
   56|     17|               throw Decoding_Error("Inconsistent length in OCSP CertificateStatusRequest");
   57|     17|            }
   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|     94|      }
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|   131k|void TLS_Data_Reader::assert_at_least(size_t n) const {
   15|   131k|   const size_t left = remaining_bytes();
   16|   131k|   if(left < n) {
  ------------------
  |  Branch (16:7): [True: 501, False: 130k]
  ------------------
   17|    501|      throw_decode_error(fmt("Expected {} bytes remaining, only {} left", n, left));
   18|    501|   }
   19|   131k|}
_ZNK5Botan3TLS15TLS_Data_Reader18throw_decode_errorENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
   21|    645|void TLS_Data_Reader::throw_decode_error(std::string_view why) const {
   22|    645|   throw Decoding_Error(fmt("Invalid {}: {}", m_typename, why));
   23|    645|}

_ZN5Botan3TLS16Signature_SchemeC2Et:
  118|  6.07k|Signature_Scheme::Signature_Scheme(uint16_t wire_code) : Signature_Scheme(Signature_Scheme::Code(wire_code)) {}
_ZN5Botan3TLS16Signature_SchemeC2ENS1_4CodeE:
  120|  6.07k|Signature_Scheme::Signature_Scheme(Signature_Scheme::Code wire_code) : m_code(wire_code) {}

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

_ZN5Botan15allocate_memoryEmm:
   21|  2.67k|BOTAN_MALLOC_FN void* allocate_memory(size_t elems, size_t elem_size) {
   22|  2.67k|   if(elems == 0 || elem_size == 0) {
  ------------------
  |  Branch (22:7): [True: 0, False: 2.67k]
  |  Branch (22:21): [True: 0, False: 2.67k]
  ------------------
   23|      0|      return nullptr;
   24|      0|   }
   25|       |
   26|       |   // Some calloc implementations do not check for overflow (?!?)
   27|  2.67k|   if(!checked_mul(elems, elem_size).has_value()) {
  ------------------
  |  Branch (27:7): [True: 0, False: 2.67k]
  ------------------
   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|  2.67k|   void* ptr = std::calloc(elems, elem_size);  // NOLINT(*-no-malloc,*-owning-memory)
   43|  2.67k|#endif
   44|  2.67k|   if(ptr == nullptr) {
  ------------------
  |  Branch (44:7): [True: 0, False: 2.67k]
  ------------------
   45|      0|      [[unlikely]] throw std::bad_alloc();
   46|      0|   }
   47|  2.67k|   return ptr;
   48|  2.67k|}
_ZN5Botan17deallocate_memoryEPvmm:
   50|  2.67k|void deallocate_memory(void* p, size_t elems, size_t elem_size) {
   51|  2.67k|   if(p == nullptr) {
  ------------------
  |  Branch (51:7): [True: 0, False: 2.67k]
  ------------------
   52|      0|      [[unlikely]] return;
   53|      0|   }
   54|       |
   55|  2.67k|   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|  2.67k|   std::free(p);  // NOLINT(*-no-malloc,*-owning-memory)
   64|  2.67k|}

_ZN5Botan19next_utf8_codepointENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEERm:
   53|  1.33k|uint32_t next_utf8_codepoint(std::string_view utf8, size_t& pos) {
   54|  1.33k|   auto read_continuation = [&]() -> uint32_t {
   55|  1.33k|      if(pos >= utf8.size()) {
   56|  1.33k|         throw Decoding_Error("Invalid UTF-8 sequence");
   57|  1.33k|      }
   58|  1.33k|      const uint8_t b = static_cast<uint8_t>(utf8[pos++]);
   59|  1.33k|      if((b & 0xC0) != 0x80) {
   60|  1.33k|         throw Decoding_Error("Invalid UTF-8 sequence");
   61|  1.33k|      }
   62|  1.33k|      return b & 0x3F;
   63|  1.33k|   };
   64|       |
   65|  1.33k|   if(pos >= utf8.size()) {
  ------------------
  |  Branch (65:7): [True: 0, False: 1.33k]
  ------------------
   66|      0|      throw Decoding_Error("Invalid UTF-8 sequence");
   67|      0|   }
   68|  1.33k|   const uint8_t lead = static_cast<uint8_t>(utf8[pos++]);
   69|  1.33k|   uint32_t c = 0;
   70|       |
   71|  1.33k|   if(lead <= 0x7F) {
  ------------------
  |  Branch (71:7): [True: 950, False: 380]
  ------------------
   72|    950|      c = lead;
   73|    950|   } else if((lead & 0xE0) == 0xC0) {
  ------------------
  |  Branch (73:14): [True: 146, False: 234]
  ------------------
   74|    146|      c = (lead & 0x1F) << 6;
   75|    146|      c |= read_continuation();
   76|    146|      if(c < 0x80) {
  ------------------
  |  Branch (76:10): [True: 2, False: 144]
  ------------------
   77|      2|         throw Decoding_Error("Overlong UTF-8 sequence");
   78|      2|      }
   79|    234|   } else if((lead & 0xF0) == 0xE0) {
  ------------------
  |  Branch (79:14): [True: 140, False: 94]
  ------------------
   80|    140|      c = (lead & 0x0F) << 12;
   81|    140|      c |= read_continuation() << 6;
   82|    140|      c |= read_continuation();
   83|    140|      if(c < 0x800) {
  ------------------
  |  Branch (83:10): [True: 7, False: 133]
  ------------------
   84|      7|         throw Decoding_Error("Overlong UTF-8 sequence");
   85|      7|      }
   86|    140|   } else if((lead & 0xF8) == 0xF0) {
  ------------------
  |  Branch (86:14): [True: 79, False: 15]
  ------------------
   87|     79|      c = (lead & 0x07) << 18;
   88|     79|      c |= read_continuation() << 12;
   89|     79|      c |= read_continuation() << 6;
   90|     79|      c |= read_continuation();
   91|     79|      if(c < 0x10000) {
  ------------------
  |  Branch (91:10): [True: 7, False: 72]
  ------------------
   92|      7|         throw Decoding_Error("Overlong UTF-8 sequence");
   93|      7|      }
   94|     79|   } else {
   95|     15|      throw Decoding_Error("Invalid UTF-8 sequence");
   96|     15|   }
   97|       |
   98|  1.29k|   if(c > 0x10FFFF) {
  ------------------
  |  Branch (98:7): [True: 5, False: 1.29k]
  ------------------
   99|      5|      throw Decoding_Error("UTF-8 sequence encodes value outside Unicode range");
  100|      5|   }
  101|  1.29k|   if(c >= 0xD800 && c < 0xE000) {
  ------------------
  |  Branch (101:7): [True: 124, False: 1.17k]
  |  Branch (101:22): [True: 11, False: 113]
  ------------------
  102|     11|      throw Decoding_Error("UTF-8 sequence encodes surrogate code point");
  103|     11|   }
  104|       |
  105|  1.28k|   return c;
  106|  1.29k|}
_ZN5Botan13is_valid_utf8ENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEE:
  108|    339|bool is_valid_utf8(std::string_view utf8) {
  109|    339|   try {
  110|    339|      size_t pos = 0;
  111|  1.66k|      while(pos < utf8.size()) {
  ------------------
  |  Branch (111:13): [True: 1.33k, False: 339]
  ------------------
  112|  1.33k|         const uint32_t c = next_utf8_codepoint(utf8, pos);
  113|  1.33k|         BOTAN_UNUSED(c);
  ------------------
  |  |  151|  1.33k|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
  114|  1.33k|      }
  115|    339|   } catch(Decoding_Error&) {
  116|     57|      return false;
  117|     57|   }
  118|    282|   return true;
  119|    339|}
_ZN5Botan12ucs2_to_utf8ENSt3__14spanIKhLm18446744073709551615EEE:
  121|    271|std::string ucs2_to_utf8(std::span<const uint8_t> ucs2) {
  122|    271|   if(ucs2.size() % 2 != 0) {
  ------------------
  |  Branch (122:7): [True: 1, False: 270]
  ------------------
  123|      1|      throw Decoding_Error("Invalid length for UCS-2 string");
  124|      1|   }
  125|       |
  126|    270|   const size_t chars = ucs2.size() / 2;
  127|       |
  128|    270|   std::string s;
  129|  1.52k|   for(size_t i = 0; i != chars; ++i) {
  ------------------
  |  Branch (129:22): [True: 1.25k, False: 270]
  ------------------
  130|  1.25k|      const uint32_t c = load_be<uint16_t>(ucs2.data(), i);
  131|  1.25k|      append_utf8_for(s, c);
  132|  1.25k|   }
  133|       |
  134|    270|   return s;
  135|    271|}
_ZN5Botan12ucs4_to_utf8ENSt3__14spanIKhLm18446744073709551615EEE:
  155|    168|std::string ucs4_to_utf8(std::span<const uint8_t> ucs4) {
  156|    168|   if(ucs4.size() % 4 != 0) {
  ------------------
  |  Branch (156:7): [True: 3, False: 165]
  ------------------
  157|      3|      throw Decoding_Error("Invalid length for UCS-4 string");
  158|      3|   }
  159|       |
  160|    165|   const size_t chars = ucs4.size() / 4;
  161|       |
  162|    165|   std::string s;
  163|    488|   for(size_t i = 0; i != chars; ++i) {
  ------------------
  |  Branch (163:22): [True: 323, False: 165]
  ------------------
  164|    323|      const uint32_t c = load_be<uint32_t>(ucs4.data(), i);
  165|    323|      append_utf8_for(s, c);
  166|    323|   }
  167|       |
  168|    165|   return s;
  169|    168|}
_ZN5Botan14latin1_to_utf8ENSt3__14spanIKhLm18446744073709551615EEE:
  190|    396|std::string latin1_to_utf8(std::span<const uint8_t> chars) {
  191|    396|   std::string s;
  192|  4.76k|   for(const uint8_t b : chars) {
  ------------------
  |  Branch (192:24): [True: 4.76k, False: 396]
  ------------------
  193|  4.76k|      append_utf8_for(s, static_cast<uint32_t>(b));
  194|  4.76k|   }
  195|    396|   return s;
  196|    396|}
charset.cpp:_ZZN5Botan19next_utf8_codepointENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEERmENK3$_0clEv:
   54|    659|   auto read_continuation = [&]() -> uint32_t {
   55|    659|      if(pos >= utf8.size()) {
  ------------------
  |  Branch (55:10): [True: 5, False: 654]
  ------------------
   56|      5|         throw Decoding_Error("Invalid UTF-8 sequence");
   57|      5|      }
   58|    654|      const uint8_t b = static_cast<uint8_t>(utf8[pos++]);
   59|    654|      if((b & 0xC0) != 0x80) {
  ------------------
  |  Branch (59:10): [True: 5, False: 649]
  ------------------
   60|      5|         throw Decoding_Error("Invalid UTF-8 sequence");
   61|      5|      }
   62|    649|      return b & 0x3F;
   63|    654|   };
charset.cpp:_ZN5Botan12_GLOBAL__N_115append_utf8_forERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEj:
   17|  6.34k|void append_utf8_for(std::string& s, uint32_t c) {
   18|  6.34k|   if(c >= 0xD800 && c < 0xE000) {
  ------------------
  |  Branch (18:7): [True: 475, False: 5.87k]
  |  Branch (18:22): [True: 14, False: 461]
  ------------------
   19|     14|      throw Decoding_Error("Invalid Unicode character");
   20|     14|   }
   21|       |
   22|  6.33k|   if(c <= 0x7F) {
  ------------------
  |  Branch (22:7): [True: 3.25k, False: 3.07k]
  ------------------
   23|  3.25k|      const uint8_t b0 = static_cast<uint8_t>(c);
   24|  3.25k|      s.push_back(static_cast<char>(b0));
   25|  3.25k|   } else if(c <= 0x7FF) {
  ------------------
  |  Branch (25:14): [True: 2.23k, False: 841]
  ------------------
   26|  2.23k|      const uint8_t b0 = 0xC0 | static_cast<uint8_t>(c >> 6);
   27|  2.23k|      const uint8_t b1 = 0x80 | static_cast<uint8_t>(c & 0x3F);
   28|  2.23k|      s.push_back(static_cast<char>(b0));
   29|  2.23k|      s.push_back(static_cast<char>(b1));
   30|  2.23k|   } else if(c <= 0xFFFF) {
  ------------------
  |  Branch (30:14): [True: 667, False: 174]
  ------------------
   31|    667|      const uint8_t b0 = 0xE0 | static_cast<uint8_t>(c >> 12);
   32|    667|      const uint8_t b1 = 0x80 | static_cast<uint8_t>((c >> 6) & 0x3F);
   33|    667|      const uint8_t b2 = 0x80 | static_cast<uint8_t>(c & 0x3F);
   34|    667|      s.push_back(static_cast<char>(b0));
   35|    667|      s.push_back(static_cast<char>(b1));
   36|    667|      s.push_back(static_cast<char>(b2));
   37|    667|   } else if(c <= 0x10FFFF) {
  ------------------
  |  Branch (37:14): [True: 119, False: 55]
  ------------------
   38|    119|      const uint8_t b0 = 0xF0 | static_cast<uint8_t>(c >> 18);
   39|    119|      const uint8_t b1 = 0x80 | static_cast<uint8_t>((c >> 12) & 0x3F);
   40|    119|      const uint8_t b2 = 0x80 | static_cast<uint8_t>((c >> 6) & 0x3F);
   41|    119|      const uint8_t b3 = 0x80 | static_cast<uint8_t>(c & 0x3F);
   42|    119|      s.push_back(static_cast<char>(b0));
   43|    119|      s.push_back(static_cast<char>(b1));
   44|    119|      s.push_back(static_cast<char>(b2));
   45|    119|      s.push_back(static_cast<char>(b3));
   46|    119|   } else {
   47|     55|      throw Decoding_Error("Invalid Unicode character");
   48|     55|   }
   49|  6.33k|}

_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|  8.48k|size_t DataSource::read_byte(uint8_t& out) {
   28|  8.48k|   return read(&out, 1);
   29|  8.48k|}
_ZN5Botan10DataSource9read_byteEv:
   34|  9.37k|std::optional<uint8_t> DataSource::read_byte() {
   35|  9.37k|   uint8_t b = 0;
   36|  9.37k|   if(this->read(&b, 1) == 1) {
  ------------------
  |  Branch (36:7): [True: 9.35k, False: 21]
  ------------------
   37|  9.35k|      return b;
   38|  9.35k|   } else {
   39|     21|      return {};
   40|     21|   }
   41|  9.37k|}
_ZN5Botan17DataSource_Memory4readEPhm:
   73|  8.59k|size_t DataSource_Memory::read(uint8_t out[], size_t length) {
   74|  8.59k|   const size_t got = std::min<size_t>(m_source.size() - m_offset, length);
   75|  8.59k|   copy_mem(out, m_source.data() + m_offset, got);
   76|  8.59k|   m_offset += got;
   77|  8.59k|   return got;
   78|  8.59k|}
_ZN5Botan17DataSource_Memory15check_availableEm:
   80|  2.39k|bool DataSource_Memory::check_available(size_t n) {
   81|  2.39k|   return (n <= (m_source.size() - m_offset));
   82|  2.39k|}
_ZNK5Botan17DataSource_Memory11end_of_dataEv:
  101|  2.15k|bool DataSource_Memory::end_of_data() const {
  102|  2.15k|   return (m_offset == m_source.size());
  103|  2.15k|}

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

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

_ZN5Botan2OS17read_env_variableERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_17basic_string_viewIcS4_EE:
  470|      1|bool OS::read_env_variable(std::string& value_out, std::string_view name_view) {
  471|      1|   value_out = "";
  472|       |
  473|      1|   if(running_in_privileged_state()) {
  ------------------
  |  Branch (473:7): [True: 0, False: 1]
  ------------------
  474|      0|      return false;
  475|      0|   }
  476|       |
  477|       |#if defined(BOTAN_TARGET_OS_HAS_WIN32) && \
  478|       |   (defined(BOTAN_BUILD_COMPILER_IS_MSVC) || defined(BOTAN_BUILD_COMPILER_IS_CLANGCL))
  479|       |   const std::string name(name_view);
  480|       |   char val[128] = {0};
  481|       |   size_t req_size = 0;
  482|       |   if(getenv_s(&req_size, val, sizeof(val), name.c_str()) == 0) {
  483|       |      // Microsoft's implementation always writes a terminating \0,
  484|       |      // and includes it in the reported length of the environment variable
  485|       |      // if a value exists.
  486|       |      if(req_size > 0 && val[req_size - 1] == '\0') {
  487|       |         value_out = std::string(val);
  488|       |      } else {
  489|       |         value_out = std::string(val, req_size);
  490|       |      }
  491|       |      return true;
  492|       |   }
  493|       |#else
  494|      1|   const std::string name(name_view);
  495|      1|   if(const char* val = std::getenv(name.c_str())) {
  ------------------
  |  Branch (495:19): [True: 0, False: 1]
  ------------------
  496|      0|      value_out = val;
  497|      0|      return true;
  498|      0|   }
  499|      1|#endif
  500|       |
  501|      1|   return false;
  502|      1|}
os_utils.cpp:_ZN5Botan12_GLOBAL__N_110get_auxvalENSt3__18optionalImEE:
  119|      1|std::optional<unsigned long> get_auxval(std::optional<unsigned long> id) {
  120|      1|   if(id) {
  ------------------
  |  Branch (120:7): [True: 1, False: 0]
  ------------------
  121|      1|#if defined(BOTAN_TARGET_OS_HAS_GETAUXVAL)
  122|      1|      return ::getauxval(*id);
  123|       |#elif defined(BOTAN_TARGET_OS_HAS_ELF_AUX_INFO)
  124|       |      unsigned long auxinfo = 0;
  125|       |      if(::elf_aux_info(static_cast<int>(*id), &auxinfo, sizeof(auxinfo)) == 0) {
  126|       |         return auxinfo;
  127|       |      }
  128|       |#endif
  129|      1|   }
  130|       |
  131|      0|   return {};
  132|      1|}
os_utils.cpp:_ZN5Botan12_GLOBAL__N_127running_in_privileged_stateEv:
  153|      1|bool running_in_privileged_state() {
  154|      1|#if defined(AT_SECURE)
  155|      1|   if(auto at_secure = get_auxval(AT_SECURE)) {
  ------------------
  |  Branch (155:12): [True: 1, False: 0]
  ------------------
  156|      1|      return at_secure != 0;
  157|      1|   }
  158|      0|#endif
  159|       |
  160|      0|#if defined(BOTAN_TARGET_OS_HAS_POSIX1)
  161|      0|   return (::getuid() != ::geteuid()) || (::getgid() != ::getegid());
  ------------------
  |  Branch (161:11): [True: 0, False: 0]
  |  Branch (161:42): [True: 0, False: 0]
  ------------------
  162|       |#else
  163|       |   return false;
  164|       |#endif
  165|      1|}

_ZN5Botan7X509_DN11decode_fromERNS_11BER_DecoderE:
  407|  1.55k|void X509_DN::decode_from(BER_Decoder& source) {
  408|  1.55k|   std::vector<uint8_t> bits;
  409|       |
  410|  1.55k|   source.start_sequence().raw_bytes(bits).end_cons();
  411|       |
  412|  1.55k|   BER_Decoder sequence(bits, source.limits());
  413|       |
  414|  1.55k|   std::vector<std::vector<std::pair<OID, ASN1_String>>> rdns;
  415|       |
  416|       |   // Cap AVAs per RDN to bound work for downstream set-based matching.
  417|       |   // No legitimate cert has anywhere near this many AVAs in a single RDN.
  418|  1.55k|   constexpr size_t MAX_AVAS_PER_RDN = 32;
  419|       |
  420|  2.58k|   while(sequence.more_items()) {
  ------------------
  |  Branch (420:10): [True: 1.03k, False: 1.55k]
  ------------------
  421|  1.03k|      BER_Decoder rdn_decoder = sequence.start_set();
  422|       |
  423|  1.03k|      std::vector<std::pair<OID, ASN1_String>> rdn;
  424|  2.91k|      while(rdn_decoder.more_items()) {
  ------------------
  |  Branch (424:13): [True: 1.87k, False: 1.03k]
  ------------------
  425|  1.87k|         OID oid;
  426|  1.87k|         ASN1_String str;
  427|       |
  428|  1.87k|         rdn_decoder.start_sequence()
  429|  1.87k|            .decode(oid)
  430|  1.87k|            .decode(str)  // TODO support Any
  431|  1.87k|            .end_cons();
  432|       |
  433|  1.87k|         rdn.emplace_back(std::move(oid), std::move(str));
  434|       |
  435|  1.87k|         if(rdn.size() > MAX_AVAS_PER_RDN) {
  ------------------
  |  Branch (435:13): [True: 0, False: 1.87k]
  ------------------
  436|      0|            throw Decoding_Error("X.500 RDN has too many attribute-value assertions");
  437|      0|         }
  438|  1.87k|      }
  439|       |
  440|       |      /*
  441|       |      RFC 5280 4.1.2.4:
  442|       |         RelativeDistinguishedName ::=
  443|       |           SET SIZE (1..MAX) OF AttributeTypeAndValue
  444|       |      */
  445|  1.03k|      if(rdn.empty()) {
  ------------------
  |  Branch (445:10): [True: 1, False: 1.03k]
  ------------------
  446|      1|         throw Decoding_Error("X.500 RDN must contain at least one attribute-value assertion");
  447|      1|      }
  448|  1.03k|      rdns.push_back(std::move(rdn));
  449|  1.03k|   }
  450|       |
  451|  1.55k|   auto canonical_bits = canonicalize_dn(rdns);
  452|       |
  453|  1.55k|   m_rdn = std::move(rdns);
  454|  1.55k|   m_dn_bits = std::move(bits);
  455|  1.55k|   m_canonical_dn_bits = std::move(canonical_bits);
  456|  1.55k|}
x509_dn.cpp:_ZN5Botan12_GLOBAL__N_115canonicalize_dnERKNSt3__16vectorINS2_INS1_4pairINS_3OIDENS_11ASN1_StringEEENS1_9allocatorIS6_EEEENS7_IS9_EEEE:
  310|    560|std::vector<uint8_t> canonicalize_dn(const std::vector<std::vector<std::pair<OID, ASN1_String>>>& rdns) {
  311|    560|   auto append_canonical_data = []<typename T>(std::vector<uint8_t>& out, const T& data) {
  312|    560|      const std::array<uint8_t, 8> data_len = store_le(static_cast<uint64_t>(data.size()));
  313|    560|      out.insert(out.end(), data_len.begin(), data_len.end());
  314|    560|      out.insert(out.end(), data.begin(), data.end());
  315|    560|   };
  316|       |
  317|    560|   std::vector<uint8_t> canonical_bits;
  318|       |
  319|    560|   for(const auto& rdn : rdns) {
  ------------------
  |  Branch (319:24): [True: 414, False: 560]
  ------------------
  320|    414|      std::vector<uint8_t> rdn_bits;
  321|       |
  322|  1.30k|      for(const auto& [oid, value] : canonicalize_rdn(rdn)) {
  ------------------
  |  Branch (322:36): [True: 1.30k, False: 414]
  ------------------
  323|  1.30k|         append_canonical_data(rdn_bits, oid.BER_encode());
  324|  1.30k|         append_canonical_data(rdn_bits, value);
  325|  1.30k|      }
  326|       |
  327|    414|      append_canonical_data(canonical_bits, rdn_bits);
  328|    414|   }
  329|       |
  330|    560|   return canonical_bits;
  331|    560|}
x509_dn.cpp:_ZN5Botan12_GLOBAL__N_116canonicalize_rdnERKNSt3__16vectorINS1_4pairINS_3OIDENS_11ASN1_StringEEENS1_9allocatorIS6_EEEE:
  298|    414|std::vector<std::pair<OID, std::string>> canonicalize_rdn(const std::vector<std::pair<OID, ASN1_String>>& rdn) {
  299|    414|   std::vector<std::pair<OID, std::string>> result;
  300|    414|   result.reserve(rdn.size());
  301|  1.30k|   for(const auto& ava : rdn) {
  ------------------
  |  Branch (301:24): [True: 1.30k, False: 414]
  ------------------
  302|  1.30k|      result.emplace_back(ava.first, X500_Char_Iterator::canonicalize(ava.second.value()));
  303|  1.30k|   }
  304|    414|   if(result.size() != 1) {
  ------------------
  |  Branch (304:7): [True: 362, False: 52]
  ------------------
  305|    362|      std::sort(result.begin(), result.end());
  306|    362|   }
  307|    414|   return result;
  308|    414|}
x509_dn.cpp:_ZN5Botan12_GLOBAL__N_118X500_Char_Iterator12canonicalizeENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  114|  1.30k|      static std::string canonicalize(std::string_view name) {
  115|  1.30k|         std::string result;
  116|  1.30k|         result.reserve(name.size());
  117|       |
  118|  1.30k|         X500_Char_Iterator it(name);
  119|  10.6k|         while(auto c = it.next()) {
  ------------------
  |  Branch (119:21): [True: 9.38k, False: 1.30k]
  ------------------
  120|  9.38k|            result += *c;
  121|  9.38k|         }
  122|       |
  123|  1.30k|         return result;
  124|  1.30k|      }
x509_dn.cpp:_ZN5Botan12_GLOBAL__N_118X500_Char_IteratorC2ENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
   81|  1.30k|      explicit X500_Char_Iterator(std::string_view s) : m_str(s), m_pos(0) {
   82|       |         // Skip leading whitespace
   83|  1.55k|         while(m_pos < m_str.size() && is_space(m_str[m_pos])) {
  ------------------
  |  Branch (83:16): [True: 897, False: 655]
  |  Branch (83:40): [True: 252, False: 645]
  ------------------
   84|    252|            ++m_pos;
   85|    252|         }
   86|  1.30k|      }
x509_dn.cpp:_ZN5Botan12_GLOBAL__N_118X500_Char_Iterator4nextEv:
   89|  10.6k|      std::optional<char> next() {
   90|  10.6k|         if(m_pos >= m_str.size()) {
  ------------------
  |  Branch (90:13): [True: 1.21k, False: 9.46k]
  ------------------
   91|  1.21k|            return std::nullopt;
   92|  1.21k|         }
   93|       |
   94|  9.46k|         if(is_space(m_str[m_pos])) {
  ------------------
  |  Branch (94:13): [True: 297, False: 9.16k]
  ------------------
   95|       |            // Skip the entire whitespace run
   96|    930|            while(m_pos < m_str.size() && is_space(m_str[m_pos])) {
  ------------------
  |  Branch (96:19): [True: 844, False: 86]
  |  Branch (96:43): [True: 633, False: 211]
  ------------------
   97|    633|               ++m_pos;
   98|    633|            }
   99|       |            // Emit a single space only if more content follows (strip trailing ws)
  100|    297|            if(m_pos < m_str.size()) {
  ------------------
  |  Branch (100:16): [True: 211, False: 86]
  ------------------
  101|    211|               return ' ';
  102|    211|            }
  103|     86|            return std::nullopt;
  104|    297|         }
  105|       |
  106|  9.16k|         const char c = m_str[m_pos++];
  107|       |         // Locale-independent ASCII fold; RFC 5280 DN matching does not depend on libc locale
  108|  9.16k|         if(c >= 'A' && c <= 'Z') {
  ------------------
  |  Branch (108:13): [True: 538, False: 8.63k]
  |  Branch (108:25): [True: 168, False: 370]
  ------------------
  109|    168|            return static_cast<char>(c + ('a' - 'A'));
  110|    168|         }
  111|  9.00k|         return c;
  112|  9.16k|      }
x509_dn.cpp:_ZZN5Botan12_GLOBAL__N_115canonicalize_dnERKNSt3__16vectorINS2_INS1_4pairINS_3OIDENS_11ASN1_StringEEENS1_9allocatorIS6_EEEENS7_IS9_EEEEENK3$_0clINS2_IhNS7_IhEEEEEEDaRSH_RKT_:
  311|  1.71k|   auto append_canonical_data = []<typename T>(std::vector<uint8_t>& out, const T& data) {
  312|  1.71k|      const std::array<uint8_t, 8> data_len = store_le(static_cast<uint64_t>(data.size()));
  313|  1.71k|      out.insert(out.end(), data_len.begin(), data_len.end());
  314|  1.71k|      out.insert(out.end(), data.begin(), data.end());
  315|  1.71k|   };
x509_dn.cpp:_ZZN5Botan12_GLOBAL__N_115canonicalize_dnERKNSt3__16vectorINS2_INS1_4pairINS_3OIDENS_11ASN1_StringEEENS1_9allocatorIS6_EEEENS7_IS9_EEEEENK3$_0clINS1_12basic_stringIcNS1_11char_traitsIcEENS7_IcEEEEEEDaRNS2_IhNS7_IhEEEERKT_:
  311|  1.30k|   auto append_canonical_data = []<typename T>(std::vector<uint8_t>& out, const T& data) {
  312|  1.30k|      const std::array<uint8_t, 8> data_len = store_le(static_cast<uint64_t>(data.size()));
  313|  1.30k|      out.insert(out.end(), data_len.begin(), data_len.end());
  314|  1.30k|      out.insert(out.end(), data.begin(), data.end());
  315|  1.30k|   };
x509_dn.cpp:_ZN5Botan12_GLOBAL__N_18is_spaceEc:
   26|  11.2k|bool is_space(char c) {
   27|  11.2k|   return c == ' ' || c == '\t';
  ------------------
  |  Branch (27:11): [True: 728, False: 10.4k]
  |  Branch (27:23): [True: 454, False: 10.0k]
  ------------------
   28|  11.2k|}

