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

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

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

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

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

_ZNK5Botan10CPUFeature6as_u32Ev:
   56|    298|      uint32_t as_u32() const { return static_cast<uint32_t>(m_bit); }
_ZN5Botan10CPUFeatureC2ENS0_3BitE:
   54|    304|      CPUFeature(Bit b) : m_bit(b) {}  // NOLINT(*-explicit-conversions,*-explicit-constructor)

_ZN5Botan3fmtIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEES7_NS1_17basic_string_viewIcS4_EEDpRKT_:
   53|     62|std::string fmt(std::string_view format, const T&... args) {
   54|     62|   std::ostringstream oss;
   55|     62|   oss.imbue(std::locale::classic());
   56|     62|   fmt_detail::do_fmt(oss, format, args...);
   57|     62|   return oss.str();
   58|     62|}
_ZN5Botan10fmt_detail6do_fmtINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEJEEEvRNS2_19basic_ostringstreamIcS5_S7_EENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|     62|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|     62|   size_t i = 0;
   27|       |
   28|  1.36k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 1.36k, False: 0]
  ------------------
   29|  1.36k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 62, False: 1.30k]
  |  Branch (29:30): [True: 62, False: 0]
  |  Branch (29:59): [True: 62, False: 0]
  ------------------
   30|     62|         oss << val;
   31|     62|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  1.30k|      } else {
   33|  1.30k|         oss << format[i];
   34|  1.30k|      }
   35|       |
   36|  1.30k|      i += 1;
   37|  1.30k|   }
   38|     62|}
_ZN5Botan10fmt_detail6do_fmtERNSt3__119basic_ostringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_17basic_string_viewIcS4_EE:
   20|  1.95k|inline void do_fmt(std::ostringstream& oss, std::string_view format) {
   21|  1.95k|   oss << format;
   22|  1.95k|}
_ZN5Botan3fmtIJmmEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_17basic_string_viewIcS4_EEDpRKT_:
   53|    458|std::string fmt(std::string_view format, const T&... args) {
   54|    458|   std::ostringstream oss;
   55|    458|   oss.imbue(std::locale::classic());
   56|    458|   fmt_detail::do_fmt(oss, format, args...);
   57|    458|   return oss.str();
   58|    458|}
_ZN5Botan10fmt_detail6do_fmtImJmEEEvRNSt3__119basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|    458|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|    458|   size_t i = 0;
   27|       |
   28|  4.58k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 4.58k, False: 0]
  ------------------
   29|  4.58k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 458, False: 4.12k]
  |  Branch (29:30): [True: 458, False: 0]
  |  Branch (29:59): [True: 458, False: 0]
  ------------------
   30|    458|         oss << val;
   31|    458|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  4.12k|      } else {
   33|  4.12k|         oss << format[i];
   34|  4.12k|      }
   35|       |
   36|  4.12k|      i += 1;
   37|  4.12k|   }
   38|    458|}
_ZN5Botan10fmt_detail6do_fmtImJEEEvRNSt3__119basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|    458|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|    458|   size_t i = 0;
   27|       |
   28|  10.9k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 10.9k, False: 0]
  ------------------
   29|  10.9k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 458, False: 10.5k]
  |  Branch (29:30): [True: 458, False: 0]
  |  Branch (29:59): [True: 458, False: 0]
  ------------------
   30|    458|         oss << val;
   31|    458|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  10.5k|      } else {
   33|  10.5k|         oss << format[i];
   34|  10.5k|      }
   35|       |
   36|  10.5k|      i += 1;
   37|  10.5k|   }
   38|    458|}
_ZN5Botan3fmtIJPKcNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEEEENS3_12basic_stringIcS6_NS3_9allocatorIcEEEES7_DpRKT_:
   53|    566|std::string fmt(std::string_view format, const T&... args) {
   54|    566|   std::ostringstream oss;
   55|    566|   oss.imbue(std::locale::classic());
   56|    566|   fmt_detail::do_fmt(oss, format, args...);
   57|    566|   return oss.str();
   58|    566|}
_ZN5Botan10fmt_detail6do_fmtIPKcJNSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEEEEvRNS4_19basic_ostringstreamIcS7_NS4_9allocatorIcEEEES8_RKT_DpRKT0_:
   25|    566|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|    566|   size_t i = 0;
   27|       |
   28|  5.09k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 5.09k, False: 0]
  ------------------
   29|  5.09k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 566, False: 4.52k]
  |  Branch (29:30): [True: 566, False: 0]
  |  Branch (29:59): [True: 566, False: 0]
  ------------------
   30|    566|         oss << val;
   31|    566|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  4.52k|      } else {
   33|  4.52k|         oss << format[i];
   34|  4.52k|      }
   35|       |
   36|  4.52k|      i += 1;
   37|  4.52k|   }
   38|    566|}
_ZN5Botan10fmt_detail6do_fmtINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEJEEEvRNS2_19basic_ostringstreamIcS5_NS2_9allocatorIcEEEES6_RKT_DpRKT0_:
   25|  1.30k|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|  1.30k|   size_t i = 0;
   27|       |
   28|  6.11k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 6.11k, False: 0]
  ------------------
   29|  6.11k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 1.30k, False: 4.81k]
  |  Branch (29:30): [True: 1.30k, False: 0]
  |  Branch (29:59): [True: 1.30k, False: 0]
  ------------------
   30|  1.30k|         oss << val;
   31|  1.30k|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  4.81k|      } else {
   33|  4.81k|         oss << format[i];
   34|  4.81k|      }
   35|       |
   36|  4.81k|      i += 1;
   37|  4.81k|   }
   38|  1.30k|}
_ZN5Botan3fmtIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEEENS1_12basic_stringIcS4_NS1_9allocatorIcEEEES5_DpRKT_:
   53|    736|std::string fmt(std::string_view format, const T&... args) {
   54|    736|   std::ostringstream oss;
   55|    736|   oss.imbue(std::locale::classic());
   56|    736|   fmt_detail::do_fmt(oss, format, args...);
   57|    736|   return oss.str();
   58|    736|}
_ZN5Botan3fmtIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEjEEENS1_12basic_stringIcS4_NS1_9allocatorIcEEEES5_DpRKT_:
   53|     57|std::string fmt(std::string_view format, const T&... args) {
   54|     57|   std::ostringstream oss;
   55|     57|   oss.imbue(std::locale::classic());
   56|     57|   fmt_detail::do_fmt(oss, format, args...);
   57|     57|   return oss.str();
   58|     57|}
_ZN5Botan10fmt_detail6do_fmtINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEJjEEEvRNS2_19basic_ostringstreamIcS5_NS2_9allocatorIcEEEES6_RKT_DpRKT0_:
   25|     57|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|     57|   size_t i = 0;
   27|       |
   28|     57|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 57, False: 0]
  ------------------
   29|     57|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 57, False: 0]
  |  Branch (29:30): [True: 57, False: 0]
  |  Branch (29:59): [True: 57, False: 0]
  ------------------
   30|     57|         oss << val;
   31|     57|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|     57|      } else {
   33|      0|         oss << format[i];
   34|      0|      }
   35|       |
   36|      0|      i += 1;
   37|      0|   }
   38|     57|}
_ZN5Botan10fmt_detail6do_fmtIjJEEEvRNSt3__119basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|    136|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|    136|   size_t i = 0;
   27|       |
   28|    329|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 329, False: 0]
  ------------------
   29|    329|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 136, False: 193]
  |  Branch (29:30): [True: 136, False: 0]
  |  Branch (29:59): [True: 136, False: 0]
  ------------------
   30|    136|         oss << val;
   31|    136|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|    193|      } else {
   33|    193|         oss << format[i];
   34|    193|      }
   35|       |
   36|    193|      i += 1;
   37|    193|   }
   38|    136|}
_ZN5Botan3fmtIJjjEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_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_fmtIjJjEEEvRNSt3__119basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_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|  2.68k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 2.68k, False: 0]
  ------------------
   29|  2.68k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 79, False: 2.60k]
  |  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|  2.60k|      } else {
   33|  2.60k|         oss << format[i];
   34|  2.60k|      }
   35|       |
   36|  2.60k|      i += 1;
   37|  2.60k|   }
   38|     79|}

_ZN5Botan11checked_mulITkNSt3__117unsigned_integralEmEENS1_8optionalIT_EES3_S3_:
   46|  2.63k|constexpr inline std::optional<T> checked_mul(T a, T b) {
   47|       |   // Multiplication by 1U is a hack to work around C's insane
   48|       |   // integer promotion rules.
   49|       |   // https://stackoverflow.com/questions/24795651
   50|  2.63k|   const T r = (1U * a) * b;
   51|       |   // If a == 0 then the multiply certainly did not overflow
   52|       |   // Otherwise r / a == b unless overflow occurred
   53|  2.63k|   if(a != 0 && r / a != b) {
  ------------------
  |  Branch (53:7): [True: 2.63k, False: 0]
  |  Branch (53:17): [True: 0, False: 2.63k]
  ------------------
   54|      0|      return {};
   55|      0|   }
   56|  2.63k|   return r;
   57|  2.63k|}
_ZN5Botan11checked_addITkNSt3__117unsigned_integralEjEENS1_8optionalIT_EES3_S3_:
   19|  1.30k|constexpr inline std::optional<T> checked_add(T a, T b) {
   20|  1.30k|   const T r = a + b;
   21|  1.30k|   if(r < a || r < b) {
  ------------------
  |  Branch (21:7): [True: 0, False: 1.30k]
  |  Branch (21:16): [True: 0, False: 1.30k]
  ------------------
   22|      0|      return {};
   23|      0|   }
   24|  1.30k|   return r;
   25|  1.30k|}
_ZN5Botan11checked_addITkNSt3__117unsigned_integralEmTpTkNS1_17unsigned_integralEJmmEQ10all_same_vIT_DpT0_EEENS1_8optionalIS2_EES2_S2_S4_:
   37|  2.51k|constexpr inline std::optional<T> checked_add(T a, T b, Ts... rest) {
   38|  2.51k|   if(auto r = checked_add(a, b)) {
  ------------------
  |  Branch (38:12): [True: 2.51k, False: 0]
  ------------------
   39|  2.51k|      return checked_add(r.value(), rest...);
   40|  2.51k|   } else {
   41|      0|      return {};
   42|      0|   }
   43|  2.51k|}
_ZN5Botan11checked_addITkNSt3__117unsigned_integralEmEENS1_8optionalIT_EES3_S3_:
   19|  7.55k|constexpr inline std::optional<T> checked_add(T a, T b) {
   20|  7.55k|   const T r = a + b;
   21|  7.55k|   if(r < a || r < b) {
  ------------------
  |  Branch (21:7): [True: 0, False: 7.55k]
  |  Branch (21:16): [True: 0, False: 7.55k]
  ------------------
   22|      0|      return {};
   23|      0|   }
   24|  7.55k|   return r;
   25|  7.55k|}
_ZN5Botan11checked_addITkNSt3__117unsigned_integralEmTpTkNS1_17unsigned_integralEJmEQ10all_same_vIT_DpT0_EEENS1_8optionalIS2_EES2_S2_S4_:
   37|  2.51k|constexpr inline std::optional<T> checked_add(T a, T b, Ts... rest) {
   38|  2.51k|   if(auto r = checked_add(a, b)) {
  ------------------
  |  Branch (38:12): [True: 2.51k, False: 0]
  ------------------
   39|  2.51k|      return checked_add(r.value(), rest...);
   40|  2.51k|   } else {
   41|      0|      return {};
   42|      0|   }
   43|  2.51k|}

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

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

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

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

_ZN5Botan9SIMD_4x32C2EDv2_x:
  966|   215k|      explicit BOTAN_FN_ISA_SIMD_4X32 SIMD_4x32(native_simd_type x) noexcept : m_simd(x) {}
_ZN5Botan9SIMD_4x327load_beEPKv:
  194|  7.72k|      static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 load_be(const void* in) noexcept {
  195|       |         if constexpr(std::endian::native == std::endian::big) {
  196|       |            return SIMD_4x32::load_native(in);
  197|  7.72k|         } else {
  198|  7.72k|            return SIMD_4x32::load_native(in).bswap();
  199|  7.72k|         }
  200|  7.72k|      }
_ZN5Botan9SIMD_4x3211load_nativeEPKv:
  166|  39.1k|      static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 load_native(const void* in) noexcept {
  167|  39.1k|#if defined(BOTAN_SIMD_USE_SSSE3)
  168|  39.1k|         return SIMD_4x32(_mm_loadu_si128(reinterpret_cast<const __m128i*>(in)));
  169|       |#elif defined(BOTAN_SIMD_USE_VSX)
  170|       |         return SIMD_4x32(reinterpret_cast<native_simd_type>(vec_xl(0, static_cast<const unsigned char*>(in))));
  171|       |#elif defined(BOTAN_SIMD_USE_NEON)
  172|       |         return SIMD_4x32(vld1q_u32(static_cast<const uint32_t*>(in)));
  173|       |#elif defined(BOTAN_SIMD_USE_LSX)
  174|       |         return SIMD_4x32(__lsx_vld(in, 0));
  175|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  176|       |         return SIMD_4x32(wasm_v128_load(in));
  177|       |#endif
  178|  39.1k|      }
_ZNK5Botan9SIMD_4x325bswapEv:
  544|  7.72k|      BOTAN_FN_ISA_SIMD_4X32 SIMD_4x32 bswap() const noexcept {
  545|  7.72k|#if defined(BOTAN_SIMD_USE_SSSE3)
  546|  7.72k|         const auto idx = _mm_set_epi8(12, 13, 14, 15, 8, 9, 10, 11, 4, 5, 6, 7, 0, 1, 2, 3);
  547|       |
  548|  7.72k|         return SIMD_4x32(_mm_shuffle_epi8(raw(), idx));
  549|       |#elif defined(BOTAN_SIMD_USE_VSX)
  550|       |         return SIMD_4x32(vec_revb(m_simd));
  551|       |
  552|       |#elif defined(BOTAN_SIMD_USE_NEON)
  553|       |         return SIMD_4x32(vreinterpretq_u32_u8(vrev32q_u8(vreinterpretq_u8_u32(m_simd))));
  554|       |#elif defined(BOTAN_SIMD_USE_LSX)
  555|       |         return SIMD_4x32(__lsx_vshuf4i_b(m_simd, 0b00011011));
  556|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  557|       |         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));
  558|       |#endif
  559|  7.72k|      }
_ZNK5Botan9SIMD_4x323rawEv:
  964|   374k|      native_simd_type BOTAN_FN_ISA_SIMD_4X32 raw() const noexcept { return m_simd; }
_ZNK5Botan9SIMD_4x32plERKS0_:
  352|  30.8k|      SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 operator+(const SIMD_4x32& other) const noexcept {
  353|  30.8k|         SIMD_4x32 retval(*this);
  354|  30.8k|         retval += other;
  355|  30.8k|         return retval;
  356|  30.8k|      }
_ZN5Botan9SIMD_4x32pLERKS0_:
  394|  57.9k|      void BOTAN_FN_ISA_SIMD_4X32 operator+=(const SIMD_4x32& other) noexcept {
  395|  57.9k|#if defined(BOTAN_SIMD_USE_SSSE3)
  396|  57.9k|         m_simd = _mm_add_epi32(m_simd, other.m_simd);
  397|       |#elif defined(BOTAN_SIMD_USE_VSX)
  398|       |         m_simd = vec_add(m_simd, other.m_simd);
  399|       |#elif defined(BOTAN_SIMD_USE_NEON)
  400|       |         m_simd = vaddq_u32(m_simd, other.m_simd);
  401|       |#elif defined(BOTAN_SIMD_USE_LSX)
  402|       |         m_simd = __lsx_vadd_w(m_simd, other.m_simd);
  403|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  404|       |         m_simd = wasm_i32x4_add(m_simd, other.m_simd);
  405|       |#endif
  406|  57.9k|      }
_ZNK5Botan9SIMD_4x328store_leEPj:
  210|    562|      void BOTAN_FN_ISA_SIMD_4X32 store_le(uint32_t out[4]) const noexcept {
  211|    562|         this->store_le(reinterpret_cast<uint8_t*>(out));
  212|    562|      }
_ZNK5Botan9SIMD_4x328store_leEPh:
  242|    562|      void BOTAN_FN_ISA_SIMD_4X32 store_le(uint8_t out[]) const noexcept {
  243|    562|         if constexpr(std::endian::native == std::endian::little) {
  244|    562|            this->store_native(out);
  245|       |         } else {
  246|       |            this->bswap().store_native(out);
  247|       |         }
  248|    562|      }
_ZNK5Botan9SIMD_4x3212store_nativeEPv:
  225|    562|      void BOTAN_FN_ISA_SIMD_4X32 store_native(void* out) const noexcept {
  226|    562|#if defined(BOTAN_SIMD_USE_SSSE3)
  227|    562|         _mm_storeu_si128(static_cast<__m128i*>(out), raw());
  228|       |#elif defined(BOTAN_SIMD_USE_VSX)
  229|       |         vec_xst(reinterpret_cast<__vector unsigned char>(m_simd), 0, static_cast<unsigned char*>(out));
  230|       |#elif defined(BOTAN_SIMD_USE_NEON)
  231|       |         vst1q_u32(static_cast<uint32_t*>(out), m_simd);
  232|       |#elif defined(BOTAN_SIMD_USE_LSX)
  233|       |         __lsx_vst(raw(), out, 0);
  234|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  235|       |         wasm_v128_store(out, m_simd);
  236|       |#endif
  237|    562|      }
_ZN5Botan9SIMD_4x327alignr8ERKS0_S2_:
  882|    562|      static inline SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 alignr8(const SIMD_4x32& a, const SIMD_4x32& b) {
  883|    562|#if defined(BOTAN_SIMD_USE_SSSE3)
  884|    562|         return SIMD_4x32(_mm_alignr_epi8(a.raw(), b.raw(), 8));
  885|       |#elif defined(BOTAN_SIMD_USE_NEON)
  886|       |         return SIMD_4x32(vextq_u32(b.raw(), a.raw(), 2));
  887|       |#elif defined(BOTAN_SIMD_USE_VSX)
  888|       |         const __vector unsigned char mask = {8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23};
  889|       |         return SIMD_4x32(vec_perm(b.raw(), a.raw(), mask));
  890|       |#elif defined(BOTAN_SIMD_USE_LSX)
  891|       |         return SIMD_4x32(__lsx_vshuf4i_d(a.raw(), b.raw(), 0b0011));
  892|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  893|       |         return SIMD_4x32(
  894|       |            wasm_i8x16_shuffle(b.raw(), a.raw(), 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23));
  895|       |#endif
  896|    562|      }
_ZN5Botan9SIMD_4x327load_leEPKv:
  183|  31.4k|      static SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 load_le(const void* in) noexcept {
  184|  31.4k|         if constexpr(std::endian::native == std::endian::little) {
  185|  31.4k|            return SIMD_4x32::load_native(in);
  186|       |         } else {
  187|       |            return SIMD_4x32::load_native(in).bswap();
  188|       |         }
  189|  31.4k|      }
_ZN5Botan9SIMD_4x327alignr4ERKS0_S2_:
  865|  23.1k|      static inline SIMD_4x32 BOTAN_FN_ISA_SIMD_4X32 alignr4(const SIMD_4x32& a, const SIMD_4x32& b) {
  866|  23.1k|#if defined(BOTAN_SIMD_USE_SSSE3)
  867|  23.1k|         return SIMD_4x32(_mm_alignr_epi8(a.raw(), b.raw(), 4));
  868|       |#elif defined(BOTAN_SIMD_USE_NEON)
  869|       |         return SIMD_4x32(vextq_u32(b.raw(), a.raw(), 1));
  870|       |#elif defined(BOTAN_SIMD_USE_VSX)
  871|       |         const __vector unsigned char mask = {4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19};
  872|       |         return SIMD_4x32(vec_perm(b.raw(), a.raw(), mask));
  873|       |#elif defined(BOTAN_SIMD_USE_LSX)
  874|       |         const auto mask = SIMD_4x32(0x07060504, 0x0B0A0908, 0x0F0E0D0C, 0x13121110);
  875|       |         return SIMD_4x32(__lsx_vshuf_b(a.raw(), b.raw(), mask.raw()));
  876|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  877|       |         return SIMD_4x32(
  878|       |            wasm_i8x16_shuffle(b.raw(), a.raw(), 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19));
  879|       |#endif
  880|  23.1k|      }
_ZNK5Botan9SIMD_4x3217shift_elems_rightILm2EEES0_vQleT_Li3E:
  601|  30.8k|      {
  602|  30.8k|#if defined(BOTAN_SIMD_USE_SSSE3)
  603|  30.8k|         return SIMD_4x32(_mm_srli_si128(raw(), 4 * I));
  604|       |#elif defined(BOTAN_SIMD_USE_NEON)
  605|       |         return SIMD_4x32(vextq_u32(raw(), vdupq_n_u32(0), I));
  606|       |#elif defined(BOTAN_SIMD_USE_VSX)
  607|       |         const __vector unsigned int zero = vec_splat_u32(0);
  608|       |
  609|       |         const __vector unsigned char shuf[3] = {
  610|       |            {4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19},
  611|       |            {8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23},
  612|       |            {12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27},
  613|       |         };
  614|       |
  615|       |         return SIMD_4x32(vec_perm(raw(), zero, shuf[I - 1]));
  616|       |#elif defined(BOTAN_SIMD_USE_LSX)
  617|       |         return SIMD_4x32(__lsx_vbsrl_v(raw(), 4 * I));
  618|       |#elif defined(BOTAN_SIMD_USE_SIMD128)
  619|       |         if constexpr(I == 0) {
  620|       |            return SIMD_4x32(m_simd);
  621|       |         }
  622|       |
  623|       |         const auto zero = wasm_u32x4_const_splat(0);
  624|       |         if constexpr(I == 1) {
  625|       |            return SIMD_4x32(
  626|       |               wasm_i8x16_shuffle(m_simd, zero, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 16, 16));
  627|       |         }
  628|       |         if constexpr(I == 2) {
  629|       |            return SIMD_4x32(
  630|       |               wasm_i8x16_shuffle(m_simd, zero, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 16, 16, 16, 16, 16, 16));
  631|       |         }
  632|       |
  633|       |         return SIMD_4x32(
  634|       |            wasm_i8x16_shuffle(m_simd, zero, 12, 13, 14, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16));
  635|       |#endif
  636|  30.8k|      }

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

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

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

_ZNK5Botan10BER_Object6is_setEv:
  267|  19.7k|      bool is_set() const { return m_type_tag != ASN1_Type::NoObject; }
_ZNK5Botan10BER_Object7taggingEv:
  272|  9.37k|      uint32_t tagging() const { return type_tag() | class_tag(); }
_ZNK5Botan10BER_Object8type_tagEv:
  277|  9.37k|      ASN1_Type type_tag() const { return m_type_tag; }
_ZNK5Botan10BER_Object9class_tagEv:
  282|  9.37k|      ASN1_Class class_tag() const { return m_class_tag; }
_ZNK5Botan10BER_Object4typeEv:
  287|  3.33k|      ASN1_Type type() const { return m_type_tag; }
_ZNK5Botan10BER_Object9get_classEv:
  292|  1.75k|      ASN1_Class get_class() const { return m_class_tag; }
_ZNK5Botan10BER_Object4bitsEv:
  298|  23.0k|      const uint8_t* bits() const { return m_value.data(); }
_ZNK5Botan10BER_Object6lengthEv:
  303|  59.1k|      size_t length() const { return m_value.size(); }
_ZNK5Botan10BER_Object4dataEv:
  308|  2.45k|      std::span<const uint8_t> data() const { return std::span{m_value}; }
_ZN5Botan10BER_Object12mutable_bitsEm:
  344|  7.57k|      uint8_t* mutable_bits(size_t length) {
  345|  7.57k|         m_value.resize(length);
  346|  7.57k|         return m_value.data();
  347|  7.57k|      }
_ZNK5Botan3OID14get_componentsEv:
  530|  5.09k|      const std::vector<uint32_t>& get_components() const {
  531|  5.09k|         return m_id;
  532|  5.09k|      }
_ZNK5Botan11ASN1_String5valueEv:
  590|  1.30k|      const std::string& value() const { return m_utf8_str; }
_ZN5BotanorENS_10ASN1_ClassES0_:
   91|  4.15k|inline ASN1_Class operator|(ASN1_Class x, ASN1_Class y) {
   92|  4.15k|   return static_cast<ASN1_Class>(static_cast<uint32_t>(x) | static_cast<uint32_t>(y));
   93|  4.15k|}
_ZN5BotanorENS_9ASN1_TypeENS_10ASN1_ClassE:
   98|  9.37k|inline uint32_t operator|(ASN1_Type x, ASN1_Class y) {
   99|  9.37k|   return static_cast<uint32_t>(x) | static_cast<uint32_t>(y);
  100|  9.37k|}
_ZN5BotanorENS_10ASN1_ClassENS_9ASN1_TypeE:
  105|  1.74k|inline uint32_t operator|(ASN1_Class x, ASN1_Type y) {
  106|  1.74k|   return static_cast<uint32_t>(x) | static_cast<uint32_t>(y);
  107|  1.74k|}
_ZN5Botan11ASN1_ObjectD2Ev:
  168|  12.7k|      virtual ~ASN1_Object() = default;
_ZN5Botan11ASN1_ObjectC2ERKS0_:
  151|  1.30k|      ASN1_Object(const ASN1_Object&) = default;
_ZN5Botan11ASN1_ObjectC2Ev:
  146|  5.22k|      ASN1_Object() = default;
_ZN5Botan11ASN1_ObjectC2EOS0_:
  161|  6.17k|      ASN1_Object(ASN1_Object&&) = default;
_ZN5Botan3OIDC2Ev:
  423|  1.83k|      explicit OID() = default;
_ZN5Botan10BER_ObjectC2Ev:
  239|  14.3k|      BER_Object() = default;
_ZN5Botan11ASN1_ObjectaSEOS0_:
  166|  1.38k|      ASN1_Object& operator=(ASN1_Object&&) = default;
_ZN5Botan10BER_ObjectC2EOS0_:
  249|  3.78k|      BER_Object(BER_Object&& other) = default;

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

_ZN5Botan11BER_Decoder6Limits3DEREv:
   44|  1.55k|            static Limits DER() { return Limits(false, 0, false, DefaultMaxObjectSize, false); }
_ZN5Botan11BER_Decoder6LimitsC2EbmbNSt3__18optionalImEEb:
  135|  1.55k|                  m_allow_ber(allow_ber),
  136|  1.55k|                  m_max_nested_indef(max_nested_indef),
  137|  1.55k|                  m_allow_standalone_eoc(allow_standalone_eoc),
  138|  1.55k|                  m_max_object_size(max_object_size),
  139|  1.55k|                  m_reject_default_value_encoding(reject_default_value_encoding) {}
_ZN5Botan11BER_Decoder14start_sequenceEv:
  277|  3.38k|      BER_Decoder start_sequence() { return start_cons(ASN1_Type::Sequence, ASN1_Class::Universal); }
_ZNK5Botan11BER_Decoder6Limits18allow_ber_encodingEv:
   58|  19.6k|            bool allow_ber_encoding() const { return m_allow_ber; }
_ZNK5Botan11BER_Decoder6Limits20require_der_encodingEv:
   63|  11.8k|            bool require_der_encoding() const { return !allow_ber_encoding(); }
_ZNK5Botan11BER_Decoder6Limits15max_object_sizeEv:
   82|  7.69k|            std::optional<size_t> max_object_size() const { return m_max_object_size; }
_ZNK5Botan11BER_Decoder6limitsEv:
  199|  4.96k|      Limits limits() const { return m_limits; }
_ZN5Botan11BER_Decoder9start_setEv:
  283|  1.02k|      BER_Decoder start_set() { return start_cons(ASN1_Type::Set, ASN1_Class::Universal); }
_ZN5Botan11BER_Decoder9raw_bytesINSt3__16vectorIhNS2_9allocatorIhEEEEQsr8conceptsE20ordinary_byte_vectorINS_6detail19wrapped_type_helperIu14__remove_cvrefIT_EE4typeEEEERS0_RS9_:
  341|  1.17k|      BER_Decoder& raw_bytes(T& out_wrapped) {
  342|  1.17k|         auto& out = unwrap_strong_type(out_wrapped);
  343|  1.17k|         out.clear();
  344|  1.17k|         uint8_t buf[64];
  345|  2.30k|         while(const size_t got = this->read_bytes(std::span{buf})) {
  ------------------
  |  Branch (345:29): [True: 1.12k, False: 1.17k]
  ------------------
  346|  1.12k|            out.insert(out.end(), buf, buf + got);
  347|  1.12k|         }
  348|  1.17k|         return (*this);
  349|  1.17k|      }

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

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

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

_ZNK5Botan7DNSName9to_stringEv:
   51|     34|      const std::string& to_string() const { return m_name; }
_ZN5Botan7DNSNameC2ENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  101|     34|      explicit DNSName(std::string canonical) : m_name(std::move(canonical)) {}

_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|    920|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromT& in) {
  200|    920|   typecast_copy(out, std::span<const FromT, 1>(&in, 1));
  201|    920|}
_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|    920|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|    920|   ranges::assert_equal_byte_lengths(out, in);
  178|    920|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|    920|}
_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|  17.2k|inline constexpr ToT typecast_copy(const FromR& src) {
  211|  17.2k|   ToT dst;  // NOLINT(*-member-init)
  212|  17.2k|   typecast_copy(dst, src);
  213|  17.2k|   return dst;
  214|  17.2k|}
_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|  17.2k|inline constexpr void typecast_copy(ToT& out, const FromR& in) {
  189|  17.2k|   typecast_copy(std::span<ToT, 1>(&out, 1), in);
  190|  17.2k|}
_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|  17.2k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|  17.2k|   ranges::assert_equal_byte_lengths(out, in);
  178|  17.2k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|  17.2k|}
_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|    115|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromT& in) {
  200|    115|   typecast_copy(out, std::span<const FromT, 1>(&in, 1));
  201|    115|}
_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|    115|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|    115|   ranges::assert_equal_byte_lengths(out, in);
  178|    115|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|    115|}
_ZN5Botan8copy_memIhQsr3stdE12is_trivial_vIu7__decayIT_EEEEvPS1_PKS1_m:
  144|  33.4k|inline constexpr void copy_mem(T* out, const T* in, size_t n) {
  145|  33.4k|   BOTAN_ASSERT_IMPLICATION(n > 0, in != nullptr && out != nullptr, "If n > 0 then args are not null");
  ------------------
  |  |  110|  33.4k|   do {                                                                                          \
  |  |  111|  33.4k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                                              \
  |  |  112|  61.7k|      if((expr1) && !(expr2)) {                                                                  \
  |  |  ------------------
  |  |  |  Branch (112:10): [True: 30.8k, False: 2.52k]
  |  |  |  Branch (112:23): [True: 30.8k, False: 0]
  |  |  |  Branch (112:23): [True: 30.8k, False: 0]
  |  |  ------------------
  |  |  113|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                                     \
  |  |  114|      0|         Botan::assertion_failure(#expr1 " implies " #expr2, msg, __func__, __FILE__, __LINE__); \
  |  |  115|      0|      }                                                                                          \
  |  |  116|  33.4k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (116:12): [Folded, False: 33.4k]
  |  |  ------------------
  ------------------
  146|       |
  147|  33.4k|   if(in != nullptr && out != nullptr && n > 0) {
  ------------------
  |  Branch (147:7): [True: 33.1k, False: 226]
  |  Branch (147:24): [True: 31.9k, False: 1.25k]
  |  Branch (147:42): [True: 30.8k, False: 1.04k]
  ------------------
  148|  30.8k|      std::memmove(out, in, sizeof(T) * n);
  149|  30.8k|   }
  150|  33.4k|}
_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|    228|inline constexpr ToT typecast_copy(const FromR& src) {
  211|    228|   ToT dst;  // NOLINT(*-member-init)
  212|    228|   typecast_copy(dst, src);
  213|    228|   return dst;
  214|    228|}
_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|    228|inline constexpr void typecast_copy(ToT& out, const FromR& in) {
  189|    228|   typecast_copy(std::span<ToT, 1>(&out, 1), in);
  190|    228|}
_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|    228|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|    228|   ranges::assert_equal_byte_lengths(out, in);
  178|    228|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|    228|}
_ZN5Botan19secure_scrub_memoryITkNS_6ranges23contiguous_output_rangeERNSt3__16vectorIhNS2_9allocatorIhEEEEEEvOT_:
   59|  18.1k|void secure_scrub_memory(ranges::contiguous_output_range auto&& data) {
   60|  18.1k|   secure_scrub_memory(std::ranges::data(data), ranges::size_bytes(data));
   61|  18.1k|}
_ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeERNSt3__15arrayIhLm8EEETkNS1_16contiguous_rangeENS3_ImLm1EEEQaasr3stdE23is_trivially_copyable_vINS2_11conditionalIXsr21__is_primary_templateINS2_15iterator_traitsIu14__remove_cvrefIDTclL_ZNS2_6ranges5__cpo5beginEEclsr3stdE7declvalIRT0_EEEEEEEEE5valueENS2_26indirectly_readable_traitsISE_EESF_E4type10value_typeEEsr3stdE23is_trivially_copyable_vINS7_IXsr21__is_primary_templateINS8_Iu14__remove_cvrefIDTclL_ZNSA_5beginEEclsr3stdE7declvalIRT_EEEEEEEEE5valueENSG_ISO_EESP_E4type10value_typeEEEEvOSL_RKSB_:
  176|  3.01k|inline constexpr void typecast_copy(ToR&& out /* NOLINT(*-std-forward) */, const FromR& in) {
  177|  3.01k|   ranges::assert_equal_byte_lengths(out, in);
  178|  3.01k|   std::memcpy(std::ranges::data(out), std::ranges::data(in), ranges::size_bytes(out));
  179|  3.01k|}
_ZN5Botan9clear_memIjEEvPT_m:
  118|      6|inline constexpr void clear_mem(T* ptr, size_t n) {
  119|      6|   clear_bytes(ptr, sizeof(T) * n);
  120|      6|}

_ZN5Botan7X509_DNC2Ev:
  159|  1.55k|      X509_DN() = default;

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

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

_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEEC2Ev:
   57|  3.21k|      Strong_Base() = default;
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEEC2ES6_:
   77|  3.17k|      constexpr explicit Strong_Base(T v) : m_value(std::move(v)) {}
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEEaSEOS7_:
   71|  3.17k|      Strong_Base& operator=(Strong_Base&&) noexcept = default;
_ZN5Botan6detail11Strong_BaseINSt3__16vectorIhNS2_9allocatorIhEEEEED2Ev:
   73|  6.38k|      ~Strong_Base() = default;

_ZN5Botan18unwrap_strong_typeIRjEEDcOT_:
  119|    920|[[nodiscard]] constexpr decltype(auto) unwrap_strong_type(T&& t) {
  120|    920|   if constexpr(!concepts::strong_type<std::remove_cvref_t<T>>) {
  121|       |      // If the parameter type isn't a strong type, return it as is.
  122|    920|      return std::forward<T>(t);
  123|       |   } else {
  124|       |      // Unwrap the strong type and return the underlying value.
  125|       |      return std::forward<T>(t).get();
  126|       |   }
  127|    920|}
_ZN5Botan16wrap_strong_typeIhRhQoosr3stdE18constructible_fromIT_T0_Eaasr8conceptsE11strong_typeIS2_Esr3stdE18constructible_fromINS2_12wrapped_typeES3_EEEDcOS3_:
  144|   759k|[[nodiscard]] constexpr decltype(auto) wrap_strong_type(ParamT&& t) {
  145|   759k|   if constexpr(std::same_as<std::remove_cvref_t<ParamT>, T>) {
  146|       |      // Noop, if the parameter type already is the desired return type.
  147|   759k|      return std::forward<ParamT>(t);
  148|       |   } else if constexpr(std::constructible_from<T, ParamT>) {
  149|       |      // Implicit conversion from the parameter type to the return type.
  150|       |      return T{std::forward<ParamT>(t)};
  151|       |   } else {
  152|       |      // Explicitly calling the wrapped type's constructor to support
  153|       |      // implicit conversions on types that mark their constructors as explicit.
  154|       |      static_assert(concepts::strong_type<T> && std::constructible_from<typename T::wrapped_type, ParamT>);
  155|       |      return T{typename T::wrapped_type{std::forward<ParamT>(t)}};
  156|       |   }
  157|   759k|}
_ZN5Botan16wrap_strong_typeItRtQoosr3stdE18constructible_fromIT_T0_Eaasr8conceptsE11strong_typeIS2_Esr3stdE18constructible_fromINS2_12wrapped_typeES3_EEEDcOS3_:
  144|  17.2k|[[nodiscard]] constexpr decltype(auto) wrap_strong_type(ParamT&& t) {
  145|  17.2k|   if constexpr(std::same_as<std::remove_cvref_t<ParamT>, T>) {
  146|       |      // Noop, if the parameter type already is the desired return type.
  147|  17.2k|      return std::forward<ParamT>(t);
  148|       |   } else if constexpr(std::constructible_from<T, ParamT>) {
  149|       |      // Implicit conversion from the parameter type to the return type.
  150|       |      return T{std::forward<ParamT>(t)};
  151|       |   } else {
  152|       |      // Explicitly calling the wrapped type's constructor to support
  153|       |      // implicit conversions on types that mark their constructors as explicit.
  154|       |      static_assert(concepts::strong_type<T> && std::constructible_from<typename T::wrapped_type, ParamT>);
  155|       |      return T{typename T::wrapped_type{std::forward<ParamT>(t)}};
  156|       |   }
  157|  17.2k|}
_ZN5Botan18unwrap_strong_typeIRmEEDcOT_:
  119|    115|[[nodiscard]] constexpr decltype(auto) unwrap_strong_type(T&& t) {
  120|    115|   if constexpr(!concepts::strong_type<std::remove_cvref_t<T>>) {
  121|       |      // If the parameter type isn't a strong type, return it as is.
  122|    115|      return std::forward<T>(t);
  123|       |   } else {
  124|       |      // Unwrap the strong type and return the underlying value.
  125|       |      return std::forward<T>(t).get();
  126|       |   }
  127|    115|}
_ZN5Botan18unwrap_strong_typeIRNSt3__16vectorIhNS1_9allocatorIhEEEEEEDcOT_:
  119|  1.17k|[[nodiscard]] constexpr decltype(auto) unwrap_strong_type(T&& t) {
  120|  1.17k|   if constexpr(!concepts::strong_type<std::remove_cvref_t<T>>) {
  121|       |      // If the parameter type isn't a strong type, return it as is.
  122|  1.17k|      return std::forward<T>(t);
  123|       |   } else {
  124|       |      // Unwrap the strong type and return the underlying value.
  125|       |      return std::forward<T>(t).get();
  126|       |   }
  127|  1.17k|}
_ZN5Botan16wrap_strong_typeIjRjQoosr3stdE18constructible_fromIT_T0_Eaasr8conceptsE11strong_typeIS2_Esr3stdE18constructible_fromINS2_12wrapped_typeES3_EEEDcOS3_:
  144|    228|[[nodiscard]] constexpr decltype(auto) wrap_strong_type(ParamT&& t) {
  145|    228|   if constexpr(std::same_as<std::remove_cvref_t<ParamT>, T>) {
  146|       |      // Noop, if the parameter type already is the desired return type.
  147|    228|      return std::forward<ParamT>(t);
  148|       |   } else if constexpr(std::constructible_from<T, ParamT>) {
  149|       |      // Implicit conversion from the parameter type to the return type.
  150|       |      return T{std::forward<ParamT>(t)};
  151|       |   } else {
  152|       |      // Explicitly calling the wrapped type's constructor to support
  153|       |      // implicit conversions on types that mark their constructors as explicit.
  154|       |      static_assert(concepts::strong_type<T> && std::constructible_from<typename T::wrapped_type, ParamT>);
  155|       |      return T{typename T::wrapped_type{std::forward<ParamT>(t)}};
  156|       |   }
  157|    228|}

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

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

_ZN5Botan3TLS21Server_Name_Indicator11static_typeEv:
  123|     21|      static Extension_Code static_type() { return Extension_Code::ServerNameIndication; }
_ZNK5Botan3TLS21Server_Name_Indicator4typeEv:
  125|     21|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS39Application_Layer_Protocol_Notification11static_typeEv:
  157|     44|      static Extension_Code static_type() { return Extension_Code::ApplicationLayerProtocolNegotiation; }
_ZNK5Botan3TLS39Application_Layer_Protocol_Notification4typeEv:
  159|     44|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS23Client_Certificate_Type11static_typeEv:
  234|     18|      static Extension_Code static_type() { return Extension_Code::ClientCertificateType; }
_ZNK5Botan3TLS23Client_Certificate_Type4typeEv:
  236|     18|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS23Server_Certificate_Type11static_typeEv:
  248|     14|      static Extension_Code static_type() { return Extension_Code::ServerCertificateType; }
_ZNK5Botan3TLS23Server_Certificate_Type4typeEv:
  250|     14|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS16Supported_Groups11static_typeEv:
  258|    177|      static Extension_Code static_type() { return Extension_Code::SupportedGroups; }
_ZNK5Botan3TLS16Supported_Groups4typeEv:
  260|    177|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS20Signature_Algorithms11static_typeEv:
  287|     11|      static Extension_Code static_type() { return Extension_Code::SignatureAlgorithms; }
_ZNK5Botan3TLS20Signature_Algorithms4typeEv:
  289|     11|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS25Signature_Algorithms_Cert11static_typeEv:
  320|     17|      static Extension_Code static_type() { return Extension_Code::CertSignatureAlgorithms; }
_ZNK5Botan3TLS25Signature_Algorithms_Cert4typeEv:
  322|     17|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS24SRTP_Protection_Profiles11static_typeEv:
  343|     14|      static Extension_Code static_type() { return Extension_Code::UseSrtp; }
_ZNK5Botan3TLS24SRTP_Protection_Profiles4typeEv:
  345|     14|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS26Certificate_Status_Request11static_typeEv:
  370|     37|      static Extension_Code static_type() { return Extension_Code::CertificateStatusRequest; }
_ZNK5Botan3TLS26Certificate_Status_Request4typeEv:
  372|     37|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS18Supported_Versions11static_typeEv:
  408|     18|      static Extension_Code static_type() { return Extension_Code::SupportedVersions; }
_ZNK5Botan3TLS18Supported_Versions4typeEv:
  410|     18|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS17Record_Size_Limit11static_typeEv:
  439|     21|      static Extension_Code static_type() { return Extension_Code::RecordSizeLimit; }
_ZNK5Botan3TLS17Record_Size_Limit4typeEv:
  441|     21|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS17Unknown_Extension4typeEv:
  470|  2.51k|      Extension_Code type() const override { return m_type; }
_ZN5Botan3TLS10Extensions3addEPNS0_9ExtensionE:
  504|    170|      void add(Extension* extn) { add(std::unique_ptr<Extension>(extn)); }
_ZN5Botan3TLS10ExtensionsC2Ev:
  557|  3.17k|      Extensions() = default;
_ZN5Botan3TLS9ExtensionD2Ev:
  115|  5.47k|      virtual ~Extension() = default;
_ZNK5Botan3TLS10Extensions3getINS0_23Renegotiation_ExtensionEEEPT_v:
  487|    175|      T* get() const {
  488|    175|         return dynamic_cast<T*>(get(T::static_type()));
  489|    175|      }

_ZNK5Botan3TLS23Renegotiation_Extension18renegotiation_infoEv:
   41|      5|      const std::vector<uint8_t>& renegotiation_info() const { return m_reneg_data; }
_ZNK5Botan3TLS24Session_Ticket_Extension4typeEv:
   58|     38|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS24Session_Ticket_Extension11static_typeEv:
   56|     38|      static Extension_Code static_type() { return Extension_Code::SessionTicket; }
_ZN5Botan3TLS23Renegotiation_ExtensionC2Ev:
   35|    170|      Renegotiation_Extension() = default;
_ZN5Botan3TLS23Supported_Point_Formats11static_typeEv:
   99|     12|      static Extension_Code static_type() { return Extension_Code::EcPointFormats; }
_ZN5Botan3TLS23Renegotiation_Extension11static_typeEv:
   31|    358|      static Extension_Code static_type() { return Extension_Code::SafeRenegotiation; }
_ZN5Botan3TLS22Extended_Master_Secret11static_typeEv:
  122|     21|      static Extension_Code static_type() { return Extension_Code::ExtendedMasterSecret; }
_ZN5Botan3TLS16Encrypt_then_MAC11static_typeEv:
  140|     12|      static Extension_Code static_type() { return Extension_Code::EncryptThenMac; }
_ZNK5Botan3TLS23Renegotiation_Extension4typeEv:
   33|    183|      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|     21|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS16Encrypt_then_MAC4typeEv:
  142|     12|      Extension_Code type() const override { return static_type(); }

_ZN5Botan3TLS6Cookie11static_typeEv:
   44|     12|      static Extension_Code static_type() { return Extension_Code::Cookie; }
_ZNK5Botan3TLS6Cookie4typeEv:
   46|     12|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS22PSK_Key_Exchange_Modes11static_typeEv:
   67|     49|      static Extension_Code static_type() { return Extension_Code::PskKeyExchangeModes; }
_ZNK5Botan3TLS22PSK_Key_Exchange_Modes4typeEv:
   69|     49|      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|     23|      static Extension_Code static_type() { return Extension_Code::PresharedKey; }
_ZNK5Botan3TLS3PSK4typeEv:
  114|     23|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS9Key_Share11static_typeEv:
  212|     18|      static Extension_Code static_type() { return Extension_Code::KeyShare; }
_ZNK5Botan3TLS9Key_Share4typeEv:
  214|     18|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS19EarlyDataIndication11static_typeEv:
  306|     14|      static Extension_Code static_type() { return Extension_Code::EarlyData; }
_ZNK5Botan3TLS19EarlyDataIndication4typeEv:
  308|     14|      Extension_Code type() const override { return static_type(); }

_ZN5Botan3TLS17Handshake_MessageD2Ev:
   54|    663|      virtual ~Handshake_Message() = default;
_ZN5Botan3TLS17Handshake_MessageC2Ev:
   55|    663|      Handshake_Message() = default;

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

_ZN5Botan3TLS16Protocol_VersionC2Ev:
   58|  3.17k|      Protocol_Version() : m_version(0) {}
_ZN5Botan3TLS16Protocol_VersionC2Et:
   60|  3.77k|      explicit Protocol_Version(uint16_t code) : m_version(code) {}
_ZN5Botan3TLS16Protocol_VersionC2Ehh:
   73|  3.15k|            Protocol_Version(static_cast<uint16_t>((static_cast<uint16_t>(major) << 8) | minor)) {}
_ZNK5Botan3TLS16Protocol_Version13major_versionEv:
   88|  6.29k|      uint8_t major_version() const { return static_cast<uint8_t>(m_version >> 8); }

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

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

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

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

_ZN5Botan11ASN1_StringC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEENS_9ASN1_TypeE:
  135|  1.83k|ASN1_String::ASN1_String(std::string_view str, ASN1_Type t) : m_utf8_str(str), m_tag(t) {
  136|  1.83k|   if(!is_utf8_subset_string_type(m_tag)) {
  ------------------
  |  Branch (136:7): [True: 0, False: 1.83k]
  ------------------
  137|      0|      throw Invalid_Argument("ASN1_String only supports encoding to UTF-8 or a UTF-8 subset");
  138|      0|   }
  139|       |
  140|  1.83k|   if(!is_valid_asn1_string_content(m_utf8_str, m_tag)) {
  ------------------
  |  Branch (140:7): [True: 0, False: 1.83k]
  ------------------
  141|      0|      throw Invalid_Argument(fmt("ASN1_String: Invalid {} encoding", asn1_tag_to_string(m_tag)));
  142|      0|   }
  143|  1.83k|}
_ZN5Botan11ASN1_StringC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  145|  1.83k|ASN1_String::ASN1_String(std::string_view str) : ASN1_String(str, choose_encoding(str)) {}
_ZN5Botan11ASN1_String11decode_fromERNS_11BER_DecoderE:
  162|  1.67k|void ASN1_String::decode_from(BER_Decoder& source) {
  163|  1.67k|   const BER_Object obj = source.get_next_object();
  164|       |
  165|  1.67k|   if(obj.get_class() != ASN1_Class::Universal || !is_asn1_string_type(obj.type())) {
  ------------------
  |  Branch (165:7): [True: 11, False: 1.66k]
  |  Branch (165:51): [True: 74, False: 1.59k]
  ------------------
  166|     79|      auto typ = static_cast<uint32_t>(obj.type());
  167|     79|      auto cls = static_cast<uint32_t>(obj.get_class());
  168|     79|      throw Decoding_Error(fmt("ASN1_String: Unknown string type {}/{}", typ, cls));
  169|     79|   }
  170|       |
  171|  1.59k|   m_tag = obj.type();
  172|  1.59k|   m_data.assign(obj.bits(), obj.bits() + obj.length());
  173|       |
  174|  1.59k|   if(m_tag == ASN1_Type::BmpString) {
  ------------------
  |  Branch (174:7): [True: 192, False: 1.40k]
  ------------------
  175|    192|      m_utf8_str = ucs2_to_utf8(m_data);
  176|  1.40k|   } else if(m_tag == ASN1_Type::UniversalString) {
  ------------------
  |  Branch (176:14): [True: 135, False: 1.27k]
  ------------------
  177|    135|      m_utf8_str = ucs4_to_utf8(m_data);
  178|  1.27k|   } else if(m_tag == ASN1_Type::TeletexString) {
  ------------------
  |  Branch (178:14): [True: 497, False: 774]
  ------------------
  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|    497|      m_utf8_str = latin1_to_utf8(m_data);
  184|    774|   } else {
  185|       |      // All other supported string types are UTF-8 or some subset thereof
  186|    774|      m_utf8_str = ASN1::to_string(obj);
  187|       |
  188|    774|      if(!is_valid_asn1_string_content(m_utf8_str, m_tag)) {
  ------------------
  |  Branch (188:10): [True: 62, False: 712]
  ------------------
  189|     62|         throw Decoding_Error(fmt("ASN1_String: Invalid {} encoding", asn1_tag_to_string(m_tag)));
  190|     62|      }
  191|    774|   }
  192|  1.59k|}
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_119is_asn1_string_typeENS_9ASN1_TypeE:
   99|  1.66k|bool is_asn1_string_type(ASN1_Type tag) {
  100|  1.66k|   return (is_utf8_subset_string_type(tag) || tag == ASN1_Type::TeletexString || tag == ASN1_Type::BmpString ||
  ------------------
  |  Branch (100:12): [True: 768, False: 898]
  |  Branch (100:47): [True: 497, False: 401]
  |  Branch (100:82): [True: 192, False: 209]
  ------------------
  101|    209|           tag == ASN1_Type::UniversalString);
  ------------------
  |  Branch (101:12): [True: 135, False: 74]
  ------------------
  102|  1.66k|}
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_126is_utf8_subset_string_typeENS_9ASN1_TypeE:
   94|  6.10k|bool is_utf8_subset_string_type(ASN1_Type tag) {
   95|  6.10k|   return (tag == ASN1_Type::NumericString || tag == ASN1_Type::PrintableString || tag == ASN1_Type::VisibleString ||
  ------------------
  |  Branch (95:12): [True: 108, False: 5.99k]
  |  Branch (95:47): [True: 3.99k, False: 2.00k]
  |  Branch (95:84): [True: 314, False: 1.69k]
  ------------------
   96|  1.69k|           tag == ASN1_Type::Ia5String || tag == ASN1_Type::Utf8String);
  ------------------
  |  Branch (96:12): [True: 290, False: 1.40k]
  |  Branch (96:43): [True: 502, False: 898]
  ------------------
   97|  6.10k|}
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_128is_valid_asn1_string_contentERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_9ASN1_TypeE:
  104|  2.60k|bool is_valid_asn1_string_content(const std::string& str, ASN1_Type tag) {
  105|  2.60k|   BOTAN_ASSERT_NOMSG(is_utf8_subset_string_type(tag));
  ------------------
  |  |   84|  2.60k|   do {                                                                     \
  |  |   85|  2.60k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|  2.60k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 2.60k]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|  2.60k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 2.60k]
  |  |  ------------------
  ------------------
  106|       |
  107|  2.60k|   switch(tag) {
  108|    251|      case ASN1_Type::Utf8String:
  ------------------
  |  Branch (108:7): [True: 251, False: 2.35k]
  ------------------
  109|    251|         return is_valid_utf8(str);
  110|     54|      case ASN1_Type::NumericString:
  ------------------
  |  Branch (110:7): [True: 54, False: 2.54k]
  ------------------
  111|  2.04k|      case ASN1_Type::PrintableString:
  ------------------
  |  Branch (111:7): [True: 1.99k, False: 607]
  ------------------
  112|  2.19k|      case ASN1_Type::Ia5String:
  ------------------
  |  Branch (112:7): [True: 145, False: 2.45k]
  ------------------
  113|  2.35k|      case ASN1_Type::VisibleString:
  ------------------
  |  Branch (113:7): [True: 157, False: 2.44k]
  ------------------
  114|  2.35k|         return g_char_validator.valid_encoding(str, tag);
  115|      0|      default:
  ------------------
  |  Branch (115:7): [True: 0, False: 2.60k]
  ------------------
  116|      0|         return false;
  117|  2.60k|   }
  118|  2.60k|}
asn1_str.cpp:_ZNK5Botan12_GLOBAL__N_131ASN1_String_Codepoint_Validator14valid_encodingENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEENS_9ASN1_TypeE:
   25|  4.18k|      constexpr bool valid_encoding(std::string_view str, ASN1_Type tag) const {
   26|  4.18k|         const uint8_t mask = mask_for(tag);
   27|  4.18k|         for(const char c : str) {
  ------------------
  |  Branch (27:27): [True: 542, False: 4.17k]
  ------------------
   28|    542|            const uint8_t codepoint = static_cast<uint8_t>(c);
   29|    542|            const bool is_valid = (m_table[codepoint] & mask) != 0;
   30|       |
   31|    542|            if(!is_valid) {
  ------------------
  |  Branch (31:16): [True: 8, False: 534]
  ------------------
   32|      8|               return false;
   33|      8|            }
   34|    542|         }
   35|       |
   36|  4.17k|         return true;
   37|  4.18k|      }
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_131ASN1_String_Codepoint_Validator8mask_forENS_9ASN1_TypeE:
   45|  4.18k|      static constexpr uint8_t mask_for(ASN1_Type tag) {
   46|  4.18k|         switch(tag) {
   47|     54|            case ASN1_Type::NumericString:
  ------------------
  |  Branch (47:13): [True: 54, False: 4.13k]
  ------------------
   48|     54|               return Numeric_String;
   49|  3.82k|            case ASN1_Type::PrintableString:
  ------------------
  |  Branch (49:13): [True: 3.82k, False: 356]
  ------------------
   50|  3.82k|               return Printable_String;
   51|    145|            case ASN1_Type::Ia5String:
  ------------------
  |  Branch (51:13): [True: 145, False: 4.04k]
  ------------------
   52|    145|               return IA5_String;
   53|    157|            case ASN1_Type::VisibleString:
  ------------------
  |  Branch (53:13): [True: 157, False: 4.02k]
  ------------------
   54|    157|               return Visible_String;
   55|      0|            default:
  ------------------
  |  Branch (55:13): [True: 0, False: 4.18k]
  ------------------
   56|      0|               return 0;
   57|  4.18k|         }
   58|  4.18k|      }
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_115choose_encodingENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  120|  1.83k|ASN1_Type choose_encoding(std::string_view str) {
  121|  1.83k|   if(g_char_validator.valid_encoding(str, ASN1_Type::PrintableString)) {
  ------------------
  |  Branch (121:7): [True: 1.83k, False: 0]
  ------------------
  122|  1.83k|      return ASN1_Type::PrintableString;
  123|  1.83k|   } else {
  124|      0|      return ASN1_Type::Utf8String;
  125|      0|   }
  126|  1.83k|}

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

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

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

_ZN5Botan7SHA_25615compress_digestERNSt3__16vectorIjNS_16secure_allocatorIjEEEENS1_4spanIKhLm18446744073709551615EEEm:
   59|    281|                                                             size_t blocks) {
   60|    281|#if defined(BOTAN_HAS_SHA2_32_X86)
   61|    281|   if(CPUID::has(CPUID::Feature::SHA)) {
  ------------------
  |  Branch (61:7): [True: 281, False: 0]
  ------------------
   62|    281|      return SHA_256::compress_digest_x86(digest, input, blocks);
   63|    281|   }
   64|      0|#endif
   65|       |
   66|       |#if defined(BOTAN_HAS_SHA2_32_ARMV8)
   67|       |   if(CPUID::has(CPUID::Feature::SHA2)) {
   68|       |      return SHA_256::compress_digest_armv8(digest, input, blocks);
   69|       |   }
   70|       |#endif
   71|       |
   72|      0|#if defined(BOTAN_HAS_SHA2_32_X86_AVX2)
   73|      0|   if(CPUID::has(CPUID::Feature::AVX2, CPUID::Feature::BMI)) {
  ------------------
  |  Branch (73:7): [True: 0, False: 0]
  ------------------
   74|      0|      return SHA_256::compress_digest_x86_avx2(digest, input, blocks);
   75|      0|   }
   76|      0|#endif
   77|       |
   78|      0|#if defined(BOTAN_HAS_SHA2_32_SIMD)
   79|      0|   if(CPUID::has(CPUID::Feature::SIMD_4X32)) {
  ------------------
  |  Branch (79:7): [True: 0, False: 0]
  ------------------
   80|      0|      return SHA_256::compress_digest_x86_simd(digest, input, blocks);
   81|      0|   }
   82|      0|#endif
   83|       |
   84|      0|   uint32_t A = digest[0];
   85|      0|   uint32_t B = digest[1];
   86|      0|   uint32_t C = digest[2];
   87|      0|   uint32_t D = digest[3];
   88|      0|   uint32_t E = digest[4];
   89|      0|   uint32_t F = digest[5];
   90|      0|   uint32_t G = digest[6];
   91|      0|   uint32_t H = digest[7];
   92|       |
   93|      0|   std::array<uint32_t, 16> W{};
   94|       |
   95|      0|   BufferSlicer in(input);
   96|       |
   97|      0|   for(size_t i = 0; i != blocks; ++i) {
  ------------------
  |  Branch (97:22): [True: 0, False: 0]
  ------------------
   98|      0|      load_be(W, in.take<block_bytes>());
   99|       |
  100|       |      // clang-format off
  101|       |
  102|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W[ 0], W[14], W[ 9], W[ 1], SHA256_K[ 0]);
  103|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W[ 1], W[15], W[10], W[ 2], SHA256_K[ 1]);
  104|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W[ 2], W[ 0], W[11], W[ 3], SHA256_K[ 2]);
  105|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W[ 3], W[ 1], W[12], W[ 4], SHA256_K[ 3]);
  106|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W[ 4], W[ 2], W[13], W[ 5], SHA256_K[ 4]);
  107|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W[ 5], W[ 3], W[14], W[ 6], SHA256_K[ 5]);
  108|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W[ 6], W[ 4], W[15], W[ 7], SHA256_K[ 6]);
  109|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W[ 7], W[ 5], W[ 0], W[ 8], SHA256_K[ 7]);
  110|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W[ 8], W[ 6], W[ 1], W[ 9], SHA256_K[ 8]);
  111|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W[ 9], W[ 7], W[ 2], W[10], SHA256_K[ 9]);
  112|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W[10], W[ 8], W[ 3], W[11], SHA256_K[10]);
  113|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W[11], W[ 9], W[ 4], W[12], SHA256_K[11]);
  114|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W[12], W[10], W[ 5], W[13], SHA256_K[12]);
  115|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W[13], W[11], W[ 6], W[14], SHA256_K[13]);
  116|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W[14], W[12], W[ 7], W[15], SHA256_K[14]);
  117|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W[15], W[13], W[ 8], W[ 0], SHA256_K[15]);
  118|       |
  119|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W[ 0], W[14], W[ 9], W[ 1], SHA256_K[16]);
  120|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W[ 1], W[15], W[10], W[ 2], SHA256_K[17]);
  121|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W[ 2], W[ 0], W[11], W[ 3], SHA256_K[18]);
  122|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W[ 3], W[ 1], W[12], W[ 4], SHA256_K[19]);
  123|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W[ 4], W[ 2], W[13], W[ 5], SHA256_K[20]);
  124|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W[ 5], W[ 3], W[14], W[ 6], SHA256_K[21]);
  125|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W[ 6], W[ 4], W[15], W[ 7], SHA256_K[22]);
  126|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W[ 7], W[ 5], W[ 0], W[ 8], SHA256_K[23]);
  127|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W[ 8], W[ 6], W[ 1], W[ 9], SHA256_K[24]);
  128|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W[ 9], W[ 7], W[ 2], W[10], SHA256_K[25]);
  129|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W[10], W[ 8], W[ 3], W[11], SHA256_K[26]);
  130|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W[11], W[ 9], W[ 4], W[12], SHA256_K[27]);
  131|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W[12], W[10], W[ 5], W[13], SHA256_K[28]);
  132|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W[13], W[11], W[ 6], W[14], SHA256_K[29]);
  133|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W[14], W[12], W[ 7], W[15], SHA256_K[30]);
  134|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W[15], W[13], W[ 8], W[ 0], SHA256_K[31]);
  135|       |
  136|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W[ 0], W[14], W[ 9], W[ 1], SHA256_K[32]);
  137|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W[ 1], W[15], W[10], W[ 2], SHA256_K[33]);
  138|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W[ 2], W[ 0], W[11], W[ 3], SHA256_K[34]);
  139|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W[ 3], W[ 1], W[12], W[ 4], SHA256_K[35]);
  140|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W[ 4], W[ 2], W[13], W[ 5], SHA256_K[36]);
  141|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W[ 5], W[ 3], W[14], W[ 6], SHA256_K[37]);
  142|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W[ 6], W[ 4], W[15], W[ 7], SHA256_K[38]);
  143|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W[ 7], W[ 5], W[ 0], W[ 8], SHA256_K[39]);
  144|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W[ 8], W[ 6], W[ 1], W[ 9], SHA256_K[40]);
  145|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W[ 9], W[ 7], W[ 2], W[10], SHA256_K[41]);
  146|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W[10], W[ 8], W[ 3], W[11], SHA256_K[42]);
  147|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W[11], W[ 9], W[ 4], W[12], SHA256_K[43]);
  148|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W[12], W[10], W[ 5], W[13], SHA256_K[44]);
  149|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W[13], W[11], W[ 6], W[14], SHA256_K[45]);
  150|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W[14], W[12], W[ 7], W[15], SHA256_K[46]);
  151|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W[15], W[13], W[ 8], W[ 0], SHA256_K[47]);
  152|       |
  153|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W[ 0], W[14], W[ 9], W[ 1], SHA256_K[48]);
  154|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W[ 1], W[15], W[10], W[ 2], SHA256_K[49]);
  155|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W[ 2], W[ 0], W[11], W[ 3], SHA256_K[50]);
  156|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W[ 3], W[ 1], W[12], W[ 4], SHA256_K[51]);
  157|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W[ 4], W[ 2], W[13], W[ 5], SHA256_K[52]);
  158|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W[ 5], W[ 3], W[14], W[ 6], SHA256_K[53]);
  159|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W[ 6], W[ 4], W[15], W[ 7], SHA256_K[54]);
  160|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W[ 7], W[ 5], W[ 0], W[ 8], SHA256_K[55]);
  161|      0|      SHA2_32_F(A, B, C, D, E, F, G, H, W[ 8], W[ 6], W[ 1], W[ 9], SHA256_K[56]);
  162|      0|      SHA2_32_F(H, A, B, C, D, E, F, G, W[ 9], W[ 7], W[ 2], W[10], SHA256_K[57]);
  163|      0|      SHA2_32_F(G, H, A, B, C, D, E, F, W[10], W[ 8], W[ 3], W[11], SHA256_K[58]);
  164|      0|      SHA2_32_F(F, G, H, A, B, C, D, E, W[11], W[ 9], W[ 4], W[12], SHA256_K[59]);
  165|      0|      SHA2_32_F(E, F, G, H, A, B, C, D, W[12], W[10], W[ 5], W[13], SHA256_K[60]);
  166|      0|      SHA2_32_F(D, E, F, G, H, A, B, C, W[13], W[11], W[ 6], W[14], SHA256_K[61]);
  167|      0|      SHA2_32_F(C, D, E, F, G, H, A, B, W[14], W[12], W[ 7], W[15], SHA256_K[62]);
  168|      0|      SHA2_32_F(B, C, D, E, F, G, H, A, W[15], W[13], W[ 8], W[ 0], SHA256_K[63]);
  169|       |
  170|       |      // clang-format on
  171|       |
  172|      0|      A = (digest[0] += A);
  173|      0|      B = (digest[1] += B);
  174|      0|      C = (digest[2] += C);
  175|      0|      D = (digest[3] += D);
  176|      0|      E = (digest[4] += E);
  177|      0|      F = (digest[5] += F);
  178|      0|      G = (digest[6] += G);
  179|      0|      H = (digest[7] += H);
  180|      0|   }
  181|      0|}
_ZN5Botan7SHA_25610compress_nERNSt3__16vectorIjNS_16secure_allocatorIjEEEENS1_4spanIKhLm18446744073709551615EEEm:
  215|    281|void SHA_256::compress_n(digest_type& digest, std::span<const uint8_t> input, size_t blocks) {
  216|    281|   SHA_256::compress_digest(digest, input, blocks);
  217|    281|}
_ZN5Botan7SHA_2564initERNSt3__16vectorIjNS_16secure_allocatorIjEEEE:
  219|    239|void SHA_256::init(digest_type& digest) {
  220|    239|   digest.assign({0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19});
  221|    239|}
_ZN5Botan7SHA_2568add_dataENSt3__14spanIKhLm18446744073709551615EEE:
  231|    239|void SHA_256::add_data(std::span<const uint8_t> input) {
  232|    239|   m_md.update(input);
  233|    239|}
_ZN5Botan7SHA_25612final_resultENSt3__14spanIhLm18446744073709551615EEE:
  235|    115|void SHA_256::final_result(std::span<uint8_t> output) {
  236|    115|   m_md.final(output);
  237|    115|}

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

_ZN5Botan3TLS21Client_Hello_InternalC2ENSt3__14spanIKhLm18446744073709551615EEE:
   61|  3.17k|Client_Hello_Internal::Client_Hello_Internal(std::span<const uint8_t> buf) {
   62|       |   /*
   63|       |   Minimum possible client hello
   64|       |
   65|       |   version: 2 bytes
   66|       |   random: 32 bytes
   67|       |   session_id len: 1 byte
   68|       |   ciphersuite_len: 2
   69|       |   ciphersuite (single): 2
   70|       |   compression_len: 1
   71|       |   compression (single): 1
   72|       |   */
   73|       |
   74|  3.17k|   constexpr size_t MinimumClientHelloBytes = 2 + 32 + 1 + 2 + 2 + 1 + 1;
   75|  3.17k|   if(buf.size() < MinimumClientHelloBytes) {
  ------------------
  |  Branch (75:7): [True: 20, False: 3.15k]
  ------------------
   76|     20|      throw Decoding_Error("Client_Hello: Packet corrupted");
   77|     20|   }
   78|       |
   79|  3.15k|   TLS_Data_Reader reader("ClientHello", buf);
   80|       |
   81|  3.15k|   const uint8_t major_version = reader.get_byte();
   82|  3.15k|   const uint8_t minor_version = reader.get_byte();
   83|       |
   84|  3.15k|   m_legacy_version = Protocol_Version(major_version, minor_version);
   85|       |
   86|       |   // DTLS has an additional 1 byte cookie length field
   87|  3.15k|   if(m_legacy_version.is_datagram_protocol() && buf.size() < MinimumClientHelloBytes + 1) {
  ------------------
  |  Branch (87:7): [True: 126, False: 3.02k]
  |  Branch (87:50): [True: 1, False: 125]
  ------------------
   88|      1|      throw Decoding_Error("Client_Hello: DTLS packet corrupted");
   89|      1|   }
   90|       |
   91|  3.15k|   m_random = reader.get_fixed<uint8_t>(32);
   92|  3.15k|   m_session_id = Session_ID(reader.get_range<uint8_t>(1, 0, 32));
   93|       |
   94|  3.15k|   if(m_legacy_version.is_datagram_protocol()) {
  ------------------
  |  Branch (94:7): [True: 124, False: 3.02k]
  ------------------
   95|    124|      auto sha256 = HashFunction::create_or_throw("SHA-256");
   96|    124|      sha256->update(reader.get_data_read_so_far());
   97|       |
   98|    124|      m_hello_cookie = reader.get_range<uint8_t>(1, 0, 255);
   99|       |
  100|    124|      sha256->update(reader.get_remaining());
  101|    124|      m_cookie_input_bits = sha256->final_stdvec();
  102|    124|   }
  103|       |
  104|  3.15k|   m_suites = reader.get_range_vector<uint16_t>(2, 1, 32767);
  105|  3.15k|   m_comp_methods = reader.get_range_vector<uint8_t>(1, 1, 255);
  106|       |
  107|  3.15k|   m_extensions.deserialize(reader, Connection_Side::Client, Handshake_Type::ClientHello);
  108|  3.15k|}
_ZN5Botan3TLS12Client_HelloD2Ev:
  141|    663|Client_Hello::~Client_Hello() = default;
_ZN5Botan3TLS12Client_HelloC2ENSt3__110unique_ptrINS0_21Client_Hello_InternalENS2_14default_deleteIS4_EEEE:
  148|    663|Client_Hello::Client_Hello(std::unique_ptr<Client_Hello_Internal> data) : m_data(std::move(data)) {
  149|    663|   BOTAN_ASSERT_NONNULL(m_data);
  ------------------
  |  |  123|    663|   do {                                                                                   \
  |  |  124|    663|      if((ptr) == nullptr) {                                                              \
  |  |  ------------------
  |  |  |  Branch (124:10): [True: 0, False: 663]
  |  |  ------------------
  |  |  125|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                              \
  |  |  126|      0|         Botan::assertion_failure(#ptr " is not null", "", __func__, __FILE__, __LINE__); \
  |  |  127|      0|      }                                                                                   \
  |  |  128|    663|   } while(0)
  |  |  ------------------
  |  |  |  Branch (128:12): [Folded, False: 663]
  |  |  ------------------
  ------------------
  150|    663|}
_ZNK5Botan3TLS12Client_Hello13offered_suiteEt:
  224|    663|bool Client_Hello::offered_suite(uint16_t ciphersuite) const {
  225|    663|   return std::find(m_data->ciphersuites().cbegin(), m_data->ciphersuites().cend(), ciphersuite) !=
  226|    663|          m_data->ciphersuites().cend();
  227|    663|}
_ZN5Botan3TLS20Client_Hello_12_ShimC2ENSt3__110unique_ptrINS0_21Client_Hello_InternalENS2_14default_deleteIS4_EEEE:
  317|    663|      Client_Hello(std::move(data)) {}

_ZN5Botan3TLS15Client_Hello_12C2ENSt3__14spanIKhLm18446744073709551615EEE:
  270|  3.17k|      Client_Hello_12(std::make_unique<Client_Hello_Internal>(buf)) {}
_ZN5Botan3TLS15Client_Hello_12C2ENSt3__110unique_ptrINS0_21Client_Hello_InternalENS2_14default_deleteIS4_EEEE:
  281|    663|Client_Hello_12::Client_Hello_12(std::unique_ptr<Client_Hello_Internal> data) : Client_Hello_12_Shim(std::move(data)) {
  282|    663|   const uint16_t TLS_EMPTY_RENEGOTIATION_INFO_SCSV = 0x00FF;
  283|       |
  284|    663|   if(offered_suite(static_cast<uint16_t>(TLS_EMPTY_RENEGOTIATION_INFO_SCSV))) {
  ------------------
  |  Branch (284:7): [True: 175, False: 488]
  ------------------
  285|    175|      if(const Renegotiation_Extension* reneg = m_data->extensions().get<Renegotiation_Extension>()) {
  ------------------
  |  Branch (285:41): [True: 5, False: 170]
  ------------------
  286|      5|         if(!reneg->renegotiation_info().empty()) {
  ------------------
  |  Branch (286:13): [True: 4, False: 1]
  ------------------
  287|      4|            throw TLS_Exception(Alert::HandshakeFailure, "Client sent renegotiation SCSV and non-empty extension");
  288|      4|         }
  289|    170|      } else {
  290|       |         // add fake extension
  291|    170|         m_data->extensions().add(new Renegotiation_Extension());  // NOLINT(*-owning-memory)
  292|    170|      }
  293|    175|   }
  294|    663|}

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

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

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

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

_ZN5Botan3TLS10ExtensionsD2Ev:
  140|  3.17k|Extensions::~Extensions() = default;
_ZNK5Botan3TLS10Extensions3hasENS0_14Extension_CodeE:
  142|  8.62k|bool Extensions::has(Extension_Code type) const {
  143|  8.62k|   return m_extensions.contains(type);
  144|  8.62k|}
_ZNK5Botan3TLS10Extensions3getENS0_14Extension_CodeE:
  146|    175|Extension* Extensions::get(Extension_Code type) const {
  147|    175|   const auto i = m_extensions.find(type);
  148|       |
  149|    175|   if(i == m_extensions.end()) {
  ------------------
  |  Branch (149:7): [True: 170, False: 5]
  ------------------
  150|    170|      return nullptr;
  151|    170|   } else {
  152|      5|      return i->second.get();
  153|      5|   }
  154|    175|}
_ZN5Botan3TLS10Extensions3addENSt3__110unique_ptrINS0_9ExtensionENS2_14default_deleteIS4_EEEE:
  156|  3.29k|void Extensions::add(std::unique_ptr<Extension> extn) {
  157|  3.29k|   const auto type = extn->type();
  158|  3.29k|   if(has(type)) {
  ------------------
  |  Branch (158:7): [True: 0, False: 3.29k]
  ------------------
  159|      0|      throw Invalid_Argument("cannot add the same extension twice: " + std::to_string(static_cast<uint16_t>(type)));
  160|      0|   }
  161|       |
  162|  3.29k|   m_extension_codes.push_back(type);
  163|  3.29k|   m_extensions.emplace(type, std::move(extn));
  164|  3.29k|}
_ZN5Botan3TLS10Extensions11deserializeERNS0_15TLS_Data_ReaderENS0_15Connection_SideENS0_14Handshake_TypeE:
  166|  2.99k|void Extensions::deserialize(TLS_Data_Reader& reader, const Connection_Side from, const Handshake_Type message_type) {
  167|  2.99k|   if(reader.has_remaining()) {
  ------------------
  |  Branch (167:7): [True: 2.95k, False: 40]
  ------------------
  168|  2.95k|      const uint16_t all_extn_size = reader.get_uint16_t();
  169|       |
  170|  2.95k|      if(reader.remaining_bytes() != all_extn_size) {
  ------------------
  |  Branch (170:10): [True: 46, False: 2.91k]
  ------------------
  171|     46|         throw Decoding_Error("Bad extension size");
  172|     46|      }
  173|       |
  174|  8.29k|      while(reader.has_remaining()) {
  ------------------
  |  Branch (174:13): [True: 5.38k, False: 2.90k]
  ------------------
  175|  5.38k|         const uint16_t extension_code = reader.get_uint16_t();
  176|  5.38k|         const uint16_t extension_size = reader.get_uint16_t();
  177|       |
  178|  5.38k|         const auto type = static_cast<Extension_Code>(extension_code);
  179|       |
  180|  5.38k|         if(this->has(type)) {
  ------------------
  |  Branch (180:13): [True: 2, False: 5.38k]
  ------------------
  181|      2|            throw TLS_Exception(TLS::Alert::DecodeError, "Peer sent duplicated extensions");
  182|      2|         }
  183|       |
  184|       |         // TODO offer a function on reader that returns a byte range as a reference
  185|       |         // to avoid this copy of the extension data
  186|  5.38k|         const std::vector<uint8_t> extn_data = reader.get_fixed<uint8_t>(extension_size);
  187|  5.38k|         m_raw_extension_data[type] = extn_data;
  188|  5.38k|         TLS_Data_Reader extn_reader("Extension", extn_data);
  189|  5.38k|         this->add(make_extension(extn_reader, type, from, message_type));
  190|  5.38k|         extn_reader.assert_done();
  191|  5.38k|      }
  192|  2.91k|   }
  193|  2.99k|}
_ZN5Botan3TLS17Unknown_ExtensionC2ENS0_14Extension_CodeERNS0_15TLS_Data_ReaderEt:
  313|  2.51k|      m_type(type), m_value(reader.get_fixed<uint8_t>(extension_size)) {}
_ZN5Botan3TLS21Server_Name_IndicatorC2ERNS0_15TLS_Data_ReaderEtNS0_15Connection_SideE:
  319|    188|Server_Name_Indicator::Server_Name_Indicator(TLS_Data_Reader& reader, uint16_t extension_size, Connection_Side from) {
  320|       |   /*
  321|       |   RFC 6066 Section 3
  322|       |
  323|       |      A server that receives a client hello containing the "server_name"
  324|       |      extension MAY use the information contained in the extension to guide
  325|       |      its selection of an appropriate certificate to return to the client,
  326|       |      and/or other aspects of security policy.  In this event, the server
  327|       |      SHALL include an extension of type "server_name" in the (extended)
  328|       |      server hello.  The "extension_data" field of this extension SHALL be
  329|       |      empty.
  330|       |   */
  331|    188|   if(from == Connection_Side::Server) {
  ------------------
  |  Branch (331:7): [True: 0, False: 188]
  ------------------
  332|      0|      if(extension_size != 0) {
  ------------------
  |  Branch (332:10): [True: 0, False: 0]
  ------------------
  333|      0|         throw TLS_Exception(Alert::IllegalParameter, "Server sent non-empty SNI extension");
  334|      0|      }
  335|    188|   } else {
  336|       |      // Clients are required to send at least one name in the SNI
  337|    188|      if(extension_size == 0) {
  ------------------
  |  Branch (337:10): [True: 9, False: 179]
  ------------------
  338|      9|         throw TLS_Exception(Alert::IllegalParameter, "Client sent empty SNI extension");
  339|      9|      }
  340|       |
  341|    179|      const uint16_t name_bytes = reader.get_uint16_t();
  342|       |
  343|       |      // RFC 6066 3: a ServerName carrying a host_name (the only NameType
  344|       |      // currently defined and the only one this implementation acts on)
  345|       |      // requires at least 1 byte name_type + 2 byte length + 1 byte HostName.
  346|    179|      if(name_bytes + 2 != extension_size || name_bytes < 4) {
  ------------------
  |  Branch (346:10): [True: 21, False: 158]
  |  Branch (346:46): [True: 5, False: 153]
  ------------------
  347|     25|         throw Decoding_Error("Bad encoding of SNI extension");
  348|     25|      }
  349|       |
  350|    154|      BOTAN_ASSERT_NOMSG(reader.remaining_bytes() == name_bytes);
  ------------------
  |  |   84|    154|   do {                                                                     \
  |  |   85|    154|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   86|    154|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 154]
  |  |  ------------------
  |  |   87|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   88|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   89|      0|      }                                                                     \
  |  |   90|    154|   } while(0)
  |  |  ------------------
  |  |  |  Branch (90:12): [Folded, False: 154]
  |  |  ------------------
  ------------------
  351|       |
  352|    508|      while(reader.has_remaining()) {
  ------------------
  |  Branch (352:13): [True: 458, False: 50]
  ------------------
  353|    458|         const uint8_t name_type = reader.get_byte();
  354|       |
  355|    458|         if(name_type == 0) {
  ------------------
  |  Branch (355:13): [True: 138, False: 320]
  ------------------
  356|       |            /*
  357|       |            RFC 6066 Section 3
  358|       |               The ServerNameList MUST NOT contain more than one name of the same name_type.
  359|       |            */
  360|    138|            if(!m_sni_host_name.empty()) {
  ------------------
  |  Branch (360:16): [True: 6, False: 132]
  ------------------
  361|      6|               throw Decoding_Error("TLS ServerNameIndicator contains more than one host_name");
  362|      6|            }
  363|       |
  364|    132|            const std::string host_name = reader.get_string(2, 1, 65535);
  365|       |
  366|       |            /*
  367|       |            RFC 6066 Section 3
  368|       |               The hostname is represented as a byte string using ASCII
  369|       |               encoding without a trailing dot. [...] Literal IPv4 and IPv6
  370|       |               addresses are not permitted in "HostName".
  371|       |            */
  372|    132|            if(auto dns_name = DNSName::from_string(host_name)) {
  ------------------
  |  Branch (372:21): [True: 34, False: 98]
  ------------------
  373|     34|               m_sni_host_name = dns_name->to_string();
  374|     98|            } else {
  375|     98|               throw TLS_Exception(Alert::IllegalParameter,
  376|     98|                                   "TLS ServerNameIndicator host_name is not a valid DNS name");
  377|     98|            }
  378|    320|         } else {
  379|       |            /*
  380|       |            Unknown name type - skip its length-prefixed value and continue
  381|       |
  382|       |            RFC 6066 Section 3
  383|       |               For backward compatibility, all future data structures associated
  384|       |               with new NameTypes MUST begin with a 16-bit length field.
  385|       |            */
  386|    320|            const uint16_t unknown_name_len = reader.get_uint16_t();
  387|    320|            reader.discard_next(unknown_name_len);
  388|    320|         }
  389|    458|      }
  390|    154|   }
  391|    188|}
_ZN5Botan3TLS39Application_Layer_Protocol_NotificationC2ERNS0_15TLS_Data_ReaderEtNS0_15Connection_SideE:
  461|    137|                                                                                 Connection_Side from) {
  462|    137|   if(extension_size < 2) {
  ------------------
  |  Branch (462:7): [True: 3, False: 134]
  ------------------
  463|      3|      throw Decoding_Error("ALPN extension cannot be empty");
  464|      3|   }
  465|       |
  466|    134|   const uint16_t name_bytes = reader.get_uint16_t();
  467|       |
  468|    134|   size_t bytes_remaining = extension_size - 2;
  469|       |
  470|    134|   if(name_bytes != bytes_remaining) {
  ------------------
  |  Branch (470:7): [True: 31, False: 103]
  ------------------
  471|     31|      throw Decoding_Error("Bad encoding of ALPN extension, bad length field");
  472|     31|   }
  473|       |
  474|       |   // RFC 7301 3.1: ProtocolName protocol_name_list<2..2^16-1>
  475|    103|   if(name_bytes == 0) {
  ------------------
  |  Branch (475:7): [True: 1, False: 102]
  ------------------
  476|      1|      throw Decoding_Error("Empty ALPN protocol_name_list not allowed");
  477|      1|   }
  478|       |
  479|  3.86k|   while(bytes_remaining > 0) {
  ------------------
  |  Branch (479:10): [True: 3.77k, False: 83]
  ------------------
  480|  3.77k|      const std::string p = reader.get_string(1, 0, 255);
  481|       |
  482|  3.77k|      if(bytes_remaining < p.size() + 1) {
  ------------------
  |  Branch (482:10): [True: 0, False: 3.77k]
  ------------------
  483|      0|         throw Decoding_Error("Bad encoding of ALPN, length field too long");
  484|      0|      }
  485|       |
  486|  3.77k|      if(p.empty()) {
  ------------------
  |  Branch (486:10): [True: 19, False: 3.75k]
  ------------------
  487|     19|         throw Decoding_Error("Empty ALPN protocol not allowed");
  488|     19|      }
  489|       |
  490|  3.75k|      bytes_remaining -= (p.size() + 1);
  491|       |
  492|  3.75k|      m_protocols.push_back(p);
  493|  3.75k|   }
  494|       |
  495|       |   // RFC 7301 3.1
  496|       |   //    The "extension_data" field of the [...] extension is structured the
  497|       |   //    same as described above for the client "extension_data", except that
  498|       |   //    the "ProtocolNameList" MUST contain exactly one "ProtocolName".
  499|     83|   if(from == Connection_Side::Server && m_protocols.size() != 1) {
  ------------------
  |  Branch (499:7): [True: 0, False: 83]
  |  Branch (499:42): [True: 0, False: 0]
  ------------------
  500|      0|      throw TLS_Exception(
  501|      0|         Alert::DecodeError,
  502|      0|         "Server sent " + std::to_string(m_protocols.size()) + " protocols in ALPN extension response");
  503|      0|   }
  504|     83|}
_ZN5Botan3TLS21Certificate_Type_BaseC2ERNS0_15TLS_Data_ReaderEtNS0_15Connection_SideE:
  567|     54|      m_from(from) {
  568|     54|   if(extension_size == 0) {
  ------------------
  |  Branch (568:7): [True: 3, False: 51]
  ------------------
  569|      3|      throw Decoding_Error("Certificate type extension cannot be empty");
  570|      3|   }
  571|       |
  572|     51|   if(from == Connection_Side::Client) {
  ------------------
  |  Branch (572:7): [True: 51, False: 0]
  ------------------
  573|     51|      const auto type_bytes = reader.get_tls_length_value(1);
  574|     51|      if(static_cast<size_t>(extension_size) != type_bytes.size() + 1) {
  ------------------
  |  Branch (574:10): [True: 16, False: 35]
  ------------------
  575|     16|         throw Decoding_Error("certificate type extension had inconsistent length");
  576|     16|      }
  577|       |      // RFC 7250 4: {client,server}_certificate_types<1..2^8-1> so must be non-empty
  578|     35|      if(type_bytes.empty()) {
  ------------------
  |  Branch (578:10): [True: 1, False: 34]
  ------------------
  579|      1|         throw Decoding_Error("Certificate type extension contains no types");
  580|      1|      }
  581|     34|      std::transform(
  582|     34|         type_bytes.begin(), type_bytes.end(), std::back_inserter(m_certificate_types), [](const auto type_byte) {
  583|     34|            return static_cast<Certificate_Type>(type_byte);
  584|     34|         });
  585|     34|   } else {
  586|       |      // RFC 7250 4.2
  587|       |      //    Note that only a single value is permitted in the
  588|       |      //    server_certificate_type extension when carried in the server hello.
  589|      0|      if(extension_size != 1) {
  ------------------
  |  Branch (589:10): [True: 0, False: 0]
  ------------------
  590|      0|         throw Decoding_Error("Server's certificate type extension must be of length 1");
  591|      0|      }
  592|      0|      const auto type_byte = reader.get_byte();
  593|      0|      m_certificate_types.push_back(static_cast<Certificate_Type>(type_byte));
  594|      0|   }
  595|     51|}
_ZN5Botan3TLS16Supported_GroupsC2ERNS0_15TLS_Data_ReaderEt:
  680|    209|Supported_Groups::Supported_Groups(TLS_Data_Reader& reader, uint16_t extension_size) {
  681|    209|   const uint16_t len = reader.get_uint16_t();
  682|       |
  683|    209|   if(len + 2 != extension_size) {
  ------------------
  |  Branch (683:7): [True: 22, False: 187]
  ------------------
  684|     22|      throw Decoding_Error("Inconsistent length field in supported groups list");
  685|     22|   }
  686|       |
  687|       |   // RFC 8446 4.2.7: NamedGroup named_group_list<2..2^16-1>;
  688|    187|   if(len == 0) {
  ------------------
  |  Branch (688:7): [True: 1, False: 186]
  ------------------
  689|      1|      throw Decoding_Error("Empty supported groups list");
  690|      1|   }
  691|       |
  692|    186|   if(len % 2 == 1) {
  ------------------
  |  Branch (692:7): [True: 8, False: 178]
  ------------------
  693|      8|      throw Decoding_Error("Supported groups list of strange size");
  694|      8|   }
  695|       |
  696|    178|   const size_t elems = len / 2;
  697|       |
  698|    178|   std::unordered_set<uint16_t> seen;
  699|  20.5k|   for(size_t i = 0; i != elems; ++i) {
  ------------------
  |  Branch (699:22): [True: 20.3k, False: 178]
  ------------------
  700|  20.3k|      const auto group = static_cast<Group_Params>(reader.get_uint16_t());
  701|       |      // Note: RFC 8446 does not explicitly enforce that groups must be unique.
  702|  20.3k|      if(seen.insert(group.wire_code()).second) {
  ------------------
  |  Branch (702:10): [True: 13.2k, False: 7.10k]
  ------------------
  703|  13.2k|         m_groups.push_back(group);
  704|  13.2k|      }
  705|  20.3k|   }
  706|    178|}
_ZN5Botan3TLS20Signature_AlgorithmsC2ERNS0_15TLS_Data_ReaderEt:
  752|     21|      m_schemes(parse_signature_algorithms(reader, extension_size)) {}
_ZN5Botan3TLS25Signature_Algorithms_CertC2ERNS0_15TLS_Data_ReaderEt:
  759|     31|      m_schemes(parse_signature_algorithms(reader, extension_size)) {}
_ZN5Botan3TLS24SRTP_Protection_ProfilesC2ERNS0_15TLS_Data_ReaderEtNS0_15Connection_SideE:
  763|     60|                                                   Connection_Side from) {
  764|       |   // RFC 5764 4.1.1: UseSRTPData consists of
  765|       |   //    SRTPProtectionProfile SRTPProtectionProfiles<2..2^16-1>;
  766|       |   //    opaque srtp_mki<0..255>;
  767|       |   // for a wire size of 2 (profiles len) + 2*N + 1 (mki len) + mki_bytes,
  768|       |   // with N >= 1.
  769|     60|   if(extension_size < 5) {
  ------------------
  |  Branch (769:7): [True: 3, False: 57]
  ------------------
  770|      3|      throw Decoding_Error("Truncated SRTP protection extension");
  771|      3|   }
  772|     57|   const size_t max_profile_pairs = (static_cast<size_t>(extension_size) - 3) / 2;
  773|     57|   m_pp = reader.get_range<uint16_t>(2, 1, max_profile_pairs);
  774|     57|   const std::vector<uint8_t> mki = reader.get_range<uint8_t>(1, 0, 255);
  775|       |
  776|     57|   if(m_pp.size() * 2 + mki.size() + 3 != extension_size) {
  ------------------
  |  Branch (776:7): [True: 17, False: 40]
  ------------------
  777|     17|      throw Decoding_Error("Bad encoding for SRTP protection extension");
  778|     17|   }
  779|       |
  780|       |   // RFC 5764 4.1.1
  781|       |   //    The extension_data field MUST contain a [...] single
  782|       |   //    SRTPProtectionProfile value that the server has chosen for use with
  783|       |   //    this connection.
  784|     40|   if(from == Connection_Side::Server && (m_pp.size() != 1 || m_pp.front() == 0)) {
  ------------------
  |  Branch (784:7): [True: 0, False: 40]
  |  Branch (784:43): [True: 0, False: 0]
  |  Branch (784:63): [True: 0, False: 0]
  ------------------
  785|      0|      throw TLS_Exception(Alert::DecodeError, "Server sent malformed DTLS-SRTP extension");
  786|      0|   }
  787|       |
  788|       |   // Any srtp_mki the peer offers is ignored; serialize() always answers with an
  789|       |   // empty srtp_mki, per RFC 5764 4.1.3:
  790|       |   //    2.  return an empty "srtp_mki" value to indicate that it cannot make
  791|       |   //        use of the MKI.
  792|     40|}
_ZN5Botan3TLS18Supported_VersionsC2ERNS0_15TLS_Data_ReaderEtNS0_15Connection_SideE:
  867|     36|Supported_Versions::Supported_Versions(TLS_Data_Reader& reader, uint16_t extension_size, Connection_Side from) {
  868|     36|   if(from == Connection_Side::Server) {
  ------------------
  |  Branch (868:7): [True: 0, False: 36]
  ------------------
  869|      0|      if(extension_size != 2) {
  ------------------
  |  Branch (869:10): [True: 0, False: 0]
  ------------------
  870|      0|         throw Decoding_Error("Server sent invalid supported_versions extension");
  871|      0|      }
  872|      0|      m_versions.push_back(Protocol_Version(reader.get_uint16_t()));
  873|     36|   } else {
  874|     36|      const auto versions = reader.get_range<uint16_t>(1, 1, 127);
  875|       |
  876|    617|      for(const auto v : versions) {
  ------------------
  |  Branch (876:24): [True: 617, False: 36]
  ------------------
  877|    617|         m_versions.push_back(Protocol_Version(v));
  878|    617|      }
  879|       |
  880|     36|      if(extension_size != 1 + 2 * versions.size()) {
  ------------------
  |  Branch (880:10): [True: 5, False: 31]
  ------------------
  881|      5|         throw Decoding_Error("Client sent invalid supported_versions extension");
  882|      5|      }
  883|     36|   }
  884|     36|}
_ZN5Botan3TLS17Record_Size_LimitC2ERNS0_15TLS_Data_ReaderEtNS0_15Connection_SideE:
  901|     39|Record_Size_Limit::Record_Size_Limit(TLS_Data_Reader& reader, uint16_t extension_size, Connection_Side from) {
  902|     39|   if(extension_size != 2) {
  ------------------
  |  Branch (902:7): [True: 11, False: 28]
  ------------------
  903|     11|      throw TLS_Exception(Alert::DecodeError, "invalid record_size_limit extension");
  904|     11|   }
  905|       |
  906|     28|   m_limit = reader.get_uint16_t();
  907|       |
  908|       |   // RFC 8449 4.
  909|       |   //    This value is the length of the plaintext of a protected record.
  910|       |   //    The value includes the content type and padding added in TLS 1.3 (that
  911|       |   //    is, the complete length of TLSInnerPlaintext).
  912|       |   //
  913|       |   //    A server MUST NOT enforce this restriction; a client might advertise
  914|       |   //    a higher limit that is enabled by an extension or version the server
  915|       |   //    does not understand. A client MAY abort the handshake with an
  916|       |   //    "illegal_parameter" alert.
  917|       |   //
  918|       |   // Note: We are currently supporting this extension in TLS 1.3 only, hence
  919|       |   //       we check for the TLS 1.3 limit. The TLS 1.2 limit would not include
  920|       |   //       the "content type byte" and hence be one byte less!
  921|     28|   if(m_limit > MAX_PLAINTEXT_SIZE + 1 /* encrypted content type byte */ && from == Connection_Side::Server) {
  ------------------
  |  Branch (921:7): [True: 5, False: 23]
  |  Branch (921:77): [True: 0, False: 5]
  ------------------
  922|      0|      throw TLS_Exception(Alert::IllegalParameter,
  923|      0|                          "Server requested a record size limit larger than the protocol's maximum");
  924|      0|   }
  925|       |
  926|       |   // RFC 8449 4.
  927|       |   //    Endpoints MUST NOT send a "record_size_limit" extension with a value
  928|       |   //    smaller than 64.  An endpoint MUST treat receipt of a smaller value
  929|       |   //    as a fatal error and generate an "illegal_parameter" alert.
  930|     28|   if(m_limit < 64) {
  ------------------
  |  Branch (930:7): [True: 7, False: 21]
  ------------------
  931|      7|      throw TLS_Exception(Alert::IllegalParameter, "Received a record size limit smaller than 64 bytes");
  932|      7|   }
  933|     28|}
tls_extensions.cpp:_ZN5Botan3TLS12_GLOBAL__N_114make_extensionERNS0_15TLS_Data_ReaderENS0_14Extension_CodeENS0_15Connection_SideENS0_14Handshake_TypeE:
   41|  5.30k|                                          const Handshake_Type message_type) {
   42|       |   // This cast is safe because we read exactly a 16 bit length field for
   43|       |   // the extension in Extensions::deserialize
   44|  5.30k|   const uint16_t size = static_cast<uint16_t>(reader.remaining_bytes());
   45|  5.30k|   switch(code) {
  ------------------
  |  Branch (45:11): [True: 2.79k, False: 2.50k]
  ------------------
   46|    188|      case Extension_Code::ServerNameIndication:
  ------------------
  |  Branch (46:7): [True: 188, False: 5.11k]
  ------------------
   47|    188|         return std::make_unique<Server_Name_Indicator>(reader, size, from);
   48|       |
   49|    209|      case Extension_Code::SupportedGroups:
  ------------------
  |  Branch (49:7): [True: 209, False: 5.09k]
  ------------------
   50|    209|         return std::make_unique<Supported_Groups>(reader, size);
   51|       |
   52|     99|      case Extension_Code::CertificateStatusRequest:
  ------------------
  |  Branch (52:7): [True: 99, False: 5.20k]
  ------------------
   53|     99|         return std::make_unique<Certificate_Status_Request>(reader, size, message_type, from);
   54|       |
   55|     21|      case Extension_Code::SignatureAlgorithms:
  ------------------
  |  Branch (55:7): [True: 21, False: 5.28k]
  ------------------
   56|     21|         return std::make_unique<Signature_Algorithms>(reader, size);
   57|       |
   58|     31|      case Extension_Code::CertSignatureAlgorithms:
  ------------------
  |  Branch (58:7): [True: 31, False: 5.27k]
  ------------------
   59|     31|         return std::make_unique<Signature_Algorithms_Cert>(reader, size);
   60|       |
   61|     60|      case Extension_Code::UseSrtp:
  ------------------
  |  Branch (61:7): [True: 60, False: 5.24k]
  ------------------
   62|     60|         return std::make_unique<SRTP_Protection_Profiles>(reader, size, from);
   63|       |
   64|    137|      case Extension_Code::ApplicationLayerProtocolNegotiation:
  ------------------
  |  Branch (64:7): [True: 137, False: 5.16k]
  ------------------
   65|    137|         return std::make_unique<Application_Layer_Protocol_Notification>(reader, size, from);
   66|       |
   67|     30|      case Extension_Code::ClientCertificateType:
  ------------------
  |  Branch (67:7): [True: 30, False: 5.27k]
  ------------------
   68|     30|         return std::make_unique<Client_Certificate_Type>(reader, size, from);
   69|       |
   70|     24|      case Extension_Code::ServerCertificateType:
  ------------------
  |  Branch (70:7): [True: 24, False: 5.28k]
  ------------------
   71|     24|         return std::make_unique<Server_Certificate_Type>(reader, size, from);
   72|       |
   73|     39|      case Extension_Code::RecordSizeLimit:
  ------------------
  |  Branch (73:7): [True: 39, False: 5.26k]
  ------------------
   74|     39|         return std::make_unique<Record_Size_Limit>(reader, size, from);
   75|       |
   76|     36|      case Extension_Code::SupportedVersions:
  ------------------
  |  Branch (76:7): [True: 36, False: 5.26k]
  ------------------
   77|     36|         return std::make_unique<Supported_Versions>(reader, size, from);
   78|       |
   79|      4|      case Extension_Code::Padding:
  ------------------
  |  Branch (79:7): [True: 4, False: 5.30k]
  ------------------
   80|      4|         break;  // RFC 7685, recognized but not implemented; falls through to Unknown_Extension
   81|       |
   82|      0|#if defined(BOTAN_HAS_TLS_12)
   83|     58|      case Extension_Code::EcPointFormats:
  ------------------
  |  Branch (83:7): [True: 58, False: 5.24k]
  ------------------
   84|     58|         return std::make_unique<Supported_Point_Formats>(reader, size);
   85|       |
   86|     27|      case Extension_Code::SafeRenegotiation:
  ------------------
  |  Branch (86:7): [True: 27, False: 5.27k]
  ------------------
   87|     27|         return std::make_unique<Renegotiation_Extension>(reader, size);
   88|       |
   89|     33|      case Extension_Code::ExtendedMasterSecret:
  ------------------
  |  Branch (89:7): [True: 33, False: 5.27k]
  ------------------
   90|     33|         return std::make_unique<Extended_Master_Secret>(reader, size);
   91|       |
   92|     24|      case Extension_Code::EncryptThenMac:
  ------------------
  |  Branch (92:7): [True: 24, False: 5.28k]
  ------------------
   93|     24|         return std::make_unique<Encrypt_then_MAC>(reader, size);
   94|       |
   95|     38|      case Extension_Code::SessionTicket:
  ------------------
  |  Branch (95:7): [True: 38, False: 5.26k]
  ------------------
   96|     38|         return std::make_unique<Session_Ticket_Extension>(reader, size, from);
   97|       |#else
   98|       |      case Extension_Code::EcPointFormats:
   99|       |      case Extension_Code::SafeRenegotiation:
  100|       |      case Extension_Code::ExtendedMasterSecret:
  101|       |      case Extension_Code::EncryptThenMac:
  102|       |      case Extension_Code::SessionTicket:
  103|       |         break;  // considered as 'unknown extension'
  104|       |#endif
  105|       |
  106|      0|#if defined(BOTAN_HAS_TLS_13)
  107|    180|      case Extension_Code::PresharedKey:
  ------------------
  |  Branch (107:7): [True: 180, False: 5.12k]
  ------------------
  108|    180|         return std::make_unique<PSK>(reader, size, message_type);
  109|       |
  110|     25|      case Extension_Code::EarlyData:
  ------------------
  |  Branch (110:7): [True: 25, False: 5.28k]
  ------------------
  111|     25|         return std::make_unique<EarlyDataIndication>(reader, size, message_type);
  112|       |
  113|     40|      case Extension_Code::Cookie:
  ------------------
  |  Branch (113:7): [True: 40, False: 5.26k]
  ------------------
  114|     40|         return std::make_unique<Cookie>(reader, size);
  115|       |
  116|     69|      case Extension_Code::PskKeyExchangeModes:
  ------------------
  |  Branch (116:7): [True: 69, False: 5.23k]
  ------------------
  117|     69|         return std::make_unique<PSK_Key_Exchange_Modes>(reader, size);
  118|       |
  119|  1.34k|      case Extension_Code::CertificateAuthorities:
  ------------------
  |  Branch (119:7): [True: 1.34k, False: 3.96k]
  ------------------
  120|  1.34k|         return std::make_unique<Certificate_Authorities>(reader, size);
  121|       |
  122|     85|      case Extension_Code::KeyShare:
  ------------------
  |  Branch (122:7): [True: 85, False: 5.22k]
  ------------------
  123|     85|         return std::make_unique<Key_Share>(reader, size, message_type);
  124|       |#else
  125|       |      case Extension_Code::PresharedKey:
  126|       |      case Extension_Code::EarlyData:
  127|       |      case Extension_Code::Cookie:
  128|       |      case Extension_Code::PskKeyExchangeModes:
  129|       |      case Extension_Code::CertificateAuthorities:
  130|       |      case Extension_Code::KeyShare:
  131|       |         break;  // considered as 'unknown extension'
  132|       |#endif
  133|  5.30k|   }
  134|       |
  135|  2.51k|   return std::make_unique<Unknown_Extension>(code, reader, size);
  136|  5.30k|}
tls_extensions.cpp:_ZZN5Botan3TLS21Certificate_Type_BaseC1ERNS0_15TLS_Data_ReaderEtNS0_15Connection_SideEENK3$_0clIhEEDaT_:
  582|  1.65k|         type_bytes.begin(), type_bytes.end(), std::back_inserter(m_certificate_types), [](const auto type_byte) {
  583|  1.65k|            return static_cast<Certificate_Type>(type_byte);
  584|  1.65k|         });
tls_extensions.cpp:_ZN5Botan3TLS12_GLOBAL__N_126parse_signature_algorithmsERNS0_15TLS_Data_ReaderEt:
  728|     52|std::vector<Signature_Scheme> parse_signature_algorithms(TLS_Data_Reader& reader, uint16_t extension_size) {
  729|     52|   uint16_t len = reader.get_uint16_t();
  730|       |
  731|     52|   if(len + 2 != extension_size || len % 2 == 1 || len == 0) {
  ------------------
  |  Branch (731:7): [True: 22, False: 30]
  |  Branch (731:36): [True: 1, False: 29]
  |  Branch (731:52): [True: 1, False: 28]
  ------------------
  732|     21|      throw Decoding_Error("Bad encoding on signature algorithms extension");
  733|     21|   }
  734|       |
  735|     31|   std::vector<Signature_Scheme> schemes;
  736|     31|   schemes.reserve(len / 2);
  737|  5.63k|   while(len > 0) {
  ------------------
  |  Branch (737:10): [True: 5.60k, False: 31]
  ------------------
  738|  5.60k|      schemes.emplace_back(reader.get_uint16_t());
  739|  5.60k|      len -= 2;
  740|  5.60k|   }
  741|       |
  742|     31|   return schemes;
  743|     52|}

_ZN5Botan3TLS26Certificate_Status_RequestC2ERNS0_15TLS_Data_ReaderEtNS0_14Handshake_TypeENS0_15Connection_SideE:
  104|     99|                                                       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|     99|   if(message_type == Handshake_Type::ClientHello) {
  ------------------
  |  Branch (123:7): [True: 99, False: 0]
  ------------------
  124|     99|      m_impl = std::make_unique<Certificate_Status_Request_Internal>(
  125|     99|         RFC6066_Certificate_Status_Request(reader, extension_size));
  126|     99|   }
  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|     99|}
_ZN5Botan3TLS26Certificate_Status_RequestD2Ev:
  176|     37|Certificate_Status_Request::~Certificate_Status_Request() = default;
tls_extensions_cert_status_req.cpp:_ZN5Botan3TLS12_GLOBAL__N_134RFC6066_Certificate_Status_RequestC2ERNS0_15TLS_Data_ReaderEt:
   38|     99|      RFC6066_Certificate_Status_Request(TLS_Data_Reader& reader, uint16_t extension_size) {
   39|     99|         if(extension_size == 0) {
  ------------------
  |  Branch (39:13): [True: 1, False: 98]
  ------------------
   40|      1|            throw Decoding_Error("Received an unexpectedly empty Certificate_Status_Request");
   41|      1|         }
   42|       |
   43|     98|         const uint8_t type = reader.get_byte();
   44|     98|         if(type == 1 /* ocsp */) {
  ------------------
  |  Branch (44:13): [True: 83, False: 15]
  ------------------
   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|     83|            if(extension_size < 5) {
  ------------------
  |  Branch (51:16): [True: 5, False: 78]
  ------------------
   52|      5|               throw Decoding_Error("Truncated OCSP CertificateStatusRequest");
   53|      5|            }
   54|     78|            const size_t len_resp_id_list = reader.get_uint16_t();
   55|     78|            if(len_resp_id_list > static_cast<size_t>(extension_size) - 5) {
  ------------------
  |  Branch (55:16): [True: 18, False: 60]
  ------------------
   56|     18|               throw Decoding_Error("Inconsistent length in OCSP CertificateStatusRequest");
   57|     18|            }
   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: 38, False: 22]
  ------------------
   61|     38|               throw Decoding_Error("Inconsistent length in OCSP CertificateStatusRequest");
   62|     38|            }
   63|     22|            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|     15|            reader.discard_next(extension_size - 1);
   68|     15|         }
   69|     98|      }
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|     37|      explicit Certificate_Status_Request_Internal(Contents c) : content(std::move(c)) {}

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

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

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

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

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

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

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

_ZN5Botan7DNSName11from_stringENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  134|    109|std::optional<DNSName> DNSName::from_string(std::string_view name) {
  135|    109|   if(auto canon = check_and_canonicalize_dns_name(name)) {
  ------------------
  |  Branch (135:12): [True: 47, False: 62]
  ------------------
  136|       |      // TODO(C++23) std::string::contains
  137|     47|      if(canon->find('*') != std::string::npos) {
  ------------------
  |  Branch (137:10): [True: 13, False: 34]
  ------------------
  138|     13|         return {};
  139|     13|      }
  140|     34|      return DNSName(std::move(*canon));
  141|     62|   } else {
  142|     62|      return {};
  143|     62|   }
  144|    109|}
dns_name.cpp:_ZN5Botan12_GLOBAL__N_131check_and_canonicalize_dns_nameENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   21|    109|std::optional<std::string> check_and_canonicalize_dns_name(std::string_view name) {
   22|       |   /*
   23|       |   * RFC 1035 limits names to "255 octets or less", but that is in the wire
   24|       |   * encoding, which includes a length octet per label plus the root label.
   25|       |   * In presentation form (without a trailing dot) the limit is 253.
   26|       |   */
   27|    109|   if(name.size() > 253) {
  ------------------
  |  Branch (27:7): [True: 9, False: 100]
  ------------------
   28|      9|      return {};
   29|      9|   }
   30|       |
   31|       |   // DNS names are not empty
   32|    100|   if(name.empty()) {
  ------------------
  |  Branch (32:7): [True: 0, False: 100]
  ------------------
   33|      0|      return {};
   34|      0|   }
   35|       |
   36|       |   // DNS names do not start with or end with a dot
   37|    100|   if(name.starts_with('.') || name.ends_with('.')) {
  ------------------
  |  Branch (37:7): [True: 1, False: 99]
  |  Branch (37:32): [True: 1, False: 98]
  ------------------
   38|      2|      return {};
   39|      2|   }
   40|       |
   41|       |   /*
   42|       |   * Table mapping uppercase to lowercase and only including values valid for
   43|       |   * DNS names: A-Z, a-z, 0-9, '-', '.', plus '*' for wildcarding (RFC 1035)
   44|       |   */
   45|       |   // clang-format off
   46|     98|   constexpr uint8_t DNS_CHAR_MAPPING[128] = {
   47|     98|      '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
   48|     98|      '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
   49|     98|      '\0', '\0', '\0', '\0',  '*', '\0', '\0',  '-',  '.', '\0',  '0',  '1',  '2',  '3',  '4',  '5',  '6',  '7',  '8',
   50|     98|       '9', '\0', '\0', '\0', '\0', '\0', '\0', '\0',  'a',  'b',  'c',  'd',  'e',  'f',  'g',  'h',  'i',  'j',  'k',
   51|     98|       'l',  'm',  'n',  'o',  'p',  'q',  'r',  's',  't',  'u',  'v',  'w',  'x',  'y',  'z', '\0', '\0', '\0', '\0',
   52|     98|       '\0', '\0',  'a',  'b',  'c',  'd',  'e',  'f',  'g',  'h',  'i',  'j',  'k',  'l',  'm',  'n',  'o',  'p',  'q',
   53|     98|       'r',  's',  't',  'u',  'v',  'w',  'x',  'y',  'z', '\0', '\0', '\0', '\0', '\0',
   54|     98|   };
   55|       |   // clang-format on
   56|       |
   57|     98|   std::string canon;
   58|     98|   canon.reserve(name.size());
   59|       |
   60|       |   // RFC 1035: DNS labels must not exceed 63 characters
   61|     98|   size_t current_label_length = 0;
   62|       |
   63|       |   // Tracks if the name consists only of digits and dots
   64|     98|   bool all_numeric = true;
   65|       |
   66|  2.19k|   for(size_t i = 0; i != name.size(); ++i) {
  ------------------
  |  Branch (66:22): [True: 2.14k, False: 52]
  ------------------
   67|  2.14k|      const char c = name[i];
   68|       |
   69|  2.14k|      if(c == '.') {
  ------------------
  |  Branch (69:10): [True: 79, False: 2.06k]
  ------------------
   70|       |         // Sequential dot (.) characters are not allowed
   71|     79|         if(i > 0 && name[i - 1] == '.') {
  ------------------
  |  Branch (71:13): [True: 79, False: 0]
  |  Branch (71:22): [True: 3, False: 76]
  ------------------
   72|      3|            return {};
   73|      3|         }
   74|       |
   75|       |         // Empty labels are not allowed
   76|     76|         if(current_label_length == 0) {
  ------------------
  |  Branch (76:13): [True: 0, False: 76]
  ------------------
   77|      0|            return {};
   78|      0|         }
   79|     76|         current_label_length = 0;  // Reset for next label
   80|  2.06k|      } else {
   81|  2.06k|         current_label_length++;
   82|       |
   83|       |         // Labels cannot exceed maximum DNS label length
   84|  2.06k|         if(current_label_length > 63) {
  ------------------
  |  Branch (84:13): [True: 2, False: 2.06k]
  ------------------
   85|      2|            return {};
   86|      2|         }
   87|  2.06k|      }
   88|       |
   89|  2.14k|      const uint8_t cu = static_cast<uint8_t>(c);
   90|       |      // DNS names are not allowed to include any high-bit set characters
   91|  2.14k|      if(cu >= 128) {
  ------------------
  |  Branch (91:10): [True: 13, False: 2.12k]
  ------------------
   92|     13|         return {};
   93|     13|      }
   94|  2.12k|      const uint8_t mapped = DNS_CHAR_MAPPING[cu];
   95|       |      // DNS names are from a restricted character set
   96|  2.12k|      if(mapped == 0) {
  ------------------
  |  Branch (96:10): [True: 19, False: 2.10k]
  ------------------
   97|     19|         return {};
   98|     19|      }
   99|       |
  100|  2.10k|      if(mapped != '.' && (mapped < '0' || mapped > '9')) {
  ------------------
  |  Branch (100:10): [True: 2.03k, False: 76]
  |  Branch (100:28): [True: 225, False: 1.80k]
  |  Branch (100:44): [True: 1.56k, False: 245]
  ------------------
  101|  1.78k|         all_numeric = false;
  102|  1.78k|      }
  103|       |
  104|  2.10k|      if(mapped == '-') {
  ------------------
  |  Branch (104:10): [True: 204, False: 1.90k]
  ------------------
  105|       |         // DNS labels are not allowed to include a leading or trailing hyphen
  106|    204|         if(i == 0 || (i > 0 && name[i - 1] == '.')) {
  ------------------
  |  Branch (106:13): [True: 1, False: 203]
  |  Branch (106:24): [True: 203, False: 0]
  |  Branch (106:33): [True: 3, False: 200]
  ------------------
  107|      4|            return {};  // leading hyphen
  108|      4|         }
  109|       |
  110|    200|         if(i == name.size() - 1 || (i < name.size() - 1 && name[i + 1] == '.')) {
  ------------------
  |  Branch (110:13): [True: 4, False: 196]
  |  Branch (110:38): [True: 196, False: 0]
  |  Branch (110:61): [True: 1, False: 195]
  ------------------
  111|      5|            return {};  // trailing hyphen
  112|      5|         }
  113|    200|      }
  114|  2.10k|      canon.push_back(static_cast<char>(mapped));
  115|  2.10k|   }
  116|       |
  117|       |   // This should never be hit, due to earlier validation steps
  118|     52|   if(current_label_length == 0) {
  ------------------
  |  Branch (118:7): [True: 0, False: 52]
  ------------------
  119|      0|      return {};
  120|      0|   }
  121|       |
  122|       |   // An entirely numeric name ("1.2.3.4") is either a misplaced IP address
  123|       |   // or an attempt at confusing some other system; reject outright
  124|     52|   if(all_numeric) {
  ------------------
  |  Branch (124:7): [True: 5, False: 47]
  ------------------
  125|      5|      return {};
  126|      5|   }
  127|       |
  128|     47|   return canon;
  129|     52|}

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

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

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

_ZN5Botan7X509_DN11decode_fromERNS_11BER_DecoderE:
  405|  1.55k|void X509_DN::decode_from(BER_Decoder& source) {
  406|  1.55k|   std::vector<uint8_t> bits;
  407|       |
  408|  1.55k|   source.start_sequence().raw_bytes(bits).end_cons();
  409|       |
  410|  1.55k|   BER_Decoder sequence(bits, source.limits());
  411|       |
  412|  1.55k|   std::vector<std::vector<std::pair<OID, ASN1_String>>> rdns;
  413|       |
  414|       |   // Cap AVAs per RDN to bound work for downstream set-based matching.
  415|       |   // No legitimate cert has anywhere near this many AVAs in a single RDN.
  416|  1.55k|   constexpr size_t MAX_AVAS_PER_RDN = 32;
  417|       |
  418|  2.57k|   while(sequence.more_items()) {
  ------------------
  |  Branch (418:10): [True: 1.02k, False: 1.55k]
  ------------------
  419|  1.02k|      BER_Decoder rdn_decoder = sequence.start_set();
  420|       |
  421|  1.02k|      std::vector<std::pair<OID, ASN1_String>> rdn;
  422|  2.85k|      while(rdn_decoder.more_items()) {
  ------------------
  |  Branch (422:13): [True: 1.83k, False: 1.02k]
  ------------------
  423|  1.83k|         OID oid;
  424|  1.83k|         ASN1_String str;
  425|       |
  426|  1.83k|         rdn_decoder.start_sequence()
  427|  1.83k|            .decode(oid)
  428|  1.83k|            .decode(str)  // TODO support Any
  429|  1.83k|            .end_cons();
  430|       |
  431|  1.83k|         rdn.emplace_back(std::move(oid), std::move(str));
  432|       |
  433|  1.83k|         if(rdn.size() > MAX_AVAS_PER_RDN) {
  ------------------
  |  Branch (433:13): [True: 0, False: 1.83k]
  ------------------
  434|      0|            throw Decoding_Error("X.500 RDN has too many attribute-value assertions");
  435|      0|         }
  436|  1.83k|      }
  437|       |
  438|       |      /*
  439|       |      RFC 5280 4.1.2.4:
  440|       |         RelativeDistinguishedName ::=
  441|       |           SET SIZE (1..MAX) OF AttributeTypeAndValue
  442|       |      */
  443|  1.02k|      if(rdn.empty()) {
  ------------------
  |  Branch (443:10): [True: 2, False: 1.02k]
  ------------------
  444|      2|         throw Decoding_Error("X.500 RDN must contain at least one attribute-value assertion");
  445|      2|      }
  446|  1.02k|      rdns.push_back(std::move(rdn));
  447|  1.02k|   }
  448|       |
  449|  1.55k|   auto canonical_bits = canonicalize_dn(rdns);
  450|       |
  451|  1.55k|   m_rdn = std::move(rdns);
  452|  1.55k|   m_dn_bits = std::move(bits);
  453|  1.55k|   m_canonical_dn_bits = std::move(canonical_bits);
  454|  1.55k|}
x509_dn.cpp:_ZN5Botan12_GLOBAL__N_120append_canonical_rdnERNSt3__16vectorIhNS1_9allocatorIhEEEERKNS2_INS1_4pairINS_3OIDENS_11ASN1_StringEEENS3_ISA_EEEE:
  152|    410|void append_canonical_rdn(std::vector<uint8_t>& canonical_bits, const std::vector<std::pair<OID, ASN1_String>>& rdn) {
  153|    410|   const auto append_canonical_data = []<typename T>(std::vector<uint8_t>& out, const T& data) {
  154|    410|      const std::array<uint8_t, 8> data_len = store_le(static_cast<uint64_t>(data.size()));
  155|    410|      out.insert(out.end(), data_len.begin(), data_len.end());
  156|    410|      out.insert(out.end(), data.begin(), data.end());
  157|    410|   };
  158|       |
  159|    410|   std::vector<uint8_t> rdn_bits;
  160|       |
  161|  1.30k|   for(const auto& [oid, value] : canonicalize_rdn(rdn)) {
  ------------------
  |  Branch (161:33): [True: 1.30k, False: 410]
  ------------------
  162|  1.30k|      append_canonical_data(rdn_bits, oid.BER_encode());
  163|  1.30k|      append_canonical_data(rdn_bits, value);
  164|  1.30k|   }
  165|       |
  166|    410|   append_canonical_data(canonical_bits, rdn_bits);
  167|    410|}
x509_dn.cpp:_ZN5Botan12_GLOBAL__N_116canonicalize_rdnERKNSt3__16vectorINS1_4pairINS_3OIDENS_11ASN1_StringEEENS1_9allocatorIS6_EEEE:
  136|    410|std::vector<std::pair<OID, std::string>> canonicalize_rdn(const std::vector<std::pair<OID, ASN1_String>>& rdn) {
  137|    410|   std::vector<std::pair<OID, std::string>> result;
  138|    410|   result.reserve(rdn.size());
  139|  1.30k|   for(const auto& ava : rdn) {
  ------------------
  |  Branch (139:24): [True: 1.30k, False: 410]
  ------------------
  140|  1.30k|      result.emplace_back(ava.first, X500_Char_Iterator::canonicalize(ava.second.value()));
  141|  1.30k|   }
  142|    410|   if(result.size() != 1) {
  ------------------
  |  Branch (142:7): [True: 355, False: 55]
  ------------------
  143|    355|      std::sort(result.begin(), result.end());
  144|    355|   }
  145|    410|   return result;
  146|    410|}
x509_dn.cpp:_ZN5Botan12_GLOBAL__N_118X500_Char_Iterator12canonicalizeENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  114|  1.30k|      static std::string canonicalize(std::string_view name) {
  115|  1.30k|         std::string result;
  116|  1.30k|         result.reserve(name.size());
  117|       |
  118|  1.30k|         X500_Char_Iterator it(name);
  119|  8.16k|         while(auto c = it.next()) {
  ------------------
  |  Branch (119:21): [True: 6.85k, False: 1.30k]
  ------------------
  120|  6.85k|            result += *c;
  121|  6.85k|         }
  122|       |
  123|  1.30k|         return result;
  124|  1.30k|      }
x509_dn.cpp:_ZN5Botan12_GLOBAL__N_118X500_Char_IteratorC2ENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
   81|  1.30k|      explicit X500_Char_Iterator(std::string_view s) : m_str(s), m_pos(0) {
   82|       |         // Skip leading whitespace
   83|  1.61k|         while(m_pos < m_str.size() && is_space(m_str[m_pos])) {
  ------------------
  |  Branch (83:16): [True: 916, False: 697]
  |  Branch (83:40): [True: 309, False: 607]
  ------------------
   84|    309|            ++m_pos;
   85|    309|         }
   86|  1.30k|      }
x509_dn.cpp:_ZN5Botan12_GLOBAL__N_118X500_Char_Iterator4nextEv:
   89|  8.16k|      std::optional<char> next() {
   90|  8.16k|         if(m_pos >= m_str.size()) {
  ------------------
  |  Branch (90:13): [True: 1.25k, False: 6.90k]
  ------------------
   91|  1.25k|            return std::nullopt;
   92|  1.25k|         }
   93|       |
   94|  6.90k|         if(is_space(m_str[m_pos])) {
  ------------------
  |  Branch (94:13): [True: 203, False: 6.70k]
  ------------------
   95|       |            // Skip the entire whitespace run
   96|    669|            while(m_pos < m_str.size() && is_space(m_str[m_pos])) {
  ------------------
  |  Branch (96:19): [True: 623, False: 46]
  |  Branch (96:43): [True: 466, False: 157]
  ------------------
   97|    466|               ++m_pos;
   98|    466|            }
   99|       |            // Emit a single space only if more content follows (strip trailing ws)
  100|    203|            if(m_pos < m_str.size()) {
  ------------------
  |  Branch (100:16): [True: 157, False: 46]
  ------------------
  101|    157|               return ' ';
  102|    157|            }
  103|     46|            return std::nullopt;
  104|    203|         }
  105|       |
  106|  6.70k|         const char c = m_str[m_pos++];
  107|       |         // Locale-independent ASCII fold; RFC 5280 DN matching does not depend on libc locale
  108|  6.70k|         if(c >= 'A' && c <= 'Z') {
  ------------------
  |  Branch (108:13): [True: 605, False: 6.09k]
  |  Branch (108:25): [True: 242, False: 363]
  ------------------
  109|    242|            return static_cast<char>(c + ('a' - 'A'));
  110|    242|         }
  111|  6.46k|         return c;
  112|  6.70k|      }
x509_dn.cpp:_ZZN5Botan12_GLOBAL__N_120append_canonical_rdnERNSt3__16vectorIhNS1_9allocatorIhEEEERKNS2_INS1_4pairINS_3OIDENS_11ASN1_StringEEENS3_ISA_EEEEENK3$_0clIS5_EEDaS6_RKT_:
  153|  1.71k|   const auto append_canonical_data = []<typename T>(std::vector<uint8_t>& out, const T& data) {
  154|  1.71k|      const std::array<uint8_t, 8> data_len = store_le(static_cast<uint64_t>(data.size()));
  155|  1.71k|      out.insert(out.end(), data_len.begin(), data_len.end());
  156|  1.71k|      out.insert(out.end(), data.begin(), data.end());
  157|  1.71k|   };
x509_dn.cpp:_ZZN5Botan12_GLOBAL__N_120append_canonical_rdnERNSt3__16vectorIhNS1_9allocatorIhEEEERKNS2_INS1_4pairINS_3OIDENS_11ASN1_StringEEENS3_ISA_EEEEENK3$_0clINS1_12basic_stringIcNS1_11char_traitsIcEENS3_IcEEEEEEDaS6_RKT_:
  153|  1.30k|   const auto append_canonical_data = []<typename T>(std::vector<uint8_t>& out, const T& data) {
  154|  1.30k|      const std::array<uint8_t, 8> data_len = store_le(static_cast<uint64_t>(data.size()));
  155|  1.30k|      out.insert(out.end(), data_len.begin(), data_len.end());
  156|  1.30k|      out.insert(out.end(), data.begin(), data.end());
  157|  1.30k|   };
x509_dn.cpp:_ZN5Botan12_GLOBAL__N_115canonicalize_dnERKNSt3__16vectorINS2_INS1_4pairINS_3OIDENS_11ASN1_StringEEENS1_9allocatorIS6_EEEENS7_IS9_EEEE:
  169|    584|std::vector<uint8_t> canonicalize_dn(const std::vector<std::vector<std::pair<OID, ASN1_String>>>& rdns) {
  170|    584|   std::vector<uint8_t> canonical_bits;
  171|       |
  172|    584|   for(const auto& rdn : rdns) {
  ------------------
  |  Branch (172:24): [True: 410, False: 584]
  ------------------
  173|    410|      append_canonical_rdn(canonical_bits, rdn);
  174|    410|   }
  175|       |
  176|    584|   return canonical_bits;
  177|    584|}
x509_dn.cpp:_ZN5Botan12_GLOBAL__N_18is_spaceEc:
   26|  8.44k|bool is_space(char c) {
   27|  8.44k|   return c == ' ' || c == '\t';
  ------------------
  |  Branch (27:11): [True: 617, False: 7.82k]
  |  Branch (27:23): [True: 361, False: 7.46k]
  ------------------
   28|  8.44k|}

