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

_ZN5Botan8high_bitITkNSt3__117unsigned_integralEjEEmT_:
   73|  1.02k|BOTAN_FORCE_INLINE constexpr size_t high_bit(T n) {
   74|  1.02k|   size_t hb = 0;
   75|       |
   76|  6.17k|   for(size_t s = 8 * sizeof(T) / 2; s > 0; s /= 2) {
  ------------------
  |  Branch (76:38): [True: 5.14k, False: 1.02k]
  ------------------
   77|       |      // Equivalent to: ((n >> s) == 0) ? 0 : s;
   78|  5.14k|      const size_t z = s - ct_if_is_zero_ret<T>(n >> s, s);
   79|  5.14k|      hb += z;
   80|  5.14k|      n >>= z;
   81|  5.14k|   }
   82|       |
   83|  1.02k|   hb += n;
   84|       |
   85|  1.02k|   return hb;
   86|  1.02k|}
_ZN5Botan17ct_if_is_zero_retITkNSt3__117unsigned_integralEjEEmT_m:
   45|  5.14k|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|  5.14k|   const T a = ~x & (x - 1);
   51|  5.14k|   const size_t a_top = static_cast<size_t>(CT::value_barrier<T>(a >> (sizeof(T) * 8 - 1)));
   52|  5.14k|   const size_t mask = static_cast<size_t>(0) - a_top;
   53|  5.14k|   return mask & s;
   54|  5.14k|}
_ZN5Botan6chooseITkNSt3__117unsigned_integralEjEET_S2_S2_S2_:
  216|   299k|BOTAN_FORCE_INLINE constexpr T choose(T mask, T a, T b) {
  217|       |   //return (mask & a) | (~mask & b);
  218|   299k|   return (b ^ (mask & (a ^ b)));
  219|   299k|}
_ZN5Botan8majorityITkNSt3__117unsigned_integralEjEET_S2_S2_S2_:
  222|   149k|BOTAN_FORCE_INLINE constexpr T majority(T a, T b, T c) {
  223|       |   /*
  224|       |   Considering each bit of a, b, c individually
  225|       |
  226|       |   If a xor b is set, then c is the deciding vote.
  227|       |
  228|       |   If a xor b is not set then either a and b are both set or both unset.
  229|       |   In either case the value of c doesn't matter, and examining b (or a)
  230|       |   allows us to determine which case we are in.
  231|       |   */
  232|   149k|   return choose(a ^ b, c, b);
  233|   149k|}

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

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

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

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

_ZN5Botan3fmtIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEES7_NS1_17basic_string_viewIcS4_EEDpRKT_:
   53|     71|std::string fmt(std::string_view format, const T&... args) {
   54|     71|   std::ostringstream oss;
   55|     71|   oss.imbue(std::locale::classic());
   56|     71|   fmt_detail::do_fmt(oss, format, args...);
   57|     71|   return oss.str();
   58|     71|}
_ZN5Botan10fmt_detail6do_fmtINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEJEEEvRNS2_19basic_ostringstreamIcS5_S7_EENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|     71|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|     71|   size_t i = 0;
   27|       |
   28|  1.56k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 1.56k, False: 0]
  ------------------
   29|  1.56k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 71, False: 1.49k]
  |  Branch (29:30): [True: 71, False: 0]
  |  Branch (29:59): [True: 71, False: 0]
  ------------------
   30|     71|         oss << val;
   31|     71|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  1.49k|      } else {
   33|  1.49k|         oss << format[i];
   34|  1.49k|      }
   35|       |
   36|  1.49k|      i += 1;
   37|  1.49k|   }
   38|     71|}
_ZN5Botan10fmt_detail6do_fmtERNSt3__119basic_ostringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_17basic_string_viewIcS4_EE:
   20|  1.94k|inline void do_fmt(std::ostringstream& oss, std::string_view format) {
   21|  1.94k|   oss << format;
   22|  1.94k|}
_ZN5Botan3fmtIJmmEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_17basic_string_viewIcS4_EEDpRKT_:
   53|    478|std::string fmt(std::string_view format, const T&... args) {
   54|    478|   std::ostringstream oss;
   55|    478|   oss.imbue(std::locale::classic());
   56|    478|   fmt_detail::do_fmt(oss, format, args...);
   57|    478|   return oss.str();
   58|    478|}
_ZN5Botan10fmt_detail6do_fmtImJmEEEvRNSt3__119basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|    478|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|    478|   size_t i = 0;
   27|       |
   28|  4.78k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 4.78k, False: 0]
  ------------------
   29|  4.78k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 478, False: 4.30k]
  |  Branch (29:30): [True: 478, False: 0]
  |  Branch (29:59): [True: 478, False: 0]
  ------------------
   30|    478|         oss << val;
   31|    478|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  4.30k|      } else {
   33|  4.30k|         oss << format[i];
   34|  4.30k|      }
   35|       |
   36|  4.30k|      i += 1;
   37|  4.30k|   }
   38|    478|}
_ZN5Botan10fmt_detail6do_fmtImJEEEvRNSt3__119basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|    478|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|    478|   size_t i = 0;
   27|       |
   28|  11.4k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 11.4k, False: 0]
  ------------------
   29|  11.4k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 478, False: 10.9k]
  |  Branch (29:30): [True: 478, False: 0]
  |  Branch (29:59): [True: 478, False: 0]
  ------------------
   30|    478|         oss << val;
   31|    478|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  10.9k|      } else {
   33|  10.9k|         oss << format[i];
   34|  10.9k|      }
   35|       |
   36|  10.9k|      i += 1;
   37|  10.9k|   }
   38|    478|}
_ZN5Botan3fmtIJPKcNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEEEENS3_12basic_stringIcS6_NS3_9allocatorIcEEEES7_DpRKT_:
   53|    613|std::string fmt(std::string_view format, const T&... args) {
   54|    613|   std::ostringstream oss;
   55|    613|   oss.imbue(std::locale::classic());
   56|    613|   fmt_detail::do_fmt(oss, format, args...);
   57|    613|   return oss.str();
   58|    613|}
_ZN5Botan10fmt_detail6do_fmtIPKcJNSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEEEEvRNS4_19basic_ostringstreamIcS7_NS4_9allocatorIcEEEES8_RKT_DpRKT0_:
   25|    613|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|    613|   size_t i = 0;
   27|       |
   28|  5.51k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 5.51k, False: 0]
  ------------------
   29|  5.51k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 613, False: 4.90k]
  |  Branch (29:30): [True: 613, False: 0]
  |  Branch (29:59): [True: 613, False: 0]
  ------------------
   30|    613|         oss << val;
   31|    613|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  4.90k|      } else {
   33|  4.90k|         oss << format[i];
   34|  4.90k|      }
   35|       |
   36|  4.90k|      i += 1;
   37|  4.90k|   }
   38|    613|}
_ZN5Botan10fmt_detail6do_fmtINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEJEEEvRNS2_19basic_ostringstreamIcS5_NS2_9allocatorIcEEEES6_RKT_DpRKT0_:
   25|  1.28k|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|  1.28k|   size_t i = 0;
   27|       |
   28|  5.88k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 5.88k, False: 0]
  ------------------
   29|  5.88k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 1.28k, False: 4.60k]
  |  Branch (29:30): [True: 1.28k, False: 0]
  |  Branch (29:59): [True: 1.28k, False: 0]
  ------------------
   30|  1.28k|         oss << val;
   31|  1.28k|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  4.60k|      } else {
   33|  4.60k|         oss << format[i];
   34|  4.60k|      }
   35|       |
   36|  4.60k|      i += 1;
   37|  4.60k|   }
   38|  1.28k|}
_ZN5Botan3fmtIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEEENS1_12basic_stringIcS4_NS1_9allocatorIcEEEES5_DpRKT_:
   53|    675|std::string fmt(std::string_view format, const T&... args) {
   54|    675|   std::ostringstream oss;
   55|    675|   oss.imbue(std::locale::classic());
   56|    675|   fmt_detail::do_fmt(oss, format, args...);
   57|    675|   return oss.str();
   58|    675|}
_ZN5Botan3fmtIJNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEjEEENS1_12basic_stringIcS4_NS1_9allocatorIcEEEES5_DpRKT_:
   53|     39|std::string fmt(std::string_view format, const T&... args) {
   54|     39|   std::ostringstream oss;
   55|     39|   oss.imbue(std::locale::classic());
   56|     39|   fmt_detail::do_fmt(oss, format, args...);
   57|     39|   return oss.str();
   58|     39|}
_ZN5Botan10fmt_detail6do_fmtINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEJjEEEvRNS2_19basic_ostringstreamIcS5_NS2_9allocatorIcEEEES6_RKT_DpRKT0_:
   25|     39|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|     39|   size_t i = 0;
   27|       |
   28|     39|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 39, False: 0]
  ------------------
   29|     39|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 39, False: 0]
  |  Branch (29:30): [True: 39, False: 0]
  |  Branch (29:59): [True: 39, False: 0]
  ------------------
   30|     39|         oss << val;
   31|     39|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|     39|      } else {
   33|      0|         oss << format[i];
   34|      0|      }
   35|       |
   36|      0|      i += 1;
   37|      0|   }
   38|     39|}
_ZN5Botan10fmt_detail6do_fmtIjJEEEvRNSt3__119basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|    110|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|    110|   size_t i = 0;
   27|       |
   28|    259|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 259, False: 0]
  ------------------
   29|    259|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 110, False: 149]
  |  Branch (29:30): [True: 110, False: 0]
  |  Branch (29:59): [True: 110, False: 0]
  ------------------
   30|    110|         oss << val;
   31|    110|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|    149|      } else {
   33|    149|         oss << format[i];
   34|    149|      }
   35|       |
   36|    149|      i += 1;
   37|    149|   }
   38|    110|}
_ZN5Botan3fmtIJjjEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_17basic_string_viewIcS4_EEDpRKT_:
   53|     71|std::string fmt(std::string_view format, const T&... args) {
   54|     71|   std::ostringstream oss;
   55|     71|   oss.imbue(std::locale::classic());
   56|     71|   fmt_detail::do_fmt(oss, format, args...);
   57|     71|   return oss.str();
   58|     71|}
_ZN5Botan10fmt_detail6do_fmtIjJjEEEvRNSt3__119basic_ostringstreamIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EERKT_DpRKT0_:
   25|     71|void do_fmt(std::ostringstream& oss, std::string_view format, const T& val, const Ts&... rest) {
   26|     71|   size_t i = 0;
   27|       |
   28|  2.41k|   while(i < format.size()) {
  ------------------
  |  Branch (28:10): [True: 2.41k, False: 0]
  ------------------
   29|  2.41k|      if(format[i] == '{' && (format.size() > (i + 1)) && format.at(i + 1) == '}') {
  ------------------
  |  Branch (29:10): [True: 71, False: 2.34k]
  |  Branch (29:30): [True: 71, False: 0]
  |  Branch (29:59): [True: 71, False: 0]
  ------------------
   30|     71|         oss << val;
   31|     71|         return do_fmt(oss, format.substr(i + 2), rest...);
   32|  2.34k|      } else {
   33|  2.34k|         oss << format[i];
   34|  2.34k|      }
   35|       |
   36|  2.34k|      i += 1;
   37|  2.34k|   }
   38|     71|}

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

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

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

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

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

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

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

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

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

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

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

_ZN5Botan2CT13value_barrierITkNSt3__117unsigned_integralEjQntsr3stdE7same_asIbT_EEES3_S3_:
   43|  5.14k|constexpr inline T value_barrier(T x) {
   44|  5.14k|   if(std::is_constant_evaluated()) {
  ------------------
  |  Branch (44:7): [Folded, False: 5.14k]
  ------------------
   45|      0|      return x;
   46|  5.14k|   } else {
   47|  5.14k|#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|  5.14k|      asm("" : "+r"(x) : /* no input */);  // NOLINT(*-no-assembler)
   56|  5.14k|      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|  5.14k|   }
   64|  5.14k|}

_ZNK5Botan10BER_Object6is_setEv:
  267|  18.0k|      bool is_set() const { return m_type_tag != ASN1_Type::NoObject; }
_ZNK5Botan10BER_Object7taggingEv:
  272|  8.70k|      uint32_t tagging() const { return type_tag() | class_tag(); }
_ZNK5Botan10BER_Object8type_tagEv:
  277|  8.70k|      ASN1_Type type_tag() const { return m_type_tag; }
_ZNK5Botan10BER_Object9class_tagEv:
  282|  8.70k|      ASN1_Class class_tag() const { return m_class_tag; }
_ZNK5Botan10BER_Object4typeEv:
  287|  3.14k|      ASN1_Type type() const { return m_type_tag; }
_ZNK5Botan10BER_Object9get_classEv:
  292|  1.64k|      ASN1_Class get_class() const { return m_class_tag; }
_ZNK5Botan10BER_Object4bitsEv:
  298|  65.8k|      const uint8_t* bits() const { return m_value.data(); }
_ZNK5Botan10BER_Object6lengthEv:
  303|   142k|      size_t length() const { return m_value.size(); }
_ZNK5Botan10BER_Object4dataEv:
  308|  2.43k|      std::span<const uint8_t> data() const { return std::span{m_value}; }
_ZN5Botan10BER_Object12mutable_bitsEm:
  344|  7.01k|      uint8_t* mutable_bits(size_t length) {
  345|  7.01k|         m_value.resize(length);
  346|  7.01k|         return m_value.data();
  347|  7.01k|      }
_ZNK5Botan3OID14get_componentsEv:
  530|  4.59k|      const std::vector<uint32_t>& get_components() const {
  531|  4.59k|         return m_id;
  532|  4.59k|      }
_ZNK5Botan11ASN1_String5valueEv:
  590|  1.20k|      const std::string& value() const { return m_utf8_str; }
_ZN5BotanorENS_10ASN1_ClassES0_:
   91|  3.79k|inline ASN1_Class operator|(ASN1_Class x, ASN1_Class y) {
   92|  3.79k|   return static_cast<ASN1_Class>(static_cast<uint32_t>(x) | static_cast<uint32_t>(y));
   93|  3.79k|}
_ZN5BotanorENS_9ASN1_TypeENS_10ASN1_ClassE:
   98|  8.70k|inline uint32_t operator|(ASN1_Type x, ASN1_Class y) {
   99|  8.70k|   return static_cast<uint32_t>(x) | static_cast<uint32_t>(y);
  100|  8.70k|}
_ZN5BotanorENS_10ASN1_ClassENS_9ASN1_TypeE:
  105|  1.65k|inline uint32_t operator|(ASN1_Class x, ASN1_Type y) {
  106|  1.65k|   return static_cast<uint32_t>(x) | static_cast<uint32_t>(y);
  107|  1.65k|}
_ZN5Botan11ASN1_ObjectD2Ev:
  168|  11.4k|      virtual ~ASN1_Object() = default;
_ZN5Botan11ASN1_ObjectC2ERKS0_:
  151|  1.20k|      ASN1_Object(const ASN1_Object&) = default;
_ZN5Botan11ASN1_ObjectC2Ev:
  146|  4.76k|      ASN1_Object() = default;
_ZN5Botan11ASN1_ObjectC2EOS0_:
  161|  5.46k|      ASN1_Object(ASN1_Object&&) = default;
_ZN5Botan3OIDC2Ev:
  423|  1.67k|      explicit OID() = default;
_ZN5Botan10BER_ObjectC2Ev:
  239|  13.1k|      BER_Object() = default;
_ZN5Botan11ASN1_ObjectaSEOS0_:
  166|  1.23k|      ASN1_Object& operator=(ASN1_Object&&) = default;
_ZN5Botan10BER_ObjectC2EOS0_:
  249|  3.42k|      BER_Object(BER_Object&& other) = default;

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

_ZN5Botan11BER_Decoder6Limits3DEREv:
   42|  1.40k|            static Limits DER() { return Limits(false, 0, false, DefaultMaxObjectSize, false); }
_ZN5Botan11BER_Decoder6LimitsC2EbmbNSt3__18optionalImEEb:
  133|  1.40k|                  m_allow_ber(allow_ber),
  134|  1.40k|                  m_max_nested_indef(max_nested_indef),
  135|  1.40k|                  m_allow_standalone_eoc(allow_standalone_eoc),
  136|  1.40k|                  m_max_object_size(max_object_size),
  137|  1.40k|                  m_reject_default_value_encoding(reject_default_value_encoding) {}
_ZN5Botan11BER_Decoder14start_sequenceEv:
  275|  3.08k|      BER_Decoder start_sequence() { return start_cons(ASN1_Type::Sequence, ASN1_Class::Universal); }
_ZNK5Botan11BER_Decoder6Limits18allow_ber_encodingEv:
   56|  18.1k|            bool allow_ber_encoding() const { return m_allow_ber; }
_ZNK5Botan11BER_Decoder6Limits20require_der_encodingEv:
   61|  10.8k|            bool require_der_encoding() const { return !allow_ber_encoding(); }
_ZNK5Botan11BER_Decoder6Limits15max_object_sizeEv:
   80|  7.11k|            std::optional<size_t> max_object_size() const { return m_max_object_size; }
_ZNK5Botan11BER_Decoder6limitsEv:
  197|  4.47k|      Limits limits() const { return m_limits; }
_ZN5Botan11BER_Decoder9start_setEv:
  281|    942|      BER_Decoder start_set() { return start_cons(ASN1_Type::Set, ASN1_Class::Universal); }
_ZN5Botan11BER_Decoder9raw_bytesINSt3__19allocatorIhEEEERS0_RNS2_6vectorIhT_EE:
  338|  1.04k|      BER_Decoder& raw_bytes(std::vector<uint8_t, Alloc>& out) {
  339|  1.04k|         out.clear();
  340|  46.6k|         for(;;) {
  341|  46.6k|            if(auto next = this->read_next_byte()) {
  ------------------
  |  Branch (341:21): [True: 45.6k, False: 1.04k]
  ------------------
  342|  45.6k|               out.push_back(*next);
  343|  45.6k|            } else {
  344|  1.04k|               break;
  345|  1.04k|            }
  346|  46.6k|         }
  347|  1.04k|         return (*this);
  348|  1.04k|      }

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

_ZN5Botan17DataSource_MemoryC2ENSt3__14spanIKhLm18446744073709551615EEE:
  181|  2.45k|      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.45k|         if(!in.empty()) {
  ------------------
  |  Branch (183:13): [True: 2.30k, False: 149]
  ------------------
  184|  2.30k|            m_source.assign(in.begin(), in.end());
  185|  2.30k|         }
  186|  2.45k|      }
_ZN5Botan10DataSourceC2Ev:
  107|  6.79k|      DataSource() = default;
_ZN5Botan10DataSourceD2Ev:
  109|  5.87k|      virtual ~DataSource() = default;

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

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

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

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

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

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

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

_ZN5Botan3TLS10ExtensionsC2Ev:
  548|  3.08k|      Extensions() = default;
_ZN5Botan3TLS18Supported_Versions11static_typeEv:
  399|     18|      static Extension_Code static_type() { return Extension_Code::SupportedVersions; }
_ZN5Botan3TLS20Signature_Algorithms11static_typeEv:
  278|      9|      static Extension_Code static_type() { return Extension_Code::SignatureAlgorithms; }
_ZN5Botan3TLS25Signature_Algorithms_Cert11static_typeEv:
  311|     20|      static Extension_Code static_type() { return Extension_Code::CertSignatureAlgorithms; }
_ZN5Botan3TLS16Supported_Groups11static_typeEv:
  249|    199|      static Extension_Code static_type() { return Extension_Code::SupportedGroups; }
_ZN5Botan3TLS21Server_Name_Indicator11static_typeEv:
  123|      9|      static Extension_Code static_type() { return Extension_Code::ServerNameIndication; }
_ZN5Botan3TLS39Application_Layer_Protocol_Notification11static_typeEv:
  148|     42|      static Extension_Code static_type() { return Extension_Code::ApplicationLayerProtocolNegotiation; }
_ZN5Botan3TLS24SRTP_Protection_Profiles11static_typeEv:
  334|      2|      static Extension_Code static_type() { return Extension_Code::UseSrtp; }
_ZNK5Botan3TLS21Server_Name_Indicator4typeEv:
  125|      9|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS39Application_Layer_Protocol_Notification4typeEv:
  150|     42|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS23Client_Certificate_Type11static_typeEv:
  225|     15|      static Extension_Code static_type() { return Extension_Code::ClientCertificateType; }
_ZNK5Botan3TLS23Client_Certificate_Type4typeEv:
  227|     15|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS23Server_Certificate_Type11static_typeEv:
  239|     14|      static Extension_Code static_type() { return Extension_Code::ServerCertificateType; }
_ZNK5Botan3TLS23Server_Certificate_Type4typeEv:
  241|     14|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS16Supported_Groups4typeEv:
  251|    199|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS20Signature_Algorithms4typeEv:
  280|      9|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS25Signature_Algorithms_Cert4typeEv:
  313|     20|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS24SRTP_Protection_Profiles4typeEv:
  336|      2|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS26Certificate_Status_Request11static_typeEv:
  361|     44|      static Extension_Code static_type() { return Extension_Code::CertificateStatusRequest; }
_ZNK5Botan3TLS26Certificate_Status_Request4typeEv:
  363|     44|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS18Supported_Versions4typeEv:
  401|     18|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS17Record_Size_Limit11static_typeEv:
  430|     19|      static Extension_Code static_type() { return Extension_Code::RecordSizeLimit; }
_ZNK5Botan3TLS17Record_Size_Limit4typeEv:
  432|     19|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS17Unknown_Extension4typeEv:
  461|  2.56k|      Extension_Code type() const override { return m_type; }
_ZN5Botan3TLS10Extensions3addEPNS0_9ExtensionE:
  495|    170|      void add(Extension* extn) { add(std::unique_ptr<Extension>(extn)); }
_ZN5Botan3TLS9ExtensionD2Ev:
  115|  5.45k|      virtual ~Extension() = default;
_ZNK5Botan3TLS10Extensions3getINS0_23Renegotiation_ExtensionEEEPT_v:
  478|    175|      T* get() const {
  479|    175|         return dynamic_cast<T*>(get(T::static_type()));
  480|    175|      }

_ZNK5Botan3TLS23Renegotiation_Extension18renegotiation_infoEv:
   41|      5|      const std::vector<uint8_t>& renegotiation_info() const { return m_reneg_data; }
_ZNK5Botan3TLS24Session_Ticket_Extension4typeEv:
   58|     34|      Extension_Code type() const override { return static_type(); }
_ZN5Botan3TLS24Session_Ticket_Extension11static_typeEv:
   56|     34|      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|    359|      static Extension_Code static_type() { return Extension_Code::SafeRenegotiation; }
_ZN5Botan3TLS22Extended_Master_Secret11static_typeEv:
  122|     25|      static Extension_Code static_type() { return Extension_Code::ExtendedMasterSecret; }
_ZN5Botan3TLS16Encrypt_then_MAC11static_typeEv:
  140|     14|      static Extension_Code static_type() { return Extension_Code::EncryptThenMac; }
_ZNK5Botan3TLS23Renegotiation_Extension4typeEv:
   33|    184|      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|     25|      Extension_Code type() const override { return static_type(); }
_ZNK5Botan3TLS16Encrypt_then_MAC4typeEv:
  142|     14|      Extension_Code type() const override { return static_type(); }

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

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

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

_ZN5Botan3TLS16Protocol_VersionC2Ev:
   54|  3.08k|      Protocol_Version() : m_version(0) {}
_ZN5Botan3TLS16Protocol_VersionC2Et:
   56|  4.06k|      explicit Protocol_Version(uint16_t code) : m_version(code) {}
_ZN5Botan3TLS16Protocol_VersionC2Ehh:
   69|  3.06k|            Protocol_Version(static_cast<uint16_t>((static_cast<uint16_t>(major) << 8) | minor)) {}
_ZNK5Botan3TLS16Protocol_Version13major_versionEv:
   84|  6.10k|      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.08k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t in[], size_t len) {
   40|  3.08k|   if(len <= max_fuzzer_input_size) {
  ------------------
  |  Branch (40:7): [True: 3.08k, False: 8]
  ------------------
   41|  3.08k|      try {
   42|  3.08k|         fuzz(std::span<const uint8_t>(in, len));
   43|  3.08k|      } 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.08k|   }
   51|  3.08k|   return 0;
   52|  3.08k|}

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

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

_ZN5BotanltERKNS_3OIDES2_:
  175|  2.29k|bool operator<(const OID& a, const OID& b) {
  176|  2.29k|   const std::vector<uint32_t>& oid1 = a.get_components();
  177|  2.29k|   const std::vector<uint32_t>& oid2 = b.get_components();
  178|       |
  179|  2.29k|   return std::lexicographical_compare(oid1.begin(), oid1.end(), oid2.begin(), oid2.end());
  180|  2.29k|}
_ZNK5Botan3OID11encode_intoERNS_11DER_EncoderE:
  185|  1.20k|void OID::encode_into(DER_Encoder& der) const {
  186|  1.20k|   if(m_id.size() < 2) {
  ------------------
  |  Branch (186:7): [True: 0, False: 1.20k]
  ------------------
  187|      0|      throw Invalid_Argument("OID::encode_into: OID is invalid");
  188|      0|   }
  189|       |
  190|  1.20k|   auto append = [](std::vector<uint8_t>& encoding, uint32_t z) {
  191|  1.20k|      if(z <= 0x7F) {
  192|  1.20k|         encoding.push_back(static_cast<uint8_t>(z));
  193|  1.20k|      } else {
  194|  1.20k|         const size_t z7 = (high_bit(z) + 7 - 1) / 7;
  195|       |
  196|  1.20k|         for(size_t j = 0; j != z7; ++j) {
  197|  1.20k|            uint8_t zp = static_cast<uint8_t>(z >> (7 * (z7 - j - 1)) & 0x7F);
  198|       |
  199|  1.20k|            if(j != z7 - 1) {
  200|  1.20k|               zp |= 0x80;
  201|  1.20k|            }
  202|       |
  203|  1.20k|            encoding.push_back(zp);
  204|  1.20k|         }
  205|  1.20k|      }
  206|  1.20k|   };
  207|       |
  208|  1.20k|   std::vector<uint8_t> encoding;
  209|       |
  210|       |   // We know 40 * root can't overflow because root is between 0 and 2
  211|  1.20k|   auto first = checked_add(40 * m_id[0], m_id[1]);
  212|  1.20k|   BOTAN_ASSERT_NOMSG(first.has_value());
  ------------------
  |  |   77|  1.20k|   do {                                                                     \
  |  |   78|  1.20k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  1.20k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 1.20k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  1.20k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 1.20k]
  |  |  ------------------
  ------------------
  213|       |
  214|  1.20k|   append(encoding, *first);
  215|       |
  216|  5.60k|   for(size_t i = 2; i != m_id.size(); ++i) {
  ------------------
  |  Branch (216:22): [True: 4.40k, False: 1.20k]
  ------------------
  217|  4.40k|      append(encoding, m_id[i]);
  218|  4.40k|   }
  219|  1.20k|   der.add_object(ASN1_Type::ObjectId, ASN1_Class::Universal, encoding);
  220|  1.20k|}
_ZN5Botan3OID11decode_fromERNS_11BER_DecoderE:
  225|  1.66k|void OID::decode_from(BER_Decoder& decoder) {
  226|  1.66k|   const BER_Object obj = decoder.get_next_object();
  227|  1.66k|   if(obj.tagging() != (ASN1_Class::Universal | ASN1_Type::ObjectId)) {
  ------------------
  |  Branch (227:7): [True: 39, False: 1.62k]
  ------------------
  228|     39|      throw BER_Bad_Tag("Error decoding OID, unknown tag", obj.tagging());
  229|     39|   }
  230|       |
  231|  1.62k|   if(obj.length() == 0) {
  ------------------
  |  Branch (231:7): [True: 1, False: 1.62k]
  ------------------
  232|      1|      throw BER_Decoding_Error("OID encoding is too short");
  233|      1|   }
  234|       |
  235|  1.62k|   auto consume = [](BufferSlicer& data) -> uint32_t {
  236|  1.62k|      BOTAN_ASSERT_NOMSG(!data.empty());
  237|  1.62k|      uint32_t b = data.take_byte();
  238|       |
  239|  1.62k|      if(b > 0x7F) {
  240|  1.62k|         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.62k|         if(b == 0) {
  246|  1.62k|            throw Decoding_Error("Leading zero byte in multibyte OID encoding");
  247|  1.62k|         }
  248|       |
  249|  1.62k|         while(true) {
  250|  1.62k|            if(data.empty()) {
  251|  1.62k|               throw Decoding_Error("Truncated OID value");
  252|  1.62k|            }
  253|       |
  254|  1.62k|            const uint8_t next = data.take_byte();
  255|  1.62k|            const bool more = (next & 0x80) == 0x80;
  256|  1.62k|            const uint8_t value = next & 0x7F;
  257|       |
  258|  1.62k|            if((b >> (32 - 7)) != 0) {
  259|  1.62k|               throw Decoding_Error("OID component overflow");
  260|  1.62k|            }
  261|       |
  262|  1.62k|            b = (b << 7) | value;
  263|       |
  264|  1.62k|            if(!more) {
  265|  1.62k|               break;
  266|  1.62k|            }
  267|  1.62k|         }
  268|  1.62k|      }
  269|       |
  270|  1.62k|      return b;
  271|  1.62k|   };
  272|       |
  273|  1.62k|   BufferSlicer data(obj.data());
  274|  1.62k|   std::vector<uint32_t> parts;
  275|  8.50k|   while(!data.empty()) {
  ------------------
  |  Branch (275:10): [True: 6.87k, False: 1.62k]
  ------------------
  276|  6.87k|      const uint32_t comp = consume(data);
  277|       |
  278|  6.87k|      if(parts.empty()) {
  ------------------
  |  Branch (278:10): [True: 1.60k, False: 5.27k]
  ------------------
  279|       |         // divide into root and second arc
  280|       |
  281|  1.60k|         const uint32_t root_arc = [](uint32_t b0) -> uint32_t {
  282|  1.60k|            if(b0 < 40) {
  283|  1.60k|               return 0;
  284|  1.60k|            } else if(b0 < 80) {
  285|  1.60k|               return 1;
  286|  1.60k|            } else {
  287|  1.60k|               return 2;
  288|  1.60k|            }
  289|  1.60k|         }(comp);
  290|       |
  291|  1.60k|         parts.push_back(root_arc);
  292|  1.60k|         BOTAN_ASSERT_NOMSG(comp >= 40 * root_arc);
  ------------------
  |  |   77|  1.60k|   do {                                                                     \
  |  |   78|  1.60k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  1.60k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 1.60k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  1.60k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 1.60k]
  |  |  ------------------
  ------------------
  293|  1.60k|         parts.push_back(comp - 40 * root_arc);
  294|  5.27k|      } else {
  295|  5.27k|         parts.push_back(comp);
  296|  5.27k|      }
  297|  6.87k|   }
  298|       |
  299|  1.62k|   m_id = parts;
  300|  1.62k|}
asn1_oid.cpp:_ZZNK5Botan3OID11encode_intoERNS_11DER_EncoderEENK3$_0clERNSt3__16vectorIhNS4_9allocatorIhEEEEj:
  190|  5.60k|   auto append = [](std::vector<uint8_t>& encoding, uint32_t z) {
  191|  5.60k|      if(z <= 0x7F) {
  ------------------
  |  Branch (191:10): [True: 4.57k, False: 1.02k]
  ------------------
  192|  4.57k|         encoding.push_back(static_cast<uint8_t>(z));
  193|  4.57k|      } else {
  194|  1.02k|         const size_t z7 = (high_bit(z) + 7 - 1) / 7;
  195|       |
  196|  3.62k|         for(size_t j = 0; j != z7; ++j) {
  ------------------
  |  Branch (196:28): [True: 2.59k, False: 1.02k]
  ------------------
  197|  2.59k|            uint8_t zp = static_cast<uint8_t>(z >> (7 * (z7 - j - 1)) & 0x7F);
  198|       |
  199|  2.59k|            if(j != z7 - 1) {
  ------------------
  |  Branch (199:16): [True: 1.56k, False: 1.02k]
  ------------------
  200|  1.56k|               zp |= 0x80;
  201|  1.56k|            }
  202|       |
  203|  2.59k|            encoding.push_back(zp);
  204|  2.59k|         }
  205|  1.02k|      }
  206|  5.60k|   };
asn1_oid.cpp:_ZZN5Botan3OID11decode_fromERNS_11BER_DecoderEENK3$_0clERNS_12BufferSlicerE:
  235|  6.87k|   auto consume = [](BufferSlicer& data) -> uint32_t {
  236|  6.87k|      BOTAN_ASSERT_NOMSG(!data.empty());
  ------------------
  |  |   77|  6.87k|   do {                                                                     \
  |  |   78|  6.87k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  6.87k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 6.87k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  6.87k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 6.87k]
  |  |  ------------------
  ------------------
  237|  6.87k|      uint32_t b = data.take_byte();
  238|       |
  239|  6.87k|      if(b > 0x7F) {
  ------------------
  |  Branch (239:10): [True: 1.30k, False: 5.57k]
  ------------------
  240|  1.30k|         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.30k|         if(b == 0) {
  ------------------
  |  Branch (245:13): [True: 1, False: 1.30k]
  ------------------
  246|      1|            throw Decoding_Error("Leading zero byte in multibyte OID encoding");
  247|      1|         }
  248|       |
  249|  2.13k|         while(true) {
  ------------------
  |  Branch (249:16): [True: 2.13k, Folded]
  ------------------
  250|  2.13k|            if(data.empty()) {
  ------------------
  |  Branch (250:16): [True: 5, False: 2.12k]
  ------------------
  251|      5|               throw Decoding_Error("Truncated OID value");
  252|      5|            }
  253|       |
  254|  2.12k|            const uint8_t next = data.take_byte();
  255|  2.12k|            const bool more = (next & 0x80) == 0x80;
  256|  2.12k|            const uint8_t value = next & 0x7F;
  257|       |
  258|  2.12k|            if((b >> (32 - 7)) != 0) {
  ------------------
  |  Branch (258:16): [True: 8, False: 2.11k]
  ------------------
  259|      8|               throw Decoding_Error("OID component overflow");
  260|      8|            }
  261|       |
  262|  2.11k|            b = (b << 7) | value;
  263|       |
  264|  2.11k|            if(!more) {
  ------------------
  |  Branch (264:16): [True: 1.28k, False: 828]
  ------------------
  265|  1.28k|               break;
  266|  1.28k|            }
  267|  2.11k|         }
  268|  1.30k|      }
  269|       |
  270|  6.86k|      return b;
  271|  6.87k|   };
asn1_oid.cpp:_ZZN5Botan3OID11decode_fromERNS_11BER_DecoderEENK3$_1clEj:
  281|  1.60k|         const uint32_t root_arc = [](uint32_t b0) -> uint32_t {
  282|  1.60k|            if(b0 < 40) {
  ------------------
  |  Branch (282:16): [True: 460, False: 1.14k]
  ------------------
  283|    460|               return 0;
  284|  1.14k|            } else if(b0 < 80) {
  ------------------
  |  Branch (284:23): [True: 605, False: 542]
  ------------------
  285|    605|               return 1;
  286|    605|            } else {
  287|    542|               return 2;
  288|    542|            }
  289|  1.60k|         }(comp);

_ZN5Botan11ASN1_StringC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEENS_9ASN1_TypeE:
  135|  1.67k|ASN1_String::ASN1_String(std::string_view str, ASN1_Type t) : m_utf8_str(str), m_tag(t) {
  136|  1.67k|   if(!is_utf8_subset_string_type(m_tag)) {
  ------------------
  |  Branch (136:7): [True: 0, False: 1.67k]
  ------------------
  137|      0|      throw Invalid_Argument("ASN1_String only supports encoding to UTF-8 or a UTF-8 subset");
  138|      0|   }
  139|       |
  140|  1.67k|   if(!is_valid_asn1_string_content(m_utf8_str, m_tag)) {
  ------------------
  |  Branch (140:7): [True: 0, False: 1.67k]
  ------------------
  141|      0|      throw Invalid_Argument(fmt("ASN1_String: Invalid {} encoding", asn1_tag_to_string(m_tag)));
  142|      0|   }
  143|  1.67k|}
_ZN5Botan11ASN1_StringC2ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  145|  1.67k|ASN1_String::ASN1_String(std::string_view str) : ASN1_String(str, choose_encoding(str)) {}
_ZN5Botan11ASN1_String11decode_fromERNS_11BER_DecoderE:
  162|  1.59k|void ASN1_String::decode_from(BER_Decoder& source) {
  163|  1.59k|   const BER_Object obj = source.get_next_object();
  164|       |
  165|  1.59k|   if(obj.get_class() != ASN1_Class::Universal || !is_asn1_string_type(obj.type())) {
  ------------------
  |  Branch (165:7): [True: 32, False: 1.56k]
  |  Branch (165:51): [True: 63, False: 1.50k]
  ------------------
  166|     71|      auto typ = static_cast<uint32_t>(obj.type());
  167|     71|      auto cls = static_cast<uint32_t>(obj.get_class());
  168|     71|      throw Decoding_Error(fmt("ASN1_String: Unknown string type {}/{}", typ, cls));
  169|     71|   }
  170|       |
  171|  1.52k|   m_tag = obj.type();
  172|  1.52k|   m_data.assign(obj.bits(), obj.bits() + obj.length());
  173|       |
  174|  1.52k|   if(m_tag == ASN1_Type::BmpString) {
  ------------------
  |  Branch (174:7): [True: 338, False: 1.18k]
  ------------------
  175|    338|      m_utf8_str = ucs2_to_utf8(m_data);
  176|  1.18k|   } else if(m_tag == ASN1_Type::UniversalString) {
  ------------------
  |  Branch (176:14): [True: 148, False: 1.04k]
  ------------------
  177|    148|      m_utf8_str = ucs4_to_utf8(m_data);
  178|  1.04k|   } else if(m_tag == ASN1_Type::TeletexString) {
  ------------------
  |  Branch (178:14): [True: 196, False: 845]
  ------------------
  179|       |      /*
  180|       |      TeletexString is nominally ITU T.61 not ISO-8859-1 but it seems
  181|       |      the majority of implementations actually used that charset here.
  182|       |      */
  183|    196|      m_utf8_str = latin1_to_utf8(m_data);
  184|    845|   } else {
  185|       |      // All other supported string types are UTF-8 or some subset thereof
  186|    845|      m_utf8_str = ASN1::to_string(obj);
  187|       |
  188|    845|      if(!is_valid_asn1_string_content(m_utf8_str, m_tag)) {
  ------------------
  |  Branch (188:10): [True: 71, False: 774]
  ------------------
  189|     71|         throw Decoding_Error(fmt("ASN1_String: Invalid {} encoding", asn1_tag_to_string(m_tag)));
  190|     71|      }
  191|    845|   }
  192|  1.52k|}
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_119is_asn1_string_typeENS_9ASN1_TypeE:
   99|  1.56k|bool is_asn1_string_type(ASN1_Type tag) {
  100|  1.56k|   return (is_utf8_subset_string_type(tag) || tag == ASN1_Type::TeletexString || tag == ASN1_Type::BmpString ||
  ------------------
  |  Branch (100:12): [True: 821, False: 745]
  |  Branch (100:47): [True: 196, False: 549]
  |  Branch (100:82): [True: 338, False: 211]
  ------------------
  101|    211|           tag == ASN1_Type::UniversalString);
  ------------------
  |  Branch (101:12): [True: 148, False: 63]
  ------------------
  102|  1.56k|}
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_126is_utf8_subset_string_typeENS_9ASN1_TypeE:
   94|  5.73k|bool is_utf8_subset_string_type(ASN1_Type tag) {
   95|  5.73k|   return (tag == ASN1_Type::NumericString || tag == ASN1_Type::PrintableString || tag == ASN1_Type::VisibleString ||
  ------------------
  |  Branch (95:12): [True: 72, False: 5.66k]
  |  Branch (95:47): [True: 3.76k, False: 1.90k]
  |  Branch (95:84): [True: 398, False: 1.50k]
  ------------------
   96|  1.50k|           tag == ASN1_Type::Ia5String || tag == ASN1_Type::Utf8String);
  ------------------
  |  Branch (96:12): [True: 100, False: 1.40k]
  |  Branch (96:43): [True: 664, False: 745]
  ------------------
   97|  5.73k|}
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_128is_valid_asn1_string_contentERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_9ASN1_TypeE:
  104|  2.49k|bool is_valid_asn1_string_content(const std::string& str, ASN1_Type tag) {
  105|  2.49k|   BOTAN_ASSERT_NOMSG(is_utf8_subset_string_type(tag));
  ------------------
  |  |   77|  2.49k|   do {                                                                     \
  |  |   78|  2.49k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  2.49k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 2.49k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  2.49k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 2.49k]
  |  |  ------------------
  ------------------
  106|       |
  107|  2.49k|   switch(tag) {
  108|    332|      case ASN1_Type::Utf8String:
  ------------------
  |  Branch (108:7): [True: 332, False: 2.16k]
  ------------------
  109|    332|         return is_valid_utf8(str);
  110|     36|      case ASN1_Type::NumericString:
  ------------------
  |  Branch (110:7): [True: 36, False: 2.46k]
  ------------------
  111|  1.91k|      case ASN1_Type::PrintableString:
  ------------------
  |  Branch (111:7): [True: 1.88k, False: 617]
  ------------------
  112|  1.96k|      case ASN1_Type::Ia5String:
  ------------------
  |  Branch (112:7): [True: 50, False: 2.44k]
  ------------------
  113|  2.16k|      case ASN1_Type::VisibleString:
  ------------------
  |  Branch (113:7): [True: 199, False: 2.29k]
  ------------------
  114|  2.16k|         return g_char_validator.valid_encoding(str, tag);
  115|      0|      default:
  ------------------
  |  Branch (115:7): [True: 0, False: 2.49k]
  ------------------
  116|      0|         return false;
  117|  2.49k|   }
  118|  2.49k|}
asn1_str.cpp:_ZNK5Botan12_GLOBAL__N_131ASN1_String_Codepoint_Validator14valid_encodingENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEENS_9ASN1_TypeE:
   25|  3.84k|      constexpr bool valid_encoding(std::string_view str, ASN1_Type tag) const {
   26|  3.84k|         const uint8_t mask = mask_for(tag);
   27|  3.84k|         for(const char c : str) {
  ------------------
  |  Branch (27:27): [True: 556, False: 3.83k]
  ------------------
   28|    556|            const uint8_t codepoint = static_cast<uint8_t>(c);
   29|    556|            const bool is_valid = (m_table[codepoint] & mask) != 0;
   30|       |
   31|    556|            if(!is_valid) {
  ------------------
  |  Branch (31:16): [True: 10, False: 546]
  ------------------
   32|     10|               return false;
   33|     10|            }
   34|    556|         }
   35|       |
   36|  3.83k|         return true;
   37|  3.84k|      }
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_131ASN1_String_Codepoint_Validator8mask_forENS_9ASN1_TypeE:
   45|  3.84k|      static constexpr uint8_t mask_for(ASN1_Type tag) {
   46|  3.84k|         switch(tag) {
   47|     36|            case ASN1_Type::NumericString:
  ------------------
  |  Branch (47:13): [True: 36, False: 3.80k]
  ------------------
   48|     36|               return Numeric_String;
   49|  3.55k|            case ASN1_Type::PrintableString:
  ------------------
  |  Branch (49:13): [True: 3.55k, False: 285]
  ------------------
   50|  3.55k|               return Printable_String;
   51|     50|            case ASN1_Type::Ia5String:
  ------------------
  |  Branch (51:13): [True: 50, False: 3.79k]
  ------------------
   52|     50|               return IA5_String;
   53|    199|            case ASN1_Type::VisibleString:
  ------------------
  |  Branch (53:13): [True: 199, False: 3.64k]
  ------------------
   54|    199|               return Visible_String;
   55|      0|            default:
  ------------------
  |  Branch (55:13): [True: 0, False: 3.84k]
  ------------------
   56|      0|               return 0;
   57|  3.84k|         }
   58|  3.84k|      }
asn1_str.cpp:_ZN5Botan12_GLOBAL__N_115choose_encodingENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  120|  1.67k|ASN1_Type choose_encoding(std::string_view str) {
  121|  1.67k|   if(g_char_validator.valid_encoding(str, ASN1_Type::PrintableString)) {
  ------------------
  |  Branch (121:7): [True: 1.67k, False: 0]
  ------------------
  122|  1.67k|      return ASN1_Type::PrintableString;
  123|  1.67k|   } else {
  124|      0|      return ASN1_Type::Utf8String;
  125|      0|   }
  126|  1.67k|}

_ZN5Botan11BER_DecoderD2Ev:
  456|  5.87k|BER_Decoder::~BER_Decoder() = default;
_ZNK5Botan11BER_Decoder10more_itemsEv:
  461|  3.48k|bool BER_Decoder::more_items() const {
  462|  3.48k|   if(m_source->end_of_data() && !m_pushed.is_set()) {
  ------------------
  |  Branch (462:7): [True: 868, False: 2.61k]
  |  Branch (462:34): [True: 868, False: 0]
  ------------------
  463|    868|      return false;
  464|    868|   }
  465|  2.61k|   return true;
  466|  3.48k|}
_ZN5Botan11BER_Decoder10verify_endEv:
  471|    483|BER_Decoder& BER_Decoder::verify_end() {
  472|    483|   return verify_end("BER_Decoder::verify_end called, but data remains");
  473|    483|}
_ZN5Botan11BER_Decoder10verify_endENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  478|    483|BER_Decoder& BER_Decoder::verify_end(std::string_view err) {
  479|    483|   if(!m_source->end_of_data() || m_pushed.is_set()) {
  ------------------
  |  Branch (479:7): [True: 208, False: 275]
  |  Branch (479:35): [True: 0, False: 275]
  ------------------
  480|    208|      throw Decoding_Error(err);
  481|    208|   }
  482|    275|   return (*this);
  483|    483|}
_ZN5Botan11BER_Decoder14read_next_byteEv:
  495|  46.6k|std::optional<uint8_t> BER_Decoder::read_next_byte() {
  496|  46.6k|   BOTAN_ASSERT_NOMSG(m_source != nullptr);
  ------------------
  |  |   77|  46.6k|   do {                                                                     \
  |  |   78|  46.6k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  46.6k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 46.6k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  46.6k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 46.6k]
  |  |  ------------------
  ------------------
  497|  46.6k|   uint8_t b = 0;
  498|  46.6k|   if(m_source->read_byte(b) != 0) {
  ------------------
  |  Branch (498:7): [True: 45.6k, False: 1.04k]
  ------------------
  499|  45.6k|      return b;
  500|  45.6k|   } else {
  501|  1.04k|      return {};
  502|  1.04k|   }
  503|  46.6k|}
_ZN5Botan11BER_Decoder15get_next_objectEv:
  516|  7.29k|BER_Object BER_Decoder::get_next_object() {
  517|  7.29k|   BER_Object next;
  518|       |
  519|  7.29k|   if(m_pushed.is_set()) {
  ------------------
  |  Branch (519:7): [True: 0, False: 7.29k]
  ------------------
  520|      0|      std::swap(next, m_pushed);
  521|      0|      return next;
  522|      0|   }
  523|       |
  524|  7.29k|   for(;;) {
  525|  7.29k|      ASN1_Type type_tag = ASN1_Type::NoObject;
  526|  7.29k|      ASN1_Class class_tag = ASN1_Class::NoObject;
  527|  7.29k|      decode_tag(m_source, type_tag, class_tag);
  528|  7.29k|      next.set_tagging(type_tag, class_tag);
  529|  7.29k|      if(next.is_set() == false) {  // no more objects
  ------------------
  |  Branch (529:10): [True: 4, False: 7.28k]
  ------------------
  530|      4|         return next;
  531|      4|      }
  532|       |
  533|  7.28k|      const size_t allow_indef = m_limits.allow_ber_encoding() ? m_limits.max_nested_indefinite_length() : 0;
  ------------------
  |  Branch (533:34): [True: 0, False: 7.28k]
  ------------------
  534|  7.28k|      const bool der_mode = m_limits.require_der_encoding();
  535|  7.28k|      const auto dl = decode_length(m_source, allow_indef, der_mode, is_constructed(class_tag));
  536|       |
  537|       |      // Per X.690 8.1.5 the only valid EOC encoding is the two-octet
  538|       |      // sequence 0x00 0x00. Reject any other length encoding on a tag of
  539|       |      // (Eoc, Universal) before we consume the "content" bytes.
  540|  7.28k|      if(type_tag == ASN1_Type::Eoc && class_tag == ASN1_Class::Universal &&
  ------------------
  |  Branch (540:10): [True: 55, False: 7.23k]
  |  Branch (540:40): [True: 41, False: 14]
  ------------------
  541|     41|         (dl.content_length() != 0 || dl.indefinite_length())) {
  ------------------
  |  Branch (541:11): [True: 35, False: 6]
  |  Branch (541:39): [True: 0, False: 6]
  ------------------
  542|     35|         throw BER_Decoding_Error("EOC marker with non-zero length");
  543|     35|      }
  544|       |
  545|  7.25k|      if(const auto max_size = m_limits.max_object_size(); max_size && dl.content_length() > *max_size) {
  ------------------
  |  Branch (545:60): [True: 7.11k, False: 132]
  |  Branch (545:72): [True: 28, False: 7.09k]
  ------------------
  546|     28|         throw BER_Decoding_Error("Encoded object exceeds maximum size");
  547|     28|      }
  548|       |
  549|  7.22k|      if(!m_source->check_available(dl.total_length())) {
  ------------------
  |  Branch (549:10): [True: 73, False: 7.15k]
  ------------------
  550|     73|         throw BER_Decoding_Error("Value truncated");
  551|     73|      }
  552|       |
  553|  7.15k|      uint8_t* out = next.mutable_bits(dl.content_length());
  554|  7.15k|      if(m_source->read(out, dl.content_length()) != dl.content_length()) {
  ------------------
  |  Branch (554:10): [True: 0, False: 7.15k]
  ------------------
  555|      0|         throw BER_Decoding_Error("Value truncated");
  556|      0|      }
  557|       |
  558|  7.15k|      if(dl.indefinite_length()) {
  ------------------
  |  Branch (558:10): [True: 0, False: 7.15k]
  ------------------
  559|       |         // After reading the data consume the 2-byte EOC
  560|      0|         uint8_t eoc[2] = {0xFF, 0xFF};
  561|      0|         if(m_source->read(eoc, 2) != 2 || eoc[0] != 0x00 || eoc[1] != 0x00) {
  ------------------
  |  Branch (561:13): [True: 0, False: 0]
  |  Branch (561:44): [True: 0, False: 0]
  |  Branch (561:62): [True: 0, False: 0]
  ------------------
  562|      0|            throw BER_Decoding_Error("Missing or malformed EOC marker");
  563|      0|         }
  564|      0|      }
  565|       |
  566|  7.15k|      if(next.tagging() == static_cast<uint32_t>(ASN1_Type::Eoc)) {
  ------------------
  |  Branch (566:10): [True: 6, False: 7.14k]
  ------------------
  567|      6|         if(m_limits.require_der_encoding()) {
  ------------------
  |  Branch (567:13): [True: 6, False: 0]
  ------------------
  568|      6|            throw BER_Decoding_Error("Detected EOC marker in DER structure");
  569|      6|         }
  570|       |         // An EOC marker is only valid as an indefinite-length terminator, which
  571|       |         // is consumed above when reading the indefinite-length object. A
  572|       |         // standalone EOC is rejected unless the caller opted to tolerate it.
  573|      0|         if(m_limits.allow_standalone_eoc()) {
  ------------------
  |  Branch (573:13): [True: 0, False: 0]
  ------------------
  574|      0|            continue;
  575|      0|         }
  576|      0|         throw BER_Decoding_Error("Encountered EOC marker outside of indefinite-length encoding");
  577|      0|      }
  578|       |
  579|  7.14k|      break;
  580|  7.15k|   }
  581|       |
  582|  7.14k|   return next;
  583|  7.29k|}
_ZN5Botan11BER_Decoder10start_consENS_9ASN1_TypeENS_10ASN1_ClassE:
  614|  4.02k|BER_Decoder BER_Decoder::start_cons(ASN1_Type type_tag, ASN1_Class class_tag) {
  615|  4.02k|   BER_Object obj = get_next_object();
  616|  4.02k|   obj.assert_is_a(type_tag, class_tag | ASN1_Class::Constructed);
  617|       |
  618|       |   // In DER mode the elements of a universal SET must appear in sorted order
  619|  4.02k|   if(m_limits.require_der_encoding() && type_tag == ASN1_Type::Set && class_tag == ASN1_Class::Universal) {
  ------------------
  |  Branch (619:7): [True: 3.62k, False: 404]
  |  Branch (619:42): [True: 917, False: 2.70k]
  |  Branch (619:72): [True: 917, False: 0]
  ------------------
  620|    917|      verify_set_is_sorted(std::span<const uint8_t>{obj.bits(), obj.length()});
  621|    917|   }
  622|       |
  623|  4.02k|   BER_Decoder child(std::move(obj), this);
  624|  4.02k|   return child;
  625|  4.02k|}
_ZN5Botan11BER_Decoder8end_consEv:
  630|  2.40k|BER_Decoder& BER_Decoder::end_cons() {
  631|  2.40k|   if(m_parent == nullptr) {
  ------------------
  |  Branch (631:7): [True: 0, False: 2.40k]
  ------------------
  632|      0|      throw Invalid_State("BER_Decoder::end_cons called with null parent");
  633|      0|   }
  634|  2.40k|   if(!m_source->end_of_data() || m_pushed.is_set()) {
  ------------------
  |  Branch (634:7): [True: 23, False: 2.37k]
  |  Branch (634:35): [True: 0, False: 2.37k]
  ------------------
  635|     23|      throw Decoding_Error("BER_Decoder::end_cons called with data left");
  636|     23|   }
  637|  2.37k|   return (*m_parent);
  638|  2.40k|}
_ZN5Botan11BER_DecoderC2EONS_10BER_ObjectEPS0_:
  641|  3.42k|      m_limits(parent != nullptr ? parent->limits() : BER_Decoder::Limits::BER()), m_parent(parent) {
  ------------------
  |  Branch (641:16): [True: 3.42k, False: 0]
  ------------------
  642|  3.42k|   m_data_src = std::make_unique<DataSource_BERObject>(std::move(obj));
  643|  3.42k|   m_source = m_data_src.get();
  644|  3.42k|}
_ZN5Botan11BER_DecoderC2ENSt3__14spanIKhLm18446744073709551615EEENS0_6LimitsE:
  659|  2.45k|BER_Decoder::BER_Decoder(std::span<const uint8_t> buf, Limits limits) : m_limits(limits) {
  660|  2.45k|   m_data_src = std::make_unique<DataSource_Memory>(buf);
  661|  2.45k|   m_source = m_data_src.get();
  662|  2.45k|}
_ZN5Botan11BER_Decoder6decodeERNS_11ASN1_ObjectENS_9ASN1_TypeENS_10ASN1_ClassE:
  671|  4.67k|BER_Decoder& BER_Decoder::decode(ASN1_Object& obj, ASN1_Type type_tag, ASN1_Class class_tag) {
  672|       |   // TODO support this case properly
  673|  4.67k|   if(type_tag != ASN1_Type::NoObject || class_tag != ASN1_Class::NoObject) {
  ------------------
  |  Branch (673:7): [True: 0, False: 4.67k]
  |  Branch (673:42): [True: 0, False: 4.67k]
  ------------------
  674|      0|      throw Not_Implemented("BER_Decoder::decode(ASN1_Object) does not support implicit tagged decoding");
  675|      0|   }
  676|  4.67k|   obj.decode_from(*this);
  677|  4.67k|   return (*this);
  678|  4.67k|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_110decode_tagEPNS_10DataSourceERNS_9ASN1_TypeERNS_10ASN1_ClassE:
   29|  7.29k|size_t decode_tag(DataSource* ber, ASN1_Type& type_tag, ASN1_Class& class_tag) {
   30|  7.29k|   auto b = ber->read_byte();
   31|       |
   32|  7.29k|   if(!b) {
  ------------------
  |  Branch (32:7): [True: 4, False: 7.28k]
  ------------------
   33|      4|      type_tag = ASN1_Type::NoObject;
   34|      4|      class_tag = ASN1_Class::NoObject;
   35|      4|      return 0;
   36|      4|   }
   37|       |
   38|  7.28k|   if((*b & 0x1F) != 0x1F) {
  ------------------
  |  Branch (38:7): [True: 6.98k, False: 297]
  ------------------
   39|  6.98k|      type_tag = ASN1_Type(*b & 0x1F);
   40|  6.98k|      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|  6.98k|      if(type_tag == ASN1_Type::Eoc && class_tag == ASN1_Class::Constructed) {
  ------------------
  |  Branch (44:10): [True: 62, False: 6.92k]
  |  Branch (44:40): [True: 2, False: 60]
  ------------------
   45|      2|         throw BER_Decoding_Error("EOC tag with constructed encoding");
   46|      2|      }
   47|  6.98k|      return 1;
   48|  6.98k|   }
   49|       |
   50|    297|   size_t tag_bytes = 1;
   51|    297|   class_tag = ASN1_Class(*b & 0xE0);
   52|       |
   53|    297|   uint32_t tag_buf = 0;
   54|  1.11k|   while(true) {
  ------------------
  |  Branch (54:10): [True: 1.11k, Folded]
  ------------------
   55|  1.11k|      b = ber->read_byte();
   56|  1.11k|      if(!b) {
  ------------------
  |  Branch (56:10): [True: 8, False: 1.10k]
  ------------------
   57|      8|         throw BER_Decoding_Error("Long-form tag truncated");
   58|      8|      }
   59|       |      // Reject if shifting in another 7 bits would overflow the uint32_t tag
   60|  1.10k|      if((tag_buf >> 25) != 0) {
  ------------------
  |  Branch (60:10): [True: 10, False: 1.09k]
  ------------------
   61|     10|         throw BER_Decoding_Error("Long-form tag overflowed 32 bits");
   62|     10|      }
   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.09k|      if(tag_bytes == 1 && (*b & 0x7F) == 0) {
  ------------------
  |  Branch (67:10): [True: 295, False: 802]
  |  Branch (67:28): [True: 2, False: 293]
  ------------------
   68|      2|         throw BER_Decoding_Error("Long form tag with leading zero");
   69|      2|      }
   70|  1.09k|      ++tag_bytes;
   71|  1.09k|      tag_buf = (tag_buf << 7) | (*b & 0x7F);
   72|  1.09k|      if((*b & 0x80) == 0) {
  ------------------
  |  Branch (72:10): [True: 277, False: 818]
  ------------------
   73|    277|         break;
   74|    277|      }
   75|  1.09k|   }
   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|    277|   if(tag_buf <= 30) {
  ------------------
  |  Branch (79:7): [True: 6, False: 271]
  ------------------
   80|      6|      throw BER_Decoding_Error("Long-form tag encoding used for small tag value");
   81|      6|   }
   82|       |
   83|    271|   if(tag_buf == static_cast<uint32_t>(ASN1_Type::NoObject)) {
  ------------------
  |  Branch (83:7): [True: 1, False: 270]
  ------------------
   84|      1|      throw BER_Decoding_Error("Tag value collides with internal sentinel");
   85|      1|   }
   86|       |
   87|       |   // NOLINTNEXTLINE(clang-analyzer-optin.core.EnumCastOutOfRange)
   88|    270|   type_tag = ASN1_Type(tag_buf);
   89|    270|   return tag_bytes;
   90|    271|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_113decode_lengthEPNS_10DataSourceEmbb:
  135|  7.25k|BerDecodedLength decode_length(DataSource* ber, size_t allow_indef, bool der_mode, bool constructed) {
  136|  7.25k|   uint8_t b = 0;
  137|  7.25k|   if(ber->read_byte(b) == 0) {
  ------------------
  |  Branch (137:7): [True: 59, False: 7.19k]
  ------------------
  138|     59|      throw BER_Decoding_Error("Length field not found");
  139|     59|   }
  140|  7.19k|   if((b & 0x80) == 0) {
  ------------------
  |  Branch (140:7): [True: 7.02k, False: 172]
  ------------------
  141|  7.02k|      return BerDecodedLength(b, 1);
  142|  7.02k|   }
  143|       |
  144|    172|   const size_t num_length_bytes = (b & 0x7F);
  145|    172|   if(num_length_bytes > 4) {
  ------------------
  |  Branch (145:7): [True: 18, False: 154]
  ------------------
  146|     18|      throw BER_Decoding_Error("Length field is too large");
  147|     18|   }
  148|       |
  149|    154|   const size_t field_size = 1 + num_length_bytes;
  150|       |
  151|    154|   if(num_length_bytes == 0) {
  ------------------
  |  Branch (151:7): [True: 14, False: 140]
  ------------------
  152|     14|      if(der_mode) {
  ------------------
  |  Branch (152:10): [True: 14, False: 0]
  ------------------
  153|     14|         throw BER_Decoding_Error("Detected indefinite-length encoding in DER structure");
  154|     14|      } 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|     14|   }
  169|       |
  170|    140|   size_t length = 0;
  171|       |
  172|    528|   for(size_t i = 0; i != num_length_bytes; ++i) {
  ------------------
  |  Branch (172:22): [True: 391, False: 137]
  ------------------
  173|    391|      if(ber->read_byte(b) == 0) {
  ------------------
  |  Branch (173:10): [True: 3, False: 388]
  ------------------
  174|      3|         throw BER_Decoding_Error("Corrupted length field");
  175|      3|      }
  176|       |      // Can't overflow since we already checked that num_length_bytes <= 4
  177|    388|      length = (length << 8) | b;
  178|    388|   }
  179|       |
  180|       |   // DER requires shortest possible length encoding
  181|    137|   if(der_mode) {
  ------------------
  |  Branch (181:7): [True: 137, False: 0]
  ------------------
  182|    137|      if(length < 128) {
  ------------------
  |  Branch (182:10): [True: 8, False: 129]
  ------------------
  183|      8|         throw BER_Decoding_Error("Detected non-canonical length encoding in DER structure");
  184|      8|      }
  185|    129|      if(num_length_bytes > 1 && length < (size_t(1) << ((num_length_bytes - 1) * 8))) {
  ------------------
  |  Branch (185:10): [True: 107, False: 22]
  |  Branch (185:34): [True: 1, False: 106]
  ------------------
  186|      1|         throw BER_Decoding_Error("Detected non-canonical length encoding in DER structure");
  187|      1|      }
  188|    129|   }
  189|       |
  190|    128|   return BerDecodedLength(length, field_size);
  191|    137|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_116BerDecodedLengthC2Emm:
  108|  7.15k|            BerDecodedLength(content_length, field_length, false) {}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_116BerDecodedLengthC2Emmb:
  125|  7.15k|            m_content_length(content_length), m_field_length(field_length), m_indefinite(indefinite) {}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_18peek_tagEPNS_10DataSourceEmRNS_9ASN1_TypeERNS_10ASN1_ClassE:
  197|  2.60k|size_t peek_tag(DataSource* src, size_t offset, ASN1_Type& type_tag, ASN1_Class& class_tag) {
  198|  2.60k|   uint8_t b = 0;
  199|  2.60k|   if(src->peek(&b, 1, offset) == 0) {
  ------------------
  |  Branch (199:7): [True: 0, False: 2.60k]
  ------------------
  200|      0|      type_tag = ASN1_Type::NoObject;
  201|      0|      class_tag = ASN1_Class::NoObject;
  202|      0|      return 0;
  203|      0|   }
  204|       |
  205|  2.60k|   if((b & 0x1F) != 0x1F) {
  ------------------
  |  Branch (205:7): [True: 2.33k, False: 277]
  ------------------
  206|  2.33k|      type_tag = ASN1_Type(b & 0x1F);
  207|  2.33k|      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.33k|      if(type_tag == ASN1_Type::Eoc && class_tag == ASN1_Class::Constructed) {
  ------------------
  |  Branch (211:10): [True: 250, False: 2.08k]
  |  Branch (211:40): [True: 2, False: 248]
  ------------------
  212|      2|         throw BER_Decoding_Error("EOC tag with constructed encoding");
  213|      2|      }
  214|  2.33k|      return 1;
  215|  2.33k|   }
  216|       |
  217|    277|   class_tag = ASN1_Class(b & 0xE0);
  218|    277|   size_t tag_bytes = 1;
  219|    277|   uint32_t tag_buf = 0;
  220|       |
  221|    722|   while(true) {
  ------------------
  |  Branch (221:10): [True: 722, Folded]
  ------------------
  222|    722|      if(src->peek(&b, 1, offset + tag_bytes) == 0) {
  ------------------
  |  Branch (222:10): [True: 5, False: 717]
  ------------------
  223|      5|         throw BER_Decoding_Error("Long-form tag truncated");
  224|      5|      }
  225|       |      // Reject if shifting in another 7 bits would overflow the uint32_t tag
  226|    717|      if((tag_buf >> 25) != 0) {
  ------------------
  |  Branch (226:10): [True: 11, False: 706]
  ------------------
  227|     11|         throw BER_Decoding_Error("Long-form tag overflowed 32 bits");
  228|     11|      }
  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|    706|      if(tag_bytes == 1 && (b & 0x7F) == 0) {
  ------------------
  |  Branch (233:10): [True: 275, False: 431]
  |  Branch (233:28): [True: 2, False: 273]
  ------------------
  234|      2|         throw BER_Decoding_Error("Long form tag with leading zero");
  235|      2|      }
  236|    704|      ++tag_bytes;
  237|    704|      tag_buf = (tag_buf << 7) | (b & 0x7F);
  238|    704|      if((b & 0x80) == 0) {
  ------------------
  |  Branch (238:10): [True: 259, False: 445]
  ------------------
  239|    259|         break;
  240|    259|      }
  241|    704|   }
  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|    259|   if(tag_buf <= 30) {
  ------------------
  |  Branch (246:7): [True: 5, False: 254]
  ------------------
  247|      5|      throw BER_Decoding_Error("Long-form tag encoding used for small tag value");
  248|      5|   }
  249|       |
  250|    254|   if(tag_buf == static_cast<uint32_t>(ASN1_Type::NoObject)) {
  ------------------
  |  Branch (250:7): [True: 1, False: 253]
  ------------------
  251|      1|      throw BER_Decoding_Error("Tag value collides with internal sentinel");
  252|      1|   }
  253|       |
  254|       |   // NOLINTNEXTLINE(clang-analyzer-optin.core.EnumCastOutOfRange)
  255|    253|   type_tag = ASN1_Type(tag_buf);
  256|    253|   return tag_bytes;
  257|    254|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_111peek_lengthEPNS_10DataSourceEmRmmbb:
  265|  2.58k|   DataSource* src, size_t offset, size_t& field_size, size_t allow_indef, bool constructed, bool der_mode) {
  266|  2.58k|   uint8_t b = 0;
  267|  2.58k|   if(src->peek(&b, 1, offset) == 0) {
  ------------------
  |  Branch (267:7): [True: 10, False: 2.57k]
  ------------------
  268|     10|      throw BER_Decoding_Error("Length field not found");
  269|     10|   }
  270|       |
  271|  2.57k|   field_size = 1;
  272|  2.57k|   if((b & 0x80) == 0) {
  ------------------
  |  Branch (272:7): [True: 2.44k, False: 130]
  ------------------
  273|  2.44k|      return b;
  274|  2.44k|   }
  275|       |
  276|    130|   const size_t num_length_bytes = (b & 0x7F);
  277|    130|   field_size += num_length_bytes;
  278|    130|   if(field_size > 5) {
  ------------------
  |  Branch (278:7): [True: 21, False: 109]
  ------------------
  279|     21|      throw BER_Decoding_Error("Length field is too large");
  280|     21|   }
  281|       |
  282|    109|   if(num_length_bytes == 0) {
  ------------------
  |  Branch (282:7): [True: 2, False: 107]
  ------------------
  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|    107|   size_t length = 0;
  298|    407|   for(size_t i = 0; i < num_length_bytes; ++i) {
  ------------------
  |  Branch (298:22): [True: 304, False: 103]
  ------------------
  299|    304|      if(src->peek(&b, 1, offset + 1 + i) == 0) {
  ------------------
  |  Branch (299:10): [True: 4, False: 300]
  ------------------
  300|      4|         throw BER_Decoding_Error("Corrupted length field");
  301|      4|      }
  302|    300|      if(get_byte<0>(length) != 0) {
  ------------------
  |  Branch (302:10): [True: 0, False: 300]
  ------------------
  303|      0|         throw BER_Decoding_Error("Field length overflow");
  304|      0|      }
  305|    300|      length = (length << 8) | b;
  306|    300|   }
  307|    103|   return length;
  308|    107|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_114is_constructedENS_10ASN1_ClassE:
   22|  9.84k|bool is_constructed(ASN1_Class class_tag) {
   23|  9.84k|   return (static_cast<uint32_t>(class_tag) & static_cast<uint32_t>(ASN1_Class::Constructed)) != 0;
   24|  9.84k|}
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_116BerDecodedLength14content_lengthEv:
  114|  28.2k|      size_t content_length() const { return m_content_length; }
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_116BerDecodedLength17indefinite_lengthEv:
  121|  7.02k|      bool indefinite_length() const { return m_indefinite; }
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_116BerDecodedLength12total_lengthEv:
  117|  7.09k|      size_t total_length() const { return m_indefinite ? m_content_length + 2 : m_content_length; }
  ------------------
  |  Branch (117:44): [True: 0, False: 7.09k]
  ------------------
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_120verify_set_is_sortedENSt3__14spanIKhLm18446744073709551615EEE:
  426|    917|void verify_set_is_sorted(std::span<const uint8_t> content) {
  427|    917|   DataSource_Span src(content);
  428|    917|   size_t offset = 0;
  429|    917|   std::optional<std::span<const uint8_t>> prev;
  430|       |
  431|  3.39k|   while(offset < content.size()) {
  ------------------
  |  Branch (431:10): [True: 2.60k, False: 786]
  ------------------
  432|  2.60k|      ASN1_Type type_tag = ASN1_Type::NoObject;
  433|  2.60k|      ASN1_Class class_tag = ASN1_Class::NoObject;
  434|  2.60k|      const size_t tag_size = peek_tag(&src, offset, type_tag, class_tag);
  435|       |
  436|  2.60k|      size_t length_size = 0;
  437|  2.60k|      const size_t item_size =
  438|  2.60k|         peek_length(&src, offset + tag_size, length_size, /*allow_indef=*/0, is_constructed(class_tag), true);
  439|       |
  440|  2.60k|      const auto end = checked_add(offset, tag_size, length_size, item_size);
  441|  2.60k|      if(!end || *end > content.size()) {
  ------------------
  |  Branch (441:10): [True: 63, False: 2.54k]
  |  Branch (441:18): [True: 70, False: 2.47k]
  ------------------
  442|     70|         throw BER_Decoding_Error("SET element exceeds available data");
  443|     70|      }
  444|       |
  445|  2.53k|      const auto elem = content.subspan(offset, *end - offset);
  446|  2.53k|      if(prev && std::lexicographical_compare(elem.begin(), elem.end(), prev->begin(), prev->end())) {
  ------------------
  |  Branch (446:10): [True: 1.58k, False: 955]
  |  Branch (446:18): [True: 61, False: 1.52k]
  ------------------
  447|     61|         throw BER_Decoding_Error("Detected unsorted SET in DER structure");
  448|     61|      }
  449|  2.47k|      prev = elem;
  450|  2.47k|      offset = *end;
  451|  2.47k|   }
  452|    917|}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_115DataSource_SpanC2ENSt3__14spanIKhLm18446744073709551615EEE:
  414|    917|      explicit DataSource_Span(std::span<const uint8_t> buf) : m_buf(buf) {}
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_115DataSource_Span4peekEPhmm:
  399|  6.21k|      size_t peek(uint8_t out[], size_t length, size_t peek_offset) const override {
  400|  6.21k|         if(peek_offset >= m_buf.size() - m_offset) {
  ------------------
  |  Branch (400:13): [True: 19, False: 6.19k]
  ------------------
  401|     19|            return 0;
  402|     19|         }
  403|  6.19k|         const size_t got = std::min(m_buf.size() - m_offset - peek_offset, length);
  404|  6.19k|         copy_mem(out, m_buf.data() + m_offset + peek_offset, got);
  405|  6.19k|         return got;
  406|  6.21k|      }
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_120DataSource_BERObjectC2EONS_10BER_ObjectE:
  379|  3.42k|      explicit DataSource_BERObject(BER_Object&& obj) : m_obj(std::move(obj)) {}
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_120DataSource_BERObject4readEPhm:
  349|  61.9k|      size_t read(uint8_t out[], size_t length) override {
  350|  61.9k|         BOTAN_ASSERT_NOMSG(m_offset <= m_obj.length());
  ------------------
  |  |   77|  61.9k|   do {                                                                     \
  |  |   78|  61.9k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  61.9k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 61.9k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  61.9k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 61.9k]
  |  |  ------------------
  ------------------
  351|  61.9k|         const size_t got = std::min<size_t>(m_obj.length() - m_offset, length);
  352|  61.9k|         copy_mem(out, m_obj.bits() + m_offset, got);
  353|  61.9k|         m_offset += got;
  354|  61.9k|         return got;
  355|  61.9k|      }
ber_dec.cpp:_ZN5Botan12_GLOBAL__N_120DataSource_BERObject15check_availableEm:
  370|  4.92k|      bool check_available(size_t n) override {
  371|  4.92k|         BOTAN_ASSERT_NOMSG(m_offset <= m_obj.length());
  ------------------
  |  |   77|  4.92k|   do {                                                                     \
  |  |   78|  4.92k|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|  4.92k|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 4.92k]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|  4.92k|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83:12): [Folded, False: 4.92k]
  |  |  ------------------
  ------------------
  372|  4.92k|         return (n <= (m_obj.length() - m_offset));
  373|  4.92k|      }
ber_dec.cpp:_ZNK5Botan12_GLOBAL__N_120DataSource_BERObject11end_of_dataEv:
  375|  4.46k|      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.46k|      size_t get_bytes_read() const override { return m_offset; }

_ZN5Botan11DER_EncoderC2ERNSt3__16vectorIhNS1_9allocatorIhEEEE:
   89|  1.20k|DER_Encoder::DER_Encoder(std::vector<uint8_t>& vec) {
   90|  1.20k|   m_append_output = [&vec](const uint8_t b[], size_t l) {
   91|  1.20k|      if(l > 0) {
   92|  1.20k|         vec.insert(vec.end(), b, b + l);
   93|  1.20k|      }
   94|  1.20k|   };
   95|  1.20k|}
_ZN5Botan11DER_Encoder10add_objectENS_9ASN1_TypeENS_10ASN1_ClassEPKhm:
  285|  1.20k|DER_Encoder& DER_Encoder::add_object(ASN1_Type type_tag, ASN1_Class class_tag, const uint8_t rep[], size_t length) {
  286|  1.20k|   std::vector<uint8_t> hdr;
  287|  1.20k|   encode_tag(hdr, type_tag, class_tag);
  288|  1.20k|   encode_length(hdr, length);
  289|       |
  290|  1.20k|   if(!m_subsequences.empty()) {
  ------------------
  |  Branch (290:7): [True: 0, False: 1.20k]
  ------------------
  291|      0|      m_subsequences[m_subsequences.size() - 1].add_bytes(hdr.data(), hdr.size(), rep, length);
  292|  1.20k|   } else if(m_append_output) {
  ------------------
  |  Branch (292:14): [True: 1.20k, False: 0]
  ------------------
  293|  1.20k|      m_append_output(hdr.data(), hdr.size());
  294|  1.20k|      m_append_output(rep, length);
  295|  1.20k|   } else {
  296|      0|      m_default_outbuf += hdr;
  297|      0|      m_default_outbuf += std::make_pair(rep, length);
  298|      0|   }
  299|       |
  300|  1.20k|   return (*this);
  301|  1.20k|}
der_enc.cpp:_ZN5Botan12_GLOBAL__N_110encode_tagERNSt3__16vectorIhNS1_9allocatorIhEEEENS_9ASN1_TypeENS_10ASN1_ClassE:
   26|  1.20k|void encode_tag(std::vector<uint8_t>& encoded_tag, ASN1_Type type_tag_e, ASN1_Class class_tag_e) {
   27|  1.20k|   const uint32_t type_tag = static_cast<uint32_t>(type_tag_e);
   28|  1.20k|   const uint32_t class_tag = static_cast<uint32_t>(class_tag_e);
   29|       |
   30|  1.20k|   if((class_tag | 0xE0) != 0xE0) {
  ------------------
  |  Branch (30:7): [True: 0, False: 1.20k]
  ------------------
   31|      0|      throw Encoding_Error(fmt("DER_Encoder: Invalid class tag {}", std::to_string(class_tag)));
   32|      0|   }
   33|       |
   34|  1.20k|   if(type_tag <= 30) {
  ------------------
  |  Branch (34:7): [True: 1.20k, False: 0]
  ------------------
   35|  1.20k|      encoded_tag.push_back(static_cast<uint8_t>(type_tag | class_tag));
   36|  1.20k|   } 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);
  ------------------
  |  |   77|      0|   do {                                                                     \
  |  |   78|      0|      /* NOLINTNEXTLINE(*-simplify-boolean-expr) */                         \
  |  |   79|      0|      if(!(expr)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (79:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   80|      0|         /* NOLINTNEXTLINE(bugprone-lambda-function-name) */                \
  |  |   81|      0|         Botan::assertion_failure(#expr, "", __func__, __FILE__, __LINE__); \
  |  |   82|      0|      }                                                                     \
  |  |   83|      0|   } while(0)
  |  |  ------------------
  |  |  |  Branch (83: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.20k|}
der_enc.cpp:_ZN5Botan12_GLOBAL__N_113encode_lengthERNSt3__16vectorIhNS1_9allocatorIhEEEEm:
   53|  1.20k|void encode_length(std::vector<uint8_t>& encoded_length, size_t length) {
   54|  1.20k|   if(length <= 127) {
  ------------------
  |  Branch (54:7): [True: 1.20k, False: 0]
  ------------------
   55|  1.20k|      encoded_length.push_back(static_cast<uint8_t>(length));
   56|  1.20k|   } 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.20k|}
der_enc.cpp:_ZZN5Botan11DER_EncoderC1ERNSt3__16vectorIhNS1_9allocatorIhEEEEENK3$_0clEPKhm:
   90|  2.40k|   m_append_output = [&vec](const uint8_t b[], size_t l) {
   91|  2.40k|      if(l > 0) {
  ------------------
  |  Branch (91:10): [True: 2.40k, False: 0]
  ------------------
   92|  2.40k|         vec.insert(vec.end(), b, b + l);
   93|  2.40k|      }
   94|  2.40k|   };

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

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

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

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

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

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

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

_ZN5Botan3TLS9Key_ShareC2ERNS0_15TLS_Data_ReaderEtNS0_14Handshake_TypeE:
  377|     85|Key_Share::Key_Share(TLS_Data_Reader& reader, uint16_t extension_size, Handshake_Type message_type) {
  378|     85|   if(message_type == Handshake_Type::ClientHello) {
  ------------------
  |  Branch (378:7): [True: 85, False: 0]
  ------------------
  379|     85|      m_impl = std::make_unique<Key_Share_Impl>(Key_Share_ClientHello(reader, extension_size));
  380|     85|   } else if(message_type == Handshake_Type::HelloRetryRequest) {
  ------------------
  |  Branch (380:14): [True: 0, False: 0]
  ------------------
  381|       |      // Connection_Side::Server
  382|      0|      m_impl = std::make_unique<Key_Share_Impl>(Key_Share_HelloRetryRequest(reader, extension_size));
  383|      0|   } else if(message_type == Handshake_Type::ServerHello) {
  ------------------
  |  Branch (383:14): [True: 0, False: 0]
  ------------------
  384|       |      // Connection_Side::Server
  385|      0|      m_impl = std::make_unique<Key_Share_Impl>(Key_Share_ServerHello(reader, extension_size));
  386|      0|   } else {
  387|      0|      throw Invalid_Argument(std::string("cannot create a Key_Share extension for message of type: ") +
  388|      0|                             handshake_type_to_string(message_type));
  389|      0|   }
  390|     85|}
_ZN5Botan3TLS9Key_ShareD2Ev:
  409|     17|Key_Share::~Key_Share() = default;
tls_extensions_key_share.cpp:_ZN5Botan3TLS12_GLOBAL__N_121Key_Share_ClientHelloC2ERNS0_15TLS_Data_ReaderEt:
  161|     85|      Key_Share_ClientHello(TLS_Data_Reader& reader, uint16_t /* extension_size */) {
  162|       |         // The reader is per-extension (Extensions::deserialize binds it to
  163|       |         // exactly extension_size bytes). Enforce that the inner
  164|       |         // client_shares length matches what the outer extension has left,
  165|       |         // then let the entry loop consume everything; extn_reader's
  166|       |         // assert_done() at the deserialize call site catches any leftover.
  167|     85|         const auto client_key_share_length = reader.get_uint16_t();
  168|     85|         if(reader.remaining_bytes() != client_key_share_length) {
  ------------------
  |  Branch (168:13): [True: 19, False: 66]
  ------------------
  169|     19|            throw TLS_Exception(Alert::DecodeError, "Inconsistent length in client KeyShare extension");
  170|     19|         }
  171|       |
  172|     66|         std::unordered_set<uint16_t> seen_groups;
  173|    372|         while(reader.has_remaining()) {
  ------------------
  |  Branch (173:16): [True: 320, False: 52]
  ------------------
  174|       |            // Each KeyShareEntry is at least 4 bytes (group + 2-byte length).
  175|       |            // Cleaner failure than the reader underflow we'd otherwise hit
  176|       |            // when the inner buffer ends mid-entry.
  177|    320|            if(reader.remaining_bytes() < 4) {
  ------------------
  |  Branch (177:16): [True: 12, False: 308]
  ------------------
  178|     12|               throw TLS_Exception(Alert::DecodeError, "Not enough data to read another KeyShareEntry");
  179|     12|            }
  180|       |
  181|    308|            Key_Share_Entry new_entry(reader);
  182|       |
  183|       |            // RFC 8446 4.2.8
  184|       |            //    Clients MUST NOT offer multiple KeyShareEntry values for the same
  185|       |            //    group. [...]
  186|       |            //    Servers MAY check for violations of these rules and abort the
  187|       |            //    handshake with an "illegal_parameter" alert if one is violated.
  188|    308|            if(!seen_groups.insert(new_entry.group().wire_code()).second) {
  ------------------
  |  Branch (188:16): [True: 2, False: 306]
  ------------------
  189|      2|               throw TLS_Exception(Alert::IllegalParameter, "Received multiple key share entries for the same group");
  190|      2|            }
  191|       |
  192|    306|            m_client_shares.emplace_back(std::move(new_entry));
  193|    306|         }
  194|     66|      }
tls_extensions_key_share.cpp:_ZN5Botan3TLS12_GLOBAL__N_115Key_Share_EntryC2ERNS0_15TLS_Data_ReaderE:
   47|    308|      explicit Key_Share_Entry(TLS_Data_Reader& reader) {
   48|       |         // TODO check that the group actually exists before casting...
   49|    308|         m_group = static_cast<Named_Group>(reader.get_uint16_t());
   50|       |         // RFC 8446 4.2.8: opaque key_exchange<1..2^16-1>
   51|    308|         m_key_exchange = reader.get_range<uint8_t>(2, 1, 65535);
   52|    308|      }
tls_extensions_key_share.cpp:_ZNK5Botan3TLS12_GLOBAL__N_115Key_Share_Entry5groupEv:
   81|    274|      Named_Group group() const { return m_group; }
tls_extensions_key_share.cpp:_ZN5Botan3TLS12_GLOBAL__N_121Key_Share_ClientHelloD2Ev:
  219|     51|      ~Key_Share_ClientHello() = default;
tls_extensions_key_share.cpp:_ZN5Botan3TLS12_GLOBAL__N_121Key_Share_ClientHelloC2EOS2_:
  224|     34|      Key_Share_ClientHello(Key_Share_ClientHello&&) = default;
tls_extensions_key_share.cpp:_ZN5Botan3TLS9Key_Share14Key_Share_ImplC2ENSt3__17variantIJNS0_12_GLOBAL__N_121Key_Share_ClientHelloENS5_21Key_Share_ServerHelloENS5_27Key_Share_HelloRetryRequestEEEE:
  372|     17|      explicit Key_Share_Impl(Key_Share_Type ks) : key_share(std::move(ks)) {}

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

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

_ZN5Botan3TLS26Certificate_Status_RequestC2ERNS0_15TLS_Data_ReaderEtNS0_14Handshake_TypeENS0_15Connection_SideE:
  104|    106|                                                       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|    106|   if(message_type == Handshake_Type::ClientHello) {
  ------------------
  |  Branch (123:7): [True: 106, False: 0]
  ------------------
  124|    106|      m_impl = std::make_unique<Certificate_Status_Request_Internal>(
  125|    106|         RFC6066_Certificate_Status_Request(reader, extension_size));
  126|    106|   }
  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|    106|}
_ZN5Botan3TLS26Certificate_Status_RequestD2Ev:
  176|     44|Certificate_Status_Request::~Certificate_Status_Request() = default;
tls_extensions_cert_status_req.cpp:_ZN5Botan3TLS12_GLOBAL__N_134RFC6066_Certificate_Status_RequestC2ERNS0_15TLS_Data_ReaderEt:
   38|    106|      RFC6066_Certificate_Status_Request(TLS_Data_Reader& reader, uint16_t extension_size) {
   39|    106|         if(extension_size == 0) {
  ------------------
  |  Branch (39:13): [True: 1, False: 105]
  ------------------
   40|      1|            throw Decoding_Error("Received an unexpectedly empty Certificate_Status_Request");
   41|      1|         }
   42|       |
   43|    105|         const uint8_t type = reader.get_byte();
   44|    105|         if(type == 1 /* ocsp */) {
  ------------------
  |  Branch (44:13): [True: 82, False: 23]
  ------------------
   45|       |            // RFC 6066 Section 8: OCSP CertificateStatusRequest is
   46|       |            //    ResponderID responder_id_list<0..2^16-1>;
   47|       |            //    Extensions  request_extensions;
   48|       |            //
   49|       |            // for a total wire size of 1 (status_type) + 2 (resp_id_list len)
   50|       |            //   + len_resp_id_list + 2 (request_ext len) + len_requ_ext.
   51|     82|            if(extension_size < 5) {
  ------------------
  |  Branch (51:16): [True: 4, False: 78]
  ------------------
   52|      4|               throw Decoding_Error("Truncated OCSP CertificateStatusRequest");
   53|      4|            }
   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: 17, False: 61]
  ------------------
   56|     17|               throw Decoding_Error("Inconsistent length in OCSP CertificateStatusRequest");
   57|     17|            }
   58|     61|            ocsp_names = reader.get_fixed<uint8_t>(len_resp_id_list);
   59|     61|            const size_t len_requ_ext = reader.get_uint16_t();
   60|     61|            if(len_resp_id_list + len_requ_ext + 5 != extension_size) {
  ------------------
  |  Branch (60:16): [True: 40, False: 21]
  ------------------
   61|     40|               throw Decoding_Error("Inconsistent length in OCSP CertificateStatusRequest");
   62|     40|            }
   63|     21|            extension_bytes = reader.get_fixed<uint8_t>(len_requ_ext);
   64|     23|         } else {
   65|       |            // RFC 6066 does not specify anything but 'ocsp' and we
   66|       |            // don't support anything else either.
   67|     23|            reader.discard_next(extension_size - 1);
   68|     23|         }
   69|    105|      }
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|     44|      explicit Certificate_Status_Request_Internal(Contents c) : content(std::move(c)) {}

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

_ZN5Botan3TLS16Signature_SchemeC2Et:
  103|  6.01k|Signature_Scheme::Signature_Scheme(uint16_t wire_code) : Signature_Scheme(Signature_Scheme::Code(wire_code)) {}
_ZN5Botan3TLS16Signature_SchemeC2ENS1_4CodeE:
  105|  6.01k|Signature_Scheme::Signature_Scheme(Signature_Scheme::Code wire_code) : m_code(wire_code) {}

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

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

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

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

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

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

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

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

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

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

