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

_ZN5Botan6chooseITkNSt3__117unsigned_integralEjEET_S2_S2_S2_:
  216|   411k|BOTAN_FORCE_INLINE constexpr T choose(T mask, T a, T b) {
  217|       |   //return (mask & a) | (~mask & b);
  218|   411k|   return (b ^ (mask & (a ^ b)));
  219|   411k|}
_ZN5Botan8majorityITkNSt3__117unsigned_integralEjEET_S2_S2_S2_:
  222|   205k|BOTAN_FORCE_INLINE constexpr T majority(T a, T b, T c) {
  223|       |   /*
  224|       |   Considering each bit of a, b, c individually
  225|       |
  226|       |   If a xor b is set, then c is the deciding vote.
  227|       |
  228|       |   If a xor b is not set then either a and b are both set or both unset.
  229|       |   In either case the value of c doesn't matter, and examining b (or a)
  230|       |   allows us to determine which case we are in.
  231|       |   */
  232|   205k|   return choose(a ^ b, c, b);
  233|   205k|}

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

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

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

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

_ZN5Botan3fmtIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEES7_NS1_17basic_string_viewIcS4_EEDpRKT_:
   53|     79|std::string fmt(std::string_view format, const T&... args) {
   54|     79|   std::ostringstream oss;
   55|     79|   oss.imbue(std::locale::classic());
   56|     79|   fmt_detail::do_fmt(oss, format, args...);
   57|     79|   return oss.str();
   58|     79|}
_ZN5Botan10fmt_detail6do_fmtINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEJEEEvRNS2_19basic_ostringstreamIcS5_S7_EENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|     79|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|     79|   size_t i = 0;
   27|       |
   28|  1.73k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 1.73k, False: 0]
  ------------------
   29|  1.73k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 79, False: 1.65k]
  |  Branch (29:30): [True: 79, False: 0]
  |  Branch (29:59): [True: 79, False: 0]
  ------------------
   30|     79|         oss << val;
   31|     79|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  1.65k|      } else {
   33|  1.65k|         oss << format[i];
   34|  1.65k|      }
   35|       |
   36|  1.65k|      i += 1;
   37|  1.65k|   }
   38|     79|}
_ZN5Botan10fmt_detail6do_fmtERNSt3__119basic_ostringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_17basic_string_viewIcS4_EE:
   20|  1.77k|inline void do_fmt(std::ostringstream& oss, std::string_view format) {
   21|  1.77k|   oss << format;
   22|  1.77k|}
_ZN5Botan3fmtIJmmEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_17basic_string_viewIcS4_EEDpRKT_:
   53|    436|std::string fmt(std::string_view format, const T&... args) {
   54|    436|   std::ostringstream oss;
   55|    436|   oss.imbue(std::locale::classic());
   56|    436|   fmt_detail::do_fmt(oss, format, args...);
   57|    436|   return oss.str();
   58|    436|}
_ZN5Botan10fmt_detail6do_fmtImJmEEEvRNSt3__119basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|    436|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|    436|   size_t i = 0;
   27|       |
   28|  4.36k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 4.36k, False: 0]
  ------------------
   29|  4.36k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 436, False: 3.92k]
  |  Branch (29:30): [True: 436, False: 0]
  |  Branch (29:59): [True: 436, False: 0]
  ------------------
   30|    436|         oss << val;
   31|    436|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  3.92k|      } else {
   33|  3.92k|         oss << format[i];
   34|  3.92k|      }
   35|       |
   36|  3.92k|      i += 1;
   37|  3.92k|   }
   38|    436|}
_ZN5Botan10fmt_detail6do_fmtImJEEEvRNSt3__119basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|    436|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|    436|   size_t i = 0;
   27|       |
   28|  10.4k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 10.4k, False: 0]
  ------------------
   29|  10.4k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 436, False: 10.0k]
  |  Branch (29:30): [True: 436, False: 0]
  |  Branch (29:59): [True: 436, False: 0]
  ------------------
   30|    436|         oss << val;
   31|    436|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  10.0k|      } else {
   33|  10.0k|         oss << format[i];
   34|  10.0k|      }
   35|       |
   36|  10.0k|      i += 1;
   37|  10.0k|   }
   38|    436|}
_ZN5Botan3fmtIJPKcNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEEEENS3_12basic_stringIcS6_NS3_9allocatorIcEEEES7_DpRKT_:
   53|    581|std::string fmt(std::string_view format, const T&... args) {
   54|    581|   std::ostringstream oss;
   55|    581|   oss.imbue(std::locale::classic());
   56|    581|   fmt_detail::do_fmt(oss, format, args...);
   57|    581|   return oss.str();
   58|    581|}
_ZN5Botan10fmt_detail6do_fmtIPKcJNSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEEEEvRNS4_19basic_ostringstreamIcS7_NS4_9allocatorIcEEEES8_RKT_DpRKT0_:
   25|    581|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|    581|   size_t i = 0;
   27|       |
   28|  5.22k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 5.22k, False: 0]
  ------------------
   29|  5.22k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 581, False: 4.64k]
  |  Branch (29:30): [True: 581, False: 0]
  |  Branch (29:59): [True: 581, False: 0]
  ------------------
   30|    581|         oss << val;
   31|    581|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  4.64k|      } else {
   33|  4.64k|         oss << format[i];
   34|  4.64k|      }
   35|       |
   36|  4.64k|      i += 1;
   37|  4.64k|   }
   38|    581|}
_ZN5Botan10fmt_detail6do_fmtINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEJEEEvRNS2_19basic_ostringstreamIcS5_NS2_9allocatorIcEEEES6_RKT_DpRKT0_:
   25|  1.14k|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|  1.14k|   size_t i = 0;
   27|       |
   28|  5.10k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 5.10k, False: 0]
  ------------------
   29|  5.10k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 1.14k, False: 3.96k]
  |  Branch (29:30): [True: 1.14k, False: 0]
  |  Branch (29:59): [True: 1.14k, False: 0]
  ------------------
   30|  1.14k|         oss << val;
   31|  1.14k|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  3.96k|      } else {
   33|  3.96k|         oss << format[i];
   34|  3.96k|      }
   35|       |
   36|  3.96k|      i += 1;
   37|  3.96k|   }
   38|  1.14k|}
_ZN5Botan3fmtIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEEENS1_12basic_stringIcS4_NS1_9allocatorIcEEEES5_DpRKT_:
   53|    560|std::string fmt(std::string_view format, const T&... args) {
   54|    560|   std::ostringstream oss;
   55|    560|   oss.imbue(std::locale::classic());
   56|    560|   fmt_detail::do_fmt(oss, format, args...);
   57|    560|   return oss.str();
   58|    560|}
_ZN5Botan3fmtIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEjEEENS1_12basic_stringIcS4_NS1_9allocatorIcEEEES5_DpRKT_:
   53|     40|std::string fmt(std::string_view format, const T&... args) {
   54|     40|   std::ostringstream oss;
   55|     40|   oss.imbue(std::locale::classic());
   56|     40|   fmt_detail::do_fmt(oss, format, args...);
   57|     40|   return oss.str();
   58|     40|}
_ZN5Botan10fmt_detail6do_fmtINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEJjEEEvRNS2_19basic_ostringstreamIcS5_NS2_9allocatorIcEEEES6_RKT_DpRKT0_:
   25|     40|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|     40|   size_t i = 0;
   27|       |
   28|     40|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 40, False: 0]
  ------------------
   29|     40|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 40, False: 0]
  |  Branch (29:30): [True: 40, False: 0]
  |  Branch (29:59): [True: 40, False: 0]
  ------------------
   30|     40|         oss << val;
   31|     40|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|     40|      } else {
   33|      0|         oss << format[i];
   34|      0|      }
   35|       |
   36|      0|      i += 1;
   37|      0|   }
   38|     40|}
_ZN5Botan10fmt_detail6do_fmtIjJEEEvRNSt3__119basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|    123|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|    123|   size_t i = 0;
   27|       |
   28|    286|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 286, False: 0]
  ------------------
   29|    286|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 123, False: 163]
  |  Branch (29:30): [True: 123, False: 0]
  |  Branch (29:59): [True: 123, False: 0]
  ------------------
   30|    123|         oss << val;
   31|    123|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|    163|      } else {
   33|    163|         oss << format[i];
   34|    163|      }
   35|       |
   36|    163|      i += 1;
   37|    163|   }
   38|    123|}
_ZN5Botan3fmtIJjjEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_17basic_string_viewIcS4_EEDpRKT_:
   53|     83|std::string fmt(std::string_view format, const T&... args) {
   54|     83|   std::ostringstream oss;
   55|     83|   oss.imbue(std::locale::classic());
   56|     83|   fmt_detail::do_fmt(oss, format, args...);
   57|     83|   return oss.str();
   58|     83|}
_ZN5Botan10fmt_detail6do_fmtIjJjEEEvRNSt3__119basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|     83|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|     83|   size_t i = 0;
   27|       |
   28|  2.82k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 2.82k, False: 0]
  ------------------
   29|  2.82k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 83, False: 2.73k]
  |  Branch (29:30): [True: 83, False: 0]
  |  Branch (29:59): [True: 83, False: 0]
  ------------------
   30|     83|         oss << val;
   31|     83|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  2.73k|      } else {
   33|  2.73k|         oss << format[i];
   34|  2.73k|      }
   35|       |
   36|  2.73k|      i += 1;
   37|  2.73k|   }
   38|     83|}

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

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

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

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

_ZN5Botan3rhoILm6ELm11ELm25ETkNSt3__117unsigned_integralEjEET2_S2_:
   53|   205k|BOTAN_FORCE_INLINE constexpr T rho(T x) {
   54|   205k|   return rotr<R1>(x) ^ rotr<R2>(x) ^ rotr<R3>(x);
   55|   205k|}
_ZN5Botan4rotrILm6ETkNSt3__117unsigned_integralEjEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   37|   205k|{
   38|   205k|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   39|   205k|}
_ZN5Botan4rotrILm11ETkNSt3__117unsigned_integralEjEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   37|   205k|{
   38|   205k|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   39|   205k|}
_ZN5Botan4rotrILm25ETkNSt3__117unsigned_integralEjEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   37|   205k|{
   38|   205k|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   39|   205k|}
_ZN5Botan3rhoILm2ELm13ELm22ETkNSt3__117unsigned_integralEjEET2_S2_:
   53|   205k|BOTAN_FORCE_INLINE constexpr T rho(T x) {
   54|   205k|   return rotr<R1>(x) ^ rotr<R2>(x) ^ rotr<R3>(x);
   55|   205k|}
_ZN5Botan4rotrILm2ETkNSt3__117unsigned_integralEjEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   37|   205k|{
   38|   205k|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   39|   205k|}
_ZN5Botan4rotrILm13ETkNSt3__117unsigned_integralEjEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   37|   205k|{
   38|   205k|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   39|   205k|}
_ZN5Botan4rotrILm22ETkNSt3__117unsigned_integralEjEET0_S2_QaagtT_Li0EltT_mlLi8EstS2_:
   37|   205k|{
   38|   205k|   return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
   39|   205k|}

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

_ZN5Botan9SHA2_32_FEjjjRjjjjS0_j:
   42|   205k|   uint32_t A, uint32_t B, uint32_t C, uint32_t& D, uint32_t E, uint32_t F, uint32_t G, uint32_t& H, uint32_t M) {
   43|   205k|   H += rho<6, 11, 25>(E) + choose(E, F, G) + M;
   44|   205k|   D += H;
   45|   205k|   H += rho<2, 13, 22>(A) + majority(A, B, C);
   46|   205k|}

_ZN5Botan9SIMD_4x32C2EDv2_x:
  944|  63.6k|      explicit BOTAN_FN_ISA_SIMD_4X32 SIMD_4x32(native_simd_type x) noexcept : m_simd(x) {}
_ZN5Botan9SIMD_4x327load_beEPKv:
  189|  1.11k|      static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 load_be(const void* in) noexcept {
  190|  1.11k|#if defined(BOTAN_SIMD_USE_SSSE3) || defined(BOTAN_SIMD_USE_LSX) || defined(BOTAN_SIMD_USE_SIMD128)
  191|  1.11k|         return load_le(in).bswap();
  192|       |
  193|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  194|       |         uint32_t R0 = Botan::load_be<uint32_t>(reinterpret_cast<const uint8_t*>(in), 0);
  195|       |         uint32_t R1 = Botan::load_be<uint32_t>(reinterpret_cast<const uint8_t*>(in), 1);
  196|       |         uint32_t R2 = Botan::load_be<uint32_t>(reinterpret_cast<const uint8_t*>(in), 2);
  197|       |         uint32_t R3 = Botan::load_be<uint32_t>(reinterpret_cast<const uint8_t*>(in), 3);
  198|       |         __vector unsigned int val = {R0, R1, R2, R3};
  199|       |         return SIMD_4x32(val);
  200|       |
  201|       |#elif defined(BOTAN_SIMD_USE_NEON)
  202|       |         SIMD_4x32 l(vld1q_u32(static_cast<const uint32_t*>(in)));
  203|       |         if constexpr(std::endian::native == std::endian::little) {
  204|       |            return l.bswap();
  205|       |         } else {
  206|       |            return l;
  207|       |         }
  208|       |#endif
  209|  1.11k|      }
_ZN5Botan9SIMD_4x327load_leEPKv:
  162|  5.58k|      static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 load_le(const void* in) noexcept {
  163|  5.58k|#if defined(BOTAN_SIMD_USE_SSSE3)
  164|  5.58k|         return SIMD_4x32(_mm_loadu_si128(reinterpret_cast<const __m128i*>(in)));
  165|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  166|       |         uint32_t R0 = Botan::load_le<uint32_t>(reinterpret_cast<const uint8_t*>(in), 0);
  167|       |         uint32_t R1 = Botan::load_le<uint32_t>(reinterpret_cast<const uint8_t*>(in), 1);
  168|       |         uint32_t R2 = Botan::load_le<uint32_t>(reinterpret_cast<const uint8_t*>(in), 2);
  169|       |         uint32_t R3 = Botan::load_le<uint32_t>(reinterpret_cast<const uint8_t*>(in), 3);
  170|       |         __vector unsigned int val = {R0, R1, R2, R3};
  171|       |         return SIMD_4x32(val);
  172|       |#elif defined(BOTAN_SIMD_USE_NEON)
  173|       |         SIMD_4x32 l(vld1q_u32(static_cast<const uint32_t*>(in)));
  174|       |         if constexpr(std::endian::native == std::endian::big) {
  175|       |            return l.bswap();
  176|       |         } else {
  177|       |            return l;
  178|       |         }
  179|       |#elif defined(BOTAN_SIMD_USE_LSX)
  180|       |         return SIMD_4x32(__lsx_vld(in, 0));
  181|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  182|       |         return SIMD_4x32(wasm_v128_load(in));
  183|       |#endif
  184|  5.58k|      }
_ZNK5Botan9SIMD_4x325bswapEv:
  576|  1.11k|      BOTAN_FN_ISA_SIMD_4X32 SIMD_4x32 bswap() const noexcept {
  577|  1.11k|#if defined(BOTAN_SIMD_USE_SSSE3)
  578|  1.11k|         const auto idx = _mm_set_epi8(12, 13, 14, 15, 8, 9, 10, 11, 4, 5, 6, 7, 0, 1, 2, 3);
  579|       |
  580|  1.11k|         return SIMD_4x32(_mm_shuffle_epi8(raw(), idx));
  581|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  582|       |   #ifdef BOTAN_SIMD_USE_VSX
  583|       |         return SIMD_4x32(vec_revb(m_simd));
  584|       |   #else
  585|       |         const __vector unsigned char rev[1] = {
  586|       |            {3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12},
  587|       |         };
  588|       |
  589|       |         return SIMD_4x32(vec_perm(m_simd, m_simd, rev[0]));
  590|       |   #endif
  591|       |
  592|       |#elif defined(BOTAN_SIMD_USE_NEON)
  593|       |         return SIMD_4x32(vreinterpretq_u32_u8(vrev32q_u8(vreinterpretq_u8_u32(m_simd))));
  594|       |#elif defined(BOTAN_SIMD_USE_LSX)
  595|       |         return SIMD_4x32(__lsx_vshuf4i_b(m_simd, 0b00011011));
  596|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  597|       |         return SIMD_4x32(wasm_i8x16_shuffle(m_simd, m_simd, 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12));
  598|       |#endif
  599|  1.11k|      }
_ZNK5Botan9SIMD_4x323rawEv:
  942|  52.4k|      native_simd_type BOTAN_FN_ISA_SIMD_4X32 raw() const noexcept { return m_simd; }
_ZNK5Botan9SIMD_4x32plERKS0_:
  385|  4.46k|      SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 operator+(const SIMD_4x32& other) const noexcept {
  386|  4.46k|         SIMD_4x32 retval(*this);
  387|  4.46k|         retval += other;
  388|  4.46k|         return retval;
  389|  4.46k|      }
_ZN5Botan9SIMD_4x32pLERKS0_:
  427|  17.8k|      void BOTAN_FN_ISA_SIMD_4X32 operator+=(const SIMD_4x32& other) noexcept {
  428|  17.8k|#if defined(BOTAN_SIMD_USE_SSSE3)
  429|  17.8k|         m_simd = _mm_add_epi32(m_simd, other.m_simd);
  430|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  431|       |         m_simd = vec_add(m_simd, other.m_simd);
  432|       |#elif defined(BOTAN_SIMD_USE_NEON)
  433|       |         m_simd = vaddq_u32(m_simd, other.m_simd);
  434|       |#elif defined(BOTAN_SIMD_USE_LSX)
  435|       |         m_simd = __lsx_vadd_w(m_simd, other.m_simd);
  436|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  437|       |         m_simd = wasm_i32x4_add(m_simd, other.m_simd);
  438|       |#endif
  439|  17.8k|      }
_ZNK5Botan9SIMD_4x328store_leEPj:
  219|  4.46k|      void BOTAN_FN_ISA_SIMD_4X32 store_le(uint32_t out[4]) const noexcept {
  220|  4.46k|         this->store_le(reinterpret_cast<uint8_t*>(out));
  221|  4.46k|      }
_ZNK5Botan9SIMD_4x328store_leEPh:
  234|  4.46k|      void BOTAN_FN_ISA_SIMD_4X32 store_le(uint8_t out[]) const noexcept {
  235|  4.46k|#if defined(BOTAN_SIMD_USE_SSSE3)
  236|       |
  237|  4.46k|         _mm_storeu_si128(reinterpret_cast<__m128i*>(out), raw());
  238|       |
  239|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  240|       |
  241|       |         union {
  242|       |               __vector unsigned int V;
  243|       |               uint32_t R[4];
  244|       |         } vec{};
  245|       |
  246|       |         // NOLINTNEXTLINE(*-union-access)
  247|       |         vec.V = raw();
  248|       |         // NOLINTNEXTLINE(*-union-access)
  249|       |         Botan::store_le(out, vec.R[0], vec.R[1], vec.R[2], vec.R[3]);
  250|       |
  251|       |#elif defined(BOTAN_SIMD_USE_NEON)
  252|       |         if constexpr(std::endian::native == std::endian::little) {
  253|       |            vst1q_u8(out, vreinterpretq_u8_u32(m_simd));
  254|       |         } else {
  255|       |            vst1q_u8(out, vreinterpretq_u8_u32(bswap().m_simd));
  256|       |         }
  257|       |#elif defined(BOTAN_SIMD_USE_LSX)
  258|       |         __lsx_vst(raw(), out, 0);
  259|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  260|       |         wasm_v128_store(out, m_simd);
  261|       |#endif
  262|  4.46k|      }
_ZN5Botan9SIMD_4x32eOERKS0_:
  455|  26.7k|      void BOTAN_FN_ISA_SIMD_4X32 operator^=(const SIMD_4x32& other) noexcept {
  456|  26.7k|#if defined(BOTAN_SIMD_USE_SSSE3)
  457|  26.7k|         m_simd = _mm_xor_si128(m_simd, other.m_simd);
  458|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  459|       |         m_simd = vec_xor(m_simd, other.m_simd);
  460|       |#elif defined(BOTAN_SIMD_USE_NEON)
  461|       |         m_simd = veorq_u32(m_simd, other.m_simd);
  462|       |#elif defined(BOTAN_SIMD_USE_LSX)
  463|       |         m_simd = __lsx_vxor_v(m_simd, other.m_simd);
  464|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  465|       |         m_simd = wasm_v128_xor(m_simd, other.m_simd);
  466|       |#endif
  467|  26.7k|      }
_ZN5Botan9SIMD_4x32C2Ev:
   86|  1.11k|      BOTAN_FN_ISA_SIMD_4X32 SIMD_4x32() noexcept {
   87|  1.11k|#if defined(BOTAN_SIMD_USE_SSSE3)
   88|  1.11k|         m_simd = _mm_setzero_si128();
   89|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
   90|       |         m_simd = vec_splat_u32(0);
   91|       |#elif defined(BOTAN_SIMD_USE_NEON)
   92|       |         m_simd = vdupq_n_u32(0);
   93|       |#elif defined(BOTAN_SIMD_USE_LSX)
   94|       |         m_simd = __lsx_vldi(0);
   95|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
   96|       |         m_simd = wasm_u32x4_const_splat(0);
   97|       |#endif
   98|  1.11k|      }
_ZN5Botan9SIMD_4x32C2Ejjjj:
  103|  6.69k|      BOTAN_FN_ISA_SIMD_4X32 SIMD_4x32(uint32_t B0, uint32_t B1, uint32_t B2, uint32_t B3) noexcept {
  104|  6.69k|#if defined(BOTAN_SIMD_USE_SSSE3)
  105|  6.69k|         m_simd = _mm_set_epi32(B3, B2, B1, B0);
  106|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  107|       |         __vector unsigned int val = {B0, B1, B2, B3};
  108|       |         m_simd = val;
  109|       |#elif defined(BOTAN_SIMD_USE_NEON)
  110|       |         // Better way to do this?
  111|       |         const uint32_t B[4] = {B0, B1, B2, B3};
  112|       |         m_simd = vld1q_u32(B);
  113|       |#elif defined(BOTAN_SIMD_USE_LSX)
  114|       |         // Better way to do this?
  115|       |         const uint32_t B[4] = {B0, B1, B2, B3};
  116|       |         m_simd = __lsx_vld(B, 0);
  117|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  118|       |         m_simd = wasm_u32x4_make(B0, B1, B2, B3);
  119|       |#endif
  120|  6.69k|      }
_ZNK5Botan9SIMD_4x32eoERKS0_:
  403|  16.7k|      SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 operator^(const SIMD_4x32& other) const noexcept {
  404|  16.7k|         SIMD_4x32 retval(*this);
  405|  16.7k|         retval ^= other;
  406|  16.7k|         return retval;
  407|  16.7k|      }
_ZN5Botan9SIMD_4x3212byte_shuffleERKS0_S2_:
  803|  6.69k|      static inline SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 byte_shuffle(const SIMD_4x32& tbl, const SIMD_4x32& idx) {
  804|  6.69k|#if defined(BOTAN_SIMD_USE_SSSE3)
  805|  6.69k|         return SIMD_4x32(_mm_shuffle_epi8(tbl.raw(), idx.raw()));
  806|       |#elif defined(BOTAN_SIMD_USE_NEON)
  807|       |         const uint8x16_t tbl8 = vreinterpretq_u8_u32(tbl.raw());
  808|       |         const uint8x16_t idx8 = vreinterpretq_u8_u32(idx.raw());
  809|       |
  810|       |   #if defined(BOTAN_TARGET_ARCH_IS_ARM32)
  811|       |         const uint8x8x2_t tbl2 = {vget_low_u8(tbl8), vget_high_u8(tbl8)};
  812|       |
  813|       |         return SIMD_4x32(
  814|       |            vreinterpretq_u32_u8(vcombine_u8(vtbl2_u8(tbl2, vget_low_u8(idx8)), vtbl2_u8(tbl2, vget_high_u8(idx8)))));
  815|       |   #else
  816|       |         return SIMD_4x32(vreinterpretq_u32_u8(vqtbl1q_u8(tbl8, idx8)));
  817|       |   #endif
  818|       |
  819|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  820|       |         const auto r = vec_perm(reinterpret_cast<__vector signed char>(tbl.raw()),
  821|       |                                 reinterpret_cast<__vector signed char>(tbl.raw()),
  822|       |                                 reinterpret_cast<__vector unsigned char>(idx.raw()));
  823|       |         return SIMD_4x32(reinterpret_cast<__vector unsigned int>(r));
  824|       |#elif defined(BOTAN_SIMD_USE_LSX)
  825|       |         return SIMD_4x32(__lsx_vshuf_b(tbl.raw(), tbl.raw(), idx.raw()));
  826|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  827|       |         return SIMD_4x32(wasm_i8x16_swizzle(tbl.raw(), idx.raw()));
  828|       |#endif
  829|  6.69k|      }
_ZNK5Botan9SIMD_4x323shlILi14EEES0_vQaagtT_Li0EltT_Li32E:
  502|  3.34k|      {
  503|  3.34k|#if defined(BOTAN_SIMD_USE_SSSE3)
  504|  3.34k|         return SIMD_4x32(_mm_slli_epi32(m_simd, SHIFT));
  505|       |
  506|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  507|       |         const unsigned int s = static_cast<unsigned int>(SHIFT);
  508|       |         const __vector unsigned int shifts = {s, s, s, s};
  509|       |         return SIMD_4x32(vec_sl(m_simd, shifts));
  510|       |#elif defined(BOTAN_SIMD_USE_NEON)
  511|       |         return SIMD_4x32(vshlq_n_u32(m_simd, SHIFT));
  512|       |#elif defined(BOTAN_SIMD_USE_LSX)
  513|       |         return SIMD_4x32(__lsx_vslli_w(m_simd, SHIFT));
  514|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  515|       |         return SIMD_4x32(wasm_i32x4_shl(m_simd, SHIFT));
  516|       |#endif
  517|  3.34k|      }
_ZNK5Botan9SIMD_4x323shrILi7EEES0_v:
  520|  3.34k|      SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 shr() const noexcept {
  521|  3.34k|#if defined(BOTAN_SIMD_USE_SSSE3)
  522|  3.34k|         return SIMD_4x32(_mm_srli_epi32(m_simd, SHIFT));
  523|       |
  524|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  525|       |         const unsigned int s = static_cast<unsigned int>(SHIFT);
  526|       |         const __vector unsigned int shifts = {s, s, s, s};
  527|       |         return SIMD_4x32(vec_sr(m_simd, shifts));
  528|       |#elif defined(BOTAN_SIMD_USE_NEON)
  529|       |         return SIMD_4x32(vshrq_n_u32(m_simd, SHIFT));
  530|       |#elif defined(BOTAN_SIMD_USE_LSX)
  531|       |         return SIMD_4x32(__lsx_vsrli_w(m_simd, SHIFT));
  532|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  533|       |         return SIMD_4x32(wasm_u32x4_shr(m_simd, SHIFT));
  534|       |#endif
  535|  3.34k|      }
_ZNK5Botan9SIMD_4x323shrILi3EEES0_v:
  520|  3.34k|      SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 shr() const noexcept {
  521|  3.34k|#if defined(BOTAN_SIMD_USE_SSSE3)
  522|  3.34k|         return SIMD_4x32(_mm_srli_epi32(m_simd, SHIFT));
  523|       |
  524|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  525|       |         const unsigned int s = static_cast<unsigned int>(SHIFT);
  526|       |         const __vector unsigned int shifts = {s, s, s, s};
  527|       |         return SIMD_4x32(vec_sr(m_simd, shifts));
  528|       |#elif defined(BOTAN_SIMD_USE_NEON)
  529|       |         return SIMD_4x32(vshrq_n_u32(m_simd, SHIFT));
  530|       |#elif defined(BOTAN_SIMD_USE_LSX)
  531|       |         return SIMD_4x32(__lsx_vsrli_w(m_simd, SHIFT));
  532|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  533|       |         return SIMD_4x32(wasm_u32x4_shr(m_simd, SHIFT));
  534|       |#endif
  535|  3.34k|      }
_ZNK5Botan9SIMD_4x323shrILi11EEES0_v:
  520|  3.34k|      SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 shr() const noexcept {
  521|  3.34k|#if defined(BOTAN_SIMD_USE_SSSE3)
  522|  3.34k|         return SIMD_4x32(_mm_srli_epi32(m_simd, SHIFT));
  523|       |
  524|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  525|       |         const unsigned int s = static_cast<unsigned int>(SHIFT);
  526|       |         const __vector unsigned int shifts = {s, s, s, s};
  527|       |         return SIMD_4x32(vec_sr(m_simd, shifts));
  528|       |#elif defined(BOTAN_SIMD_USE_NEON)
  529|       |         return SIMD_4x32(vshrq_n_u32(m_simd, SHIFT));
  530|       |#elif defined(BOTAN_SIMD_USE_LSX)
  531|       |         return SIMD_4x32(__lsx_vsrli_w(m_simd, SHIFT));
  532|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  533|       |         return SIMD_4x32(wasm_u32x4_shr(m_simd, SHIFT));
  534|       |#endif
  535|  3.34k|      }
_ZNK5Botan9SIMD_4x323shlILi11EEES0_vQaagtT_Li0EltT_Li32E:
  502|  3.34k|      {
  503|  3.34k|#if defined(BOTAN_SIMD_USE_SSSE3)
  504|  3.34k|         return SIMD_4x32(_mm_slli_epi32(m_simd, SHIFT));
  505|       |
  506|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  507|       |         const unsigned int s = static_cast<unsigned int>(SHIFT);
  508|       |         const __vector unsigned int shifts = {s, s, s, s};
  509|       |         return SIMD_4x32(vec_sl(m_simd, shifts));
  510|       |#elif defined(BOTAN_SIMD_USE_NEON)
  511|       |         return SIMD_4x32(vshlq_n_u32(m_simd, SHIFT));
  512|       |#elif defined(BOTAN_SIMD_USE_LSX)
  513|       |         return SIMD_4x32(__lsx_vslli_w(m_simd, SHIFT));
  514|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  515|       |         return SIMD_4x32(wasm_i32x4_shl(m_simd, SHIFT));
  516|       |#endif
  517|  3.34k|      }
_ZNK5Botan9SIMD_4x323shrILi10EEES0_v:
  520|  6.69k|      SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 shr() const noexcept {
  521|  6.69k|#if defined(BOTAN_SIMD_USE_SSSE3)
  522|  6.69k|         return SIMD_4x32(_mm_srli_epi32(m_simd, SHIFT));
  523|       |
  524|       |#elif defined(BOTAN_SIMD_USE_ALTIVEC)
  525|       |         const unsigned int s = static_cast<unsigned int>(SHIFT);
  526|       |         const __vector unsigned int shifts = {s, s, s, s};
  527|       |         return SIMD_4x32(vec_sr(m_simd, shifts));
  528|       |#elif defined(BOTAN_SIMD_USE_NEON)
  529|       |         return SIMD_4x32(vshrq_n_u32(m_simd, SHIFT));
  530|       |#elif defined(BOTAN_SIMD_USE_LSX)
  531|       |         return SIMD_4x32(__lsx_vsrli_w(m_simd, SHIFT));
  532|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  533|       |         return SIMD_4x32(wasm_u32x4_shr(m_simd, SHIFT));
  534|       |#endif
  535|  6.69k|      }

_ZN5Botan9SIMD_8x32C2EDv4_x:
  343|   334k|      explicit SIMD_8x32(__m256i x) noexcept : m_avx2(x) {}
_ZN5Botan9SIMD_8x3210load_be128EPKhS2_:
  101|  5.86k|      static SIMD_8x32 load_be128(const uint8_t in1[], const uint8_t in2[]) noexcept {
  102|  5.86k|         return SIMD_8x32(
  103|  5.86k|                   _mm256_loadu2_m128i(reinterpret_cast<const __m128i*>(in2), reinterpret_cast<const __m128i*>(in1)))
  104|  5.86k|            .bswap();
  105|  5.86k|      }
_ZNK5Botan9SIMD_8x325bswapEv:
  238|  5.86k|      SIMD_8x32 bswap() const noexcept {
  239|  5.86k|         alignas(32) const uint8_t BSWAP_TBL[32] = {3,  2,  1,  0,  7,  6,  5,  4,  11, 10, 9,  8,  15, 14, 13, 12,
  240|  5.86k|                                                    19, 18, 17, 16, 23, 22, 21, 20, 27, 26, 25, 24, 31, 30, 29, 28};
  241|       |
  242|  5.86k|         const __m256i bswap = _mm256_load_si256(reinterpret_cast<const __m256i*>(BSWAP_TBL));
  243|       |
  244|  5.86k|         const __m256i output = _mm256_shuffle_epi8(m_avx2, bswap);
  245|       |
  246|  5.86k|         return SIMD_8x32(output);
  247|  5.86k|      }
_ZNK5Botan9SIMD_8x32plERKS0_:
  164|  23.4k|      SIMD_8x32 operator+(const SIMD_8x32& other) const noexcept {
  165|  23.4k|         SIMD_8x32 retval(*this);
  166|  23.4k|         retval += other;
  167|  23.4k|         return retval;
  168|  23.4k|      }
_ZN5Botan9SIMD_8x32pLERKS0_:
  199|  93.8k|      void operator+=(const SIMD_8x32& other) { m_avx2 = _mm256_add_epi32(m_avx2, other.m_avx2); }
_ZNK5Botan9SIMD_8x3211store_le128EPjS1_:
  108|  23.4k|      void store_le128(uint32_t out1[], uint32_t out2[]) const noexcept {
  109|  23.4k|         _mm256_storeu2_m128i(reinterpret_cast<__m128i*>(out2), reinterpret_cast<__m128i*>(out1), raw());
  110|  23.4k|      }
_ZNK5Botan9SIMD_8x323rawEv:
  340|   269k|      __m256i BOTAN_FN_ISA_AVX2 raw() const noexcept { return m_avx2; }
_ZN5Botan9SIMD_8x32eOERKS0_:
  205|   140k|      void operator^=(const SIMD_8x32& other) { m_avx2 = _mm256_xor_si256(m_avx2, other.m_avx2); }
_ZNK5Botan9SIMD_8x32eoERKS0_:
  178|  88.0k|      SIMD_8x32 operator^(const SIMD_8x32& other) const noexcept {
  179|  88.0k|         SIMD_8x32 retval(*this);
  180|  88.0k|         retval ^= other;
  181|  88.0k|         return retval;
  182|  88.0k|      }
_ZN5Botan9SIMD_8x32C2Ev:
   30|  5.86k|      BOTAN_FORCE_INLINE SIMD_8x32() noexcept : m_avx2(_mm256_setzero_si256()) {}
_ZN5Botan9SIMD_8x32C2Ejjjj:
   52|  35.2k|      explicit SIMD_8x32(uint32_t B0, uint32_t B1, uint32_t B2, uint32_t B3) noexcept {
   53|       |         // NOLINTNEXTLINE(*-prefer-member-initializer)
   54|  35.2k|         m_avx2 = _mm256_set_epi32(B3, B2, B1, B0, B3, B2, B1, B0);
   55|  35.2k|      }
_ZN5Botan9SIMD_8x3210load_le128EPKj:
   76|  23.4k|      static SIMD_8x32 load_le128(const uint32_t* in) noexcept {
   77|  23.4k|         return SIMD_8x32(_mm256_broadcastsi128_si256(_mm_loadu_si128(reinterpret_cast<const __m128i*>(in))));
   78|  23.4k|      }
_ZN5Botan9SIMD_8x3212byte_shuffleERKS0_S2_:
  330|  35.2k|      static inline SIMD_8x32 BOTAN_FN_ISA_AVX2 byte_shuffle(const SIMD_8x32& tbl, const SIMD_8x32& idx) {
  331|  35.2k|         return SIMD_8x32(_mm256_shuffle_epi8(tbl.raw(), idx.raw()));
  332|  35.2k|      }
_ZNK5Botan9SIMD_8x323shlILi14EEES0_v:
  217|  17.6k|      BOTAN_FN_ISA_AVX2 SIMD_8x32 shl() const noexcept {
  218|  17.6k|         return SIMD_8x32(_mm256_slli_epi32(m_avx2, SHIFT));
  219|  17.6k|      }
_ZNK5Botan9SIMD_8x323shrILi7EEES0_v:
  222|  17.6k|      BOTAN_FN_ISA_AVX2 SIMD_8x32 shr() const noexcept {
  223|  17.6k|         return SIMD_8x32(_mm256_srli_epi32(m_avx2, SHIFT));
  224|  17.6k|      }
_ZNK5Botan9SIMD_8x323shrILi3EEES0_v:
  222|  17.6k|      BOTAN_FN_ISA_AVX2 SIMD_8x32 shr() const noexcept {
  223|  17.6k|         return SIMD_8x32(_mm256_srli_epi32(m_avx2, SHIFT));
  224|  17.6k|      }
_ZNK5Botan9SIMD_8x323shrILi11EEES0_v:
  222|  17.6k|      BOTAN_FN_ISA_AVX2 SIMD_8x32 shr() const noexcept {
  223|  17.6k|         return SIMD_8x32(_mm256_srli_epi32(m_avx2, SHIFT));
  224|  17.6k|      }
_ZNK5Botan9SIMD_8x323shlILi11EEES0_v:
  217|  17.6k|      BOTAN_FN_ISA_AVX2 SIMD_8x32 shl() const noexcept {
  218|  17.6k|         return SIMD_8x32(_mm256_slli_epi32(m_avx2, SHIFT));
  219|  17.6k|      }
_ZNK5Botan9SIMD_8x323shrILi10EEES0_v:
  222|  35.2k|      BOTAN_FN_ISA_AVX2 SIMD_8x32 shr() const noexcept {
  223|  35.2k|         return SIMD_8x32(_mm256_srli_epi32(m_avx2, SHIFT));
  224|  35.2k|      }

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

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

_ZNK5Botan10BER_Object6is_setEv:
  138|  9.41k|      bool is_set() const { return m_type_tag != ASN1_Type::NoObject; }
_ZNK5Botan10BER_Object7taggingEv:
  140|  4.33k|      uint32_t tagging() const { return type_tag() | class_tag(); }
_ZNK5Botan10BER_Object8type_tagEv:
  142|  4.33k|      ASN1_Type type_tag() const { return m_type_tag; }
_ZNK5Botan10BER_Object9class_tagEv:
  144|  4.33k|      ASN1_Class class_tag() const { return m_class_tag; }
_ZNK5Botan10BER_Object4typeEv:
  146|  1.18k|      ASN1_Type type() const { return m_type_tag; }
_ZNK5Botan10BER_Object9get_classEv:
  148|    680|      ASN1_Class get_class() const { return m_class_tag; }
_ZNK5Botan10BER_Object4bitsEv:
  150|  34.4k|      const uint8_t* bits() const { return m_value.data(); }
_ZNK5Botan10BER_Object6lengthEv:
  152|  74.3k|      size_t length() const { return m_value.size(); }
_ZNK5Botan10BER_Object4dataEv:
  154|    945|      std::span<const uint8_t> data() const { return std::span{m_value}; }
_ZN5Botan10BER_Object12mutable_bitsEm:
  171|  3.56k|      uint8_t* mutable_bits(size_t length) {
  172|  3.56k|         m_value.resize(length);
  173|  3.56k|         return m_value.data();
  174|  3.56k|      }
_ZN5BotanorENS_10ASN1_ClassES0_:
   78|  2.24k|inline ASN1_Class operator|(ASN1_Class x, ASN1_Class y) {
   79|  2.24k|   return static_cast<ASN1_Class>(static_cast<uint32_t>(x) | static_cast<uint32_t>(y));
   80|  2.24k|}
_ZN5BotanorENS_9ASN1_TypeENS_10ASN1_ClassE:
   82|  4.33k|inline uint32_t operator|(ASN1_Type x, ASN1_Class y) {
   83|  4.33k|   return static_cast<uint32_t>(x) | static_cast<uint32_t>(y);
   84|  4.33k|}
_ZN5BotanorENS_10ASN1_ClassENS_9ASN1_TypeE:
   86|    726|inline uint32_t operator|(ASN1_Class x, ASN1_Type y) {
   87|    726|   return static_cast<uint32_t>(x) | static_cast<uint32_t>(y);
   88|    726|}
_ZN5Botan11ASN1_ObjectD2Ev:
  122|  4.10k|      virtual ~ASN1_Object() = default;
_ZN5Botan11ASN1_ObjectC2Ev:
  117|  2.76k|      ASN1_Object() = default;
_ZN5Botan11ASN1_ObjectC2EOS0_:
  120|  1.34k|      ASN1_Object(ASN1_Object&&) = default;
_ZN5Botan3OIDC2Ev:
  220|    805|      explicit OID() = default;
_ZN5Botan10BER_ObjectC2Ev:
  130|  7.95k|      BER_Object() = default;
_ZN5Botan10BER_ObjectC2EOS0_:
  133|  2.08k|      BER_Object(BER_Object&& other) = default;

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

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

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

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

_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeERKNSt3__14spanIhLm4EEEjQaaaasr3stdE23is_trivially_copyable_vIT0_Entsr3std6rangesE5rangeIS7_Esr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISF_EESG_E4type10value_typeEEEEvOSC_RKS7_:
  199|  1.06k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromT& in) {
  200|  1.06k|   typecast_copy(out, std::span<const FromT, 1>(&in, 1));
  201|  1.06k|}
_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.06k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|  1.06k|   ranges::assert_equal_byte_lengths(out, in);
  178|  1.06k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|  1.06k|}
_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|  24.6k|inline constexpr ToT typecast_copy(const FromR& src) {
  211|  24.6k|   ToT dst;  // NOLINT(*-member-init)
  212|  24.6k|   typecast_copy(dst, src);
  213|  24.6k|   return dst;
  214|  24.6k|}
_ZN5Botan13typecast_copyItTkNS_6ranges16contiguous_rangeENSt3__14spanIKhLm2EEEQaaaasr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISD_EESE_E4type10value_typeEEsr3stdE23is_trivially_copyable_vIT_Entsr3std6rangesE5rangeISK_EEEvRSK_RKSA_:
  188|  24.6k|inline constexpr void typecast_copy(ToT& out, const FromR& in) {
  189|  24.6k|   typecast_copy(std::span<ToT, 1>(&out, 1), in);
  190|  24.6k|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeENSt3__14spanItLm1EEETkNS1_16contiguous_rangeENS3_IKhLm2EEEQaasr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISE_EESF_E4type10value_typeEEsr3stdE23is_trivially_copyable_vINS7_IXsr21__is_primary_templateINS8_Iu14__remove_cvrefIDTclL_ZNSA_5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENSG_ISO_EESP_E4type10value_typeEEEEvOSL_RKSB_:
  176|  24.6k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|  24.6k|   ranges::assert_equal_byte_lengths(out, in);
  178|  24.6k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|  24.6k|}
_ZN5Botan11clear_bytesEPvm:
  101|      6|inline constexpr void clear_bytes(void* ptr, size_t bytes) {
  102|      6|   if(bytes > 0) {
  ------------------
  |  Branch (102:7): [True: 6, False: 0]
  ------------------
  103|      6|      std::memset(ptr, 0, bytes);
  104|      6|   }
  105|      6|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeERKNSt3__14spanIhLm8EEEmQaaaasr3stdE23is_trivially_copyable_vIT0_Entsr3std6rangesE5rangeIS7_Esr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISF_EESG_E4type10value_typeEEEEvOSC_RKS7_:
  199|    133|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromT& in) {
  200|    133|   typecast_copy(out, std::span<const FromT, 1>(&in, 1));
  201|    133|}
_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|    133|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|    133|   ranges::assert_equal_byte_lengths(out, in);
  178|    133|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|    133|}
_ZN5Botan8copy_memIhQsr3stdE12is_trivial_vIu7__decayIT_EEEEvPS1_PKS1_m:
  144|  39.2k|inline constexpr void copy_mem(T* out, const T* in, size_t n) {
  145|  39.2k|   BOTAN_ASSERT_IMPLICATION(n > 0, in != nullptr && out != nullptr, "If n > 0 then args are not null");
  ------------------
  |  |  103|  39.2k|   do {                                                                                          \
  |  |  104|  39.2k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                              \
  |  |  105|  75.2k|      if((expr1) && !(expr2)) {                                                                  \
  |  |  ------------------
  |  |  |  Branch (105:10): [True: 37.6k, False: 1.64k]
  |  |  |  Branch (105:23): [True: 37.6k, False: 0]
  |  |  |  Branch (105:23): [True: 37.6k, False: 0]
  |  |  ------------------
  |  |  106|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                                     \
  |  |  107|      0|         Botan::assertion_failure(#expr1 " implies " #expr2, msg, __func__, __FILE__, __LINE__); \
  |  |  108|      0|      }                                                                                          \
  |  |  109|  39.2k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (109:12): [Folded, False: 39.2k]
  |  |  ------------------
  ------------------
  146|       |
  147|  39.2k|   if(in != nullptr && out != nullptr && n > 0) {
  ------------------
  |  Branch (147:7): [True: 39.0k, False: 248]
  |  Branch (147:24): [True: 38.2k, False: 746]
  |  Branch (147:42): [True: 37.6k, False: 649]
  ------------------
  148|  37.6k|      std::memmove(out, in, sizeof(T) * n);
  149|  37.6k|   }
  150|  39.2k|}
_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|    247|inline constexpr ToT typecast_copy(const FromR& src) {
  211|    247|   ToT dst;  // NOLINT(*-member-init)
  212|    247|   typecast_copy(dst, src);
  213|    247|   return dst;
  214|    247|}
_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|    247|inline constexpr void typecast_copy(ToT& out, const FromR& in) {
  189|    247|   typecast_copy(std::span<ToT, 1>(&out, 1), in);
  190|    247|}
_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|    247|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|    247|   ranges::assert_equal_byte_lengths(out, in);
  178|    247|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|    247|}
_ZN5Botan19secure_scrub_memoryITkNS_6ranges23contiguous_output_rangeERNSt3__16vectorIhNS2_9allocatorIhEEEEEEvOT_:
   59|  10.0k|void secure_scrub_memory(ranges::contiguous_output_range auto&& data) {
   60|  10.0k|   secure_scrub_memory(std::ranges::data(data), ranges::size_bytes(data));
   61|  10.0k|}
_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:
   48|  1.15k|      X509_DN() = default;

_ZN5Botan6ranges24assert_exact_byte_lengthILm4ETkNS0_14spanable_rangeENSt3__14spanIhLm4EEEEEvRKT0_:
   77|  2.12k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  2.12k|   const std::span s{r};
   79|  2.12k|   if constexpr(statically_spanable_range<R>) {
   80|  2.12k|      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.12k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm4EEETpTkNS0_14spanable_rangeEJNS3_IKjLm1EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  1.06k|{
  101|  1.06k|   const std::span s0{r0};
  102|       |
  103|  1.06k|   if constexpr(statically_spanable_range<R0>) {
  104|  1.06k|      constexpr size_t expected_size = s0.size_bytes();
  105|  1.06k|      (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.06k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm4ETkNS0_14spanable_rangeENSt3__14spanIKjLm1EEEEEvRKT0_:
   77|  1.06k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  1.06k|   const std::span s{r};
   79|  1.06k|   if constexpr(statically_spanable_range<R>) {
   80|  1.06k|      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.06k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm4EEEEEmRKT_:
   59|  1.06k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  1.06k|   return std::span{r}.size_bytes();
   61|  1.06k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm1ETkNS0_14spanable_rangeENSt3__14spanIKhLm1EEEEEvRKT0_:
   77|   784k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|   784k|   const std::span s{r};
   79|   784k|   if constexpr(statically_spanable_range<R>) {
   80|   784k|      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|   784k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm2ETkNS0_14spanable_rangeENSt3__14spanIKhLm2EEEEEvRKT0_:
   77|  49.2k|inline constexpr void assert_exact_byte_length(const R& r) {
   78|  49.2k|   const std::span s{r};
   79|  49.2k|   if constexpr(statically_spanable_range<R>) {
   80|  49.2k|      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|  49.2k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanItLm1EEETpTkNS0_14spanable_rangeEJNS3_IKhLm2EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|  24.6k|{
  101|  24.6k|   const std::span s0{r0};
  102|       |
  103|  24.6k|   if constexpr(statically_spanable_range<R0>) {
  104|  24.6k|      constexpr size_t expected_size = s0.size_bytes();
  105|  24.6k|      (assert_exact_byte_length<expected_size>(rs), ...);
  106|       |   } else {
  107|       |      const size_t expected_size = s0.size_bytes();
  108|       |      const bool correct_size =
  109|       |         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|       |      if(!correct_size) {
  112|       |         memory_region_size_violation();
  113|       |      }
  114|       |   }
  115|  24.6k|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanItLm1EEEEEmRKT_:
   59|  24.6k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  24.6k|   return std::span{r}.size_bytes();
   61|  24.6k|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm8ETkNS0_14spanable_rangeENSt3__14spanIhLm8EEEEEvRKT0_:
   77|    133|inline constexpr void assert_exact_byte_length(const R& r) {
   78|    133|   const std::span s{r};
   79|    133|   if constexpr(statically_spanable_range<R>) {
   80|    133|      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|    133|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm8EEETpTkNS0_14spanable_rangeEJNS3_IKmLm1EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|    133|{
  101|    133|   const std::span s0{r0};
  102|       |
  103|    133|   if constexpr(statically_spanable_range<R0>) {
  104|    133|      constexpr size_t expected_size = s0.size_bytes();
  105|    133|      (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|    133|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm8ETkNS0_14spanable_rangeENSt3__14spanIKmLm1EEEEEvRKT0_:
   77|    133|inline constexpr void assert_exact_byte_length(const R& r) {
   78|    133|   const std::span s{r};
   79|    133|   if constexpr(statically_spanable_range<R>) {
   80|    133|      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|    133|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm8EEEEEmRKT_:
   59|    133|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|    133|   return std::span{r}.size_bytes();
   61|    133|}
_ZN5Botan6ranges24assert_exact_byte_lengthILm4ETkNS0_14spanable_rangeENSt3__14spanIKhLm4EEEEEvRKT0_:
   77|    494|inline constexpr void assert_exact_byte_length(const R& r) {
   78|    494|   const std::span s{r};
   79|    494|   if constexpr(statically_spanable_range<R>) {
   80|    494|      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|    494|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIjLm1EEETpTkNS0_14spanable_rangeEJNS3_IKhLm4EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|    247|{
  101|    247|   const std::span s0{r0};
  102|       |
  103|    247|   if constexpr(statically_spanable_range<R0>) {
  104|    247|      constexpr size_t expected_size = s0.size_bytes();
  105|    247|      (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|    247|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIjLm1EEEEEmRKT_:
   59|    247|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|    247|   return std::span{r}.size_bytes();
   61|    247|}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__16vectorIhNS2_9allocatorIhEEEEEEmRKT_:
   59|  10.0k|inline constexpr size_t size_bytes(const spanable_range auto& r) {
   60|  10.0k|   return std::span{r}.size_bytes();
   61|  10.0k|}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm18446744073709551615EEETpTkNS0_14spanable_rangeEJNS3_IKjLm18446744073709551615EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E:
  100|    133|{
  101|    133|   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|    133|   } else {
  107|    133|      const size_t expected_size = s0.size_bytes();
  108|    133|      const bool correct_size =
  109|    133|         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
  110|       |
  111|    133|      if(!correct_size) {
  ------------------
  |  Branch (111:10): [True: 0, False: 133]
  ------------------
  112|      0|         memory_region_size_violation();
  113|      0|      }
  114|    133|   }
  115|    133|}

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

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

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

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

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

_ZNK5Botan3TLS23Renegotiation_Extension18renegotiation_infoEv:
   41|      8|      const std::vector<uint8_t>& renegotiation_info() const { return m_reneg_data; }
_ZNK5Botan3TLS24Session_Ticket_Extension4typeEv:
   58|     45|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS24Session_Ticket_Extension11static_typeEv:
   56|     45|      static Extension_Code static_type() { return Extension_Code::SessionTicket; }
_ZN5Botan3TLS23Renegotiation_ExtensionC2Ev:
   35|    185|      Renegotiation_Extension() = default;
_ZN5Botan3TLS23Supported_Point_Formats11static_typeEv:
   99|     12|      static Extension_Code static_type() { return Extension_Code::EcPointFormats; }
_ZN5Botan3TLS23Renegotiation_Extension11static_typeEv:
   31|    394|      static Extension_Code static_type() { return Extension_Code::SafeRenegotiation; }
_ZN5Botan3TLS22Extended_Master_Secret11static_typeEv:
  122|     34|      static Extension_Code static_type() { return Extension_Code::ExtendedMasterSecret; }
_ZN5Botan3TLS16Encrypt_then_MAC11static_typeEv:
  140|     22|      static Extension_Code static_type() { return Extension_Code::EncryptThenMac; }
_ZNK5Botan3TLS23Renegotiation_Extension4typeEv:
   33|    201|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS23Supported_Point_Formats4typeEv:
  101|     12|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS22Extended_Master_Secret4typeEv:
  124|     34|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS16Encrypt_then_MAC4typeEv:
  142|     22|      Extension_Code type() const override { return static_type(); }

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

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

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

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

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

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

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

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

_ZN5Botan11ASN1_StringC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEENS_9ASN1_TypeE:
  135|    805|ASN1_String::ASN1_String(std::string_view str, ASN1_Type t) : m_utf8_str(str), m_tag(t) {
  136|    805|   if(!is_utf8_subset_string_type(m_tag)) {
  ------------------
  |  Branch (136:7): [True: 0, False: 805]
  ------------------
  137|      0|      throw Invalid_Argument("ASN1_String only supports encoding to UTF-8 or a UTF-8 subset");
  138|      0|   }
  139|       |
  140|    805|   if(!is_valid_asn1_string_content(m_utf8_str, m_tag)) {
  ------------------
  |  Branch (140:7): [True: 0, False: 805]
  ------------------
  141|      0|      throw Invalid_Argument(fmt("ASN1_String: Invalid {} encoding", asn1_tag_to_string(m_tag)));
  142|      0|   }
  143|    805|}
_ZN5Botan11ASN1_StringC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  145|    805|ASN1_String::ASN1_String(std::string_view str) : ASN1_String(str, choose_encoding(str)) {}
_ZN5Botan11ASN1_String11decode_fromERNS_11BER_DecoderE:
  162|    655|void ASN1_String::decode_from(BER_Decoder& source) {
  163|    655|   const BER_Object obj = source.get_next_object();
  164|       |
  165|    655|   if(obj.get_class() != ASN1_Class::Universal || !is_asn1_string_type(obj.type())) {
  ------------------
  |  Branch (165:7): [True: 66, False: 589]
  |  Branch (165:51): [True: 75, False: 514]
  ------------------
  166|     83|      auto typ = static_cast<uint32_t>(obj.type());
  167|     83|      auto cls = static_cast<uint32_t>(obj.get_class());
  168|     83|      throw Decoding_Error(fmt("ASN1_String: Unknown string type {}/{}", typ, cls));
  169|     83|   }
  170|       |
  171|    572|   m_tag = obj.type();
  172|    572|   m_data.assign(obj.bits(), obj.bits() + obj.length());
  173|       |
  174|    572|   if(m_tag == ASN1_Type::BmpString) {
  ------------------
  |  Branch (174:7): [True: 70, False: 502]
  ------------------
  175|     70|      m_utf8_str = ucs2_to_utf8(m_data);
  176|    502|   } else if(m_tag == ASN1_Type::UniversalString) {
  ------------------
  |  Branch (176:14): [True: 112, False: 390]
  ------------------
  177|    112|      m_utf8_str = ucs4_to_utf8(m_data);
  178|    390|   } else if(m_tag == ASN1_Type::TeletexString) {
  ------------------
  |  Branch (178:14): [True: 69, False: 321]
  ------------------
  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|     69|      m_utf8_str = latin1_to_utf8(m_data);
  184|    321|   } else {
  185|       |      // All other supported string types are UTF-8 or some subset thereof
  186|    321|      m_utf8_str = ASN1::to_string(obj);
  187|       |
  188|    321|      if(!is_valid_asn1_string_content(m_utf8_str, m_tag)) {
  ------------------
  |  Branch (188:10): [True: 79, False: 242]
  ------------------
  189|     79|         throw Decoding_Error(fmt("ASN1_String: Invalid {} encoding", asn1_tag_to_string(m_tag)));
  190|     79|      }
  191|    321|   }
  192|    572|}
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_119is_asn1_string_typeENS_9ASN1_TypeE:
   99|    589|bool is_asn1_string_type(ASN1_Type tag) {
  100|    589|   return (is_utf8_subset_string_type(tag) || tag == ASN1_Type::TeletexString || tag == ASN1_Type::BmpString ||
  ------------------
  |  Branch (100:12): [True: 263, False: 326]
  |  Branch (100:47): [True: 69, False: 257]
  |  Branch (100:82): [True: 70, False: 187]
  ------------------
  101|    187|           tag == ASN1_Type::UniversalString);
  ------------------
  |  Branch (101:12): [True: 112, False: 75]
  ------------------
  102|    589|}
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_126is_utf8_subset_string_typeENS_9ASN1_TypeE:
   94|  2.46k|bool is_utf8_subset_string_type(ASN1_Type tag) {
   95|  2.46k|   return (tag == ASN1_Type::NumericString || tag == ASN1_Type::PrintableString || tag == ASN1_Type::VisibleString ||
  ------------------
  |  Branch (95:12): [True: 48, False: 2.41k]
  |  Branch (95:47): [True: 1.64k, False: 774]
  |  Branch (95:84): [True: 92, False: 682]
  ------------------
   96|    682|           tag == ASN1_Type::Ia5String || tag == ASN1_Type::Utf8String);
  ------------------
  |  Branch (96:12): [True: 48, False: 634]
  |  Branch (96:43): [True: 308, False: 326]
  ------------------
   97|  2.46k|}
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_128is_valid_asn1_string_contentERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_9ASN1_TypeE:
  104|  1.06k|bool is_valid_asn1_string_content(const std::string& str, ASN1_Type tag) {
  105|  1.06k|   BOTAN_ASSERT_NOMSG(is_utf8_subset_string_type(tag));
  ------------------
  |  |   77|  1.06k|   do {                                                                     \
  |  |   78|  1.06k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  1.06k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 1.06k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  1.06k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 1.06k]
  |  |  ------------------
  ------------------
  106|       |
  107|  1.06k|   switch(tag) {
  108|    154|      case ASN1_Type::Utf8String:
  ------------------
  |  Branch (108:7): [True: 154, False: 914]
  ------------------
  109|    154|         return is_valid_utf8(str);
  110|     24|      case ASN1_Type::NumericString:
  ------------------
  |  Branch (110:7): [True: 24, False: 1.04k]
  ------------------
  111|    844|      case ASN1_Type::PrintableString:
  ------------------
  |  Branch (111:7): [True: 820, False: 248]
  ------------------
  112|    868|      case ASN1_Type::Ia5String:
  ------------------
  |  Branch (112:7): [True: 24, False: 1.04k]
  ------------------
  113|    914|      case ASN1_Type::VisibleString:
  ------------------
  |  Branch (113:7): [True: 46, False: 1.02k]
  ------------------
  114|    914|         return g_char_validator.valid_encoding(str, tag);
  115|      0|      default:
  ------------------
  |  Branch (115:7): [True: 0, False: 1.06k]
  ------------------
  116|      0|         return false;
  117|  1.06k|   }
  118|  1.06k|}
asn1_str.cpp:_ZNK5Botan12_GLOBAL__N_131ASN1_String_Codepoint_Validator14valid_encodingENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEENS_9ASN1_TypeE:
   25|  1.71k|      constexpr bool valid_encoding(std::string_view str, ASN1_Type tag) const {
   26|  1.71k|         const uint8_t mask = mask_for(tag);
   27|  1.71k|         for(const char c : str) {
  ------------------
  |  Branch (27:27): [True: 143, False: 1.70k]
  ------------------
   28|    143|            const uint8_t codepoint = static_cast<uint8_t>(c);
   29|    143|            const bool is_valid = (m_table[codepoint] & mask) != 0;
   30|       |
   31|    143|            if(!is_valid) {
  ------------------
  |  Branch (31:16): [True: 15, False: 128]
  ------------------
   32|     15|               return false;
   33|     15|            }
   34|    143|         }
   35|       |
   36|  1.70k|         return true;
   37|  1.71k|      }
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_131ASN1_String_Codepoint_Validator8mask_forENS_9ASN1_TypeE:
   45|  1.71k|      static constexpr uint8_t mask_for(ASN1_Type tag) {
   46|  1.71k|         switch(tag) {
   47|     24|            case ASN1_Type::NumericString:
  ------------------
  |  Branch (47:13): [True: 24, False: 1.69k]
  ------------------
   48|     24|               return Numeric_String;
   49|  1.62k|            case ASN1_Type::PrintableString:
  ------------------
  |  Branch (49:13): [True: 1.62k, False: 94]
  ------------------
   50|  1.62k|               return Printable_String;
   51|     24|            case ASN1_Type::Ia5String:
  ------------------
  |  Branch (51:13): [True: 24, False: 1.69k]
  ------------------
   52|     24|               return IA5_String;
   53|     46|            case ASN1_Type::VisibleString:
  ------------------
  |  Branch (53:13): [True: 46, False: 1.67k]
  ------------------
   54|     46|               return Visible_String;
   55|      0|            default:
  ------------------
  |  Branch (55:13): [True: 0, False: 1.71k]
  ------------------
   56|      0|               return 0;
   57|  1.71k|         }
   58|  1.71k|      }
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_115choose_encodingENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  120|    805|ASN1_Type choose_encoding(std::string_view str) {
  121|    805|   if(g_char_validator.valid_encoding(str, ASN1_Type::PrintableString)) {
  ------------------
  |  Branch (121:7): [True: 805, False: 0]
  ------------------
  122|    805|      return ASN1_Type::PrintableString;
  123|    805|   } else {
  124|      0|      return ASN1_Type::Utf8String;
  125|      0|   }
  126|    805|}

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

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

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

_ZN5Botan7SHA_25624compress_digest_x86_avx2ERNSt3__16vectorIjNS_16secure_allocatorIjEEEENS1_4spanIKhLm18446744073709551615EEEm:
  100|    330|   digest_type& digest, std::span<const uint8_t> input, size_t blocks) {
  101|       |   // clang-format off
  102|       |
  103|    330|   alignas(64) const uint32_t K[64] = {
  104|    330|      0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5,
  105|    330|      0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174,
  106|    330|      0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC, 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA,
  107|    330|      0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967,
  108|    330|      0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85,
  109|    330|      0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070,
  110|    330|      0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3,
  111|    330|      0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2};
  112|       |
  113|       |   // clang-format on
  114|       |
  115|    330|   alignas(64) uint32_t W[16];
  116|    330|   alignas(64) uint32_t W2[64];
  117|       |
  118|    330|   uint32_t A = digest[0];
  119|    330|   uint32_t B = digest[1];
  120|    330|   uint32_t C = digest[2];
  121|    330|   uint32_t D = digest[3];
  122|    330|   uint32_t E = digest[4];
  123|    330|   uint32_t F = digest[5];
  124|    330|   uint32_t G = digest[6];
  125|    330|   uint32_t H = digest[7];
  126|       |
  127|    330|   const uint8_t* data = input.data();
  128|       |
  129|  1.79k|   while(blocks >= 2) {
  ------------------
  |  Branch (129:10): [True: 1.46k, False: 330]
  ------------------
  130|  1.46k|      SIMD_8x32 WS[4];
  131|       |
  132|  7.33k|      for(size_t i = 0; i < 4; i++) {
  ------------------
  |  Branch (132:25): [True: 5.86k, False: 1.46k]
  ------------------
  133|  5.86k|         WS[i] = SIMD_8x32::load_be128(&data[16 * i], &data[64 + 16 * i]);
  134|  5.86k|         auto WK = WS[i] + SIMD_8x32::load_le128(&K[4 * i]);
  135|  5.86k|         WK.store_le128(&W[4 * i], &W2[4 * i]);
  136|  5.86k|      }
  137|       |
  138|  1.46k|      data += 2 * 64;
  139|  1.46k|      blocks -= 2;
  140|       |
  141|  5.86k|      for(size_t r = 0; r != 48; r += 16) {
  ------------------
  |  Branch (141:25): [True: 4.40k, False: 1.46k]
  ------------------
  142|  4.40k|         auto w = next_w(WS) + SIMD_8x32::load_le128(&K[r + 16]);
  143|       |
  144|  4.40k|         SHA2_32_F(A, B, C, D, E, F, G, H, W[0]);
  145|  4.40k|         SHA2_32_F(H, A, B, C, D, E, F, G, W[1]);
  146|  4.40k|         SHA2_32_F(G, H, A, B, C, D, E, F, W[2]);
  147|  4.40k|         SHA2_32_F(F, G, H, A, B, C, D, E, W[3]);
  148|       |
  149|  4.40k|         w.store_le128(&W[0], &W2[r + 16]);
  150|       |
  151|  4.40k|         w = next_w(WS) + SIMD_8x32::load_le128(&K[r + 20]);
  152|       |
  153|  4.40k|         SHA2_32_F(E, F, G, H, A, B, C, D, W[4]);
  154|  4.40k|         SHA2_32_F(D, E, F, G, H, A, B, C, W[5]);
  155|  4.40k|         SHA2_32_F(C, D, E, F, G, H, A, B, W[6]);
  156|  4.40k|         SHA2_32_F(B, C, D, E, F, G, H, A, W[7]);
  157|       |
  158|  4.40k|         w.store_le128(&W[4], &W2[r + 20]);
  159|       |
  160|  4.40k|         w = next_w(WS) + SIMD_8x32::load_le128(&K[r + 24]);
  161|       |
  162|  4.40k|         SHA2_32_F(A, B, C, D, E, F, G, H, W[8]);
  163|  4.40k|         SHA2_32_F(H, A, B, C, D, E, F, G, W[9]);
  164|  4.40k|         SHA2_32_F(G, H, A, B, C, D, E, F, W[10]);
  165|  4.40k|         SHA2_32_F(F, G, H, A, B, C, D, E, W[11]);
  166|       |
  167|  4.40k|         w.store_le128(&W[8], &W2[r + 24]);
  168|       |
  169|  4.40k|         w = next_w(WS) + SIMD_8x32::load_le128(&K[r + 28]);
  170|       |
  171|  4.40k|         SHA2_32_F(E, F, G, H, A, B, C, D, W[12]);
  172|  4.40k|         SHA2_32_F(D, E, F, G, H, A, B, C, W[13]);
  173|  4.40k|         SHA2_32_F(C, D, E, F, G, H, A, B, W[14]);
  174|  4.40k|         SHA2_32_F(B, C, D, E, F, G, H, A, W[15]);
  175|       |
  176|  4.40k|         w.store_le128(&W[12], &W2[r + 28]);
  177|  4.40k|      }
  178|       |
  179|  1.46k|      SHA2_32_F(A, B, C, D, E, F, G, H, W[0]);
  180|  1.46k|      SHA2_32_F(H, A, B, C, D, E, F, G, W[1]);
  181|  1.46k|      SHA2_32_F(G, H, A, B, C, D, E, F, W[2]);
  182|  1.46k|      SHA2_32_F(F, G, H, A, B, C, D, E, W[3]);
  183|  1.46k|      SHA2_32_F(E, F, G, H, A, B, C, D, W[4]);
  184|  1.46k|      SHA2_32_F(D, E, F, G, H, A, B, C, W[5]);
  185|  1.46k|      SHA2_32_F(C, D, E, F, G, H, A, B, W[6]);
  186|  1.46k|      SHA2_32_F(B, C, D, E, F, G, H, A, W[7]);
  187|  1.46k|      SHA2_32_F(A, B, C, D, E, F, G, H, W[8]);
  188|  1.46k|      SHA2_32_F(H, A, B, C, D, E, F, G, W[9]);
  189|  1.46k|      SHA2_32_F(G, H, A, B, C, D, E, F, W[10]);
  190|  1.46k|      SHA2_32_F(F, G, H, A, B, C, D, E, W[11]);
  191|  1.46k|      SHA2_32_F(E, F, G, H, A, B, C, D, W[12]);
  192|  1.46k|      SHA2_32_F(D, E, F, G, H, A, B, C, W[13]);
  193|  1.46k|      SHA2_32_F(C, D, E, F, G, H, A, B, W[14]);
  194|  1.46k|      SHA2_32_F(B, C, D, E, F, G, H, A, W[15]);
  195|       |
  196|  1.46k|      A = (digest[0] += A);
  197|  1.46k|      B = (digest[1] += B);
  198|  1.46k|      C = (digest[2] += C);
  199|  1.46k|      D = (digest[3] += D);
  200|  1.46k|      E = (digest[4] += E);
  201|  1.46k|      F = (digest[5] += F);
  202|  1.46k|      G = (digest[6] += G);
  203|  1.46k|      H = (digest[7] += H);
  204|       |
  205|       |      // Now the second block, with already expanded message
  206|  1.46k|      SHA2_32_F(A, B, C, D, E, F, G, H, W2[0]);
  207|  1.46k|      SHA2_32_F(H, A, B, C, D, E, F, G, W2[1]);
  208|  1.46k|      SHA2_32_F(G, H, A, B, C, D, E, F, W2[2]);
  209|  1.46k|      SHA2_32_F(F, G, H, A, B, C, D, E, W2[3]);
  210|  1.46k|      SHA2_32_F(E, F, G, H, A, B, C, D, W2[4]);
  211|  1.46k|      SHA2_32_F(D, E, F, G, H, A, B, C, W2[5]);
  212|  1.46k|      SHA2_32_F(C, D, E, F, G, H, A, B, W2[6]);
  213|  1.46k|      SHA2_32_F(B, C, D, E, F, G, H, A, W2[7]);
  214|  1.46k|      SHA2_32_F(A, B, C, D, E, F, G, H, W2[8]);
  215|  1.46k|      SHA2_32_F(H, A, B, C, D, E, F, G, W2[9]);
  216|  1.46k|      SHA2_32_F(G, H, A, B, C, D, E, F, W2[10]);
  217|  1.46k|      SHA2_32_F(F, G, H, A, B, C, D, E, W2[11]);
  218|  1.46k|      SHA2_32_F(E, F, G, H, A, B, C, D, W2[12]);
  219|  1.46k|      SHA2_32_F(D, E, F, G, H, A, B, C, W2[13]);
  220|  1.46k|      SHA2_32_F(C, D, E, F, G, H, A, B, W2[14]);
  221|  1.46k|      SHA2_32_F(B, C, D, E, F, G, H, A, W2[15]);
  222|       |
  223|  1.46k|      SHA2_32_F(A, B, C, D, E, F, G, H, W2[16]);
  224|  1.46k|      SHA2_32_F(H, A, B, C, D, E, F, G, W2[17]);
  225|  1.46k|      SHA2_32_F(G, H, A, B, C, D, E, F, W2[18]);
  226|  1.46k|      SHA2_32_F(F, G, H, A, B, C, D, E, W2[19]);
  227|  1.46k|      SHA2_32_F(E, F, G, H, A, B, C, D, W2[20]);
  228|  1.46k|      SHA2_32_F(D, E, F, G, H, A, B, C, W2[21]);
  229|  1.46k|      SHA2_32_F(C, D, E, F, G, H, A, B, W2[22]);
  230|  1.46k|      SHA2_32_F(B, C, D, E, F, G, H, A, W2[23]);
  231|  1.46k|      SHA2_32_F(A, B, C, D, E, F, G, H, W2[24]);
  232|  1.46k|      SHA2_32_F(H, A, B, C, D, E, F, G, W2[25]);
  233|  1.46k|      SHA2_32_F(G, H, A, B, C, D, E, F, W2[26]);
  234|  1.46k|      SHA2_32_F(F, G, H, A, B, C, D, E, W2[27]);
  235|  1.46k|      SHA2_32_F(E, F, G, H, A, B, C, D, W2[28]);
  236|  1.46k|      SHA2_32_F(D, E, F, G, H, A, B, C, W2[29]);
  237|  1.46k|      SHA2_32_F(C, D, E, F, G, H, A, B, W2[30]);
  238|  1.46k|      SHA2_32_F(B, C, D, E, F, G, H, A, W2[31]);
  239|       |
  240|  1.46k|      SHA2_32_F(A, B, C, D, E, F, G, H, W2[32]);
  241|  1.46k|      SHA2_32_F(H, A, B, C, D, E, F, G, W2[33]);
  242|  1.46k|      SHA2_32_F(G, H, A, B, C, D, E, F, W2[34]);
  243|  1.46k|      SHA2_32_F(F, G, H, A, B, C, D, E, W2[35]);
  244|  1.46k|      SHA2_32_F(E, F, G, H, A, B, C, D, W2[36]);
  245|  1.46k|      SHA2_32_F(D, E, F, G, H, A, B, C, W2[37]);
  246|  1.46k|      SHA2_32_F(C, D, E, F, G, H, A, B, W2[38]);
  247|  1.46k|      SHA2_32_F(B, C, D, E, F, G, H, A, W2[39]);
  248|  1.46k|      SHA2_32_F(A, B, C, D, E, F, G, H, W2[40]);
  249|  1.46k|      SHA2_32_F(H, A, B, C, D, E, F, G, W2[41]);
  250|  1.46k|      SHA2_32_F(G, H, A, B, C, D, E, F, W2[42]);
  251|  1.46k|      SHA2_32_F(F, G, H, A, B, C, D, E, W2[43]);
  252|  1.46k|      SHA2_32_F(E, F, G, H, A, B, C, D, W2[44]);
  253|  1.46k|      SHA2_32_F(D, E, F, G, H, A, B, C, W2[45]);
  254|  1.46k|      SHA2_32_F(C, D, E, F, G, H, A, B, W2[46]);
  255|  1.46k|      SHA2_32_F(B, C, D, E, F, G, H, A, W2[47]);
  256|       |
  257|  1.46k|      SHA2_32_F(A, B, C, D, E, F, G, H, W2[48]);
  258|  1.46k|      SHA2_32_F(H, A, B, C, D, E, F, G, W2[49]);
  259|  1.46k|      SHA2_32_F(G, H, A, B, C, D, E, F, W2[50]);
  260|  1.46k|      SHA2_32_F(F, G, H, A, B, C, D, E, W2[51]);
  261|  1.46k|      SHA2_32_F(E, F, G, H, A, B, C, D, W2[52]);
  262|  1.46k|      SHA2_32_F(D, E, F, G, H, A, B, C, W2[53]);
  263|  1.46k|      SHA2_32_F(C, D, E, F, G, H, A, B, W2[54]);
  264|  1.46k|      SHA2_32_F(B, C, D, E, F, G, H, A, W2[55]);
  265|  1.46k|      SHA2_32_F(A, B, C, D, E, F, G, H, W2[56]);
  266|  1.46k|      SHA2_32_F(H, A, B, C, D, E, F, G, W2[57]);
  267|  1.46k|      SHA2_32_F(G, H, A, B, C, D, E, F, W2[58]);
  268|  1.46k|      SHA2_32_F(F, G, H, A, B, C, D, E, W2[59]);
  269|  1.46k|      SHA2_32_F(E, F, G, H, A, B, C, D, W2[60]);
  270|  1.46k|      SHA2_32_F(D, E, F, G, H, A, B, C, W2[61]);
  271|  1.46k|      SHA2_32_F(C, D, E, F, G, H, A, B, W2[62]);
  272|  1.46k|      SHA2_32_F(B, C, D, E, F, G, H, A, W2[63]);
  273|       |
  274|  1.46k|      A = (digest[0] += A);
  275|  1.46k|      B = (digest[1] += B);
  276|  1.46k|      C = (digest[2] += C);
  277|  1.46k|      D = (digest[3] += D);
  278|  1.46k|      E = (digest[4] += E);
  279|  1.46k|      F = (digest[5] += F);
  280|  1.46k|      G = (digest[6] += G);
  281|  1.46k|      H = (digest[7] += H);
  282|  1.46k|   }
  283|       |
  284|    609|   while(blocks > 0) {
  ------------------
  |  Branch (284:10): [True: 279, False: 330]
  ------------------
  285|    279|      SIMD_4x32 WS[4];
  286|       |
  287|  1.39k|      for(size_t i = 0; i < 4; i++) {
  ------------------
  |  Branch (287:25): [True: 1.11k, False: 279]
  ------------------
  288|  1.11k|         WS[i] = SIMD_4x32::load_be(&data[16 * i]);
  289|  1.11k|         auto WK = WS[i] + SIMD_4x32::load_le(&K[4 * i]);
  290|  1.11k|         WK.store_le(&W[4 * i]);
  291|  1.11k|      }
  292|       |
  293|    279|      data += 64;
  294|    279|      blocks -= 1;
  295|       |
  296|  1.11k|      for(size_t r = 0; r != 48; r += 16) {
  ------------------
  |  Branch (296:25): [True: 837, False: 279]
  ------------------
  297|    837|         auto w = next_w(WS) + SIMD_4x32::load_le(&K[r + 16]);
  298|       |
  299|    837|         SHA2_32_F(A, B, C, D, E, F, G, H, W[0]);
  300|    837|         SHA2_32_F(H, A, B, C, D, E, F, G, W[1]);
  301|    837|         SHA2_32_F(G, H, A, B, C, D, E, F, W[2]);
  302|    837|         SHA2_32_F(F, G, H, A, B, C, D, E, W[3]);
  303|       |
  304|    837|         w.store_le(&W[0]);
  305|       |
  306|    837|         w = next_w(WS) + SIMD_4x32::load_le(&K[r + 20]);
  307|       |
  308|    837|         SHA2_32_F(E, F, G, H, A, B, C, D, W[4]);
  309|    837|         SHA2_32_F(D, E, F, G, H, A, B, C, W[5]);
  310|    837|         SHA2_32_F(C, D, E, F, G, H, A, B, W[6]);
  311|    837|         SHA2_32_F(B, C, D, E, F, G, H, A, W[7]);
  312|       |
  313|    837|         w.store_le(&W[4]);
  314|       |
  315|    837|         w = next_w(WS) + SIMD_4x32::load_le(&K[r + 24]);
  316|       |
  317|    837|         SHA2_32_F(A, B, C, D, E, F, G, H, W[8]);
  318|    837|         SHA2_32_F(H, A, B, C, D, E, F, G, W[9]);
  319|    837|         SHA2_32_F(G, H, A, B, C, D, E, F, W[10]);
  320|    837|         SHA2_32_F(F, G, H, A, B, C, D, E, W[11]);
  321|       |
  322|    837|         w.store_le(&W[8]);
  323|       |
  324|    837|         w = next_w(WS) + SIMD_4x32::load_le(&K[r + 28]);
  325|       |
  326|    837|         SHA2_32_F(E, F, G, H, A, B, C, D, W[12]);
  327|    837|         SHA2_32_F(D, E, F, G, H, A, B, C, W[13]);
  328|    837|         SHA2_32_F(C, D, E, F, G, H, A, B, W[14]);
  329|    837|         SHA2_32_F(B, C, D, E, F, G, H, A, W[15]);
  330|       |
  331|    837|         w.store_le(&W[12]);
  332|    837|      }
  333|       |
  334|    279|      SHA2_32_F(A, B, C, D, E, F, G, H, W[0]);
  335|    279|      SHA2_32_F(H, A, B, C, D, E, F, G, W[1]);
  336|    279|      SHA2_32_F(G, H, A, B, C, D, E, F, W[2]);
  337|    279|      SHA2_32_F(F, G, H, A, B, C, D, E, W[3]);
  338|    279|      SHA2_32_F(E, F, G, H, A, B, C, D, W[4]);
  339|    279|      SHA2_32_F(D, E, F, G, H, A, B, C, W[5]);
  340|    279|      SHA2_32_F(C, D, E, F, G, H, A, B, W[6]);
  341|    279|      SHA2_32_F(B, C, D, E, F, G, H, A, W[7]);
  342|    279|      SHA2_32_F(A, B, C, D, E, F, G, H, W[8]);
  343|    279|      SHA2_32_F(H, A, B, C, D, E, F, G, W[9]);
  344|    279|      SHA2_32_F(G, H, A, B, C, D, E, F, W[10]);
  345|    279|      SHA2_32_F(F, G, H, A, B, C, D, E, W[11]);
  346|    279|      SHA2_32_F(E, F, G, H, A, B, C, D, W[12]);
  347|    279|      SHA2_32_F(D, E, F, G, H, A, B, C, W[13]);
  348|    279|      SHA2_32_F(C, D, E, F, G, H, A, B, W[14]);
  349|    279|      SHA2_32_F(B, C, D, E, F, G, H, A, W[15]);
  350|       |
  351|    279|      A = (digest[0] += A);
  352|    279|      B = (digest[1] += B);
  353|    279|      C = (digest[2] += C);
  354|    279|      D = (digest[3] += D);
  355|    279|      E = (digest[4] += E);
  356|    279|      F = (digest[5] += F);
  357|    279|      G = (digest[6] += G);
  358|    279|      H = (digest[7] += H);
  359|    279|   }
  360|    330|}
sha2_32_avx2.cpp:_ZN5Botan12_GLOBAL__N_16next_wINS_9SIMD_8x32EEET_PS3_:
   50|  17.6k|BOTAN_FN_ISA_AVX2_BMI2 BOTAN_FORCE_INLINE SIMD_T next_w(SIMD_T x[4]) {
   51|  17.6k|   constexpr size_t sigma0_0 = 7;
   52|  17.6k|   constexpr size_t sigma0_1 = 18;
   53|  17.6k|   constexpr size_t sigma0_2 = 3;
   54|  17.6k|   constexpr size_t sigma1_0 = 17;
   55|  17.6k|   constexpr size_t sigma1_1 = 19;
   56|  17.6k|   constexpr size_t sigma1_2 = 10;
   57|       |
   58|  17.6k|   const SIMD_T lo_mask = SIMD_T(0x03020100, 0x0b0a0908, 0x80808080, 0x80808080);
   59|  17.6k|   const SIMD_T hi_mask = SIMD_T(0x80808080, 0x80808080, 0x03020100, 0x0b0a0908);
   60|       |
   61|  17.6k|   auto t0 = alignr4(x[1], x[0]);
   62|  17.6k|   x[0] += alignr4(x[3], x[2]);
   63|       |
   64|  17.6k|   auto t1 = t0.template shl<32 - sigma0_1>();
   65|  17.6k|   auto t2 = t0.template shr<sigma0_0>();
   66|  17.6k|   auto t3 = t0.template shr<sigma0_2>();
   67|  17.6k|   t0 = t3 ^ t2;
   68|       |
   69|  17.6k|   t3 = shuffle_32<0b11111010>(x[3]);
   70|  17.6k|   t2 = t2.template shr<sigma0_1 - sigma0_0>();
   71|  17.6k|   t0 ^= t1 ^ t2;
   72|  17.6k|   t1 = t1.template shl<sigma0_1 - sigma0_0>();
   73|  17.6k|   t2 = t3.template shr<sigma1_2>();
   74|  17.6k|   t3 = shr64<sigma1_0>(t3);
   75|  17.6k|   x[0] += t0 ^ t1;
   76|       |
   77|  17.6k|   t2 ^= t3;
   78|  17.6k|   t3 = shr64<sigma1_1 - sigma1_0>(t3);
   79|  17.6k|   x[0] += SIMD_T::byte_shuffle(t2 ^ t3, lo_mask);
   80|       |
   81|  17.6k|   t3 = shuffle_32<0b01010000>(x[0]);
   82|  17.6k|   t2 = t3.template shr<sigma1_2>();
   83|  17.6k|   t3 = shr64<sigma1_0>(t3);
   84|  17.6k|   t2 ^= t3;
   85|  17.6k|   t3 = shr64<sigma1_1 - sigma1_0>(t3);
   86|  17.6k|   x[0] += SIMD_T::byte_shuffle(t2 ^ t3, hi_mask);
   87|       |
   88|  17.6k|   const auto tmp = x[0];
   89|  17.6k|   x[0] = x[1];
   90|  17.6k|   x[1] = x[2];
   91|  17.6k|   x[2] = x[3];
   92|  17.6k|   x[3] = tmp;
   93|       |
   94|  17.6k|   return x[3];
   95|  17.6k|}
sha2_32_avx2.cpp:_ZN5Botan12_GLOBAL__N_17alignr4ERKNS_9SIMD_8x32ES3_:
   35|  35.2k|BOTAN_FN_ISA_AVX2_BMI2 inline SIMD_8x32 alignr4(const SIMD_8x32& a, const SIMD_8x32& b) {
   36|       |   return SIMD_8x32(_mm256_alignr_epi8(a.raw(), b.raw(), 4));
   37|  35.2k|}
sha2_32_avx2.cpp:_ZN5Botan12_GLOBAL__N_110shuffle_32ILh250EEENS_9SIMD_8x32ERKS2_:
   45|  17.6k|BOTAN_FN_ISA_AVX2_BMI2 inline SIMD_8x32 shuffle_32(const SIMD_8x32& a) {
   46|       |   return SIMD_8x32(_mm256_shuffle_epi32(a.raw(), S));
   47|  17.6k|}
sha2_32_avx2.cpp:_ZN5Botan12_GLOBAL__N_15shr64ILm17EEENS_9SIMD_8x32ERKS2_:
   40|  35.2k|BOTAN_FN_ISA_AVX2_BMI2 inline SIMD_8x32 shr64(const SIMD_8x32& a) {
   41|  35.2k|   return SIMD_8x32(_mm256_srli_epi64(a.raw(), S));
   42|  35.2k|}
sha2_32_avx2.cpp:_ZN5Botan12_GLOBAL__N_15shr64ILm2EEENS_9SIMD_8x32ERKS2_:
   40|  35.2k|BOTAN_FN_ISA_AVX2_BMI2 inline SIMD_8x32 shr64(const SIMD_8x32& a) {
   41|  35.2k|   return SIMD_8x32(_mm256_srli_epi64(a.raw(), S));
   42|  35.2k|}
sha2_32_avx2.cpp:_ZN5Botan12_GLOBAL__N_110shuffle_32ILh80EEENS_9SIMD_8x32ERKS2_:
   45|  17.6k|BOTAN_FN_ISA_AVX2_BMI2 inline SIMD_8x32 shuffle_32(const SIMD_8x32& a) {
   46|       |   return SIMD_8x32(_mm256_shuffle_epi32(a.raw(), S));
   47|  17.6k|}
sha2_32_avx2.cpp:_ZN5Botan12_GLOBAL__N_16next_wINS_9SIMD_4x32EEET_PS3_:
   50|  3.34k|BOTAN_FN_ISA_AVX2_BMI2 BOTAN_FORCE_INLINE SIMD_T next_w(SIMD_T x[4]) {
   51|  3.34k|   constexpr size_t sigma0_0 = 7;
   52|  3.34k|   constexpr size_t sigma0_1 = 18;
   53|  3.34k|   constexpr size_t sigma0_2 = 3;
   54|  3.34k|   constexpr size_t sigma1_0 = 17;
   55|  3.34k|   constexpr size_t sigma1_1 = 19;
   56|  3.34k|   constexpr size_t sigma1_2 = 10;
   57|       |
   58|  3.34k|   const SIMD_T lo_mask = SIMD_T(0x03020100, 0x0b0a0908, 0x80808080, 0x80808080);
   59|  3.34k|   const SIMD_T hi_mask = SIMD_T(0x80808080, 0x80808080, 0x03020100, 0x0b0a0908);
   60|       |
   61|  3.34k|   auto t0 = alignr4(x[1], x[0]);
   62|  3.34k|   x[0] += alignr4(x[3], x[2]);
   63|       |
   64|  3.34k|   auto t1 = t0.template shl<32 - sigma0_1>();
   65|  3.34k|   auto t2 = t0.template shr<sigma0_0>();
   66|  3.34k|   auto t3 = t0.template shr<sigma0_2>();
   67|  3.34k|   t0 = t3 ^ t2;
   68|       |
   69|  3.34k|   t3 = shuffle_32<0b11111010>(x[3]);
   70|  3.34k|   t2 = t2.template shr<sigma0_1 - sigma0_0>();
   71|  3.34k|   t0 ^= t1 ^ t2;
   72|  3.34k|   t1 = t1.template shl<sigma0_1 - sigma0_0>();
   73|  3.34k|   t2 = t3.template shr<sigma1_2>();
   74|  3.34k|   t3 = shr64<sigma1_0>(t3);
   75|  3.34k|   x[0] += t0 ^ t1;
   76|       |
   77|  3.34k|   t2 ^= t3;
   78|  3.34k|   t3 = shr64<sigma1_1 - sigma1_0>(t3);
   79|  3.34k|   x[0] += SIMD_T::byte_shuffle(t2 ^ t3, lo_mask);
   80|       |
   81|  3.34k|   t3 = shuffle_32<0b01010000>(x[0]);
   82|  3.34k|   t2 = t3.template shr<sigma1_2>();
   83|  3.34k|   t3 = shr64<sigma1_0>(t3);
   84|  3.34k|   t2 ^= t3;
   85|  3.34k|   t3 = shr64<sigma1_1 - sigma1_0>(t3);
   86|  3.34k|   x[0] += SIMD_T::byte_shuffle(t2 ^ t3, hi_mask);
   87|       |
   88|  3.34k|   const auto tmp = x[0];
   89|  3.34k|   x[0] = x[1];
   90|  3.34k|   x[1] = x[2];
   91|  3.34k|   x[2] = x[3];
   92|  3.34k|   x[3] = tmp;
   93|       |
   94|  3.34k|   return x[3];
   95|  3.34k|}
sha2_32_avx2.cpp:_ZN5Botan12_GLOBAL__N_17alignr4ERKNS_9SIMD_4x32ES3_:
   21|  6.69k|BOTAN_FN_ISA_AVX2_BMI2 inline SIMD_4x32 alignr4(const SIMD_4x32& a, const SIMD_4x32& b) {
   22|       |   return SIMD_4x32(_mm_alignr_epi8(a.raw(), b.raw(), 4));
   23|  6.69k|}
sha2_32_avx2.cpp:_ZN5Botan12_GLOBAL__N_110shuffle_32ILh250EEENS_9SIMD_4x32ERKS2_:
   31|  3.34k|BOTAN_FN_ISA_AVX2_BMI2 inline SIMD_4x32 shuffle_32(const SIMD_4x32& a) {
   32|       |   return SIMD_4x32(_mm_shuffle_epi32(a.raw(), S));
   33|  3.34k|}
sha2_32_avx2.cpp:_ZN5Botan12_GLOBAL__N_15shr64ILm17EEENS_9SIMD_4x32ERKS2_:
   26|  6.69k|BOTAN_FN_ISA_AVX2_BMI2 inline SIMD_4x32 shr64(const SIMD_4x32& a) {
   27|  6.69k|   return SIMD_4x32(_mm_srli_epi64(a.raw(), S));
   28|  6.69k|}
sha2_32_avx2.cpp:_ZN5Botan12_GLOBAL__N_15shr64ILm2EEENS_9SIMD_4x32ERKS2_:
   26|  6.69k|BOTAN_FN_ISA_AVX2_BMI2 inline SIMD_4x32 shr64(const SIMD_4x32& a) {
   27|  6.69k|   return SIMD_4x32(_mm_srli_epi64(a.raw(), S));
   28|  6.69k|}
sha2_32_avx2.cpp:_ZN5Botan12_GLOBAL__N_110shuffle_32ILh80EEENS_9SIMD_4x32ERKS2_:
   31|  3.34k|BOTAN_FN_ISA_AVX2_BMI2 inline SIMD_4x32 shuffle_32(const SIMD_4x32& a) {
   32|       |   return SIMD_4x32(_mm_shuffle_epi32(a.raw(), S));
   33|  3.34k|}

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

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

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

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

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

_ZN5Botan3TLS3PSKC2ERNS0_15TLS_Data_ReaderEtNS0_14Handshake_TypeE:
  142|    201|PSK::PSK(TLS_Data_Reader& reader, uint16_t extension_size, Handshake_Type message_type) {
  143|    201|   if(message_type == Handshake_Type::ServerHello) {
  ------------------
  |  Branch (143:7): [True: 0, False: 201]
  ------------------
  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|    201|   } else if(message_type == Handshake_Type::ClientHello) {
  ------------------
  |  Branch (150:14): [True: 201, False: 0]
  ------------------
  151|    201|      const auto identities_length = reader.get_uint16_t();
  152|    201|      const auto identities_offset = reader.read_so_far();
  153|       |
  154|    201|      std::vector<PskIdentity> psk_identities;
  155|  4.15k|      while(reader.has_remaining() && (reader.read_so_far() - identities_offset) < identities_length) {
  ------------------
  |  Branch (155:13): [True: 4.07k, False: 78]
  |  Branch (155:39): [True: 3.95k, False: 123]
  ------------------
  156|       |         /* Per RFC 8446 PskIdentity is
  157|       |
  158|       |         struct {
  159|       |            opaque identity<1..2^16-1>;
  160|       |            uint32 obfuscated_ticket_age;
  161|       |         } PskIdentity;
  162|       |
  163|       |         so we should reject an empty identity. However BoGo seems to expect
  164|       |         being able to send us such an identity, so for now we accept it.
  165|       |         */
  166|       |
  167|  3.95k|         auto identity = reader.get_tls_length_value(2);
  168|  3.95k|         const auto obfuscated_ticket_age = reader.get_uint32_t();
  169|  3.95k|         psk_identities.emplace_back(std::move(identity), obfuscated_ticket_age);
  170|  3.95k|      }
  171|       |
  172|    201|      if(psk_identities.empty()) {
  ------------------
  |  Branch (172:10): [True: 2, False: 199]
  ------------------
  173|      2|         throw TLS_Exception(Alert::DecodeError, "Empty PSK list");
  174|      2|      }
  175|       |
  176|    199|      if(reader.read_so_far() - identities_offset != identities_length) {
  ------------------
  |  Branch (176:10): [True: 38, False: 161]
  ------------------
  177|     38|         throw TLS_Exception(Alert::DecodeError, "Inconsistent PSK identity list");
  178|     38|      }
  179|       |
  180|    161|      const auto binders_length = reader.get_uint16_t();
  181|    161|      const auto binders_offset = reader.read_so_far();
  182|       |
  183|    161|      if(binders_length == 0) {
  ------------------
  |  Branch (183:10): [True: 1, False: 160]
  ------------------
  184|      1|         throw TLS_Exception(Alert::DecodeError, "Empty PSK binders list");
  185|      1|      }
  186|       |
  187|    160|      std::vector<Client_PSK> psks;
  188|  1.78k|      for(auto& psk_identity : psk_identities) {
  ------------------
  |  Branch (188:30): [True: 1.78k, False: 136]
  ------------------
  189|  1.78k|         if(!reader.has_remaining() || reader.read_so_far() - binders_offset >= binders_length) {
  ------------------
  |  Branch (189:13): [True: 21, False: 1.76k]
  |  Branch (189:40): [True: 3, False: 1.76k]
  ------------------
  190|     24|            throw TLS_Exception(Alert::IllegalParameter, "Not enough PSK binders");
  191|     24|         }
  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.76k|         psks.emplace_back(std::move(psk_identity), reader.get_tls_length_value(1));
  199|  1.76k|      }
  200|       |
  201|    136|      if(reader.read_so_far() - binders_offset != binders_length) {
  ------------------
  |  Branch (201:10): [True: 51, False: 85]
  ------------------
  202|     51|         throw TLS_Exception(Alert::IllegalParameter, "Too many PSK binders");
  203|     51|      }
  204|       |
  205|     85|      m_impl = std::make_unique<PSK_Internal>(std::move(psks));
  206|     85|   } else {
  207|      0|      throw TLS_Exception(Alert::DecodeError, "Found a PSK extension in an unexpected handshake message");
  208|      0|   }
  209|    201|}
_ZN5Botan3TLS3PSKD2Ev:
  231|     26|PSK::~PSK() = default;
tls_extensions_psk.cpp:_ZN5Botan3TLS12_GLOBAL__N_110Client_PSKC2ENS0_11PskIdentityENSt3__16vectorIhNS4_9allocatorIhEEEE:
   56|  1.75k|            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|     26|      explicit PSK_Internal(std::vector<Client_PSK> clt_psks) : psk(std::move(clt_psks)) {}

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

_ZN5Botan3TLS26Certificate_Status_RequestC2ERNS0_15TLS_Data_ReaderEtNS0_14Handshake_TypeENS0_15Connection_SideE:
  104|    103|                                                       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|    103|   if(message_type == Handshake_Type::ClientHello) {
  ------------------
  |  Branch (123:7): [True: 103, False: 0]
  ------------------
  124|    103|      m_impl = std::make_unique<Certificate_Status_Request_Internal>(
  125|    103|         RFC6066_Certificate_Status_Request(reader, extension_size));
  126|    103|   }
  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|    103|}
_ZN5Botan3TLS26Certificate_Status_RequestD2Ev:
  176|     35|Certificate_Status_Request::~Certificate_Status_Request() = default;
tls_extensions_cert_status_req.cpp:_ZN5Botan3TLS12_GLOBAL__N_134RFC6066_Certificate_Status_RequestC2ERNS0_15TLS_Data_ReaderEt:
   38|    103|      RFC6066_Certificate_Status_Request(TLS_Data_Reader& reader, uint16_t extension_size) {
   39|    103|         if(extension_size == 0) {
  ------------------
  |  Branch (39:13): [True: 1, False: 102]
  ------------------
   40|      1|            throw Decoding_Error("Received an unexpectedly empty Certificate_Status_Request");
   41|      1|         }
   42|       |
   43|    102|         const uint8_t type = reader.get_byte();
   44|    102|         if(type == 1 /* ocsp */) {
  ------------------
  |  Branch (44:13): [True: 80, False: 22]
  ------------------
   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|     80|            if(extension_size < 5) {
  ------------------
  |  Branch (51:16): [True: 3, False: 77]
  ------------------
   52|      3|               throw Decoding_Error("Truncated OCSP CertificateStatusRequest");
   53|      3|            }
   54|     77|            const size_t len_resp_id_list = reader.get_uint16_t();
   55|     77|            if(len_resp_id_list > static_cast<size_t>(extension_size) - 5) {
  ------------------
  |  Branch (55:16): [True: 17, False: 60]
  ------------------
   56|     17|               throw Decoding_Error("Inconsistent length in OCSP CertificateStatusRequest");
   57|     17|            }
   58|     60|            ocsp_names = reader.get_fixed<uint8_t>(len_resp_id_list);
   59|     60|            const size_t len_requ_ext = reader.get_uint16_t();
   60|     60|            if(len_resp_id_list + len_requ_ext + 5 != extension_size) {
  ------------------
  |  Branch (60:16): [True: 47, False: 13]
  ------------------
   61|     47|               throw Decoding_Error("Inconsistent length in OCSP CertificateStatusRequest");
   62|     47|            }
   63|     13|            extension_bytes = reader.get_fixed<uint8_t>(len_requ_ext);
   64|     22|         } else {
   65|       |            // RFC 6066 does not specify anything but 'ocsp' and we
   66|       |            // don't support anything else either.
   67|     22|            reader.discard_next(extension_size - 1);
   68|     22|         }
   69|    102|      }
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|     35|      explicit Certificate_Status_Request_Internal(Contents c) : content(std::move(c)) {}

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

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

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

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

_ZN5Botan13is_valid_utf8ENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEE:
  106|    154|bool is_valid_utf8(std::string_view utf8) {
  107|    154|   try {
  108|    154|      size_t pos = 0;
  109|  1.48k|      while(pos < utf8.size()) {
  ------------------
  |  Branch (109:13): [True: 1.33k, False: 154]
  ------------------
  110|  1.33k|         const uint32_t c = next_utf8_codepoint(utf8, pos);
  111|  1.33k|         BOTAN_UNUSED(c);
  ------------------
  |  |  144|  1.33k|#define BOTAN_UNUSED Botan::ignore_params
  ------------------
  112|  1.33k|      }
  113|    154|   } catch(Decoding_Error&) {
  114|     64|      return false;
  115|     64|   }
  116|     90|   return true;
  117|    154|}
_ZN5Botan12ucs2_to_utf8ENSt3__14spanIKhLm18446744073709551615EEE:
  119|     70|std::string ucs2_to_utf8(std::span<const uint8_t> ucs2) {
  120|     70|   if(ucs2.size() % 2 != 0) {
  ------------------
  |  Branch (120:7): [True: 2, False: 68]
  ------------------
  121|      2|      throw Decoding_Error("Invalid length for UCS-2 string");
  122|      2|   }
  123|       |
  124|     68|   const size_t chars = ucs2.size() / 2;
  125|       |
  126|     68|   std::string s;
  127|    500|   for(size_t i = 0; i != chars; ++i) {
  ------------------
  |  Branch (127:22): [True: 432, False: 68]
  ------------------
  128|    432|      const uint32_t c = load_be<uint16_t>(ucs2.data(), i);
  129|    432|      append_utf8_for(s, c);
  130|    432|   }
  131|       |
  132|     68|   return s;
  133|     70|}
_ZN5Botan12ucs4_to_utf8ENSt3__14spanIKhLm18446744073709551615EEE:
  153|    112|std::string ucs4_to_utf8(std::span<const uint8_t> ucs4) {
  154|    112|   if(ucs4.size() % 4 != 0) {
  ------------------
  |  Branch (154:7): [True: 1, False: 111]
  ------------------
  155|      1|      throw Decoding_Error("Invalid length for UCS-4 string");
  156|      1|   }
  157|       |
  158|    111|   const size_t chars = ucs4.size() / 4;
  159|       |
  160|    111|   std::string s;
  161|    358|   for(size_t i = 0; i != chars; ++i) {
  ------------------
  |  Branch (161:22): [True: 247, False: 111]
  ------------------
  162|    247|      const uint32_t c = load_be<uint32_t>(ucs4.data(), i);
  163|    247|      append_utf8_for(s, c);
  164|    247|   }
  165|       |
  166|    111|   return s;
  167|    112|}
_ZN5Botan14latin1_to_utf8ENSt3__14spanIKhLm18446744073709551615EEE:
  188|     69|std::string latin1_to_utf8(std::span<const uint8_t> chars) {
  189|     69|   std::string s;
  190|    736|   for(const uint8_t b : chars) {
  ------------------
  |  Branch (190:24): [True: 736, False: 69]
  ------------------
  191|    736|      append_utf8_for(s, static_cast<uint32_t>(b));
  192|    736|   }
  193|     69|   return s;
  194|     69|}
charset.cpp:_ZN5Botan12_GLOBAL__N_119next_utf8_codepointENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEERm:
   52|  1.33k|uint32_t next_utf8_codepoint(std::string_view utf8, size_t& pos) {
   53|  1.33k|   auto read_continuation = [&]() -> uint32_t {
   54|  1.33k|      if(pos >= utf8.size()) {
   55|  1.33k|         throw Decoding_Error("Invalid UTF-8 sequence");
   56|  1.33k|      }
   57|  1.33k|      const uint8_t b = static_cast<uint8_t>(utf8[pos++]);
   58|  1.33k|      if((b & 0xC0) != 0x80) {
   59|  1.33k|         throw Decoding_Error("Invalid UTF-8 sequence");
   60|  1.33k|      }
   61|  1.33k|      return b & 0x3F;
   62|  1.33k|   };
   63|       |
   64|  1.33k|   const uint8_t lead = static_cast<uint8_t>(utf8[pos++]);
   65|  1.33k|   uint32_t c = 0;
   66|       |
   67|  1.33k|   if(lead <= 0x7F) {
  ------------------
  |  Branch (67:7): [True: 1.06k, False: 267]
  ------------------
   68|  1.06k|      c = lead;
   69|  1.06k|   } else if((lead & 0xE0) == 0xC0) {
  ------------------
  |  Branch (69:14): [True: 82, False: 185]
  ------------------
   70|     82|      c = (lead & 0x1F) << 6;
   71|     82|      c |= read_continuation();
   72|     82|      if(c < 0x80) {
  ------------------
  |  Branch (72:10): [True: 2, False: 80]
  ------------------
   73|      2|         throw Decoding_Error("Overlong UTF-8 sequence");
   74|      2|      }
   75|    185|   } else if((lead & 0xF0) == 0xE0) {
  ------------------
  |  Branch (75:14): [True: 74, False: 111]
  ------------------
   76|     74|      c = (lead & 0x0F) << 12;
   77|     74|      c |= read_continuation() << 6;
   78|     74|      c |= read_continuation();
   79|     74|      if(c < 0x800) {
  ------------------
  |  Branch (79:10): [True: 7, False: 67]
  ------------------
   80|      7|         throw Decoding_Error("Overlong UTF-8 sequence");
   81|      7|      }
   82|    111|   } else if((lead & 0xF8) == 0xF0) {
  ------------------
  |  Branch (82:14): [True: 89, False: 22]
  ------------------
   83|     89|      c = (lead & 0x07) << 18;
   84|     89|      c |= read_continuation() << 12;
   85|     89|      c |= read_continuation() << 6;
   86|     89|      c |= read_continuation();
   87|     89|      if(c < 0x10000) {
  ------------------
  |  Branch (87:10): [True: 5, False: 84]
  ------------------
   88|      5|         throw Decoding_Error("Overlong UTF-8 sequence");
   89|      5|      }
   90|     89|   } else {
   91|     22|      throw Decoding_Error("Invalid UTF-8 sequence");
   92|     22|   }
   93|       |
   94|  1.29k|   if(c > 0x10FFFF) {
  ------------------
  |  Branch (94:7): [True: 3, False: 1.29k]
  ------------------
   95|      3|      throw Decoding_Error("UTF-8 sequence encodes value outside Unicode range");
   96|      3|   }
   97|  1.29k|   if(c >= 0xD800 && c < 0xE000) {
  ------------------
  |  Branch (97:7): [True: 98, False: 1.19k]
  |  Branch (97:22): [True: 12, False: 86]
  ------------------
   98|     12|      throw Decoding_Error("UTF-8 sequence encodes surrogate code point");
   99|     12|   }
  100|       |
  101|  1.28k|   return c;
  102|  1.29k|}
charset.cpp:_ZZN5Botan12_GLOBAL__N_119next_utf8_codepointENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEERmENK3$_0clEv:
   53|    489|   auto read_continuation = [&]() -> uint32_t {
   54|    489|      if(pos >= utf8.size()) {
  ------------------
  |  Branch (54:10): [True: 3, False: 486]
  ------------------
   55|      3|         throw Decoding_Error("Invalid UTF-8 sequence");
   56|      3|      }
   57|    486|      const uint8_t b = static_cast<uint8_t>(utf8[pos++]);
   58|    486|      if((b & 0xC0) != 0x80) {
  ------------------
  |  Branch (58:10): [True: 10, False: 476]
  ------------------
   59|     10|         throw Decoding_Error("Invalid UTF-8 sequence");
   60|     10|      }
   61|    476|      return b & 0x3F;
   62|    486|   };
charset.cpp:_ZN5Botan12_GLOBAL__N_115append_utf8_forERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEj:
   18|  1.41k|void append_utf8_for(std::string& s, uint32_t c) {
   19|  1.41k|   if(c >= 0xD800 && c < 0xE000) {
  ------------------
  |  Branch (19:7): [True: 354, False: 1.06k]
  |  Branch (19:22): [True: 14, False: 340]
  ------------------
   20|     14|      throw Decoding_Error("Invalid Unicode character");
   21|     14|   }
   22|       |
   23|  1.40k|   if(c <= 0x7F) {
  ------------------
  |  Branch (23:7): [True: 607, False: 794]
  ------------------
   24|    607|      const uint8_t b0 = static_cast<uint8_t>(c);
   25|    607|      s.push_back(static_cast<char>(b0));
   26|    794|   } else if(c <= 0x7FF) {
  ------------------
  |  Branch (26:14): [True: 307, False: 487]
  ------------------
   27|    307|      const uint8_t b0 = 0xC0 | static_cast<uint8_t>(c >> 6);
   28|    307|      const uint8_t b1 = 0x80 | static_cast<uint8_t>(c & 0x3F);
   29|    307|      s.push_back(static_cast<char>(b0));
   30|    307|      s.push_back(static_cast<char>(b1));
   31|    487|   } else if(c <= 0xFFFF) {
  ------------------
  |  Branch (31:14): [True: 309, False: 178]
  ------------------
   32|    309|      const uint8_t b0 = 0xE0 | static_cast<uint8_t>(c >> 12);
   33|    309|      const uint8_t b1 = 0x80 | static_cast<uint8_t>((c >> 6) & 0x3F);
   34|    309|      const uint8_t b2 = 0x80 | static_cast<uint8_t>(c & 0x3F);
   35|    309|      s.push_back(static_cast<char>(b0));
   36|    309|      s.push_back(static_cast<char>(b1));
   37|    309|      s.push_back(static_cast<char>(b2));
   38|    309|   } else if(c <= 0x10FFFF) {
  ------------------
  |  Branch (38:14): [True: 119, False: 59]
  ------------------
   39|    119|      const uint8_t b0 = 0xF0 | static_cast<uint8_t>(c >> 18);
   40|    119|      const uint8_t b1 = 0x80 | static_cast<uint8_t>((c >> 12) & 0x3F);
   41|    119|      const uint8_t b2 = 0x80 | static_cast<uint8_t>((c >> 6) & 0x3F);
   42|    119|      const uint8_t b3 = 0x80 | static_cast<uint8_t>(c & 0x3F);
   43|    119|      s.push_back(static_cast<char>(b0));
   44|    119|      s.push_back(static_cast<char>(b1));
   45|    119|      s.push_back(static_cast<char>(b2));
   46|    119|      s.push_back(static_cast<char>(b3));
   47|    119|   } else {
   48|     59|      throw Decoding_Error("Invalid Unicode character");
   49|     59|   }
   50|  1.40k|}

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

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

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

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

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

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

_ZN5Botan7X509_DN11decode_fromERNS_11BER_DecoderE:
  395|  1.15k|void X509_DN::decode_from(BER_Decoder& source) {
  396|  1.15k|   std::vector<uint8_t> bits;
  397|       |
  398|  1.15k|   source.start_sequence().raw_bytes(bits).end_cons();
  399|       |
  400|  1.15k|   BER_Decoder sequence(bits, source.limits());
  401|       |
  402|  1.15k|   m_rdn.clear();
  403|       |
  404|       |   // Cap AVAs per RDN to bound work for downstream set-based matching.
  405|       |   // No legitimate cert has anywhere near this many AVAs in a single RDN.
  406|  1.15k|   constexpr size_t MAX_AVAS_PER_RDN = 32;
  407|       |
  408|  1.69k|   while(sequence.more_items()) {
  ------------------
  |  Branch (408:10): [True: 562, False: 1.12k]
  ------------------
  409|    562|      BER_Decoder rdn_decoder = sequence.start_set();
  410|       |
  411|    562|      std::vector<std::pair<OID, ASN1_String>> rdn;
  412|  1.36k|      while(rdn_decoder.more_items()) {
  ------------------
  |  Branch (412:13): [True: 805, False: 562]
  ------------------
  413|    805|         OID oid;
  414|    805|         ASN1_String str;
  415|       |
  416|    805|         rdn_decoder.start_sequence()
  417|    805|            .decode(oid)
  418|    805|            .decode(str)  // TODO support Any
  419|    805|            .end_cons();
  420|       |
  421|    805|         rdn.emplace_back(std::move(oid), std::move(str));
  422|       |
  423|    805|         if(rdn.size() > MAX_AVAS_PER_RDN) {
  ------------------
  |  Branch (423:13): [True: 0, False: 805]
  ------------------
  424|      0|            throw Decoding_Error("X.500 RDN has too many attribute-value assertions");
  425|      0|         }
  426|    805|      }
  427|       |
  428|       |      /*
  429|       |      RFC 5280 4.1.2.4:
  430|       |         RelativeDistinguishedName ::=
  431|       |           SET SIZE (1..MAX) OF AttributeTypeAndValue
  432|       |      */
  433|    562|      if(rdn.empty()) {
  ------------------
  |  Branch (433:10): [True: 25, False: 537]
  ------------------
  434|     25|         throw Decoding_Error("X.500 RDN must contain at least one attribute-value assertion");
  435|     25|      }
  436|    537|      m_rdn.push_back(std::move(rdn));
  437|    537|   }
  438|       |
  439|  1.12k|   m_dn_bits = bits;
  440|  1.12k|}

